/* Thread author panel */
.thread-title-card,
.thread-post-card {
    background: #ffffff;
    border-color: rgba(203, 213, 225, 0.78);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055), 0 1px 2px rgba(15, 23, 42, 0.045);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body.theme-default #forum-top-bar {
    background: transparent !important;
    box-shadow: none;
}

body.theme-default #forum-top-bar > div:first-child,
body.theme-default #forum-top-bar > div:nth-child(2) {
    background: transparent !important;
    border-bottom: 0;
}

body.theme-default #forum-top-bar > div:first-child > .forum-layout-container {
    background: var(--forum-header-bg);
    border-bottom: 1px solid color-mix(in srgb, var(--forum-accent-color, #38bdf8) 28%, transparent);
}

body.theme-default #forum-top-bar > div:nth-child(2) > .forum-layout-container {
    background: color-mix(in srgb, var(--forum-accent-color, #38bdf8) 18%, #eef7f8);
    border-bottom: 1px solid color-mix(in srgb, var(--forum-accent-color, #38bdf8) 22%, transparent);
}

.dark body.theme-default #forum-top-bar > div:first-child > .forum-layout-container {
    background: var(--forum-header-dark-bg);
    border-bottom-color: color-mix(in srgb, var(--forum-accent-color, #38bdf8) 24%, rgba(255, 255, 255, 0.08));
}

.dark body.theme-default #forum-top-bar > div:nth-child(2) > .forum-layout-container {
    background: color-mix(in srgb, var(--forum-accent-color, #38bdf8) 16%, #111c23);
    border-bottom-color: color-mix(in srgb, var(--forum-accent-color, #38bdf8) 18%, rgba(255, 255, 255, 0.06));
}

.custom-forum-shell,
.custom-forum-cat-group,
.custom-forum-row,
.category-thread-row,
.category-thread-list-header {
    box-sizing: border-box;
    max-width: 100%;
}

/* Default theme color overrides */
body.theme-default .custom-forum-cat-group {
    border-color: #c9d8e6;
    background: #f7fbfe;
    box-shadow: 0 14px 32px rgba(35, 57, 86, 0.08);
}

body.theme-default .custom-forum-cat-header {
    background: #dbe9f3;
    border-color: #c6d8e8;
}

body.theme-default .custom-forum-cat-header h2 {
    color: #1f344f;
}

body.theme-default .custom-forum-cat-header p {
    color: #5b7189;
}

body.theme-default .custom-forum-cat-count {
    background: #f3f8fe;
    color: #275cc7;
}

body.theme-default .custom-forum-cat-icon,
body.theme-default .custom-forum-icon-bubble {
    background: transparent;
    color: #275cc7;
}

body.theme-default .custom-forum-row {
    background: #fbfdff;
    border-color: #d8e4ee;
}

body.theme-default .custom-forum-row:hover {
    background: #f1f7fb;
}

body.theme-default .custom-forum-title-link,
body.theme-default .custom-forum-stat strong,
body.theme-default .custom-forum-lp-title {
    color: #20354f;
}

body.theme-default .custom-forum-desc,
body.theme-default .custom-forum-stat,
body.theme-default .custom-forum-lp-meta,
body.theme-default .custom-forum-lp-user,
body.theme-default .custom-forum-lp-date {
    color: #5f7288;
}

.dark body.theme-default .custom-forum-cat-group {
    border-color: #2c4652;
    background: #16232b;
    box-shadow: none;
}

.dark body.theme-default .custom-forum-cat-header {
    background: #243946;
    border-color: #2f4b58;
}

.dark body.theme-default .custom-forum-row {
    background: #111b23;
    border-color: #2c4652;
}

.dark body.theme-default .custom-forum-row:hover {
    background: #1c2c36;
}

.dark body.theme-default .custom-forum-cat-header h2,
.dark body.theme-default .custom-forum-title-link,
.dark body.theme-default .custom-forum-stat strong,
.dark body.theme-default .custom-forum-lp-title {
    color: #edf5ff;
}

.dark body.theme-default .custom-forum-cat-header p,
.dark body.theme-default .custom-forum-desc,
.dark body.theme-default .custom-forum-stat,
.dark body.theme-default .custom-forum-lp-meta,
.dark body.theme-default .custom-forum-lp-user,
.dark body.theme-default .custom-forum-lp-date {
    color: #a7c2ba;
}

body.theme-default .rtp-panel {
    border-color: #c9d8e6;
    background: #f7fbfe;
    box-shadow: 0 14px 32px rgba(35, 57, 86, 0.08);
}

body.theme-default .rtp-tabs {
    background: #dbe9f3;
    border-bottom-color: #c6d8e8;
}

body.theme-default .rtp-tab {
    border-right-color: rgba(91, 113, 137, 0.2);
    color: #38546f;
}

body.theme-default .rtp-tab:hover,
body.theme-default .rtp-tab.is-active {
    background: #c8dceb;
    color: #1f344f;
}

body.theme-default .rtp-tab.is-active {
    box-shadow: inset 0 -2px 0 #287fa9;
}

body.theme-default .rtp-tab i {
    color: #287fa9;
}

body.theme-default .rtp-head {
    background: #edf4f8;
    color: #344d68;
}

body.theme-default .rtp-row {
    border-bottom-color: #d6e2ec;
    background: #f8fbfd;
    color: #53677d;
}

body.theme-default .rtp-row:hover {
    background: #eef6fb;
}

body.theme-default .rtp-row>div+div,
body.theme-default .rtp-head>div+div {
    border-left-color: #d6e2ec;
}

body.theme-default .rtp-online-dot {
    border-color: #f8fbfd;
}

body.theme-default .rtp-title,
body.theme-default .rtp-category a {
    color: #20354f;
}

body.theme-default .rtp-title:hover,
body.theme-default .rtp-category a:hover {
    color: #1e6f9f;
}

body.theme-default .rtp-stats,
body.theme-default .rtp-last {
    color: #42576e;
}

body.theme-default .rtp-empty {
    background: #f8fbfd;
    color: #64788f;
}

.dark body.theme-default .rtp-panel {
    border-color: #2c4652;
    background: #16232b;
    box-shadow: none;
}

.dark body.theme-default .rtp-tabs {
    background: #243946;
    border-bottom-color: #2f4b58;
}

.dark body.theme-default .rtp-tab {
    border-right-color: rgba(167, 194, 186, 0.16);
    color: #b7d0c8;
}

.dark body.theme-default .rtp-tab:hover,
.dark body.theme-default .rtp-tab.is-active {
    background: #31505a;
    color: #ffffff;
}

.dark body.theme-default .rtp-tab.is-active {
    box-shadow: inset 0 -2px 0 #78d3c4;
}

.dark body.theme-default .rtp-tab i {
    color: #c4e5de;
}

.dark body.theme-default .rtp-head {
    background: #20313a;
    color: #eaf7f2;
}

.dark body.theme-default .rtp-row {
    border-bottom-color: #2c4652;
    background: #111b23;
    color: #a7c2ba;
}

.dark body.theme-default .rtp-row:hover {
    background: #1c2c36;
}

.dark body.theme-default .rtp-row>div+div,
.dark body.theme-default .rtp-head>div+div {
    border-left-color: #2c4652;
}

.dark body.theme-default .rtp-online-dot {
    border-color: #111b23;
}

.dark body.theme-default .rtp-title,
.dark body.theme-default .rtp-category a {
    color: #eaf7f2;
}

.dark body.theme-default .rtp-title:hover,
.dark body.theme-default .rtp-category a:hover {
    color: #78d3c4;
}

.dark body.theme-default .rtp-stats,
.dark body.theme-default .rtp-last {
    color: #c4e5de;
}

.dark body.theme-default .rtp-empty {
    background: #111b23;
    color: #a7c2ba;
}

.thread-title-card {
    margin-top: 0.25rem;
}

.thread-post-card {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.thread-post-body {
    background: rgba(255, 255, 255, 0.92);
}

.thread-post-footer {
    font-size: 0.6875rem;
    line-height: 1rem;
}

.thread-post-actions {
    font-size: 0.75rem;
    line-height: 1rem;
}

.thread-user-panel {
    font-size: 0.8125rem;
    background: rgba(248, 250, 252, 0.72);
    border-color: rgba(226, 232, 240, 0.9);
}

.thread-user-panel-member {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.88), rgba(241, 245, 249, 0.58));
}

.thread-user-panel-admin {
    background: linear-gradient(180deg, rgba(255, 247, 248, 0.72), rgba(255, 255, 255, 0.78));
    border-color: rgba(251, 113, 133, 0.2);
}

.thread-user-panel-founder {
    background: linear-gradient(180deg, rgba(248, 250, 255, 0.86), rgba(255, 255, 255, 0.78));
    border-color: rgba(99, 102, 241, 0.2);
}

.thread-user-panel-moderator {
    background: linear-gradient(180deg, rgba(246, 254, 250, 0.78), rgba(255, 255, 255, 0.78));
    border-color: rgba(16, 185, 129, 0.2);
}

.thread-user-panel-premium {
    background: linear-gradient(180deg, rgba(255, 253, 244, 0.8), rgba(255, 255, 255, 0.78));
    border-color: rgba(245, 158, 11, 0.2);
}

.thread-user-panel-custom {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--thread-role-color, #eef2ff) 50%, white), rgba(255, 255, 255, 0.82));
    border-color: color-mix(in srgb, var(--thread-role-color, #eef2ff) 28%, transparent);
}

.thread-user-name {
    font-size: 1rem;
    line-height: 1.35rem;
}

.thread-user-badge {
    font-size: 0.75rem;
    line-height: 1.05rem;
}

.thread-user-badge-custom {
    background-color: var(--thread-badge-bg, transparent);
    color: var(--thread-badge-color, #334155);
    border: 1px solid color-mix(in srgb, var(--thread-badge-color, #334155) 18%, transparent);
}

.dark .thread-user-badge-custom {
    background-color: var(--thread-badge-dark-bg, var(--thread-badge-bg, transparent));
    color: var(--thread-badge-dark-color, var(--thread-badge-color, #e2e8f0));
    border-color: color-mix(in srgb, var(--thread-badge-dark-color, var(--thread-badge-color, #e2e8f0)) 22%, transparent);
}

.thread-user-title,
.thread-user-stat {
    font-size: 0.8125rem;
    line-height: 1.1rem;
}

.thread-user-title-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0.125rem 0.45rem;
    border-radius: 0.375rem;
    background-color: var(--thread-title-bg, transparent);
    color: var(--thread-title-color, #64748b);
    border: 1px solid color-mix(in srgb, var(--thread-title-color, #64748b) 16%, transparent);
}

.thread-user-panel-vertical .thread-user-title-custom {
    width: fit-content;
}

.dark .thread-user-title-custom {
    background-color: var(--thread-title-dark-bg, var(--thread-title-bg, transparent));
    color: var(--thread-title-dark-color, var(--thread-title-color, #e2e8f0));
    border-color: color-mix(in srgb, var(--thread-title-dark-color, var(--thread-title-color, #e2e8f0)) 20%, transparent);
}

.thread-prefix-badge {
    display: inline-flex;
    align-items: center;
    background-color: var(--prefix-bg, #4f46e5);
    color: var(--prefix-color, #ffffff);
}

.dark .thread-prefix-badge {
    background-color: var(--prefix-dark-bg, var(--prefix-bg, #4f46e5));
    color: var(--prefix-dark-color, var(--prefix-color, #ffffff));
}

.thread-prefix-badge.thread-prefix-announcement {
    border: 1px solid rgba(185, 28, 28, 0.34);
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.dark .thread-prefix-badge.thread-prefix-announcement {
    border-color: rgba(248, 113, 113, 0.36);
    background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
    color: #fff1f2;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.22);
}

.category-thread-pinned-spacer {
    height: 16px;
    background: transparent;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.dark .category-thread-pinned-spacer {
    border-top-color: rgba(51, 65, 85, 0.55);
    border-bottom-color: rgba(51, 65, 85, 0.55);
}

.category-thread-list-header {
    display: none;
}

.category-thread-header-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.category-thread-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}

.category-thread-header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(150px, 34vw);
    height: 34px;
    border: 1px solid #dbe3ef;
    background: #d6f0e4;
    padding: 0 11px;
    color: #64748b;
}

.category-thread-header-search input {
    min-width: 0;
    width: 100%;
    border: 0;
    background: transparent;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    outline: none;
}

.category-thread-header-search input::placeholder {
    color: #94a3b8;
}

.category-thread-subscribe-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    white-space: nowrap;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    padding: 0 12px;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 900;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.category-thread-subscribe-button:hover {
    border-color: #818cf8;
    background: #e0e7ff;
    color: #3730a3;
}

.category-thread-subscribe-button.is-active {
    border-color: #22c55e;
    background: #dcfce7;
    color: #15803d;
}

.dark .category-thread-header-search {
    border-color: rgba(255, 255, 255, 0.08);
    background: #1d2938;
    color: #cbd5e1;
}

.dark .category-thread-header-search input {
    color: #e2e8f0;
}

.dark .category-thread-subscribe-button {
    border-color: rgba(129, 140, 248, 0.35);
    background: rgba(79, 70, 229, 0.18);
    color: #c7d2fe;
}

.dark .category-thread-subscribe-button:hover {
    border-color: rgba(165, 180, 252, 0.55);
    background: rgba(79, 70, 229, 0.28);
    color: #ffffff;
}

.dark .category-thread-subscribe-button.is-active {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

.category-thread-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px;
    transition: background-color 150ms ease;
}

.category-thread-row:hover {
    background: rgba(238, 242, 255, 0.45);
}

.category-thread-row.category-thread-sticky {
    background: #e2f7ff;
    box-shadow: inset 3px 0 0 #d97706;
}

.category-thread-row.category-thread-sticky:hover {
    background: #ffe8ba;
}

.category-thread-row.category-thread-announcement {
    background: linear-gradient(90deg, rgba(254, 226, 226, 0.95), rgba(255, 247, 237, 0.72));
    box-shadow: inset 3px 0 0 #dc2626;
}

.category-thread-row.category-thread-announcement:hover {
    background: linear-gradient(90deg, #fecaca, #ffedd5);
}

.dark .category-thread-row:hover {
    background: rgba(30, 41, 59, 0.3);
}

.dark .category-thread-row.category-thread-sticky {
    background: #332612;
    box-shadow: inset 3px 0 0 #f59e0b;
}

.dark .category-thread-row.category-thread-sticky:hover {
    background: #432f13;
}

.dark .category-thread-row.category-thread-announcement {
    background: linear-gradient(90deg, rgba(69, 10, 10, 0.82), rgba(67, 20, 7, 0.58));
    box-shadow: inset 3px 0 0 #ef4444;
}

.dark .category-thread-row.category-thread-announcement:hover {
    background: linear-gradient(90deg, rgba(91, 12, 12, 0.9), rgba(88, 28, 12, 0.68));
}

.category-thread-main {
    display: flex;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    align-items: flex-start;
    gap: 12px;
}

.category-thread-title-block {
    flex: 1 1 auto;
    min-width: 0;
}

.category-thread-rating {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-left: auto;
    border: 1px solid #f6d365;
    background: #fff3bf;
    padding: 4px 8px;
    color: #8a4b00;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.category-thread-rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: #d1a11d;
}

.category-thread-rating-stars i {
    color: #d6b75a;
    opacity: 0.38;
}

.category-thread-rating-stars i.is-active {
    color: #f59e0b;
    opacity: 1;
}

.category-thread-rating-score {
    color: #8a4b00;
}

.dark .category-thread-rating {
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(146, 64, 14, 0.28);
    color: #fde68a;
}

.dark .category-thread-rating-stars i {
    color: #92400e;
    opacity: 0.58;
}

.dark .category-thread-rating-stars i.is-active,
.dark .category-thread-rating-score {
    color: #fde68a;
}

.category-thread-side {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    padding-top: 8px;
    margin-top: 4px;
    font-size: 14px;
}

.dark .category-thread-side {
    border-top-color: rgba(30, 41, 59, 0.9);
}

.category-thread-stats {
    display: flex;
    gap: 16px;
    text-align: center;
    font-size: 12px;
    color: #006aff;
    font-weight: 600;
    text-shadow: none;
}

.category-thread-stats>div {
    width: 48px;
}

.category-thread-lastpost {
    display: flex;
    width: 180px;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

@media (min-width: 640px) {
    .category-thread-list-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 48px 48px 180px;
        gap: 16px;
        align-items: center;
        border-bottom: 1px solid #dbe3ef;
        background: #a2dbd2;
        padding: 12px 16px;
        color: #000000;
        font-size: 11px;
        font-weight: 900;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    .dark .category-thread-list-header {
        border-bottom-color: rgba(71, 85, 105, 0.75);
        background: #25283a;
        color: #dbe4f0;
    }

    .category-thread-header-replies,
    .category-thread-header-views {
        text-align: center;
    }

    .category-thread-header-last {
        text-align: right;
    }

    .category-thread-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 48px 48px 180px;
        gap: 16px;
        align-items: center;
        padding: 16px;
    }

    .category-thread-side {
        display: contents;
        width: auto;
        border-top: 0;
        padding-top: 0;
        margin-top: 0;
    }

    .category-thread-stats {
        display: contents;
    }

    .category-thread-stats>div {
        width: auto;
    }

    .category-thread-lastpost {
        width: 180px;
        justify-content: flex-end;
    }
}

@media (max-width: 639px) {
    .category-thread-header-tools,
    .category-thread-header-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .category-thread-header-search {
        width: 100%;
    }

    .category-thread-subscribe-button {
        width: 100%;
        justify-content: center;
    }

    .category-thread-main {
        gap: 9px;
    }

    .category-thread-main > .h-9,
    .category-thread-main > .w-9 {
        width: 2rem;
        height: 2rem;
    }

    .category-thread-title-block > .flex.items-center {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    .category-thread-rating {
        margin-left: 0;
    }

    .category-thread-side {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .category-thread-stats {
        width: 100%;
        justify-content: space-around;
        gap: 8px;
        border-radius: 8px;
        background: rgba(241, 245, 249, 0.72);
        padding: 8px;
    }

    .dark .category-thread-stats {
        background: rgba(15, 23, 42, 0.46);
    }

    .category-thread-stats > div {
        width: auto;
        flex: 1 1 0;
    }

    .category-thread-lastpost {
        width: 100%;
        border-radius: 8px;
        background: rgba(248, 250, 252, 0.78);
        padding: 8px;
    }

    .dark .category-thread-lastpost {
        background: rgba(15, 23, 42, 0.46);
    }
}

.reputation-badge {
    min-width: 9rem;
}

.reputation-badge-head,
.reputation-badge-pill,
.reputation-segments {
    display: inline-flex;
    align-items: center;
}

.reputation-badge-head {
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.reputation-badge-pill {
    gap: 0.375rem;
    border: 1px solid color-mix(in srgb, var(--rep-bar) 26%, transparent);
    border-radius: 999px;
    background: var(--rep-bg);
    color: var(--rep-fg);
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.reputation-badge-tier {
    color: #94a3b8;
    font-size: 0.625rem;
    font-weight: 900;
    white-space: nowrap;
}

.reputation-segments {
    gap: 0.125rem;
}

.reputation-segment {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 999px;
    background: #cbd5e1;
}

.reputation-segment.is-active,
.reputation-progress-fill {
    background: var(--rep-bar);
}

.reputation-progress {
    height: 0.375rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.reputation-progress-fill {
    height: 100%;
    border-radius: inherit;
}

.dark .reputation-badge-pill {
    background: rgba(15, 23, 42, 0.72);
}

.dark .reputation-segment {
    background: #334155;
}

.dark .reputation-segment.is-active {
    background: var(--rep-bar);
}

.dark .reputation-progress {
    background: #1e293b;
}

.forum-pagination {
    display: inline-flex;
    align-items: stretch;
    min-height: 33px;
    overflow: hidden;
    border: 1px solid #dce4ef;
    background: #f4f7fb;
    box-shadow: none;
}

.forum-pagination-item {
    display: inline-flex;
    min-width: 28px;
    height: 33px;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    border-right: 1px solid #e3eaf3;
    background: #f4f7fb;
    color: #7f8da7;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.forum-pagination-item:last-child {
    border-right: 0;
}

.forum-pagination-item:hover {
    background: #ffffff;
    color: #ff5a3d;
    box-shadow: inset 0 -2px 0 rgba(255, 90, 61, 0.22);
}

.forum-pagination-item.is-active {
    margin: 6px 5px;
    min-width: 18px;
    height: 21px;
    padding: 0 0.35rem;
    border-right: 0;
    border-radius: 2px;
    background: #ff5a3d;
    color: #ffffff;
    font-weight: 800;
    box-shadow: none;
}

.forum-pagination-item.is-active+.forum-pagination-item {
    border-left: 1px solid rgba(226, 232, 240, 0.9);
}

.forum-pagination-item.is-disabled,
.forum-pagination-item.is-gap {
    cursor: default;
    color: #9aa7bd;
}

.forum-pagination-item.is-disabled:hover,
.forum-pagination-item.is-gap:hover {
    background: transparent;
    color: #94a3b8;
}

.forum-pagination-last,
.forum-pagination-first {
    min-width: 38px;
    background: #e8eef7;
    color: #9aa7bd;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.forum-pagination-arrow {
    min-width: 40px;
    background: #f4f7fb;
    color: #ff5a3d;
    font-size: 0.75rem;
}

.forum-pagination-arrow:hover {
    background: #ffffff;
    color: #ff3f1f;
}

.forum-pagination-last:hover,
.forum-pagination-first:hover {
    background: #dde6f2;
    color: #ff5a3d;
}

.forum-sort-form {
    display: inline-flex;
}

.forum-sort-select {
    height: 34px;
    min-width: 220px;
    appearance: none;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background:
        linear-gradient(45deg, transparent 50%, #ff5a3d 50%) calc(100% - 18px) 14px / 6px 6px no-repeat,
        linear-gradient(135deg, #ff5a3d 50%, transparent 50%) calc(100% - 13px) 14px / 6px 6px no-repeat,
        #f8fafc;
    color: #64748b;
    padding: 0 2.4rem 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.forum-sort-select:focus {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.dark .forum-pagination {
    border-color: rgba(51, 65, 85, 0.9);
    background: #0f172a;
    box-shadow: none;
}

.dark .forum-pagination-item {
    border-right-color: rgba(51, 65, 85, 0.85);
    color: #94a3b8;
}

.dark .forum-pagination-item:hover {
    background: rgba(79, 70, 229, 0.18);
    color: #c7d2fe;
}

.dark .forum-pagination-item.is-active {
    background: #ff5a3d;
    color: #ffffff;
}

.dark .forum-pagination-last,
.dark .forum-pagination-first {
    background: rgba(51, 65, 85, 0.55);
    color: #94a3b8;
}

.dark .forum-sort-select {
    border-color: rgba(51, 65, 85, 0.9);
    background:
        linear-gradient(45deg, transparent 50%, #ff5a3d 50%) calc(100% - 18px) 14px / 6px 6px no-repeat,
        linear-gradient(135deg, #ff5a3d 50%, transparent 50%) calc(100% - 13px) 14px / 6px 6px no-repeat,
        #0f172a;
    color: #94a3b8;
    box-shadow: none;
}

.thread-tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(14, 165, 233, 0.18);
}

.thread-tag-badge-strong {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
}

.dark .thread-tag-badge {
    background: rgba(14, 165, 233, 0.14);
    color: #7dd3fc;
    border-color: rgba(14, 165, 233, 0.2);
}

.thread-tag-strip {
    background: rgba(248, 250, 252, 0.88);
}

.dark .thread-tag-strip {
    background: rgba(15, 23, 42, 0.34);
}

.contact-page {
    width: 100%;
}

.contact-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.25rem;
    border: 1px solid #dce7f2;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 58%, #f7fafc 100%);
    padding: 1.5rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}

.contact-hero-kicker {
    display: inline-flex;
    margin-bottom: 0.45rem;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-hero h1 {
    margin: 0;
    color: #172033;
    font-size: 1.85rem;
    font-weight: 950;
    letter-spacing: 0;
}

.contact-hero p {
    max-width: 720px;
    margin: 0.55rem 0 0;
    color: #5f6b7c;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.65;
}

.contact-hero-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.65rem;
    max-width: 260px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    padding: 0.8rem 0.95rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
}

.contact-hero-badge i {
    color: #2563eb;
    font-size: 1.05rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: start;
}

.contact-form-panel,
.contact-info-panel {
    overflow: hidden;
    border: 1px solid #dce7f2;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}

.contact-form-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #e6edf5;
    background: #ffffff;
    color: #172033;
    padding: 1.05rem 1.2rem;
}

.contact-form-heading span {
    display: block;
    font-size: 0.92rem;
    font-weight: 950;
}

.contact-form-heading small {
    display: block;
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
}

.contact-form-heading > i {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eaf2ff;
    color: #2563eb;
}

.contact-form-body {
    padding: 1.25rem;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contact-form-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
}

.contact-form-input {
    width: 100%;
    border: 1px solid #d8e3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #172033;
    padding: 0.72rem 0.8rem;
    font-size: 0.875rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.contact-form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.contact-form-input::placeholder {
    color: #94a3b8;
}

.contact-subject-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.contact-radio-row {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid #dce7f2;
    border-radius: 8px;
    background: #f8fafc;
    padding: 0.65rem 0.75rem;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
}

.contact-radio-row input[type="radio"] {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    accent-color: #2563eb;
}

.contact-other-input {
    min-width: 0;
    padding: 0.5rem 0.6rem;
}

.contact-form-textarea {
    min-height: 220px;
    resize: vertical;
}

.contact-captcha-block {
    max-width: 390px;
    margin-top: 1.25rem;
}

.contact-captcha-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-captcha-img {
    height: 42px;
    border: 1px solid #d8e3ef;
    border-radius: 8px;
    background: #ffffff;
}

.contact-captcha-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d8e3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.contact-captcha-refresh:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.contact-captcha-input {
    max-width: 240px;
}

.contact-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
    margin-top: 1.25rem;
}

.contact-submit-button,
.contact-reset-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 8px;
    padding: 0.72rem 1rem;
    font-size: 0.78rem;
    font-weight: 950;
    transition: filter 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.contact-submit-button {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.contact-reset-button {
    background: #e2e8f0;
    color: #334155;
}

.contact-submit-button:hover,
.contact-reset-button:hover {
    filter: brightness(0.98);
    transform: translateY(-1px);
}

.contact-info-panel {
    display: grid;
    gap: 0.9rem;
    padding: 0.9rem;
}

.contact-info-card {
    border: 1px solid #dce7f2;
    border-radius: 8px;
    background: #f8fafc;
    padding: 1rem;
}

.contact-info-card-primary {
    background: #172033;
    color: #ffffff;
}

.contact-info-card-primary > i {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #93c5fd;
}

.contact-info-card h2 {
    margin: 0.8rem 0 0;
    font-size: 1rem;
    font-weight: 950;
}

.contact-info-card p {
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.55;
}

.contact-info-card span {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.contact-info-card strong {
    display: block;
    overflow-wrap: anywhere;
    margin-top: 0.35rem;
    color: #172033;
    font-size: 0.92rem;
    font-weight: 900;
}

.contact-info-list {
    display: grid;
    gap: 0.65rem;
}

.contact-info-list div {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid #dce7f2;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.75rem;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 800;
}

.contact-info-list i {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eaf2ff;
    color: #2563eb;
}

.dark .contact-hero,
.dark .contact-form-panel,
.dark .contact-info-panel {
    border-color: rgba(148, 163, 184, 0.22);
    background: #111827;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.dark .contact-hero h1,
.dark .contact-form-heading,
.dark .contact-info-card strong {
    color: #f8fafc;
}

.dark .contact-hero p,
.dark .contact-form-heading small,
.dark .contact-form-label,
.dark .contact-radio-row,
.dark .contact-info-list div {
    color: #cbd5e1;
}

.dark .contact-hero-badge,
.dark .contact-form-heading,
.dark .contact-info-card,
.dark .contact-info-list div {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.82);
}

.dark .contact-form-input {
    border-color: #334155;
    background: #0f172a;
    color: #e2e8f0;
}

.dark .contact-radio-row,
.dark .contact-reset-button,
.dark .contact-captcha-img,
.dark .contact-captcha-refresh {
    border-color: #334155;
    background: #0f172a;
}

.dark .contact-reset-button,
.dark .contact-captcha-refresh {
    color: #cbd5e1;
}

@media (max-width: 640px) {
    .contact-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 1.1rem;
    }

    .contact-hero h1 {
        font-size: 1.45rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-subject-list {
        grid-template-columns: 1fr;
    }

    .contact-radio-row {
        width: 100%;
    }

    .contact-captcha-block,
    .contact-captcha-input {
        max-width: none;
    }

    .contact-form-actions {
        justify-content: stretch;
    }

    .contact-submit-button,
    .contact-reset-button {
        flex: 1 1 0;
    }
}

.thread-attachment-block {
    background: rgba(248, 250, 252, 0.86);
    border-radius: 0.75rem;
    padding-top: 1rem;
}

.dark .thread-attachment-block {
    background: rgba(15, 23, 42, 0.24);
}

.thread-attachment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    background: #ffffff;
    color: #334155;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.thread-attachment-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.dark .thread-attachment-item {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(51, 65, 85, 0.9);
    color: #e2e8f0;
}

.dark .thread-attachment-item:hover {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(71, 85, 105, 0.95);
}

.thread-attachment-image {
    align-items: flex-start;
}

.thread-attachment-thumb {
    position: relative;
    flex: 0 0 72px;
    width: 72px;
    height: 56px;
    border-radius: 0.55rem;
    overflow: hidden;
    background: #e2e8f0;
}

.thread-attachment-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thread-attachment-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.thread-attachment-image:hover .thread-attachment-thumb-overlay {
    opacity: 1;
}

.thread-attachment-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e7ff;
    color: #4f46e5;
}

.dark .thread-attachment-icon {
    background: rgba(79, 70, 229, 0.18);
    color: #a5b4fc;
}

.thread-attachment-meta {
    min-width: 0;
    flex: 1;
}

.thread-attachment-name {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    color: inherit;
    word-break: break-word;
}

.thread-attachment-size {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #64748b;
}

.dark .thread-attachment-size {
    color: #94a3b8;
}

.thread-title-input-group {
    display: grid;
    grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
    gap: 0.625rem;
    align-items: stretch;
}

.thread-title-input-group .thread-prefix-select,
.thread-title-input-group .thread-title-input {
    width: 100%;
    min-width: 0;
}

.thread-title-input-group .thread-prefix-select {
    font-weight: 700;
}

.thread-seo-panel {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    overflow: hidden;
}

.thread-seo-panel summary {
    cursor: pointer;
    padding: 0.8rem 1rem;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 800;
    list-style-position: inside;
}

.thread-seo-fields {
    display: grid;
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.dark .thread-seo-panel {
    background: rgba(15, 23, 42, 0.42);
    border-color: #334155;
}

.dark .thread-seo-panel summary {
    color: #e2e8f0;
}

.thread-user-stat {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(226, 232, 240, 0.58);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
    width: 100%;
    min-width: 9.75rem;
}

.thread-user-stat>span:first-child {
    color: #64748b;
}

.thread-user-stat>span:last-child {
    color: #334155;
}

.thread-user-rank {
    font-size: 0.875rem;
}

@media (min-width: 1024px) {
    .thread-user-panel-horizontal {
        display: grid !important;
        grid-template-columns: minmax(140px, 140px) minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        align-content: center !important;
        align-items: start !important;
        column-gap: 1.25rem !important;
        row-gap: 0.45rem !important;
    }

    .thread-user-panel-horizontal > .relative.group {
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: center !important;
        align-self: end !important;
        margin-bottom: 0 !important;
    }

    .thread-user-panel-horizontal > .contents {
        display: contents !important;
    }

    .thread-user-panel-horizontal > .contents > div:first-child {
        grid-column: 1 !important;
        grid-row: 2 !important;
        justify-self: center !important;
        align-items: center !important;
        width: 100% !important;
        min-width: 0 !important;
        text-align: center !important;
    }

    .thread-user-panel-horizontal .thread-user-badges {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .thread-user-panel-horizontal .thread-user-badge,
    .thread-user-panel-horizontal .thread-user-title {
        width: fit-content !important;
        margin-left: 0 !important;
    }

    .thread-user-panel-horizontal .thread-user-title {
        justify-content: center !important;
        margin-top: 0.125rem !important;
        margin-bottom: 0.25rem !important;
    }

    .thread-user-panel-horizontal .thread-user-title + div {
        justify-content: center !important;
    }

    .thread-user-panel-horizontal > .contents > .thread-user-stats {
        grid-column: 2 !important;
        grid-row: 1 / span 2 !important;
        justify-self: end !important;
        align-self: center !important;
        width: 12rem !important;
        margin-left: auto !important;
    }
}

.thread-user-panel-vertical .thread-user-badges {
    row-gap: 0.35rem;
}

.thread-user-panel-vertical .thread-user-stats {
    row-gap: 0.4rem;
    width: 100%;
    max-width: 11rem;
}

.thread-user-panel-horizontal .thread-user-stats {
    width: 100%;
    max-width: 12rem;
    justify-self: end;
}

.thread-user-panel-horizontal .thread-user-stat {
    min-width: 0;
}

.dark .thread-user-panel-member {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.42));
}

.dark .thread-title-card,
.dark .thread-post-card {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(51, 65, 85, 0.86);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
}

.dark .thread-post-body {
    background: rgba(15, 23, 42, 0.48);
}

.dark .thread-user-panel-admin {
    background: linear-gradient(180deg, rgba(76, 5, 25, 0.5), rgba(15, 23, 42, 0.46));
    border-color: rgba(251, 113, 133, 0.28);
}

.dark .thread-user-panel-founder {
    background: linear-gradient(180deg, rgba(49, 46, 129, 0.48), rgba(15, 23, 42, 0.46));
    border-color: rgba(129, 140, 248, 0.3);
}

.dark .thread-user-panel-moderator {
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.45), rgba(15, 23, 42, 0.46));
    border-color: rgba(52, 211, 153, 0.28);
}

.dark .thread-user-panel-premium {
    background: linear-gradient(180deg, rgba(120, 53, 15, 0.45), rgba(15, 23, 42, 0.46));
    border-color: rgba(251, 191, 36, 0.28);
}

.dark .thread-user-panel-custom {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--thread-role-dark-color, var(--thread-role-color, #312e81)) 24%, rgba(15, 23, 42, 0.72)), rgba(15, 23, 42, 0.48));
    border-color: color-mix(in srgb, var(--thread-role-dark-color, var(--thread-role-color, #312e81)) 34%, transparent);
}

.dark .thread-user-stat {
    background: rgba(15, 23, 42, 0.42);
    border-color: rgba(51, 65, 85, 0.42);
    box-shadow: none;
}

.dark .thread-user-stat>span:first-child {
    color: #94a3b8;
}

.dark .thread-user-stat>span:last-child {
    color: #e2e8f0;
}

@media (min-width: 768px) {
    .thread-user-panel-vertical {
        width: 14rem;
    }

    .thread-user-panel-vertical .thread-user-name {
        font-size: 1rem;
    }

    .thread-user-panel-vertical .thread-user-badge {
        font-size: 0.75rem;
    }
}

@media (max-width: 1023px) {
    .thread-user-panel-horizontal .thread-user-stats {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .thread-title-input-group {
        grid-template-columns: 1fr;
    }
}

/* Forum category list */
.custom-forum-shell {
    max-width: 1280px;
    margin: 0 auto;
}

.custom-forum-header {
    display: none;
}

.custom-forum-cat-group {
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(22, 34, 58, 0.08);
}

.custom-forum-cat-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border-bottom: 1px solid #dfe6f0;
    background: #243946;
}

.custom-forum-cat-heading {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.custom-forum-cat-icon,
.custom-forum-icon-bubble {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: #3157d5;
    background: transparent;
}

.custom-forum-cat-icon i,
.custom-forum-icon-bubble i {
    font-size: 16px;
}

.custom-forum-icon-image {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 6px;
}

.custom-forum-icon-svg {
    width: 38px;
    height: 32px;
    display: grid;
    place-items: center;
    color: currentColor;
    overflow: visible;
}

.custom-forum-icon-svg svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: block;
    overflow: visible;
}

.custom-forum-cat-icon .custom-forum-icon-svg,
.custom-forum-icon-bubble .custom-forum-icon-svg {
    flex: 0 0 auto;
}

.custom-forum-cat-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.25;
}

.custom-forum-cat-header p {
    margin: 4px 0 0;
    color: #d7dceb;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.custom-forum-cat-count {
    height: 28px;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 0 10px;
    border-radius: 999px;
    color: #3157d5;
    background: #eef3ff;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.custom-forum-row {
    min-height: 86px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) minmax(120px, 150px) minmax(220px, 330px);
    align-items: center;
    gap: 14px;
    padding: 15px 18px 15px 34px;
    border-bottom: 1px solid #dfe6f0;
    background: #ffffff;
    transition: background-color 0.16s ease;
}

.custom-forum-row:hover {
    background: #fbfdff;
}

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

.custom-forum-row>* {
    min-width: 0;
}

.custom-forum-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-forum-info {
    min-width: 0;
}

.custom-forum-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.custom-forum-title-link {
    color: #33435f;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
}

.custom-forum-title-link:hover {
    color: #3157d5;
}

.custom-forum-viewers {
    height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    color: #3157d5;
    background: #eef3ff;
    font-size: 12px;
    font-weight: 850;
}

.custom-forum-desc {
    margin: 0;
    color: #63728a;
    font-size: 13px;
    line-height: 1.45;
}

.custom-forum-sub-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}

.custom-forum-sub {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    color: #63728a;
    background: #f9fbff;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.custom-forum-sub i {
    color: #3157d5;
    font-size: 12px;
}

.custom-forum-sub:hover {
    color: #3157d5;
    border-color: #cbd6e4;
    background: #ffffff;
}

.custom-forum-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(70px, 1fr));
    gap: 6px;
    align-items: center;
    justify-self: center;
    width: 150px;
}

.custom-forum-stat {
    text-align: center;
    color: #63728a;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
}

.custom-forum-stat strong {
    display: block;
    margin-bottom: 4px;
    color: #33435f;
    font-size: 19px;
    font-weight: 850;
    line-height: 1;
}

.custom-forum-lastpost {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.custom-forum-lp-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: #172033;
    font-size: 11px;
    font-weight: 850;
}

.custom-forum-lp-body {
    min-width: 0;
}

.custom-forum-lastpost > .custom-forum-lp-title:first-child {
    grid-column: 1 / -1;
}

.custom-forum-lastpost > div:not(.custom-forum-lp-body) {
    grid-column: 1 / -1;
    min-width: 0;
}

.custom-forum-premium-hidden {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 64px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: linear-gradient(135deg, #eff6ff 0%, #fff7ed 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: #24364f;
}

.custom-forum-premium-lock {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #1f3b73;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(31, 59, 115, 0.16);
}

.custom-forum-premium-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.custom-forum-premium-copy strong {
    overflow: hidden;
    color: #15243a;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-forum-premium-copy small {
    color: #5b6e8a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.custom-forum-premium-lock i {
    font-size: 14px;
}

.custom-forum-lp-title,
.custom-forum-lp-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-forum-lp-title {
    color: #182235;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
    text-decoration: none;
}

.custom-forum-lp-title:hover {
    color: #3157d5;
}

.custom-forum-lp-meta {
    margin-top: 4px;
    color: #63728a;
    font-size: 12px;
}

.custom-forum-lp-user {
    color: #3157d5;
    font-weight: 800;
}

.custom-forum-lp-separator {
    margin: 0 5px;
    color: #94a3b8;
}

.custom-forum-lp-date {
    color: #63728a;
}

.custom-forum-lp-empty,
.custom-forum-empty {
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
}

.custom-forum-empty {
    padding: 24px;
    text-align: center;
}

.custom-forum-empty-page {
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    background: #ffffff;
}

.dark .custom-forum-cat-group {
    border-color: #2c4652;
    background: #16232b;
    box-shadow: none;
}

.dark .custom-forum-row {
    border-color: #2c4652;
    background: #111b23;
}

.dark .custom-forum-cat-header {
    border-color: rgba(71, 85, 105, 0.95);
    background: #202235;
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.08);
}

.dark .custom-forum-cat-header h2,
.dark .custom-forum-title-link,
.dark .custom-forum-stat strong,
.dark .custom-forum-lp-title {
    color: #e2e8f0;
}

.dark .custom-forum-cat-header p,
.dark .custom-forum-desc,
.dark .custom-forum-stat,
.dark .custom-forum-lp-meta,
.dark .custom-forum-lp-user,
.dark .custom-forum-lp-date {
    color: #94a3b8;
}

.dark .custom-forum-premium-hidden {
    border-color: rgba(96, 165, 250, 0.34);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.96) 0%, rgba(48, 35, 18, 0.78) 100%);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
    color: #dbeafe;
}

.dark .custom-forum-premium-lock {
    background: #f59e0b;
    color: #111827;
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.16);
}

.dark .custom-forum-premium-copy strong {
    color: #f8fafc;
}

.dark .custom-forum-premium-copy small {
    color: #cbd5e1;
}

@media (max-width: 980px) {
    .custom-forum-row {
        grid-template-columns: 46px minmax(0, 1fr) minmax(190px, 260px);
        padding-left: 18px;
    }

    .custom-forum-stats {
        display: none;
    }
}

@media (max-width: 760px) {
    .custom-forum-cat-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .custom-forum-cat-heading {
        width: 100%;
    }

    .custom-forum-cat-count {
        align-self: flex-start;
    }

    .custom-forum-row {
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        padding: 14px;
    }

    .custom-forum-icon-bubble {
        width: 42px;
        height: 42px;
    }

    .custom-forum-info {
        grid-column: 2;
    }

    .custom-forum-stats {
        grid-column: 1 / -1;
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-self: stretch;
        border-radius: 8px;
        background: #f8fbff;
        padding: 8px;
    }

    .dark .custom-forum-stats {
        background: rgba(15, 23, 42, 0.34);
    }

    .custom-forum-lastpost {
        grid-column: 1 / -1;
        width: 100%;
        border-radius: 8px;
        background: #f8fbff;
        padding: 9px;
    }

    .dark .custom-forum-lastpost {
        background: rgba(15, 23, 42, 0.34);
    }

    .custom-forum-desc {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

@media (max-width: 640px) {
    .custom-forum-title-line,
    .custom-forum-sub-list {
        gap: 7px;
    }

    .custom-forum-title-link {
        font-size: 15px;
    }

    .custom-forum-sub {
        max-width: 100%;
    }

    .custom-forum-sub span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .custom-forum-shell {
        margin-inline: -6px;
    }

    .custom-forum-cat-header {
        padding: 12px;
    }

    .custom-forum-row {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .custom-forum-icon-bubble,
    .custom-forum-cat-icon {
        width: 36px;
        height: 36px;
    }

    .custom-forum-lp-avatar {
        width: 30px;
        height: 30px;
    }

    .custom-forum-lastpost:has(.custom-forum-lp-avatar) {
        grid-template-columns: 30px minmax(0, 1fr);
    }
}

/* Final priority row colors: announcements sit above sticky rows. */
.category-thread-row.category-thread-announcement {
    order: -30;
    border-color: rgba(248, 113, 113, 0.38);
    background: linear-gradient(90deg, rgba(254, 202, 202, 0.95), rgba(255, 237, 213, 0.74));
    box-shadow: inset 3px 0 0 #dc2626;
}

.category-thread-row.category-thread-sticky {
    order: -20;
    border-color: rgba(251, 191, 36, 0.34);
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.96), rgba(224, 242, 254, 0.58));
    box-shadow: inset 3px 0 0 #f59e0b;
}

.dark .category-thread-row.category-thread-announcement {
    border-color: rgba(248, 113, 113, 0.42);
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.72), rgba(69, 10, 10, 0.52) 42%, rgba(15, 23, 42, 0.96));
}

.dark .category-thread-row.category-thread-sticky {
    border-color: rgba(251, 191, 36, 0.34);
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.64), rgba(69, 26, 3, 0.46) 42%, rgba(15, 23, 42, 0.96));
}
