*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-tap-highlight-color: transparent;
}

a,
button,
input,
select,
textarea,
summary,
[role="button"],
[tabindex]:not([tabindex="-1"]) {
    -webkit-tap-highlight-color: transparent;
}

:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

@media (hover: none) and (pointer: coarse) {
    .forum-mobile-sidebar__menu a:focus,
    .forum-mobile-sidebar__menu a:focus-visible {
        outline: none;
    }

    .forum-mobile-sidebar__menu a:focus::after,
    .forum-mobile-sidebar__menu a:focus-visible::after {
        background-color: transparent;
    }

    .forum-mobile-sidebar__menu a.active::after {
        background-color: #22c55e;
    }
}

:root {
    --purple: #6A11CF;
    --purple-deep: #591e98;
    --purple-dark: #4d2674;
    --pink: #FF004C;
    --pink-hover: #e00044;
    --bg: #f0ebf8;
    --surface: #ffffff;
    --surface-soft: #fcfbff;
    --panel: #ffffff;
    --text: #1a1625;
    --text-soft: #6b6578;
    --muted: #8a8494;
    --border: #ddd0f0;
    --border-strong: #6A11CF;
    --glow: rgba(106, 17, 207, 0.15);
    --radius: 14px;
    --radius-sm: 10px;
    --forum-max-width: 1152px; /* ~12" screen cap — layout stops growing above this */
    --forum-mobile-freeze-width: 768px;
    --forum-frame-radius: 16px;
    --forum-body-gutter: 0.85rem; /* inset for breadcrumb, search, and content panels */
    --forum-search-row-gap: 0.75rem;
    --forum-site-search-width: calc(153px * 1.2 * 1.3);
    --shadow: 0 8px 28px rgba(89, 30, 152, 0.12);
    --font-display: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html.dark-mode {
    --bg: #242525;
    --surface: #272827;
    --surface-soft: #2e2f2e;
    --panel: #272827;
    --text: #b8b3a8;
    --text-soft: #a8a299;
    --muted: #8f8a80;
    --border: #6b2dada3;
    --border-strong: #6A11CF;
    --glow: rgba(106, 17, 207, 0.25);
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
}

html.dark-mode strong,
html.dark-mode b,
html.dark-mode .forum-admin-user-card-head {
    color: var(--text);
    font-weight: 700;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.forum-container {
    width: 100%;
    margin: 0 auto;
}

.forum-page {
    width: 100%;
    max-width: var(--forum-max-width);
    margin-inline: auto;
    padding-inline: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.forum-page > .forum-header,
.forum-page > .forum-footer {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
}

/* Under 12" cap: header/footer full-bleed to screen edges, rounded corners kept */
@media (max-width: 1152px) {
    .forum-page {
        max-width: none;
    }

    .forum-page > .forum-header {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-radius: 0 0 var(--forum-frame-radius) var(--forum-frame-radius);
    }

    .forum-page > .forum-footer {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-radius: var(--forum-frame-radius) var(--forum-frame-radius) 0 0;
    }
}

.forum-main > .forum-container {
    width: max(100%, var(--forum-mobile-freeze-width));
    min-width: max(100%, var(--forum-mobile-freeze-width));
    max-width: 100%;
    margin-inline: auto;
    flex-shrink: 0;
    box-sizing: border-box;
    padding-inline: var(--forum-body-gutter);
}

.forum-footer > .forum-container {
    width: max(100%, var(--forum-mobile-freeze-width));
    min-width: max(100%, var(--forum-mobile-freeze-width));
    max-width: 100%;
    margin-inline: auto;
    flex-shrink: 0;
    box-sizing: border-box;
}

a {
    color: #0000FF;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #FF0000;
}

/* ── Header ── */
.forum-header {
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: #fff;
    box-shadow: none;
    border-radius: 0 0 var(--forum-frame-radius) var(--forum-frame-radius);
    flex-shrink: 0;
    overflow: visible;
}

.forum-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.38rem 0.7rem 0.42rem;
    flex-wrap: nowrap;
}

.forum-header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: 0;
    flex-shrink: 0;
}

.forum-header-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.25s ease;
}

.forum-header-search.is-open {
    max-width: min(18rem, 42vw);
}

.forum-header-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.forum-header-search-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

html.dark-mode .forum-header-search-toggle {
    border-color: var(--border);
    color: var(--text);
}

html.dark-mode .forum-header-search-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
}

.forum-header-search-form {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
}

.forum-header-search-input {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0.45rem 0.85rem;
    font: inherit;
    font-size: 0.88rem;
}

.forum-header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.forum-header-search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.12);
}

html.dark-mode .forum-header-search-input {
    border-color: var(--border);
    background: var(--surface-soft);
    color: var(--text);
}

html.dark-mode .forum-header-search-input::placeholder {
    color: var(--muted);
}

html.dark-mode .forum-header-search-input:focus {
    border-color: var(--border-strong);
}

.forum-search-page-form {
    margin-bottom: 1rem;
}

.forum-search-results {
    margin-top: 0;
}

.forum-search-section-heading {
    margin: 0.5rem 0 0.5rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: lowercase;
    color: #000;
}

.forum-search-section-heading:first-of-type {
    margin-top: 0.35rem;
}

.forum-thread-list.forum-search-results--two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.forum-thread-list.forum-search-results--two-col .forum-thread-row {
    min-width: 0;
}

.forum-logo {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1.15;
    text-decoration: none;
}

.forum-logo:hover {
    color: #fff;
    opacity: 1;
}

html.dark-mode .forum-logo,
html.dark-mode .forum-nav a,
html.dark-mode .forum-nav-link,
html.dark-mode .forum-user-menu__toggle {
    color: var(--text);
}

html.dark-mode .forum-logo:hover {
    color: var(--text);
    opacity: 1;
}

html.dark-mode .forum-nav a:hover,
html.dark-mode .forum-nav-link:hover {
    color: #d4cfc4;
}

.forum-header-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
    min-width: 0;
    flex: 1 1 auto;
}

.forum-header-tagline,
.forum-footer-tagline {
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: 0.68rem;
    line-height: 1.2;
    font-weight: 600;
    color: #FF0000;
    text-decoration: none;
}

.forum-header-tagline:hover,
.forum-footer-tagline:hover {
    color: #FF0000;
    opacity: 1;
}

.forum-footer .forum-footer-tagline {
    display: inline-block;
    padding: 0 0 0.35rem;
}

.forum-nav {
    display: none;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: nowrap;
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-top: 0;
}

.forum-nav a,
.forum-nav-link {
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    text-decoration: none;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease-in-out;
}

.forum-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 8px;
    width: 0;
    height: 2px;
    background-color: #22c55e;
}

.forum-nav a:hover,
.forum-nav-link:hover {
    color: #fff;
}

.forum-nav a:hover::after,
.forum-nav a:focus-visible::after {
    width: 100%;
}

.forum-nav a.active::after {
    width: 100%;
    background-color: #22c55e;
}

.forum-nav-link {
    text-transform: lowercase;
}

/* ── User menu ── */
.forum-user-menu {
    position: relative;
    z-index: 30;
}

.forum-user-menu__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.06rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    border-radius: var(--radius-sm);
}

.forum-user-menu__toggle:hover,
.forum-user-menu.is-open .forum-user-menu__toggle {
    background: rgba(255, 255, 255, 0.1);
}

.forum-user-menu__avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: none;
    box-shadow: none;
    flex-shrink: 0;
    display: block;
}

.forum-user-menu__avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #006400;
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1;
}

html.dark-mode .forum-user-menu__avatar--placeholder,
html.dark-mode .forum-post-avatar--placeholder {
    color: var(--text);
}

.forum-user-menu__dropdown {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 11rem;
    z-index: 10050;
}

.forum-user-menu.is-open .forum-user-menu__dropdown {
    display: block;
}

.forum-user-menu__dropdown[hidden] {
    display: none;
}

.forum-user-menu__dropdown a {
    display: block;
    padding: 0.55rem 0.9rem;
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: lowercase;
    text-decoration: none;
}

/* ── Theme toggle (sexer switch) ── */
.forum-theme-switch.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.forum-theme-switch.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.forum-theme-switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--purple-dark);
    transition: 0.35s;
    border-radius: 34px;
    border: 1px solid #242525;
}

html.dark-mode .forum-theme-switch .slider,
.forum-theme-switch input:checked + .slider {
    background-color: var(--purple);
    border-color: var(--purple);
}

.forum-theme-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #c7c1b6;
    transition: 0.35s;
    border-radius: 50%;
    z-index: 1;
}

.forum-theme-switch input:checked + .slider:before {
    transform: translateX(24px);
}

.forum-theme-switch .icon-moon,
.forum-theme-switch .icon-sun {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}

.forum-theme-switch .icon-moon { left: 5px; }
.forum-theme-switch .icon-sun { right: 5px; }

/* Mobile slide-in menu (sexer.ee style) */
.forum-mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.forum-mobile-menu-toggle:focus,
.forum-mobile-menu-toggle:focus-visible {
    outline: none;
}

.forum-mobile-menu-toggle svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.forum-mobile-menu-toggle svg path {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0.9;
    stroke-linejoin: round;
}

.forum-header-search {
    display: none !important;
}

html:not(.dark-mode) .forum-header-brand .forum-logo {
    color: #fff;
}

html:not(.dark-mode) .forum-mobile-menu-toggle {
    color: #fff;
}

html:not(.dark-mode) .forum-mobile-menu-toggle svg,
html:not(.dark-mode) .forum-mobile-menu-toggle svg path {
    fill: #fff;
    stroke: #fff;
    color: #fff;
}

.forum-header-actions .forum-theme-switch.switch,
.forum-header-inner > .forum-theme-switch.switch {
    width: 44px;
    height: 24px;
    margin-top: 0;
    flex-shrink: 0;
}

.forum-header-actions .forum-theme-switch .slider:before,
.forum-header-inner > .forum-theme-switch .slider:before {
    height: 16px;
    width: 16px;
}

.forum-header-actions .forum-theme-switch input:checked + .slider:before,
.forum-header-inner > .forum-theme-switch input:checked + .slider:before {
    transform: translateX(20px);
}

.forum-header-actions .forum-theme-switch .icon-moon svg,
.forum-header-actions .forum-theme-switch .icon-sun svg,
.forum-header-inner > .forum-theme-switch .icon-moon svg,
.forum-header-inner > .forum-theme-switch .icon-sun svg {
    width: 12px;
    height: 12px;
}

/* Wide: nav replaces hamburger (exclude short landscape phones) */
@media (min-width: 769px) and (not ((orientation: landscape) and (max-height: 500px))) {
    .forum-nav.forum-header-desktop-only {
        display: flex;
    }

    .forum-mobile-menu-toggle {
        display: none !important;
    }

    .forum-header-desktop-only.forum-user-menu {
        display: block;
    }
}

.forum-mobile-sidebar {
    position: fixed;
    top: 10px;
    right: -300px;
    width: 200px;
    height: auto;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    background-color: #6A11CF;
    color: #fff;
    transition: right 0.4s ease-in-out, visibility 0.4s ease-in-out;
    padding: 0 1rem 1rem;
    z-index: 2147483647;
    border-bottom-left-radius: 20px;
    border-top-left-radius: 20px;
    border: 5px solid #ff0000;
    visibility: hidden;
}

.forum-mobile-sidebar.is-open {
    visibility: visible;
    right: 0;
}

.forum-mobile-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.forum-mobile-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 45px;
    line-height: 1;
    padding: 0;
    margin-left: auto;
    -webkit-tap-highlight-color: transparent;
}

.forum-mobile-sidebar__close:hover,
.forum-mobile-sidebar__close:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    outline: none;
}

.forum-mobile-sidebar__menu {
    display: grid;
    justify-items: end;
    width: 100%;
    gap: 0;
    padding-right: 12px;
    box-sizing: border-box;
}

.forum-mobile-sidebar__menu a {
    display: inline-block;
    width: fit-content;
    max-width: calc(100% - 2px);
    justify-self: end;
    position: relative;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    line-height: 28px;
    letter-spacing: 0.7px;
    padding-bottom: 5px;
    margin-right: 0;
    text-transform: uppercase;
    text-align: right;
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.forum-mobile-sidebar__menu a:focus,
.forum-mobile-sidebar__menu a:focus-visible {
    outline: none;
}

.forum-mobile-sidebar__menu a:not(:last-child) {
    margin-bottom: -10px;
}

.forum-mobile-sidebar__menu a::after {
    content: "";
    position: absolute;
    left: auto;
    right: 0;
    bottom: 8px;
    width: 100%;
    height: 2px;
    background-color: transparent;
}

.forum-mobile-sidebar__menu a:hover::after,
.forum-mobile-sidebar__menu a:focus-visible::after,
.forum-mobile-sidebar__menu a.active::after {
    background-color: #22c55e;
}

html:not(.dark-mode) .forum-mobile-sidebar__menu a,
html:not(.dark-mode) .forum-mobile-sidebar__menu a:hover,
html:not(.dark-mode) .forum-mobile-sidebar__menu a:focus-visible,
html:not(.dark-mode) .forum-mobile-sidebar__menu a.active {
    color: #fff;
}

html.dark-mode .forum-mobile-menu-toggle {
    color: var(--text-soft);
}

html.dark-mode .forum-mobile-menu-toggle svg,
html.dark-mode .forum-mobile-menu-toggle svg path {
    fill: var(--text-soft);
    stroke: var(--text-soft);
    color: var(--text-soft);
}

html.dark-mode .forum-mobile-sidebar__close {
    color: var(--text-soft);
}

html.dark-mode .forum-mobile-sidebar__menu a,
html.dark-mode .forum-mobile-sidebar__menu a:hover,
html.dark-mode .forum-mobile-sidebar__menu a:focus-visible,
html.dark-mode .forum-mobile-sidebar__menu a.active {
    color: var(--text-soft);
}

.forum-mobile-sidebar__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-top: 0.75rem;
    padding-right: 12px;
    box-sizing: border-box;
}

body.forum-mobile-sidebar-open {
    overflow: hidden;
}

/* ── Main content ── */
.forum-main {
    flex: 1 0 auto;
    padding: 0;
    width: 100%;
}

.forum-main:has(.forum-breadcrumb-row) {
    padding-top: var(--forum-search-row-gap);
}

.forum-main:not(:has(.forum-breadcrumb-row)) {
    padding-top: var(--forum-search-row-gap);
}

.forum-footer {
    background: transparent;
    border: 1px solid var(--purple);
    border-radius: var(--forum-frame-radius) var(--forum-frame-radius) 0 0;
    padding: 1.25rem 0.85rem 1.65rem;
    color: var(--muted);
    font-size: 0.92rem;
    flex-shrink: 0;
    width: 100%;
    margin-inline: 0;
    overflow: visible;
}

.forum-footer .forum-container {
    padding: 0;
}

.forum-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.forum-footer-left {
    min-width: 0;
}

.forum-footer-stats {
    margin-left: auto;
    text-align: right;
    line-height: 1.12;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.forum-post-author-name {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.12rem;
    flex-wrap: nowrap;
    width: auto;
    max-width: 100%;
    line-height: 1.2;
}

.forum-post-author-name__user {
    flex: 0 1 auto;
    min-width: 0;
}

.forum-post-author-name__admin {
    display: inline-flex;
    align-items: center;
    gap: 0.054rem;
    flex: 0 0 auto;
}

.forum-post-author-name__admin .badge {
    margin: 0;
}

.forum-post-author-name .forum-messenger-online-dot {
    margin: 0;
    flex-shrink: 0;
}

.forum-footer-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: lowercase;
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.55;
    color: #0000FF;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

.forum-footer-back-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    color: inherit;
    transform: translateX(0);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.forum-footer-back:hover,
.forum-footer-back:focus-visible,
.forum-footer-back:active {
    color: #FF0000;
}

.forum-footer-back:hover .forum-footer-back-arrow,
.forum-footer-back:focus-visible .forum-footer-back-arrow,
.forum-footer-back:active .forum-footer-back-arrow {
    animation: forum-back-arrow-heartbeat 1.45s ease-in-out infinite;
}

@media (max-width: 768px), ((orientation: landscape) and (max-height: 500px)) {
    .forum-footer-back {
        align-items: center;
        line-height: 1.35;
    }

    .forum-footer-back-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.35rem;
        font-weight: 900;
        line-height: 1;
        margin-top: 0;
    }
}

.forum-footer p {
    margin: 0.35rem 0 0;
}

@keyframes forum-back-arrow-heartbeat {
    0%, 36%, 100% {
        transform: translateX(0);
    }
    9% {
        transform: translateX(-5px);
    }
    18% {
        transform: translateX(0);
    }
    27% {
        transform: translateX(-5px);
    }
}

.forum-hero {
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.35rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(106, 17, 207, 0.12), rgba(255, 0, 76, 0.08));
    border: 1px solid var(--border);
}

.forum-hero h1 {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--purple-deep);
}

html.dark-mode .forum-hero h1 {
    color: var(--purple);
}

.forum-hero p,
.forum-subtitle {
    margin: 0;
    color: var(--muted);
}

.forum-guest-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.forum-guest-cta .forum-guest-actions {
    margin-top: 0;
}

.forum-guest-cta {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    padding: 0.75rem 1rem;
}

.forum-home-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
    align-items: stretch;
}

.forum-home-split-main {
    min-width: 0;
}

.forum-home-side-panel {
    min-width: 0;
    min-height: 8rem;
}

.forum-home-split .forum-panel {
    margin-bottom: 0;
    padding: 1rem 0.75rem;
}

html.dark-mode .forum-guest-actions .btn-ghost {
    color: #c7c1b6;
    border-color: var(--border);
}

.forum-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
    box-shadow: none;
}

html.dark-mode .forum-panel {
    border-color: var(--border);
}

.forum-panel-narrow {
    max-width: 640px;
}

#reply-form.forum-panel-narrow {
    width: min(640px, calc(100% - 0.9rem));
    margin-inline: auto;
}

html:not(.dark-mode) #reply-form .forum-section-heading {
    color: #000;
}

html:not(.dark-mode) #reply-form .forum-post-form .btn-primary {
    background: #006400;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 100, 0, 0.3);
}

html:not(.dark-mode) #reply-form .forum-post-form .btn-primary:hover {
    background: #005200;
    color: #fff;
}

.forum-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.forum-panel-head-spacer {
    flex: 1;
}

.forum-panel h1,
.forum-panel h2 {
    margin: 0 0 0.5rem;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--purple-deep);
}

.forum-main-topics-heading {
    color: #FF0000;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.forum-panel:has(.forum-main-topics-heading) h2.forum-main-topics-heading {
    margin-bottom: 0.12rem;
}

.forum-home-split-main:has(.forum-user-stats) {
    position: relative;
}

.forum-user-stats {
    font-size: 0.86rem;
    line-height: 1.12;
    margin: 0;
}

.forum-panel:has(.forum-main-topics-heading) .forum-user-stats {
    position: absolute;
    top: 0.3rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    margin: 0;
}

.forum-panel:has(.forum-main-topics-heading) .forum-table {
    margin-top: 0;
}

.forum-user-stats-all {
    color: #000;
}

html.dark-mode .forum-user-stats-all {
    color: #b8b3a8;
}

.forum-user-stats-online {
    color: #228B22;
}

.forum-panel h2.forum-main-topics-heading {
    color: #FF0000;
}

.forum-panel h2.forum-online-users-heading {
    color: #228B22;
    margin: 0 0 0.75rem;
}

.forum-panel h2.forum-recent-topics-heading {
    margin: 0;
}

.forum-home-split:has(.forum-home-online-panel) .forum-panel-head {
    margin-bottom: 0.75rem;
}

.forum-home-split--recent-online {
    align-items: start;
}

.forum-home-online-panel {
    align-self: start;
    min-height: 0;
    height: auto;
}

.forum-home-split-main .forum-thread-list--home-recent,
.forum-search-results.forum-search-results--topic-rows {
    gap: 0.32rem;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto auto;
    column-gap: 0.45rem;
    row-gap: 0.02rem;
    padding: 0.22rem 0.55rem;
    align-items: start;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-main,
.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-main-top,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-main,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-main-top {
    display: contents;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-main-top > .badge,
.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-title-link,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-main-top > .badge,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-title-link {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    z-index: 0;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-title-link,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-title-link {
    display: block;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-meta,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-meta {
    grid-column: 1;
    grid-row: 2;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-preview,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-preview {
    grid-column: 1 / -1;
    grid-row: 3;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-row-foot,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-row-foot {
    grid-column: 1;
    grid-row: 4;
    position: relative;
    z-index: 1;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-title-link,
.forum-search-results.forum-search-results--topic-rows .forum-thread-title-link {
    font-size: 0.8rem;
    line-height: 1.12;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-preview,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-preview {
    font-size: 0.68rem;
    line-height: 1.12;
    max-height: calc(1.12em * 3);
    margin: 0.04rem 0 0.06rem;
    overflow: hidden;
    text-align: justify;
    text-align-last: left;
    word-break: break-all;
    overflow-wrap: anywhere;
    color: var(--text-soft);
    position: relative;
    z-index: 0;
}

html:not(.dark-mode) .forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-preview,
html:not(.dark-mode) .forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-preview {
    color: #000;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-meta,
.forum-search-results.forum-search-results--topic-rows .forum-thread-meta {
    margin-top: 0;
    font-size: 0.68rem;
    line-height: 1.12;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row-foot,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row-foot {
    margin-top: 0;
    line-height: 1.05;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-metrics,
.forum-search-results.forum-search-results--topic-rows .forum-thread-metrics {
    grid-column: 2;
    grid-row: 1 / -1;
    gap: 0;
    min-width: 2.85rem;
    padding-top: 0;
    align-self: stretch;
    position: relative;
    z-index: 1;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-metrics > .forum-view-count,
.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-metrics > .forum-reply-count,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-metrics > .forum-view-count,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-metrics > .forum-reply-count {
    width: fit-content;
    align-self: flex-end;
    background: var(--surface-soft);
    padding: 0.02rem 0.12rem;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-metrics > .forum-view-count,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-metrics > .forum-view-count {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding-bottom: 0;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-thread-metrics > .forum-reply-count,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-thread-metrics > .forum-reply-count {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding-top: 0;
    margin-bottom: 0.12rem;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-last-replier,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-last-replier {
    margin-top: auto;
    position: relative;
    z-index: 1;
    width: fit-content;
    align-self: flex-end;
    background: var(--surface-soft);
    padding: 0.02rem 0.12rem;
    border-radius: var(--radius-sm);
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-last-replier__name,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-last-replier__name {
    display: inline-block;
    width: fit-content;
    max-width: none;
    background: transparent;
    padding: 0;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-thread-row--preview-foot .forum-category-topic-meta-item--metric-date,
.forum-search-results.forum-search-results--topic-rows .forum-thread-row--preview-foot .forum-category-topic-meta-item--metric-date {
    display: inline-block;
    width: fit-content;
    background: var(--surface-soft);
    padding: 0.02rem 0.1rem;
    position: relative;
    z-index: 1;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-view-count,
.forum-home-split-main .forum-thread-list--home-recent .forum-reply-count,
.forum-search-results.forum-search-results--topic-rows .forum-view-count,
.forum-search-results.forum-search-results--topic-rows .forum-reply-count {
    font-size: 0.64rem;
    gap: 0.16rem;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-view-count__icon,
.forum-home-split-main .forum-thread-list--home-recent .forum-reply-count__icon,
.forum-search-results.forum-search-results--topic-rows .forum-view-count__icon,
.forum-search-results.forum-search-results--topic-rows .forum-reply-count__icon {
    width: 10px;
    height: 10px;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-last-replier__icon,
.forum-search-results.forum-search-results--topic-rows .forum-last-replier__icon {
    width: 10px;
    height: 10px;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-last-replier,
.forum-search-results.forum-search-results--topic-rows .forum-last-replier {
    gap: 0.12rem;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-last-replier__name,
.forum-search-results.forum-search-results--topic-rows .forum-last-replier__name {
    font-size: 0.6rem;
    line-height: 1.05;
    max-width: 4.25rem;
}

.forum-home-split-main .forum-thread-list--home-recent .forum-category-topic-meta-item,
.forum-search-results.forum-search-results--topic-rows .forum-category-topic-meta-item {
    font-size: 0.6rem;
    line-height: 1.05;
}

.forum-home-split-main .forum-thread-list--home-recent .badge,
.forum-search-results.forum-search-results--topic-rows .badge {
    font-size: 0.58rem;
    padding: 0.05rem 0.28rem;
    margin-right: 0.2rem;
}

.forum-label-search-main-row,
.forum-label-search-sub-row {
    margin-bottom: 0.55rem;
}

.forum-label-search-main-row:has(+ .forum-label-search-topic-divider) {
    margin-bottom: 0.35rem;
}

.forum-label-search-topic-divider {
    display: block;
    width: 20%;
    max-width: 20%;
    height: 0;
    margin: 0 0 0.55rem;
    border: none;
    border-top: 1px solid var(--purple);
}

.forum-label-search-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.forum-label-search-chip:hover,
.forum-label-search-chip:focus-visible {
    background: var(--glow);
    border-color: var(--purple);
    color: var(--text);
    outline: none;
}

.forum-label-search-chip.is-selected {
    background: var(--purple);
    border-color: var(--purple);
    color: #fff;
}

html.dark-mode .forum-label-search-chip.is-selected {
    color: #fff;
}

.forum-label-search-filter-bar {
    margin-bottom: 0.85rem;
}

.forum-label-search-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.forum-label-search-filters > .forum-label:not(.forum-label-search-date-field) {
    width: 50%;
    max-width: 50%;
    align-self: flex-start;
}

.forum-label-search-filters .forum-admin-user-search-input {
    width: 100%;
    max-width: none;
}

.forum-label-search-date-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.5rem;
    width: 50%;
    max-width: 50%;
    align-self: flex-start;
    justify-content: flex-start;
}

.forum-label-search-date-field {
    flex: 1 1 0;
    min-width: 0;
}

.forum-label-search-date-field .forum-label-text {
    font-size: 0.82rem;
}

.forum-label-search-date-input {
    width: 100%;
    padding: 0.4rem 0.55rem;
    font-size: 0.82rem;
}

.forum-label-search-submit {
    align-self: flex-start;
    color: #fff;
}

html.dark-mode .forum-label-search-submit,
html.dark-mode .forum-label-search-submit:hover,
html.dark-mode .forum-label-search-submit:focus-visible {
    color: #fff;
}

.forum-label-search-empty {
    margin: 0;
}

a.forum-label-chip--link {
    text-decoration: none;
    color: inherit;
}

a.forum-label-chip--link:hover,
a.forum-label-chip--link:focus-visible {
    border-color: var(--purple);
    outline: none;
}

html:not(.dark-mode) .forum-panel:has(.forum-main-topics-heading) .forum-table-row strong,
html:not(.dark-mode) .forum-table--subcategories .forum-table-row strong {
    color: #000;
}

a.forum-table-row {
    color: var(--text);
    text-decoration: none;
}

.forum-table:not(.forum-table--popular) a.forum-table-row:hover,
.forum-table:not(.forum-table--popular) a.forum-table-row:hover span,
.forum-table:not(.forum-table--popular) a.forum-table-row:hover small {
    color: var(--text);
}

a.forum-table-row:hover strong {
    color: var(--purple-deep);
}

html:not(.dark-mode) a.forum-table-row:hover strong,
html:not(.dark-mode) .forum-table--subcategories a.forum-table-row:hover strong {
    color: #000;
}

html.dark-mode a.forum-table-row:hover strong {
    color: var(--purple);
}

html.dark-mode .forum-table--popular a.forum-table-row:hover .forum-popular-topic-link {
    color: #ff0000;
}

.forum-recent-topics-heading {
    margin: 0;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.01em;
    line-height: 1.45;
}

html:not(.dark-mode) .forum-panel h2.forum-recent-topics-heading {
    color: #000;
}

html.dark-mode .forum-panel h2.forum-recent-topics-heading {
    color: var(--muted);
}

.forum-online-users-heading {
    margin: 0 0 0.75rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.01em;
    line-height: 1.45;
    color: #228B22;
}

.forum-online-users-list {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    line-height: 1.45;
    font-size: 0.92rem;
}

.forum-online-users-name {
    color: #228B22;
    flex: 0 0 auto;
}

.forum-username-chat-trigger {
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    display: inline;
    appearance: none;
    -webkit-appearance: none;
}

.forum-username-chat-trigger:hover,
.forum-username-chat-trigger:focus,
.forum-username-chat-trigger:focus-visible,
.forum-username-chat-trigger:active {
    color: inherit;
    text-decoration: none;
    background: none;
    outline: none;
    box-shadow: none;
}

.forum-online-users-list .forum-username-chat-trigger {
    flex: 0 0 auto;
}

.forum-last-replier__name .forum-username-chat-trigger,
.forum-category-topic-row .forum-last-replier__name .forum-username-chat-trigger {
    cursor: pointer;
    max-width: 100%;
    vertical-align: bottom;
}

.forum-last-replier__name .forum-username-chat-trigger .forum-username,
.forum-category-topic-row .forum-last-replier__name .forum-username-chat-trigger .forum-username {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-online-users-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #228B22;
    flex: 0 0 auto;
    flex-shrink: 0;
    box-shadow: none;
    border: none;
    outline: none;
}

.forum-online-users-empty {
    margin: 0;
    min-height: 1.45em;
}

.forum-subsection-heading {
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--purple-deep);
    text-transform: uppercase;
}

html.dark-mode .forum-subsection-heading {
    color: var(--purple);
}

html.dark-mode .forum-main-topics-heading {
    color: #FF0000;
}

html.dark-mode .forum-panel h1,
html.dark-mode .forum-panel h2 {
    color: var(--text-soft);
}

html.dark-mode .forum-panel h2.forum-main-topics-heading {
    color: #FF0000;
}

html.dark-mode .forum-panel h2.forum-online-users-heading {
    color: #00FF00;
}

html.dark-mode .forum-online-users-heading,
html.dark-mode .forum-online-users-name {
    color: #00FF00;
}

html.dark-mode .forum-online-users-dot {
    background: #00FF00;
}

html.dark-mode .forum-user-stats-online {
    color: #00FF00;
}

.forum-breadcrumb-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: nowrap;
    margin-top: 0;
    margin-bottom: 0.85rem;
}

.forum-breadcrumb-row:not(.forum-breadcrumb-row--thread) {
    margin-bottom: var(--forum-search-row-gap);
    padding-bottom: 0;
}

.forum-breadcrumb-row-head {
    position: relative;
    width: 100%;
    min-height: 2.55rem;
}

.forum-breadcrumb-row--thread {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
    padding-inline: 0;
}

.forum-breadcrumb-row--thread .forum-breadcrumb-row-head .forum-breadcrumb {
    width: 100%;
}

.forum-thread-title-row {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.forum-breadcrumb-row-head .forum-breadcrumb {
    flex: 1 1 auto;
    min-width: 0;
}

.forum-breadcrumb-row-head .forum-site-search-toolbar {
    position: absolute;
    right: 0;
    top: 50%;
    flex: 0 0 auto;
    margin-left: 0;
    margin-top: 0;
    transform: translateY(-50%);
}

.forum-site-search-toolbar {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-width: 0;
}

.forum-breadcrumb-row-head .forum-site-search-toolbar .forum-site-search {
    width: var(--forum-site-search-width);
    max-width: var(--forum-site-search-width);
    flex: 0 0 auto;
}

.forum-label-search-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    padding: 0 0.75rem;
    min-height: 2.35rem;
    text-decoration: none;
    text-transform: lowercase;
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1;
    background: #006400;
    color: #fff;
    border: 1px solid #006400;
    border-radius: var(--radius-sm);
    box-shadow: none;
    white-space: nowrap;
}

.forum-label-search-nav-btn:hover,
.forum-label-search-nav-btn:focus-visible {
    background: #005200;
    border-color: #005200;
    color: #fff;
    outline: none;
}

html.dark-mode .forum-label-search-nav-btn,
html.dark-mode .forum-label-search-nav-btn:hover,
html.dark-mode .forum-label-search-nav-btn:focus-visible {
    background: #006400;
    border-color: #006400;
    color: #fff;
    box-shadow: none;
}

.forum-label-search-nav-btn svg {
    flex-shrink: 0;
    width: 21px;
    height: 21px;
    color: #fff;
}

.forum-main > .forum-breadcrumb-row:not(.forum-breadcrumb-row--thread) + * {
    margin-top: 0;
}

.forum-breadcrumb {
    margin-bottom: 0;
    color: #000;
    font-size: 0.92rem;
}

.forum-site-search {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.35rem;
    flex: 1 1 14rem;
    max-width: 28rem;
    min-width: 0;
    box-sizing: border-box;
}

.forum-site-search-label {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.forum-site-search-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #6A11CF;
    border-radius: 10px;
    background-color: #fff;
    color: #6A11CF;
    cursor: pointer;
    line-height: 1;
}

.forum-site-search-btn:hover {
    background-color: #6A11CF;
    border-color: #6A11CF;
    color: #fff;
}

html.dark-mode .forum-site-search-btn {
    border-color: var(--border);
    background-color: var(--surface);
    color: var(--border-strong);
}

html.dark-mode .forum-site-search-btn:hover {
    background-color: #6A11CF;
    border-color: #6A11CF;
    color: #fff;
}

.forum-inline-search-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.9rem;
    font: inherit;
    background: var(--surface);
    color: var(--text);
    -webkit-appearance: none;
    appearance: none;
}

.forum-inline-search-input:focus,
.forum-inline-search-input:focus-visible {
    outline: none;
    border-color: var(--border);
    box-shadow: none;
}

.forum-site-search-input {
    padding-inline: 0.45rem;
}

.forum-pw-generate-label {
    display: none;
}

.forum-search-results-heading {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #000;
}

.forum-panel h1.forum-search-results-heading,
.forum-panel h2.forum-search-section-heading {
    color: #000;
}

html:not(.dark-mode) .forum-search-results .forum-link-blue,
html:not(.dark-mode) .forum-search-results .forum-thread-title-link {
    color: #000;
}

html:not(.dark-mode) .forum-search-results .forum-link-blue:hover,
html:not(.dark-mode) .forum-search-results .forum-thread-title-link:hover {
    color: #FF0000;
}

html.dark-mode .forum-search-results-heading,
html.dark-mode .forum-panel h1.forum-search-results-heading {
    color: var(--text-soft);
}

html.dark-mode .forum-search-section-heading,
html.dark-mode .forum-panel h2.forum-search-section-heading {
    color: var(--muted);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html.dark-mode .forum-breadcrumb {
    color: var(--muted);
}

.forum-breadcrumb a,
.forum-link-blue {
    color: #0000FF;
    text-decoration: none;
    transition: color 0.25s ease;
}

.forum-breadcrumb a:hover,
.forum-link-blue:hover {
    color: #FF0000;
}

/* ── Category table ── */
.forum-table-head,
.forum-table-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: center;
}

.forum-table-head span:not(:first-child),
.forum-table-row span:not(:first-child) {
    display: none;
}

.forum-table-head {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 0 0.5rem 0.65rem;
}

.forum-table-head span:not(:first-child) {
    text-align: center;
}

.forum-table-row {
    padding: 0.9rem 0.5rem;
    color: inherit;
    border-radius: 12px;
    background: transparent;
    transition: box-shadow 0.15s ease;
}

.forum-table-row span:not(:first-child) {
    text-align: center;
}

a.forum-table-row:hover,
a.forum-table-row:focus,
a.forum-table-row:focus-visible,
a.forum-table-row:active,
.forum-table-row.forum-guest-locked:hover,
.forum-table-row.forum-guest-locked:focus,
.forum-table-row.forum-guest-locked:focus-visible {
    background: transparent;
    box-shadow: 0 0 0 2px #32CD32;
    outline: none;
}

.forum-table-row strong {
    display: block;
    margin-bottom: 0.05rem;
    color: var(--purple-deep);
    text-transform: uppercase;
    font-size: 1.05rem;
    line-height: 1.12;
}

.forum-table--subcategories .forum-table-row strong {
    font-size: 0.92rem;
}

.forum-panel-flush-top {
    padding-top: 0.25rem;
}

.forum-category-lead {
    margin: -0.35rem 0 0.85rem;
}

html.dark-mode .forum-table-row {
    color: var(--muted);
}

html.dark-mode .forum-table:not(.forum-table--popular) .forum-table-row strong {
    color: var(--purple);
}

.forum-table-row small {
    display: block;
    margin-top: 0.05rem;
    color: var(--muted);
    line-height: 1.15;
}

/* Main topics list — 80% tighter row spacing */
.forum-panel:has(.forum-main-topics-heading) .forum-table-head,
.forum-panel:has(.forum-main-topics-heading) .forum-table-row {
    gap: 0.15rem;
}

.forum-panel:has(.forum-main-topics-heading) .forum-table-head {
    padding: 0 0.1rem 0.08rem;
}

.forum-panel:has(.forum-main-topics-heading) .forum-table-row {
    padding: 0.18rem 0.1rem;
}

.forum-panel:has(.forum-main-topics-heading) .forum-table-row strong {
    margin-bottom: 0.01rem;
    line-height: 1.02;
}

.forum-panel:has(.forum-main-topics-heading) .forum-table-row small {
    margin-top: 0.01rem;
    line-height: 1.03;
}

/* Main topics + sub-topic lists — Topics / Posts count columns */
.forum-panel:has(.forum-main-topics-heading) .forum-table:not(.forum-table--popular) .forum-table-head,
.forum-panel:has(.forum-main-topics-heading) .forum-table:not(.forum-table--popular) .forum-table-row,
.forum-table--subcategories .forum-table-head,
.forum-table--subcategories .forum-table-row {
    grid-template-columns: 1fr 90px 90px;
}

.forum-panel:has(.forum-main-topics-heading) .forum-table:not(.forum-table--popular) .forum-table-head span:not(:first-child),
.forum-panel:has(.forum-main-topics-heading) .forum-table:not(.forum-table--popular) .forum-table-row span:not(:first-child),
.forum-table--subcategories .forum-table-head span:not(:first-child),
.forum-table--subcategories .forum-table-row span:not(:first-child) {
    display: block;
}

.forum-table--popular .forum-table-head,
.forum-table--popular .forum-table-row {
    grid-template-columns: 1fr 72px 52px;
}

.forum-table--popular .forum-table-head span:not(:first-child) {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
}

.forum-table--popular .forum-table-head-replies,
.forum-table--popular .forum-table-head-views {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
}

.forum-table--popular .forum-table-head-replies .forum-reply-count,
.forum-table--popular .forum-table-head-views .forum-view-count {
    color: var(--muted);
}

.forum-table--popular .forum-table-row > span:nth-child(2),
.forum-table--popular .forum-table-row > span:last-child {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 2;
}

.forum-view-count,
.forum-reply-count {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.forum-view-count__icon,
.forum-reply-count__icon {
    flex-shrink: 0;
    opacity: 0.92;
}

.forum-view-count__num,
.forum-reply-count__num {
    font-variant-numeric: tabular-nums;
}

.forum-view-count--number-only,
.forum-reply-count--number-only {
    gap: 0;
}


.forum-panel:has(.forum-popular-topics-heading) .forum-table-head,
.forum-panel:has(.forum-popular-topics-heading) .forum-table-row,
.forum-home-side-panel .forum-table--popular .forum-table-head,
.forum-home-side-panel .forum-table--popular .forum-table-row {
    gap: 0.15rem;
}

.forum-panel:has(.forum-popular-topics-heading) .forum-table-head,
.forum-home-side-panel .forum-table--popular .forum-table-head {
    padding: 0 0.1rem 0.13rem;
}

.forum-panel:has(.forum-popular-topics-heading) .forum-table-row,
.forum-home-side-panel .forum-table--popular .forum-table-row {
    padding: 0.18rem 0.1rem;
}

.forum-table--popular .forum-table-row > span:first-child {
    min-width: 0;
    overflow: hidden;
}

.forum-table--popular .forum-popular-topic-link {
    display: block;
    max-width: 100%;
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: none;
    font-family: var(--font);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.forum-table--popular a.forum-table-row:hover .forum-popular-topic-link,
.forum-table--popular a.forum-table-row:focus-visible .forum-popular-topic-link,
.forum-table--popular a.forum-table-row:active .forum-popular-topic-link,
.forum-table--popular .forum-guest-locked:hover .forum-popular-topic-link,
.forum-table--popular .forum-guest-locked:focus-visible .forum-popular-topic-link {
    color: #ff0000;
}

.forum-table--popular .forum-table-row span:not(:first-child) {
    color: var(--muted);
    font-weight: 400;
}

.forum-table--popular a.forum-table-row:hover span:not(:first-child),
.forum-table--popular a.forum-table-row:focus-visible span:not(:first-child),
.forum-table--popular a.forum-table-row:active span:not(:first-child),
.forum-table--popular .forum-guest-locked:hover span:not(:first-child),
.forum-table--popular .forum-guest-locked:focus-visible span:not(:first-child),
.forum-table--popular .forum-guest-locked:active span:not(:first-child),
.forum-table--popular a.forum-table-row:hover .forum-view-count,
.forum-table--popular a.forum-table-row:focus-visible .forum-view-count,
.forum-table--popular a.forum-table-row:active .forum-view-count,
.forum-table--popular .forum-guest-locked:hover .forum-view-count,
.forum-table--popular .forum-guest-locked:focus-visible .forum-view-count,
.forum-table--popular .forum-guest-locked:active .forum-view-count,
.forum-table--popular a.forum-table-row:hover .forum-view-count__num,
.forum-table--popular a.forum-table-row:focus-visible .forum-view-count__num,
.forum-table--popular a.forum-table-row:active .forum-view-count__num,
.forum-table--popular .forum-guest-locked:hover .forum-view-count__num,
.forum-table--popular .forum-guest-locked:focus-visible .forum-view-count__num,
.forum-table--popular .forum-guest-locked:active .forum-view-count__num,
.forum-table--popular a.forum-table-row:hover .forum-reply-count,
.forum-table--popular a.forum-table-row:focus-visible .forum-reply-count,
.forum-table--popular a.forum-table-row:active .forum-reply-count,
.forum-table--popular .forum-guest-locked:hover .forum-reply-count,
.forum-table--popular .forum-guest-locked:focus-visible .forum-reply-count,
.forum-table--popular .forum-guest-locked:active .forum-reply-count,
.forum-table--popular a.forum-table-row:hover .forum-reply-count__num,
.forum-table--popular a.forum-table-row:focus-visible .forum-reply-count__num,
.forum-table--popular a.forum-table-row:active .forum-reply-count__num,
.forum-table--popular .forum-guest-locked:hover .forum-reply-count__num,
.forum-table--popular .forum-guest-locked:focus-visible .forum-reply-count__num,
.forum-table--popular .forum-guest-locked:active .forum-reply-count__num {
    color: #ff0000;
}

/* Sub-topic list — 50% tighter row spacing */
.forum-table--subcategories .forum-table-head,
.forum-table--subcategories .forum-table-row {
    gap: 0.375rem;
}

.forum-table--subcategories .forum-table-head {
    padding: 0 0.25rem 0.325rem;
}

.forum-table--subcategories .forum-table-row {
    padding: 0.45rem 0.25rem;
}

.forum-table--subcategories .forum-table-row strong {
    margin-bottom: 0.025rem;
    line-height: 1.06;
}

.forum-table--subcategories .forum-table-row small {
    margin-top: 0.025rem;
    line-height: 1.075;
}

@media (max-width: 960px) {
    .forum-panel:has(.forum-main-topics-heading) .forum-table-row strong {
        margin-bottom: 0;
        line-height: 1.01;
    }

    .forum-panel:has(.forum-main-topics-heading) .forum-table-row small {
        margin-top: 0;
        line-height: 1.02;
    }

    .forum-table--subcategories .forum-table-row strong {
        margin-bottom: 0;
        line-height: 1.03;
    }

    .forum-table--subcategories .forum-table-row small {
        margin-top: 0;
        line-height: 1.04;
    }
}

.forum-guest-locked {
    cursor: pointer;
}

.forum-thread-title-link {
    font-weight: 700;
    text-transform: none;
}

.forum-thread-main > a.forum-link-blue.forum-thread-title-link,
.forum-thread-main > span.forum-link-blue.forum-thread-title-link,
.forum-thread-meta a.forum-link-blue,
.forum-thread-meta span.forum-link-blue.forum-thread-category-label {
    color: #0000FF;
    text-decoration: none;
    transition: color 0.25s ease;
}

.forum-thread-meta a.forum-link-blue,
.forum-thread-meta span.forum-link-blue.forum-thread-category-label {
    font-weight: 400;
}

.forum-thread-category-label {
    transition: color 0.25s ease;
}

.forum-thread-row.forum-guest-locked:hover,
.forum-thread-row.forum-guest-locked:focus,
.forum-thread-row.forum-guest-locked:focus-visible {
    background: var(--surface-soft);
    border-color: var(--border);
    box-shadow: none;
}

.forum-thread-row .forum-guest-locked.forum-link-blue.forum-thread-title-link:hover,
.forum-thread-row .forum-guest-locked.forum-link-blue.forum-thread-category-label:hover,
.forum-thread-row .forum-guest-locked.forum-link-blue.forum-thread-title-link:focus-visible,
.forum-thread-row .forum-guest-locked.forum-link-blue.forum-thread-category-label:focus-visible {
    color: #FF0000;
}

.forum-thread-main > a.forum-link-blue.forum-thread-title-link:hover,
.forum-thread-meta a.forum-link-blue:hover,
.forum-thread-meta a.forum-thread-category-label:hover,
html.dark-mode .forum-thread-main > a.forum-link-blue.forum-thread-title-link:hover,
html.dark-mode .forum-thread-meta a.forum-link-blue:hover {
    color: #FF0000;
}

.forum-guest-modal[hidden] {
    display: none !important;
}

.forum-guest-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forum-guest-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.forum-guest-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 92vw);
    padding: 1.35rem 1.25rem 1.25rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.forum-guest-modal__close {
    position: absolute;
    top: 0.45rem;
    right: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.forum-guest-modal__close:hover,
.forum-guest-modal__close:focus-visible {
    background: rgba(0, 0, 0, 0.08);
    outline: none;
}

html.dark-mode .forum-guest-modal__close:hover,
html.dark-mode .forum-guest-modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
}

.forum-guest-modal__title {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.forum-guest-modal__dialog p {
    margin: 0 0 1rem;
    color: var(--text-soft);
}

.forum-guest-modal__actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

/* ── Threads ── */
.forum-thread-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.forum-thread-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.forum-thread-main {
    min-width: 0;
    flex: 1;
}

.forum-thread-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.42rem;
    flex-shrink: 0;
    min-width: 3.5rem;
    padding-top: 0.05rem;
}

.forum-last-replier {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    color: var(--muted);
    line-height: 1;
    min-width: 0;
}

.forum-last-replier__icon {
    flex-shrink: 0;
    opacity: 0.92;
}

.forum-last-replier__name {
    font-size: 0.68rem;
    font-weight: 300;
    line-height: 1.1;
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-last-replier__name .forum-username--online {
    color: #228B22;
}

html.dark-mode .forum-last-replier__name .forum-username--online {
    color: #00FF00;
}

.forum-thread-row:hover {
    border-color: var(--purple);
    box-shadow: 0 0 0 1px rgba(106, 17, 207, 0.2);
}

.forum-thread-meta {
    color: var(--muted);
    font-size: 0.86rem;
    margin-top: 0.25rem;
}

.forum-thread-row--preview-foot {
    align-items: flex-start;
}

.forum-thread-row--preview-foot .forum-thread-main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.2rem;
    min-height: 0;
    min-width: 0;
    flex: 1 1 auto;
    max-width: calc(100% - 4.25rem);
}

.forum-thread-row--preview-foot .forum-thread-main-top {
    min-width: 0;
}

.forum-thread-row--preview-foot .forum-thread-row-foot {
    flex-shrink: 0;
    margin-top: 0;
}

.forum-thread-row--preview-foot .forum-thread-metrics {
    align-items: flex-end;
    align-self: flex-start;
    flex-shrink: 0;
    padding-top: 0.05rem;
}

.forum-thread-row--preview-foot .forum-view-count,
.forum-thread-row--preview-foot .forum-reply-count,
.forum-thread-row--preview-foot .forum-last-replier {
    flex-direction: row-reverse;
    justify-content: flex-start;
    width: 100%;
}

.forum-thread-row--preview-foot .forum-category-topic-meta-item--metric-date {
    align-self: flex-end;
}

/* ── Posts ── */
.forum-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.forum-thread-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-inline: 0;
    margin-bottom: 1rem;
}

.forum-post {
    display: grid;
    grid-template-columns: 5.75rem 1fr;
    gap: 0.65rem;
    align-items: start;
}

.forum-post.forum-post-box {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.forum-post-box {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1rem 0.45rem;
    background: var(--surface-soft);
    box-shadow: 0 2px 10px rgba(89, 30, 152, 0.06);
}

html.dark-mode .forum-post-box {
    border: 1px solid var(--purple);
    box-shadow: none;
}

.forum-post-reply-row {
    margin-top: 0.5rem;
}

.forum-post-reply-row + .forum-post-footer {
    margin-top: 0.45rem;
}

.forum-post-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.35rem 0.65rem;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 0.45rem;
    padding-top: 0.35rem;
    padding-bottom: 0;
    border-top: 1px solid var(--border);
}

.forum-post-footer-primary {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
    min-width: 0;
}

.forum-post-footer-labels {
    display: contents;
}

.forum-post-footer .forum-label-chip {
    flex-shrink: 0;
}

.forum-post-reply-row button[data-forum-reply-toggle],
.forum-post-actions button[data-forum-reply-toggle] {
    font-weight: 700;
    background: #00ff00;
    border-color: #00ff00;
    color: #0000ff;
}

.forum-post-reply-row button[data-forum-reply-toggle]:hover,
.forum-post-reply-row button[data-forum-reply-toggle]:focus-visible,
.forum-post-actions button[data-forum-reply-toggle]:hover,
.forum-post-actions button[data-forum-reply-toggle]:focus-visible {
    background: #0000ff;
    border-color: #0000ff;
    color: #00ff00;
}

html.dark-mode .forum-post-reply-row button[data-forum-reply-toggle],
html.dark-mode .forum-post-actions button[data-forum-reply-toggle] {
    background: #00ff00;
    border-color: #00ff00;
    color: #0000ff;
}

html.dark-mode .forum-post-reply-row button[data-forum-reply-toggle]:hover,
html.dark-mode .forum-post-reply-row button[data-forum-reply-toggle]:focus-visible,
html.dark-mode .forum-post-actions button[data-forum-reply-toggle]:hover,
html.dark-mode .forum-post-actions button[data-forum-reply-toggle]:focus-visible {
    background: #0000ff;
    border-color: #0000ff;
    color: #00ff00;
}

html.dark-mode .forum-post-footer {
    border-top-color: var(--purple);
}

.forum-post-footer .forum-post-time {
    color: #000;
    font-size: 0.82rem;
    white-space: nowrap;
}

html.dark-mode .forum-post-footer .forum-post-time {
    color: var(--muted);
}

.forum-post-footer .forum-view-count {
    flex-shrink: 0;
}

.forum-post-author-menu {
    position: relative;
    z-index: 5;
    min-width: 0;
}

.forum-post-author-menu .forum-user-menu__toggle {
    color: var(--text);
    padding: 0.18rem 0.55rem 0.18rem 0.22rem;
    border-radius: var(--radius-sm);
}

.forum-post-author-menu .forum-user-menu__toggle:hover,
.forum-post-author-menu .forum-user-menu__toggle:focus-visible,
.forum-post-author-menu.is-open .forum-user-menu__toggle {
    background: var(--glow);
    outline: none;
}

html.dark-mode .forum-post-author-menu .forum-user-menu__toggle:hover,
html.dark-mode .forum-post-author-menu .forum-user-menu__toggle:focus-visible,
html.dark-mode .forum-post-author-menu.is-open .forum-user-menu__toggle {
    background: rgba(255, 255, 255, 0.1);
}

.forum-post-author-menu .forum-user-menu__avatar {
    border: none;
}

.forum-post-author-menu__toggle {
    max-width: 100%;
}

.forum-post-author-menu__avatar--placeholder-single {
    font-size: 0.82rem;
}

.forum-post-author-menu__avatar--placeholder-short {
    font-size: 0.62rem;
}

.forum-post-author-menu__label {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
}

.forum-post-author-menu__label .forum-messenger-online-dot {
    margin-left: -0.16rem;
}

.forum-post-author-menu__popover {
    position: absolute;
    bottom: calc(100% + 0.45rem);
    left: 0;
    z-index: 40;
    min-width: 11.5rem;
}

.forum-post-author-menu__popover[hidden] {
    display: none !important;
}

.forum-post-author-menu__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow);
}

html.dark-mode .forum-post-author-menu__card {
    border-color: var(--purple);
    background: #2e2f2e;
}

.forum-post-author-menu__card-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: none;
    box-shadow: none;
    display: block;
}

.forum-post-author-menu__card-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #006400;
    border: none;
    color: #fff;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    padding: 0.25rem;
    word-break: break-word;
    overflow: hidden;
}

html.dark-mode .forum-post-author-menu__card-avatar--placeholder {
    color: var(--text);
}

.forum-post-author-menu__card-avatar--placeholder-single {
    font-size: 2rem;
}

.forum-post-author-menu__card-avatar--placeholder-short {
    font-size: 1.1rem;
}

.forum-post-author-menu__card-avatar--placeholder-medium {
    font-size: 0.82rem;
}

.forum-post-author-menu__card-avatar--placeholder-long {
    font-size: 0.58rem;
}

.forum-post-author-menu__message {
    text-transform: lowercase;
}

.forum-post-author-menu__name {
    color: var(--text);
    font-size: 0.88rem;
}

.forum-post-author-menu__stat {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.25;
}

.forum-post-admin-bar {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    z-index: 2;
}

.forum-post-admin-bar form {
    margin: 0;
}

.btn-admin-edit {
    background: #28a745;
    color: #fff;
    border: none;
}

.btn-admin-edit:hover {
    background: #218838;
    color: #fff;
}

html.dark-mode .btn-admin-edit,
html.dark-mode .btn-admin-edit:hover {
    color: #fff;
}

.btn-admin-delete {
    background: #dc3545;
    color: #fff;
    border: none;
}

.btn-admin-delete:hover {
    background: #c82333;
    color: #fff;
}

.forum-admin-added {
    color: #FF0000;
}

.forum-admin-added a,
.forum-admin-added a.forum-auto-link {
    color: #FF0000;
}

.forum-composer[data-forum-composer-admin-edit] .forum-label {
    position: relative;
}

.forum-composer-body--source {
    display: none !important;
}

.forum-composer-body--wysiwyg {
    display: block;
    width: 100%;
    min-height: calc(1.55em * 10);
    max-height: min(70vh, 520px);
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    cursor: text;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.9rem;
    font: inherit;
    background: var(--surface);
    color: var(--text);
}

.forum-composer-body--wysiwyg:focus,
.forum-composer-body--wysiwyg:focus-visible {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--glow);
}

.forum-composer-body--wysiwyg .forum-admin-edit-line {
    min-height: 1.55em;
}

.forum-composer-body--wysiwyg .forum-admin-edit-red {
    color: #ff0000;
}

html.dark-mode .forum-composer-body--wysiwyg {
    background-color: #1e1f1e !important;
    border-color: var(--border);
    color: #c7c1b6 !important;
    caret-color: #c7c1b6;
}

html.dark-mode .forum-composer-body--wysiwyg .forum-admin-edit-red {
    color: #ff4444;
}

.forum-admin-text-color-popup {
    position: fixed;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.forum-admin-text-color-popup[hidden] {
    display: none !important;
}

.forum-admin-text-color-btn {
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
    font: inherit;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.forum-admin-text-color-btn--red {
    color: #ff0000;
}

.forum-admin-text-color-btn--normal {
    color: var(--text);
}

html.dark-mode .forum-admin-text-color-btn--normal {
    color: var(--text-soft);
}

.forum-admin-text-color-btn:hover,
.forum-admin-text-color-btn:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 2px var(--glow);
    outline: none;
}

.forum-composer-toolbar .forum-composer-text-color-btn {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    padding: 0.15rem 0.55rem;
    font: inherit;
    font-size: inherit;
    font-weight: 700;
    line-height: 1.2;
}

.forum-composer-toolbar .forum-composer-text-color-btn--red {
    color: #ffcccc;
}

.forum-composer-toolbar .forum-composer-text-color-btn--normal {
    color: #fff;
}

html.dark-mode .forum-composer-toolbar .forum-composer-text-color-btn--red {
    color: #ff6666;
}

html.dark-mode .forum-composer-toolbar .forum-composer-text-color-btn--normal {
    color: #fff;
}

.forum-pic-gallery {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.45rem;
    width: fit-content;
    max-width: 100%;
    margin-top: 0.85rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-sizing: border-box;
}

html.dark-mode .forum-pic-gallery {
    border-color: var(--purple);
}

.forum-pic-gallery:focus,
.forum-pic-gallery:focus-visible {
    outline: none;
}

@keyframes forum-gallery-thumb-emerge {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.forum-pic-gallery__thumb {
    display: block;
    flex: 0 0 80px;
    width: 80px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    line-height: 0;
    opacity: 0;
    transform: scale(0.9);
    animation: forum-gallery-thumb-emerge 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.forum-pic-gallery__thumb:nth-child(1) { animation-delay: 0.04s; }
.forum-pic-gallery__thumb:nth-child(2) { animation-delay: 0.08s; }
.forum-pic-gallery__thumb:nth-child(3) { animation-delay: 0.12s; }
.forum-pic-gallery__thumb:nth-child(4) { animation-delay: 0.16s; }
.forum-pic-gallery__thumb:nth-child(5) { animation-delay: 0.2s; }
.forum-pic-gallery__thumb:nth-child(6) { animation-delay: 0.24s; }
.forum-pic-gallery__thumb:nth-child(7) { animation-delay: 0.28s; }
.forum-pic-gallery__thumb:nth-child(8) { animation-delay: 0.32s; }
.forum-pic-gallery__thumb:nth-child(9) { animation-delay: 0.36s; }
.forum-pic-gallery__thumb:nth-child(10) { animation-delay: 0.4s; }
.forum-pic-gallery__thumb:nth-child(11) { animation-delay: 0.44s; }
.forum-pic-gallery__thumb:nth-child(12) { animation-delay: 0.48s; }

.forum-pic-gallery__thumb:focus,
.forum-pic-gallery__thumb:focus-visible {
    outline: none;
}

.forum-pic-gallery__thumb:hover,
.forum-pic-gallery__thumb.is-active {
    border-color: var(--purple);
    box-shadow: 0 0 0 2px var(--glow);
}

.forum-pic-gallery__thumb img {
    width: 100%;
    height: 100px;
    min-width: 0;
    max-width: none;
    object-fit: cover;
    display: block;
}

.forum-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.88);
    opacity: 0;
    transition: opacity 0.32s ease;
}

.forum-lightbox.is-open {
    opacity: 1;
}

.forum-lightbox[hidden] {
    display: none;
}

.forum-lightbox__close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
}

.forum-lightbox__close:hover,
.forum-lightbox__close:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    outline: none;
}

.forum-lightbox__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: min(100%, 960px);
    min-height: 0;
    padding: 0 1.25rem;
    overflow: visible;
}

/* Match sexer.ee #imageModal .slick-prev / .slick-next (header.php + slick-theme) */
.forum-lightbox__nav {
    font-size: 0;
    line-height: 0;
    position: absolute;
    top: 50%;
    display: block;
    width: 44px;
    height: 44px;
    padding: 0;
    transform: translate(0, -50%);
    cursor: pointer;
    color: transparent;
    border: none;
    outline: none;
    background: transparent;
    z-index: 10;
}

.forum-lightbox__nav:hover,
.forum-lightbox__nav:focus {
    color: transparent;
    outline: none;
    background: transparent;
}

.forum-lightbox__nav::before {
    content: '<';
    font-family: 'Manrope', sans-serif;
    font-size: 34px;
    line-height: 0;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0 9px;
    opacity: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.forum-lightbox__nav--next::before {
    content: '>';
}

.forum-lightbox__nav:hover:not(:disabled)::before,
.forum-lightbox__nav:focus:not(:disabled)::before {
    opacity: 1;
}

.forum-lightbox__nav:disabled {
    cursor: not-allowed;
}

.forum-lightbox__nav:disabled::before {
    opacity: 0.25;
}

.forum-lightbox__nav--prev {
    left: -19px;
    right: auto;
    z-index: 11;
}

.forum-lightbox__nav--next {
    right: -19px;
    left: auto;
    z-index: 11;
}

.forum-lightbox__main {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.34s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.forum-lightbox.is-open .forum-lightbox__main {
    opacity: 1;
    transform: scale(1);
}

.forum-lightbox__viewport {
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
}

.forum-lightbox__viewport.is-dragging {
    cursor: grabbing;
}

.forum-lightbox__track {
    display: flex;
    width: auto;
    transition: transform 0.75s ease;
    will-change: transform;
}

.forum-lightbox__slide {
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.forum-lightbox__slide img {
    max-width: 100%;
    max-height: calc(100vh - 9rem);
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    display: block;
}

.forum-gallery-indicators {
    position: absolute;
    top: 4%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 999px;
    padding: 0 8px;
    box-sizing: border-box;
    overflow: visible;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.forum-gallery-indicators[hidden] {
    display: none !important;
}

.forum-gallery-indicators__prev,
.forum-gallery-indicators__next {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    color: #00c853;
    line-height: 1;
    font-family: var(--font-display);
}

.forum-gallery-indicators__dots {
    display: flex;
    gap: 6px;
    padding: 6px 4px;
    margin: -6px -4px;
    touch-action: none;
}

.forum-gallery-indicators__dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-block;
    transform-origin: center center;
    transition: transform 0.12s ease, background-color 0.12s ease;
    will-change: transform;
}

.forum-gallery-indicators__dot.is-active {
    background: #00c853;
}

.forum-gallery-indicators__dot.is-touched {
    background: #00c853;
    transform: scale(2.4);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.forum-lightbox__main img {
    max-width: 100%;
    max-height: calc(100vh - 9rem);
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    display: block;
}

.forum-lightbox__thumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    max-width: min(100%, 960px);
    padding-bottom: 0.25rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.32s ease 0.06s, transform 0.34s cubic-bezier(0.22, 1, 0.36, 1) 0.06s;
}

.forum-lightbox.is-open .forum-lightbox__thumbs {
    opacity: 1;
    transform: translateY(0);
}

.forum-lightbox__thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    line-height: 0;
    opacity: 0;
    transform: scale(0.9);
    transition: border-color 0.2s ease;
}

.forum-lightbox.is-open .forum-lightbox__thumb {
    animation: forum-gallery-thumb-emerge 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(1) { animation-delay: 0.1s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(2) { animation-delay: 0.13s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(3) { animation-delay: 0.16s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(4) { animation-delay: 0.19s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(5) { animation-delay: 0.22s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(6) { animation-delay: 0.25s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(7) { animation-delay: 0.28s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(8) { animation-delay: 0.31s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(9) { animation-delay: 0.34s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(10) { animation-delay: 0.37s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(11) { animation-delay: 0.4s; }
.forum-lightbox.is-open .forum-lightbox__thumb:nth-child(12) { animation-delay: 0.43s; }

.forum-lightbox__thumb:hover,
.forum-lightbox__thumb.is-active {
    opacity: 1;
    border-color: var(--purple);
}

.forum-lightbox__thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    display: block;
    border-radius: calc(var(--radius-sm) - 2px);
}

@media (prefers-reduced-motion: reduce) {
    .forum-pic-gallery__thumb,
    .forum-lightbox,
    .forum-lightbox__main,
    .forum-lightbox__thumbs,
    .forum-lightbox__thumb {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Mobile lightbox: full-width main image like sexer.ee #imageModal; thumbs scroll below */
@media (max-width: 767.9px), ((orientation: landscape) and (max-height: 767.9px) and (pointer: coarse)) {
    .forum-lightbox {
        justify-content: flex-start;
        align-items: stretch;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        gap: 0.5rem;
    }

    .forum-lightbox__stage {
        width: 100%;
        max-width: none;
        padding: 0;
        flex: 0 0 auto;
        min-height: 0;
    }

    .forum-lightbox__main {
        width: 100%;
    }

    .forum-lightbox__viewport {
        border-radius: var(--radius-sm);
        overflow: hidden;
    }

    .forum-lightbox__slide img,
    .forum-lightbox__main img {
        width: 100%;
        max-width: 100%;
        max-height: none;
        height: auto;
        border-radius: var(--radius-sm);
        object-fit: contain;
    }

    .forum-lightbox__nav--prev {
        left: 3px;
    }

    .forum-lightbox__nav--next {
        right: 3px;
    }

    .forum-lightbox__close {
        top: 0.5rem;
        right: 0.5rem;
    }

    .forum-lightbox__thumbs {
        width: 100%;
        max-width: none;
        flex-shrink: 0;
        padding: 0.5rem 0.5rem 1rem;
    }
}

.forum-post-reply-to {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.forum-post-body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.forum-post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
    flex-shrink: 0;
}

.forum-post-actions .forum-post-time {
    color: #000;
    font-size: 0.82rem;
    margin-left: auto;
}

html.dark-mode .forum-post-actions .forum-post-time {
    color: var(--muted);
}

.forum-post-actions form {
    margin: 0;
}

.forum-inline-image {
    margin: 0.75rem 0;
}

.forum-inline-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
}

.forum-category-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.85rem;
}

.forum-category-split .forum-panel {
    margin-bottom: 0;
}

.forum-category-split + .forum-pagination {
    margin-top: 1rem;
}

.forum-category-topic-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.forum-category-topic-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0 0.75rem;
    box-sizing: border-box;
    min-height: 6.35rem;
    height: 6.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.7rem 0.35rem;
    background: rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.forum-category-topic-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: space-between;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
}

.forum-category-topic-row .forum-thread-metrics {
    flex-shrink: 0;
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    padding-top: 0.05rem;
    min-width: 3.5rem;
    align-items: stretch;
}

/* Sub-topic: last comment user + icon one row down, aligned with "by:" author. */
.forum-category-topic-row:not(:has(.forum-category-topic-meta-last)) .forum-thread-metrics {
    align-self: stretch;
}

.forum-category-topic-row:not(:has(.forum-category-topic-meta-last)) .forum-thread-metrics .forum-last-replier {
    margin-top: auto;
}

.forum-category-topic-row-foot {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
}

.forum-category-topic-row-foot-last {
    display: flex;
    flex-direction: row-reverse;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.42rem;
    margin-left: auto;
    flex-shrink: 0;
}

.forum-category-topic-row-foot .forum-last-replier {
    flex-direction: row-reverse;
    justify-content: flex-start;
    flex-shrink: 0;
}

.forum-category-topic-row-foot .forum-category-topic-meta-item--metric-date {
    margin-left: 0;
    text-align: right;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-category-topic-row {
    grid-template-rows: auto auto auto auto;
    min-height: 6.35rem;
    height: auto;
    align-items: start;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-category-topic-main,
.forum-category-topic-list:not(.forum-label-search-results) .forum-category-topic-link {
    display: contents;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-category-topic-title {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 0.04rem;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    position: relative;
    z-index: 0;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-category-topic-preview {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: calc(1.12em * 3);
    max-height: calc(1.12em * 3);
    position: relative;
    z-index: 0;
    text-align: justify;
    text-align-last: left;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-category-topic-meta {
    grid-column: 1;
    grid-row: 3;
    margin-top: 0;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-thread-metrics {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: stretch;
    position: relative;
    z-index: 1;
    gap: 0;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-thread-metrics > .forum-view-count,
.forum-category-topic-list:not(.forum-label-search-results) .forum-thread-metrics > .forum-reply-count {
    width: fit-content;
    align-self: flex-end;
    background: var(--surface-soft);
    padding: 0.02rem 0.12rem;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-thread-metrics > .forum-view-count {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding-bottom: 0;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-thread-metrics > .forum-reply-count {
    border-radius: 0 0 0 var(--radius-sm);
    padding-top: 0;
    margin-bottom: 0.12rem;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-category-topic-row-foot {
    grid-row: 4;
    position: relative;
    z-index: 1;
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-thread-metrics .forum-last-replier {
    margin-top: auto;
    width: fit-content;
    align-self: flex-end;
    background: var(--surface-soft);
    padding: 0.02rem 0.12rem;
    border-radius: var(--radius-sm);
}

.forum-category-topic-list:not(.forum-label-search-results) .forum-category-topic-row-foot .forum-category-topic-meta-item--metric-date {
    display: inline-block;
    width: fit-content;
    margin-left: auto;
    background: var(--surface-soft);
    padding: 0.02rem 0.1rem;
    border-radius: var(--radius-sm);
}

.forum-category-topic-row .forum-view-count,
.forum-category-topic-row .forum-reply-count,
.forum-category-topic-row .forum-thread-metrics .forum-last-replier {
    flex-direction: row-reverse;
    justify-content: flex-start;
    width: 100%;
}

html.dark-mode .forum-category-topic-row {
    background: rgba(255, 255, 255, 0.02);
}

.forum-category-topic-row--featured {
    border: 3px solid #FF0000;
}

.forum-thread-title-bar--featured .forum-thread-page-title {
    border-width: 3px;
    border-color: #FF0000;
}

.forum-category-topic-link {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    text-decoration: none;
    overflow: hidden;
}

.forum-panel .forum-category-topic-link.forum-link-blue,
.forum-panel .forum-category-topic-link.forum-link-blue .forum-category-topic-title {
    color: #0000FF;
    text-decoration: none;
    transition: color 0.25s ease;
}

.forum-panel .forum-category-topic-link.forum-link-blue:hover,
.forum-panel .forum-category-topic-link.forum-link-blue:focus-visible,
.forum-panel .forum-category-topic-link.forum-link-blue:active,
.forum-panel .forum-category-topic-link.forum-link-blue:hover .forum-category-topic-title,
.forum-panel .forum-category-topic-link.forum-link-blue:focus-visible .forum-category-topic-title,
.forum-panel .forum-category-topic-link.forum-link-blue:active .forum-category-topic-title {
    color: #FF0000;
}

.forum-category-topic-title {
    margin: 0 0 0.08rem;
    font-size: 0.98rem;
    font-weight: 700;
    font-family: var(--font);
    line-height: 1.08;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: none;
}

.forum-category-topic-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.forum-category-topic-meta-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
}

.forum-category-topic-meta-item {
    font-size: 0.68rem;
    font-weight: 300;
    line-height: 1.15;
    color: var(--muted);
    white-space: nowrap;
}

.forum-category-topic-meta-item--metric-date {
    text-align: right;
    margin-left: auto;
}

.forum-thread-title-bar {
    flex: 0 1 auto;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: auto;
}

.forum-thread-title-bar--admin {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 0.35rem;
}

.forum-thread-title-bar--admin .forum-thread-page-title {
    grid-column: 1;
    grid-row: 1;
}

.forum-thread-title-bar--admin .forum-thread-admin-actions {
    grid-column: 2;
    grid-row: 1;
}

.forum-thread-admin-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    align-self: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
}

.forum-thread-admin-actions .btn.btn-xs,
.forum-thread-admin-actions .forum-thread-move > .btn.btn-xs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.65rem;
    white-space: nowrap;
}

.forum-thread-admin-actions .forum-thread-move,
.forum-thread-admin-actions .forum-thread-merge,
.forum-thread-admin-actions .forum-thread-unmerge,
.forum-thread-admin-actions .forum-thread-featured-form {
    display: flex;
    align-items: center;
}

.forum-thread-featured-form {
    margin: 0;
}

.forum-thread-page-title {
    margin: 0;
    flex: 0 0 auto;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.9rem;
    font: inherit;
    font-weight: 700;
    font-size: inherit;
    line-height: 1.35;
    background: var(--surface);
    color: #FF0000;
    letter-spacing: 0.02em;
}

html.dark-mode .forum-thread-page-title {
    color: #FF0000;
}

.forum-thread-title-edit-toggle {
    flex: 0 0 auto;
}

.forum-thread-title-edit-form {
    display: none;
    margin: 0;
    min-width: 0;
}

.forum-thread-title-edit-form[hidden] {
    display: none !important;
}

.forum-thread-title-edit-form .forum-thread-title-edit-input {
    margin: 0;
}

.forum-thread-title-edit-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.forum-thread-title-bar--editing .forum-thread-page-title {
    visibility: hidden;
}

.forum-thread-title-bar--editing .forum-thread-admin-actions {
    display: none;
}

.forum-thread-title-bar--editing .forum-thread-title-edit-form {
    display: contents !important;
}

.forum-thread-title-bar--editing .forum-thread-title-edit-input {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.forum-thread-title-bar--editing .forum-thread-title-edit-actions {
    grid-column: 2;
    grid-row: 1;
}

.forum-thread-move {
    position: relative;
    flex: 0 0 auto;
}

.forum-thread-move-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 40;
    min-width: min(18rem, calc(100vw - 2rem));
    max-width: min(22rem, calc(100vw - 2rem));
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow);
}

html.dark-mode .forum-thread-move-menu {
    border-color: var(--purple);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.forum-thread-move-menu[hidden] {
    display: none !important;
}

.forum-thread-move-form {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0;
}

.forum-thread-move-form__label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
}

.forum-thread-move-form__select {
    width: 100%;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    font: inherit;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: inherit;
}

.forum-thread-move-form__select:focus,
.forum-thread-move-form__select:focus-visible {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 2px var(--glow);
}

.forum-thread-move-menu .forum-inline-search-input {
    width: 100%;
    min-width: 0;
    padding: 0.45rem 0.55rem;
    font: inherit;
    font-size: 0.82rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: inherit;
}

.forum-thread-move-menu .forum-inline-search-input:focus,
.forum-thread-move-menu .forum-inline-search-input:focus-visible {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 2px var(--glow);
}

.forum-thread-merge-results {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 12rem;
    overflow-y: auto;
    margin: 0;
}

.forum-thread-merge-results[hidden],
.forum-thread-merge-empty[hidden],
.forum-thread-merge-selected[hidden] {
    display: none !important;
}

.forum-thread-merge-result {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.55rem;
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: inherit;
    cursor: pointer;
}

.forum-thread-merge-result:hover,
.forum-thread-merge-result.is-selected {
    border-color: var(--purple);
    box-shadow: 0 0 0 1px var(--glow);
}

.forum-thread-merge-result__title {
    font-weight: 600;
    line-height: 1.2;
}

.forum-thread-merge-result__meta {
    font-size: 0.74rem;
    color: var(--text-soft);
    line-height: 1.2;
}

.forum-thread-merge-empty,
.forum-thread-merge-selected {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-soft);
}

.forum-thread-merge-selected {
    color: inherit;
}

.forum-thread-unmerge-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.forum-thread-unmerge-item {
    margin: 0;
}

.forum-thread-unmerge-item__btn {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    width: 100%;
    margin: 0;
    padding: 0.45rem 0.55rem;
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: inherit;
    cursor: pointer;
}

.forum-thread-unmerge-item__btn:hover {
    border-color: var(--purple);
    box-shadow: 0 0 0 1px var(--glow);
}

.forum-thread-unmerge-item__title {
    font-weight: 600;
    line-height: 1.2;
}

.forum-thread-unmerge-item__meta {
    font-size: 0.74rem;
    color: var(--text-soft);
    line-height: 1.2;
}

.forum-category-topic-preview {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-soft);
    line-height: 1.12;
    max-height: calc(1.12em * 2);
    overflow: hidden;
}

html:not(.dark-mode) .forum-category-topic-preview {
    color: #000;
}

.forum-label-search .forum-category-topic-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

@media (min-width: 768px) {
    .forum-label-search .forum-category-topic-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .forum-label-search .forum-category-topic-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.forum-label-search .forum-category-topic-row {
    width: 100%;
    min-width: 0;
    min-height: 4.5rem;
    height: 4.5rem;
    padding: 0.32rem 0.45rem 0.28rem;
    gap: 0 0.35rem;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    align-items: start;
    --forum-category-topic-metrics-space: 2.2rem;
}

.forum-label-search .forum-category-topic-main {
    display: contents;
}

.forum-label-search .forum-category-topic-link {
    display: contents;
}

.forum-label-search .forum-category-topic-title {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 0;
    box-sizing: border-box;
    font-size: 0.68rem;
    line-height: 1.08;
    margin-bottom: 0.02rem;
    text-overflow: clip;
    position: relative;
    z-index: 0;
}

.forum-label-search .forum-category-topic-preview {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    margin: 0;
    font-size: 0.56rem;
    line-height: 1.08;
    max-height: calc(1.08em * 3);
    position: relative;
    z-index: 0;
    text-align: justify;
    text-align-last: left;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.forum-label-search .forum-category-topic-meta-item {
    font-size: 0.5rem;
    line-height: 1.05;
}

.forum-label-search .forum-category-topic-meta {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    margin-top: 0.08rem;
    display: block;
    width: auto;
}

.forum-label-search .forum-category-topic-meta-left {
    grid-column: 1;
}

.forum-label-search .forum-thread-metrics {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: stretch;
    min-width: 2rem;
    gap: 0;
    padding-top: 0;
    position: relative;
    z-index: 1;
}

.forum-label-search .forum-thread-metrics > .forum-view-count,
.forum-label-search .forum-thread-metrics > .forum-reply-count {
    width: fit-content;
    align-self: flex-end;
    background: var(--surface-soft);
    padding: 0.02rem 0.1rem;
}

.forum-label-search .forum-thread-metrics > .forum-view-count {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding-bottom: 0;
}

.forum-label-search .forum-thread-metrics > .forum-reply-count {
    border-radius: 0 0 0 var(--radius-sm);
    padding-top: 0;
    margin-bottom: 0.08rem;
}

.forum-label-search .forum-thread-metrics .forum-last-replier {
    margin-top: auto;
    width: fit-content;
    align-self: flex-end;
    background: var(--surface-soft);
    padding: 0.02rem 0.1rem;
    border-radius: var(--radius-sm);
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.forum-label-search .forum-view-count,
.forum-label-search .forum-reply-count {
    font-size: 0.5rem;
    gap: 0.1rem;
}

.forum-label-search .forum-view-count__icon,
.forum-label-search .forum-reply-count__icon,
.forum-label-search .forum-last-replier__icon {
    width: 8px;
    height: 8px;
}

.forum-label-search .forum-last-replier__name {
    font-size: 0.48rem;
    max-width: 2.6rem;
}

.forum-label-search .forum-category-topic-row-foot {
    grid-column: 1 / -1;
    grid-row: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    justify-content: unset;
    gap: 0 0.3rem;
    position: relative;
    z-index: 1;
}

.forum-label-search .forum-category-topic-row-foot-last {
    min-width: 2rem;
}

.forum-label-search .forum-category-topic-row-foot .forum-category-topic-meta-item--metric-date,
.forum-label-search .forum-category-topic-row-foot-last .forum-category-topic-meta-item--metric-date {
    display: inline-block;
    width: fit-content;
    margin-left: auto;
    background: var(--surface-soft);
    padding: 0.02rem 0.1rem;
    border-radius: var(--radius-sm);
    text-align: right;
}

.forum-composer-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.35rem 0 0.5rem;
}

.forum-composer-emotions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.65rem;
    margin-bottom: 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.forum-composer-emotions[hidden] {
    display: none !important;
}

.forum-composer-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.65rem;
    margin-bottom: 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.forum-composer-labels[hidden] {
    display: none !important;
}

.forum-composer-labels-empty {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.forum-composer-label {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
    line-height: 1.2;
    padding: 0.28rem 0.72rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.forum-composer-label:hover,
.forum-composer-label:focus-visible {
    border-color: var(--purple);
    outline: none;
}

.forum-composer-label.is-selected {
    background: var(--glow);
    border-color: var(--purple);
    color: var(--text);
}

.forum-composer-labels-fields {
    display: none;
}

.forum-composer-emoji {
    border: none;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.15rem;
    line-height: 1;
}

.forum-composer-count {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.forum-composer-images {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.forum-composer-image-chip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.78rem;
    color: var(--text-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    cursor: grab;
    user-select: none;
}

.forum-composer-image-chip.is-dragging {
    opacity: 0.55;
}

.forum-composer-image-chip--drop-before {
    box-shadow: inset 0 3px 0 0 var(--purple);
}

.forum-composer-image-chip--drop-after {
    box-shadow: inset 0 -3px 0 0 var(--purple);
}

.forum-composer-image-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-composer-image-preview {
    flex: 0 0 auto;
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: block;
    pointer-events: none;
}

.forum-composer-image-remove {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    font-size: 1.35rem;
}

.forum-composer.is-dragover .forum-composer-body {
    outline: 2px dashed var(--purple);
    outline-offset: 2px;
}

.forum-reply-target-note {
    margin: 0 0 0.75rem;
    font-size: 0.86rem;
    color: var(--muted);
}

.forum-post-sidebar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.86rem;
    text-align: left;
    min-width: 0;
}

.forum-post-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: none;
    box-shadow: none;
    flex-shrink: 0;
    display: block;
}

.forum-post-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #006400;
    border: none;
    color: #fff;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    padding: 0.15rem;
    word-break: break-word;
    overflow: hidden;
    letter-spacing: -0.02em;
}

.forum-post-avatar--placeholder-single {
    font-size: 2.5rem;
    padding: 0;
    text-transform: uppercase;
}

.forum-post-avatar--placeholder-short {
    font-size: 1.15rem;
}

.forum-post-avatar--placeholder-medium {
    font-size: 0.82rem;
}

.forum-post-avatar--placeholder-long {
    font-size: 0.58rem;
    line-height: 1.05;
    padding: 0.25rem;
}

.forum-post-author-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
    min-width: 0;
}

.forum-post-author-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
}

.forum-post-author-extra {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
    margin-top: 0.1rem;
}

.forum-post-message-btn {
    min-width: 0;
    padding-inline: 0.65rem;
    text-transform: lowercase;
}

.forum-post-author-stat {
    font-size: 0.78rem;
    color: #000;
    line-height: 1.25;
    text-align: left;
}

html.dark-mode .forum-post-author-stat {
    color: var(--muted);
}

.forum-post-sidebar strong {
    color: #000;
    font-weight: 700;
}

html.dark-mode .forum-post-sidebar strong {
    color: var(--purple);
}

.forum-post-content {
    flex: 1 1 auto;
    word-break: break-word;
}

.forum-post-content a,
.forum-post-content a.forum-auto-link {
    color: #0000FF;
    text-decoration: none;
    transition: color 0.25s ease;
    word-break: break-all;
}

.forum-post-content a:hover,
.forum-post-content a.forum-auto-link:hover {
    color: #FF0000;
}

.forum-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.forum-attachment img {
    max-width: min(100%, 320px);
    max-height: 320px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-strong);
    display: block;
}

.forum-admin-edit-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.forum-admin-edit-attachment {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 96px;
    cursor: pointer;
}

.forum-admin-edit-attachment img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: block;
}

.forum-admin-edit-attachment__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: lowercase;
}

.forum-admin-edit-attachment__remove input {
    margin: 0;
    accent-color: var(--purple);
}

.forum-admin-edit-attachment:has(input:checked) img {
    opacity: 0.45;
    border-color: #ff4444;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.35);
}

/* ── Forms ── */
.forum-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.forum-label,
.forum-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.forum-label-text {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text);
}

html.dark-mode .forum-label-text {
    color: var(--muted);
}

.forum-form input[type="text"],
.forum-form input[type="email"],
.forum-form input[type="password"],
.forum-form input[type="search"],
.forum-form input[type="url"],
.forum-form select,
.forum-form textarea,
.forum-label input,
.forum-password-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.9rem;
    font: inherit;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.forum-form input[type="text"],
.forum-form input[type="email"],
.forum-form input[type="password"],
.forum-form input[type="search"],
.forum-form input[type="url"],
.forum-label input {
    -webkit-appearance: none;
    appearance: none;
}

.forum-form input:focus,
.forum-form select:focus,
.forum-form textarea:focus,
.forum-password-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--glow);
}

.forum-form input:invalid,
.forum-form select:invalid,
.forum-form textarea:invalid,
.forum-password-input:invalid {
    animation: none !important;
    box-shadow: none;
    border-color: var(--border);
    outline: none;
}

.forum-form input:focus:invalid,
.forum-form select:focus:invalid,
.forum-form textarea:focus:invalid,
.forum-password-input:focus:invalid {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--glow);
}

html.dark-mode .forum-form input[type="text"],
html.dark-mode .forum-form input[type="email"],
html.dark-mode .forum-form input[type="password"],
html.dark-mode .forum-form input[type="search"],
html.dark-mode .forum-form input[type="url"],
html.dark-mode .forum-form select,
html.dark-mode .forum-form textarea,
html.dark-mode .forum-label input,
html.dark-mode .forum-password-input {
    background-color: #1e1f1e !important;
    border-color: var(--border);
    color: #c7c1b6 !important;
    caret-color: #c7c1b6;
}

html.dark-mode .forum-form input::placeholder,
html.dark-mode .forum-form textarea::placeholder,
html.dark-mode .forum-label input::placeholder {
    color: #9a9488;
    opacity: 1;
}

html.dark-mode .forum-form input:-webkit-autofill,
html.dark-mode .forum-form input:-webkit-autofill:hover,
html.dark-mode .forum-form input:-webkit-autofill:focus,
html.dark-mode .forum-label input:-webkit-autofill,
html.dark-mode .forum-label input:-webkit-autofill:hover,
html.dark-mode .forum-label input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1e1f1e inset !important;
    box-shadow: 0 0 0 1000px #1e1f1e inset !important;
    -webkit-text-fill-color: #c7c1b6 !important;
    border-color: var(--border) !important;
    transition: background-color 99999s ease-out 0s;
}

.forum-form textarea {
    resize: both;
    min-height: 120px;
}

.forum-form small {
    color: var(--muted);
    font-weight: 400;
}

.forum-form-footer {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--muted);
}

.forum-form-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.forum-thread-reply-note {
    color: #ff0000;
    font-weight: 600;
}

.forum-subtitle-tight {
    margin-top: -0.35rem;
    margin-bottom: 0.25rem;
}

.forum-auth-heading {
    text-transform: lowercase;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    line-height: 1.2;
    color: #000;
}

html:not(.dark-mode) .forum-panel h1.forum-auth-heading {
    color: #000;
}

html.dark-mode .forum-auth-heading {
    color: var(--muted);
}

.forum-auth-heading-link {
    color: #0000FF;
    text-decoration: none;
    font-weight: 800;
}

.forum-auth-heading-link:hover {
    color: #FF0000;
}

.forum-auth-tagline {
    margin: 0 0 1rem;
    color: #FF0000 !important;
    font-weight: 700;
}

.forum-auth-google-block {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.forum-auth-google-hint {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: lowercase;
    color: var(--muted);
}

.forum-auth-complete-btn {
    text-transform: lowercase;
}

html.dark-mode .forum-auth-complete-btn {
    background: #006400;
    color: #fff;
    box-shadow: none;
}

html.dark-mode .forum-auth-complete-btn:hover {
    background: #005200;
    color: #fff;
}

.forum-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.forum-auth-divider-lg {
    margin: 1rem 0 1.1rem;
}

.forum-auth-divider-lg span {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    line-height: 1.2;
    color: var(--purple-deep);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

html:not(.dark-mode) .forum-auth-divider.forum-auth-divider-lg span {
    color: #000;
}

html.dark-mode .forum-auth-divider-lg span {
    color: var(--text);
}

.forum-auth-divider::before,
.forum-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.forum-auth-switch {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.forum-auth-divider-lg::before,
.forum-auth-divider-lg::after {
    background: var(--purple);
    opacity: 0.85;
}

html:not(.dark-mode) .forum-auth-divider.forum-auth-divider-lg::before,
html:not(.dark-mode) .forum-auth-divider.forum-auth-divider-lg::after {
    background: #000;
    opacity: 1;
}

.btn-register {
    background: #006400;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 100, 0, 0.3);
}

.btn-register:hover {
    background: #005200;
    color: #fff;
}

html.dark-mode .btn-register {
    box-shadow: none;
    color: #fff;
}

html.dark-mode .btn-register:hover {
    color: #fff;
}

html.dark-mode .forum-composer-toolbar .btn-register {
    color: var(--muted);
}

html.dark-mode .forum-composer-toolbar .btn-register:hover,
html.dark-mode .forum-composer-toolbar .btn-register:focus-visible {
    color: var(--text-soft);
}

html.dark-mode .forum-post-form .btn-primary,
html.dark-mode .forum-inline-reply .btn-primary {
    background: #006400;
    color: var(--muted);
    box-shadow: none;
}

html.dark-mode .forum-post-form .btn-primary:hover,
html.dark-mode .forum-inline-reply .btn-primary:hover {
    background: #005200;
    color: var(--text-soft);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    border: 1px solid #b8a4d9;
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.9rem;
    background: #fff;
    color: #3c4043;
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08), 0 0 0 1px rgba(106, 17, 207, 0.12);
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn-google:hover {
    background: #faf8ff;
    border-color: var(--purple);
    color: #3c4043;
    box-shadow: 0 2px 8px rgba(106, 17, 207, 0.18), 0 0 0 1px rgba(106, 17, 207, 0.2);
}

.btn-google-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    line-height: 0;
}

.btn-google-icon svg {
    display: block;
}

html.dark-mode .btn-google {
    background: var(--surface-soft);
    color: var(--text);
    border-color: var(--border);
    box-shadow: none;
}

html.dark-mode .btn-google:hover {
    background: #353635;
    color: var(--text);
    border-color: var(--border-strong);
    box-shadow: none;
}

button.btn-google {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    text-align: center;
}

.forum-account-google-actions .btn-google {
    box-sizing: border-box;
}

.forum-account-google-actions .forum-form-hint {
    margin: 0;
}

.forum-account-remove-google-form {
    width: 100%;
    margin: 0;
}

.forum-account-remove-google-btn {
    text-transform: lowercase;
}

.btn-new-topic {
    text-transform: lowercase;
}

.forum-header .btn-new-topic {
    box-shadow: 0 4px 14px rgba(255, 0, 76, 0.35);
}

html.dark-mode .forum-header .btn-new-topic {
    box-shadow: 0 4px 14px rgba(255, 0, 76, 0.28);
}

/* ── Password field extras ── */
.forum-password-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    gap: 0.4rem;
}

.forum-password-row .forum-password-input {
    min-width: 0;
    min-height: 46px;
    height: 100%;
    box-sizing: border-box;
}

.forum-password-actions {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    flex-shrink: 0;
}

.forum-pw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--purple);
    cursor: pointer;
    padding: 0 0.65rem;
    min-width: 46px;
    height: 100%;
    min-height: 46px;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

html.dark-mode .forum-pw-btn {
    background: #1e1f1e;
    border-color: var(--border);
    color: var(--purple);
}

.forum-pw-btn:hover {
    background: var(--glow);
    border-color: var(--purple);
    color: var(--pink);
}

.forum-pw-btn .icon-eye-off {
    display: none;
}

.forum-pw-btn.is-visible .icon-eye {
    display: none;
}

.forum-pw-btn.is-visible .icon-eye-off {
    display: block;
}

/* ── Custom file upload ── */
.forum-file-upload {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    cursor: pointer;
}

.forum-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.forum-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 1rem;
    border-radius: var(--radius-sm);
    background: #006400;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s, color 0.15s;
}

html.dark-mode .forum-file-btn {
    color: var(--muted);
}

html.dark-mode .forum-file-btn:hover {
    color: var(--text-soft);
}

.forum-file-upload:hover .forum-file-btn {
    opacity: 0.92;
}

.forum-file-name {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    padding: 0.68rem 1.25rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-sm {
    padding: 0.45rem 0.95rem;
    font-size: 0.86rem;
}

.btn-primary {
    background: var(--pink);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 0, 76, 0.35);
}

html.dark-mode .forum-nav .btn-primary,
html.dark-mode .forum-header .btn-primary {
    box-shadow: none;
}

/* ── Account settings ── */
.forum-account-section {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.forum-account-section:first-of-type {
    margin-top: 1rem;
    padding-top: 0;
    border-top: none;
}

.forum-account-section h2 {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    text-transform: lowercase;
}

.forum-account-meta {
    display: grid;
    grid-template-columns: 6rem 1fr;
    gap: 0.35rem 1rem;
    margin: 0 0 1rem;
}

.forum-account-meta dt {
    font-weight: 700;
    text-transform: lowercase;
    color: var(--text-soft);
}

.forum-account-meta dd {
    margin: 0;
}

.forum-account-note {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
}

.forum-account-edit-label {
    display: inline-flex;
    align-items: center;
    margin-left: 0.4rem;
    padding: 0.1rem 0.5rem;
    border: 0;
    border-radius: 999px;
    background: #006400;
    color: #fff;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    text-transform: lowercase;
    cursor: pointer;
    vertical-align: middle;
}

.forum-account-edit-label:hover,
.forum-account-edit-label:focus-visible {
    background: #22c55e;
    color: #fff;
}

.forum-account-login-note {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    color: var(--text-soft);
    line-height: 1.45;
}

.forum-account .forum-account-section h2,
.forum-account .forum-label-text,
.forum-account .forum-pw-btn,
.forum-account .forum-account-meta dt,
.forum-account .forum-account-meta dd,
.forum-account .forum-account-note,
.forum-account .forum-account-login-note,
.forum-account .forum-form-hint,
.forum-account label small,
.forum-account .forum-file-name {
    color: #000;
}

html.dark-mode .forum-account {
    color: var(--text-soft);
}

html.dark-mode .forum-account-section:first-of-type h2,
html.dark-mode .forum-account-section:first-of-type .forum-label-text,
html.dark-mode .forum-account-section:first-of-type .forum-account-login-note,
html.dark-mode .forum-account-section:first-of-type .forum-account-meta dt,
html.dark-mode .forum-account-section:first-of-type .forum-account-meta dd,
html.dark-mode .forum-account-section:first-of-type .forum-account-note {
    color: var(--muted);
}

html.dark-mode .forum-account-section:not(:first-of-type):not(.forum-account-section--password) h2,
html.dark-mode .forum-account-section:not(:first-of-type):not(.forum-account-section--password) .forum-label-text,
html.dark-mode .forum-account .forum-pw-btn {
    color: var(--purple);
}

html.dark-mode .forum-account-section--password h2,
html.dark-mode .forum-account-section--password .forum-label-text {
    color: var(--text-soft);
}

html.dark-mode .forum-account .forum-form-hint,
html.dark-mode .forum-account label small {
    color: var(--muted);
}

html.dark-mode .forum-account .btn-danger {
    color: #fff;
}

html.dark-mode .forum-account .btn-danger:hover,
html.dark-mode .forum-account .btn-danger:focus-visible {
    color: #fff;
}

.forum-account .btn-register {
    width: 100%;
    text-transform: lowercase;
    font-weight: 700;
    background: #006400;
    color: #fff;
    border: 1px solid #006400;
    box-shadow: none;
}

.forum-account .btn-register:hover,
.forum-account .btn-register:focus-visible {
    background: #005200;
    color: #fff;
    border-color: #005200;
    box-shadow: none;
}

html.dark-mode .forum-account .btn-register {
    background: #006400;
    color: var(--muted);
    border: 1px solid #006400;
    box-shadow: none;
}

html.dark-mode .forum-account .btn-register:hover,
html.dark-mode .forum-account .btn-register:focus-visible {
    background: #005200;
    color: var(--muted);
    border-color: #005200;
    box-shadow: none;
}

.forum-account-avatar-actions {
    margin-top: 0.65rem;
}

.forum-account-google-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.forum-account-avatar-preview {
    margin: 0.5rem 0 0.75rem;
}

.forum-account-avatar-preview img {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: none;
    box-shadow: none;
    display: block;
}

.forum-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.btn-primary:hover {
    background: var(--pink-hover);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
    color: #fff;
}

.btn-block {
    width: 100%;
}

.forum-account-delete {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.forum-swal-light.swal2-popup {
    background: #ffffff !important;
    color: #1a1625 !important;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.forum-swal-light .swal2-title,
.forum-swal-light .swal2-html-container {
    color: #1a1625 !important;
}

.forum-swal-dark.swal2-popup {
    background: #191c24 !important;
    color: #fff !important;
    border: 1px solid #2c2e33;
}

html.dark-mode .forum-swal-dark.swal2-popup,
html.dark-mode .forum-swal-dark .swal2-title,
html.dark-mode .forum-swal-dark .swal2-html-container {
    color: #ffffff !important;
}

.forum-swal-dark .swal2-icon.swal2-warning,
.forum-swal-light .swal2-icon.swal2-warning {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}

body .swal2-container {
    z-index: 2147483647 !important;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(106, 17, 207, 0.15);
    color: var(--purple);
    margin-right: 0.35rem;
}

.badge-pin {
    background: rgba(255, 0, 76, 0.15);
    color: var(--pink);
}

.badge-lock {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.badge-admin {
    background: #006400;
    color: #fff;
    text-transform: lowercase;
    font-weight: 700;
    letter-spacing: 0;
}

.forum-username-group {
    display: inline-flex;
    align-items: center;
    gap: 0.06rem;
    vertical-align: baseline;
}

/* Usernames keep registration casing everywhere (never force lowercase via parent styles). */
.forum-username,
.forum-username-chat-trigger {
    text-transform: none;
}

.forum-username-group .badge-admin {
    margin: 0;
}

html.dark-mode .badge-admin {
    color: var(--muted);
}

.forum-alert,
.forum-alert-success,
.forum-post .forum-post-message-btn {
    color: #fff;
}

.forum-alert-error {
    color: #fff;
}

html.dark-mode .forum-post .forum-post-message-btn,
html.dark-mode .forum-post .forum-post-message-btn:hover {
    color: var(--muted);
}

html.dark-mode .forum-post .forum-post-message-btn:hover {
    color: var(--text-soft);
}

/* ── Alerts ── */
.forum-flash-stack {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--forum-max-width);
    padding: var(--forum-body-gutter) var(--forum-body-gutter) 0;
    box-sizing: border-box;
    z-index: 2147483647;
    pointer-events: none;
}

.forum-flash-stack:has(.forum-alert) {
    pointer-events: auto;
}

.forum-flash-stack .forum-alert {
    margin: 0;
    border-radius: var(--radius-sm);
    pointer-events: auto;
    width: 100%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    cursor: pointer;
}

.forum-alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #006400;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.forum-alert-success {
    background: #006400;
    color: #fff;
    border-color: rgba(0, 0, 0, 0.12);
}

.forum-alert-error {
    background: #dc2626;
    color: #fff;
    border-color: rgba(0, 0, 0, 0.12);
}

html:not(.dark-mode) .forum-alert,
html:not(.dark-mode) .forum-alert-success,
html:not(.dark-mode) .forum-alert-error {
    color: #fff;
}

html.dark-mode .forum-alert,
html.dark-mode .forum-alert-success {
    background: #006400;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

html.dark-mode .forum-alert-error {
    background: #dc2626;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

@keyframes forum-email-needed-beat {
    0%, 100% {
        border-color: #dc2626;
        box-shadow: 0 0 0 3px #dc2626;
    }

    50% {
        border-color: #ff4444;
        box-shadow: 0 0 0 1px #ff6666;
    }
}

.forum-form input.forum-input-email-needed-beat,
.forum-label input.forum-input-email-needed-beat {
    border-width: 3px !important;
    border-color: #dc2626 !important;
    animation: forum-email-needed-beat 0.28s ease-in-out 6;
    outline: none;
}

.forum-empty {
    color: var(--muted);
}

.forum-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 1rem;
    margin-top: 1rem;
    color: var(--muted);
}

.forum-pagination--top {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.forum-pagination--bottom {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.forum-pagination__pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.forum-pagination__page,
.forum-pagination__gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0 0.45rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    line-height: 1;
}

.forum-pagination__page {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.forum-pagination__page:hover {
    border-color: var(--purple);
    color: var(--purple);
}

.forum-pagination__page.is-current {
    border-color: var(--purple);
    background: var(--purple);
    color: #fff;
}

html.dark-mode .forum-pagination__page.is-current {
    color: var(--text);
}

.forum-pagination__gap {
    border: none;
    background: transparent;
    color: var(--muted);
}

.forum-pagination__edge {
    font-weight: 700;
    white-space: nowrap;
}

.forum-pagination a {
    font-weight: 700;
}

.forum-post--nested {
    margin-left: 1.25rem;
}

.forum-post--depth-2 {
    margin-left: 2.5rem;
}

.forum-post--depth-3 {
    margin-left: 3.75rem;
}

.forum-post--depth-4 {
    margin-left: 5rem;
}

.forum-inline-reply {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border);
}

.forum-inline-reply[hidden] {
    display: none !important;
}

.forum-inline-reply .forum-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.forum-scroll-top {
    position: fixed;
    bottom: 20px;
    right: 10px;
    z-index: 1200;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 2px solid var(--purple);
    border-radius: 50%;
    background: transparent;
    color: var(--purple);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.forum-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.forum-scroll-top svg {
    display: block;
    width: 20px;
    height: 20px;
    margin: 0 auto;
}

.forum-scroll-top:hover {
    background: var(--purple);
    color: #fff;
}

html.dark-mode .forum-scroll-top {
    border-color: var(--purple);
    color: var(--purple);
}

html.dark-mode .forum-scroll-top:hover {
    background: var(--purple);
    color: #fff;
}

.forum-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.forum-admin-add-block,
.forum-admin-schema {
    min-width: 0;
}

.forum-admin-schema {
    margin: 0;
    padding: 0;
}

.forum-admin-tree-wrap {
    margin: 0;
    padding: 0;
}

.forum-panel h2.forum-admin-add-heading {
    margin: 0 0 0.75rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.01em;
    color: #000;
}

html.dark-mode .forum-panel h2.forum-admin-add-heading {
    color: var(--text-soft);
}

.forum-admin-topic-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.forum-admin-name-sub,
.forum-admin-name-sub2 {
    display: none;
}

.forum-admin-cat-form.forum-admin-mode-sub .forum-admin-name-main,
.forum-admin-cat-form.forum-admin-mode-sub2 .forum-admin-name-main {
    display: none;
}

.forum-admin-cat-form.forum-admin-mode-sub .forum-admin-name-sub {
    display: block;
}

.forum-admin-cat-form.forum-admin-mode-sub2 .forum-admin-name-sub2 {
    display: block;
}

.forum-admin-cat-form.forum-admin-mode-main .forum-admin-name-main {
    display: block;
}

.forum-admin-cat-form.forum-admin-mode-sub .forum-admin-main-wrap,
.forum-admin-cat-form.forum-admin-mode-sub2 .forum-admin-main-wrap {
    display: flex;
}

.forum-admin-cat-form.forum-admin-mode-main .forum-admin-main-wrap,
.forum-admin-cat-form.forum-admin-mode-main .forum-admin-sub-wrap,
.forum-admin-cat-form.forum-admin-mode-sub .forum-admin-sub-wrap {
    display: none;
}

.forum-admin-cat-form.forum-admin-mode-sub2 .forum-admin-sub-wrap {
    display: flex;
}

.forum-admin-cat-form .forum-fieldset {
    min-inline-size: 0;
}

.forum-admin-cat-form .forum-radio {
    cursor: pointer;
    align-items: center;
    text-align: center;
    margin-top: 0.5rem;
    user-select: none;
    color: var(--text);
    transition: color 0.15s ease;
}

.forum-admin-cat-form .forum-radio input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.forum-admin-cat-form .forum-radio::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    margin: 0 auto 0.3rem;
    border-left: 0.38rem solid transparent;
    border-right: 0.38rem solid transparent;
    border-top: 0.48rem solid var(--muted);
    transition: border-top-color 0.15s ease;
}

.forum-admin-cat-form .forum-radio:has(input:checked) {
    color: #22c55e;
}

.forum-admin-cat-form .forum-radio:has(input:checked)::before {
    border-top-color: #22c55e;
}

.forum-admin-cat-form .forum-radio:has(input:focus-visible) {
    outline: none;
}

.forum-admin-cat-form .forum-radio:has(input:focus-visible)::before {
    filter: drop-shadow(0 0 0 2px var(--border-strong));
}

.forum-admin-list-item {
    padding: 0;
}

.forum-admin-list-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    border-radius: 12px;
    transition: box-shadow 0.15s ease;
    position: relative;
}

.forum-admin-list-row:hover:not(.forum-admin-list-row--editing),
.forum-admin-list-row:focus-within:not(.forum-admin-list-row--editing) {
    background: transparent;
    box-shadow: 0 0 0 2px #32CD32;
    outline: none;
}

.forum-admin-list-item--editing-descr > .forum-admin-list-row,
.forum-admin-list-item--editing-descr > .forum-admin-list-row:hover,
.forum-admin-list-item--editing-descr > .forum-admin-list-row:focus-within {
    box-shadow: none;
    outline: none;
}

html.dark-mode .forum-admin-list-row:hover:not(.forum-admin-list-row--editing),
html.dark-mode .forum-admin-list-row:focus-within:not(.forum-admin-list-row--editing) {
    background: transparent;
    box-shadow: 0 0 0 2px #32CD32;
}

html.dark-mode .forum-admin-list-item--editing-descr > .forum-admin-list-row,
html.dark-mode .forum-admin-list-item--editing-descr > .forum-admin-list-row:hover,
html.dark-mode .forum-admin-list-item--editing-descr > .forum-admin-list-row:focus-within {
    box-shadow: none;
    outline: none;
}

.forum-admin-drag-handle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-soft);
    font-size: 0.85rem;
    line-height: 1;
    letter-spacing: -0.08em;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: element;
}

.forum-admin-list-link {
    -webkit-user-drag: none;
    user-drag: none;
}

.forum-admin-drag-handle:hover {
    color: var(--text);
    background: rgba(127, 127, 127, 0.12);
}

.forum-admin-drag-handle:active {
    cursor: grabbing;
}

.forum-admin-list-item--dragging > .forum-admin-list-row {
    opacity: 0.55;
}

.forum-admin-list-item--drop-before > .forum-admin-list-row {
    box-shadow: inset 0 2px 0 var(--purple);
}

.forum-admin-list-item--drop-after > .forum-admin-list-row {
    box-shadow: inset 0 -2px 0 var(--purple);
}

.forum-admin-category-group .forum-admin-category-group {
    margin: 0.15rem 0 0;
    padding-left: 0.75rem;
}

.forum-admin-list-depth-1 > .forum-admin-list-row {
    padding-left: 0.75rem;
}

.forum-admin-list-depth-2 > .forum-admin-list-row {
    padding-left: 1.5rem;
    color: var(--text-soft);
}

.forum-admin-list-view {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.forum-admin-edit-form {
    display: none;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.forum-admin-edit-form[hidden] {
    display: none !important;
}

.forum-admin-edit-input {
    min-width: 8rem;
    max-width: 100%;
    flex: 1 1 10rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1.3;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s ease;
}

.forum-admin-edit-input:focus,
.forum-admin-edit-input:focus-visible,
.forum-admin-edit-input:active {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

html.dark-mode .forum-admin-edit-input {
    background-color: #1e1f1e;
    border-color: var(--border);
    color: #c7c1b6;
    caret-color: #c7c1b6;
}

html.dark-mode .forum-admin-edit-input:focus,
html.dark-mode .forum-admin-edit-input:focus-visible,
html.dark-mode .forum-admin-edit-input:active {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

.forum-admin-list-row.forum-admin-list-row--editing,
.forum-admin-list-row.forum-admin-list-row--editing:hover,
.forum-admin-list-row.forum-admin-list-row--editing:focus-within {
    box-shadow: none;
    outline: none;
    background: transparent;
}

html.dark-mode .forum-admin-list-row.forum-admin-list-row--editing,
html.dark-mode .forum-admin-list-row.forum-admin-list-row--editing:hover,
html.dark-mode .forum-admin-list-row.forum-admin-list-row--editing:focus-within {
    box-shadow: none;
    outline: none;
    background: transparent;
}

.forum-admin-list-actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

.forum-admin-list-actions form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.forum-admin-delete-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.forum-admin-list-actions .btn-xs {
    flex-shrink: 0;
    white-space: nowrap;
}

.forum-admin-list-row.forum-admin-list-row--editing .forum-admin-list-view,
.forum-admin-list-row.forum-admin-list-row--editing .forum-admin-list-actions {
    display: none;
}

.forum-admin-list-row.forum-admin-list-row--editing .forum-admin-edit-form {
    display: flex !important;
}

.forum-admin-descr-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
    margin: 0.175rem 0 0.275rem 1.75rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.forum-admin-descr-form[hidden] {
    display: none !important;
}

.forum-admin-descr-form__label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
    flex: 1 1 14rem;
    min-width: 0;
}

.forum-admin-descr-input {
    width: 100%;
    padding: 0.35rem 0.55rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

.forum-admin-descr-input:focus,
.forum-admin-descr-input:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

.forum-admin-descr-form__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.forum-admin-list-depth-1 .forum-admin-descr-form {
    margin-left: 2.5rem;
}

.forum-admin-list-depth-2 .forum-admin-descr-form {
    margin-left: 3.25rem;
}

.btn-xs {
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1.3;
}

.forum-fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin: 0;
}

.forum-fieldset legend {
    padding: 0 0.35rem;
}

.forum-radio {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    text-transform: lowercase;
    margin-top: 0.35rem;
}

.forum-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.85rem 0 0;
    font-size: 0.92rem;
    line-height: 1.2;
    cursor: pointer;
    color: var(--text);
}

.forum-form label.forum-check {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    align-self: flex-start;
    gap: 0.65rem;
}

.forum-check input[type="checkbox"] {
    width: 1em;
    height: 1em;
    margin: 0;
    flex: 0 0 auto;
    cursor: pointer;
}

.forum-admin-settings-form {
    margin-top: 0.85rem;
    align-self: flex-start;
    width: 100%;
}

.forum-admin-settings-form .forum-check + .forum-check {
    margin-top: 0.65rem;
}

.forum-repair-mode-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    text-align: center;
}

.forum-repair-mode-banner p {
    margin: 0;
    line-height: 1.45;
}

.forum-repair-mode-banner__icon {
    color: #00c853;
    animation: forum-repair-gear-spin 2.4s linear infinite;
}

@keyframes forum-repair-gear-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .forum-repair-mode-banner__icon {
        animation: none;
    }
}

.forum-admin-settings-form .forum-check {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.forum-admin-settings-form .forum-check input[type="checkbox"] {
    width: 1.4rem;
    height: 1.4rem;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #0a58ca;
    border-radius: 0.25em;
    background-color: transparent;
    background-image: none;
    print-color-adjust: exact;
}

.forum-admin-settings-form .forum-check input[type="checkbox"]:focus {
    border-color: #0a58ca;
    box-shadow: 0 0 0 0.2rem rgba(10, 88, 202, 0.25);
    outline: none;
}

.forum-admin-settings-form .forum-check input[type="checkbox"]:checked {
    background-color: #0a58ca;
    border-color: #0a58ca;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2300d25b' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.forum-admin-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.forum-admin-list li {
    padding: 0.175rem 0;
}

.forum-admin-list-link {
    font-weight: 700;
}

.forum-admin-list-link:hover {
    text-decoration: none;
}

.forum-admin-list-sub {
    padding-left: 1.1rem !important;
    color: var(--text-soft);
}

.forum-admin-list-prefix {
    opacity: 0.65;
    margin-right: 0.25rem;
}

.forum-admin-list-count {
    opacity: 0.7;
    font-size: 0.88rem;
}

.forum-admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.forum-post-delete {
    margin-top: 0.75rem;
}

.forum-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
}

.forum-messages-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.forum-messages-tabs a {
    font-weight: 700;
    text-decoration: none;
    color: #0000FF;
    text-transform: lowercase;
}

.forum-messages-tabs a.is-active {
    color: #FF0000;
}

.forum-message-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.forum-message-row {
    display: block;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
}

.forum-message-row.is-unread {
    border-color: var(--accent);
    background: rgba(89, 30, 152, 0.08);
}

.forum-message-row-meta {
    display: block;
    font-size: 0.88rem;
    color: var(--text-soft);
    margin-top: 0.2rem;
}

.forum-message-view-meta {
    color: var(--text-soft);
    margin: 0.5rem 0 1rem;
}

.forum-message-view-body {
    white-space: pre-wrap;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.forum-message-view-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.forum-message-recipients {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.forum-message-recipients:focus-within {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--glow);
}

.forum-message-recipients.is-invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.18);
}

.forum-message-recipients.is-full .forum-message-recipients-input {
    display: none;
}

.forum-message-recipients-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.forum-message-recipient-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.2rem 0.35rem 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--glow);
    border: 1px solid var(--border);
    font-size: 0.88rem;
    line-height: 1.2;
}

.forum-message-recipient-chip__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-message-recipient-chip__remove {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1rem;
}

.forum-message-recipients-input {
    flex: 1 1 8rem;
    min-width: 6rem;
    width: auto !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0.25rem 0.35rem !important;
}

.forum-message-recipients-input:focus {
    box-shadow: none !important;
}

/* ── Shared site dropdown menus ── */
.forum-admin-user-per-page__menu,
.forum-messenger-search-dropdown,
.forum-message-recipients-dropdown,
.forum-user-menu__dropdown {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 0.35rem;
}

html.dark-mode .forum-admin-user-per-page__menu,
html.dark-mode .forum-messenger-search-dropdown,
html.dark-mode .forum-message-recipients-dropdown,
html.dark-mode .forum-user-menu__dropdown {
    background: #2e2f2e;
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.forum-admin-user-per-page__option,
.forum-messenger-search-dropdown__item,
.forum-messenger-search-dropdown__empty,
.forum-message-recipients-dropdown__item,
.forum-user-menu__dropdown a {
    color: #000;
    border-radius: 8px;
}

html.dark-mode .forum-admin-user-per-page__option,
html.dark-mode .forum-messenger-search-dropdown__item,
html.dark-mode .forum-messenger-search-dropdown__empty,
html.dark-mode .forum-message-recipients-dropdown__item,
html.dark-mode .forum-user-menu__dropdown a {
    color: #c7c1b6;
}

.forum-admin-user-per-page__option:hover,
.forum-admin-user-per-page__option:focus-visible,
.forum-admin-user-per-page__option.is-selected,
.forum-messenger-search-dropdown__item:hover,
.forum-messenger-search-dropdown__item:focus,
.forum-messenger-search-dropdown__item:focus-visible,
.forum-message-recipients-dropdown__item:hover,
.forum-message-recipients-dropdown__item.is-active,
.forum-user-menu__dropdown a:hover,
.forum-user-menu__dropdown a:focus-visible {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
    outline: none;
}

html.dark-mode .forum-admin-user-per-page__option:hover,
html.dark-mode .forum-admin-user-per-page__option:focus-visible,
html.dark-mode .forum-admin-user-per-page__option.is-selected,
html.dark-mode .forum-messenger-search-dropdown__item:hover,
html.dark-mode .forum-messenger-search-dropdown__item:focus,
html.dark-mode .forum-messenger-search-dropdown__item:focus-visible,
html.dark-mode .forum-message-recipients-dropdown__item:hover,
html.dark-mode .forum-message-recipients-dropdown__item.is-active,
html.dark-mode .forum-user-menu__dropdown a:hover,
html.dark-mode .forum-user-menu__dropdown a:focus-visible {
    background: #353635;
    color: #c7c1b6;
}

.forum-messenger-search-dropdown .forum-username,
.forum-messenger-search-dropdown .forum-username--admin,
.forum-messenger-search-dropdown__item:hover .forum-username,
.forum-messenger-search-dropdown__item:hover .forum-username--admin,
.forum-messenger-search-dropdown__item:focus .forum-username,
.forum-messenger-search-dropdown__item:focus .forum-username--admin,
.forum-messenger-search-dropdown__item:focus-visible .forum-username,
.forum-messenger-search-dropdown__item:focus-visible .forum-username--admin {
    color: inherit;
}

.forum-message-recipients-dropdown {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    margin: 0;
    list-style: none;
    max-height: 12rem;
    overflow-y: auto;
}

.forum-message-recipients-dropdown[hidden] {
    display: none;
}

.forum-message-recipients-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    font-size: 0.92rem;
}

html.dark-mode .forum-message-recipients {
    background-color: #1e1f1e !important;
}

.forum-admin-users {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.forum-admin-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.55rem;
}

.forum-admin-menu--panel-top {
    margin: 0;
}

.forum-admin-user-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    min-height: 2.2rem;
    margin: 0 0 0.85rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.forum-admin-user-per-page {
    position: relative;
    display: inline-flex;
    margin: 0 0 0 auto;
}

.forum-admin-user-per-page__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.4rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    color: #000;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.forum-admin-user-per-page__trigger:hover,
.forum-admin-user-per-page__trigger:focus {
    color: #000;
    background: var(--glow);
    border-color: var(--purple);
    outline: none;
}

html.dark-mode .forum-admin-user-per-page__trigger {
    background: var(--surface-soft);
    color: var(--text);
    border-color: var(--border);
}

html.dark-mode .forum-admin-user-per-page__trigger:hover,
html.dark-mode .forum-admin-user-per-page__trigger:focus {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border-strong);
}

.forum-admin-user-per-page__menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    min-width: 100%;
    z-index: 10050;
}

.forum-admin-user-per-page.is-open .forum-admin-user-per-page__menu {
    display: block;
}

.forum-admin-user-per-page__menu[hidden] {
    display: none;
}

.forum-admin-user-per-page__option {
    display: block;
    width: 100%;
    padding: 0.55rem 0.9rem;
    border: none;
    background: transparent;
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
}

.forum-admin-user-filter-bar__hint {
    color: var(--muted);
    font-size: 0.88rem;
    text-transform: lowercase;
}

.forum-round-clear,
.forum-admin-user-filter-chip__remove,
.forum-message-recipient-chip__remove,
.forum-label-chip__remove,
.forum-composer-image-remove,
.forum-input-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(127, 127, 127, 0.16);
    color: #ff0000;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

html.dark-mode .forum-round-clear,
html.dark-mode .forum-admin-user-filter-chip__remove,
html.dark-mode .forum-message-recipient-chip__remove,
html.dark-mode .forum-label-chip__remove,
html.dark-mode .forum-composer-image-remove,
html.dark-mode .forum-input-clear-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ff6666;
}

.forum-round-clear:hover,
.forum-round-clear:focus-visible,
.forum-admin-user-filter-chip__remove:hover,
.forum-admin-user-filter-chip__remove:focus,
.forum-admin-user-filter-chip__remove:focus-visible,
.forum-message-recipient-chip__remove:hover,
.forum-message-recipient-chip__remove:focus-visible,
.forum-label-chip__remove:hover,
.forum-label-chip__remove:focus-visible,
.forum-composer-image-remove:hover,
.forum-composer-image-remove:focus-visible,
.forum-input-clear-btn:hover,
.forum-input-clear-btn:focus-visible {
    background: rgba(255, 0, 0, 0.18);
    color: #ff0000;
    outline: none;
}

html.dark-mode .forum-round-clear:hover,
html.dark-mode .forum-round-clear:focus-visible,
html.dark-mode .forum-admin-user-filter-chip__remove:hover,
html.dark-mode .forum-admin-user-filter-chip__remove:focus,
html.dark-mode .forum-admin-user-filter-chip__remove:focus-visible,
html.dark-mode .forum-message-recipient-chip__remove:hover,
html.dark-mode .forum-message-recipient-chip__remove:focus-visible,
html.dark-mode .forum-label-chip__remove:hover,
html.dark-mode .forum-label-chip__remove:focus-visible,
html.dark-mode .forum-composer-image-remove:hover,
html.dark-mode .forum-composer-image-remove:focus-visible,
html.dark-mode .forum-input-clear-btn:hover,
html.dark-mode .forum-input-clear-btn:focus-visible {
    background: rgba(255, 0, 0, 0.22);
    color: #ff6666;
}

.forum-input-clear-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.forum-input-clear-wrap > .forum-inline-search-input,
.forum-input-clear-wrap > .forum-admin-user-search-input,
.forum-input-clear-wrap > .forum-label-search-date-input {
    padding-right: 2.35rem;
}

.forum-input-clear-btn {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    font-size: 1.05rem;
}

.forum-input-clear-btn[hidden] {
    display: none !important;
}

.forum-header-search-input[type="search"]::-webkit-search-cancel-button,
.forum-inline-search-input[type="search"]::-webkit-search-cancel-button,
.forum-admin-user-search-input[type="search"]::-webkit-search-cancel-button,
.forum-messenger-search-input[type="search"]::-webkit-search-cancel-button,
.forum-admin-chats-search-input[type="search"]::-webkit-search-cancel-button,
.forum-admin-user-search .forum-inline-search-input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    margin-left: 0.2rem;
    border-radius: 50%;
    background-color: rgba(127, 127, 127, 0.16);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 2l8 8M10 2L2 10' stroke='%23ff0000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px 11px;
    cursor: pointer;
}

html.dark-mode .forum-header-search-input[type="search"]::-webkit-search-cancel-button,
html.dark-mode .forum-inline-search-input[type="search"]::-webkit-search-cancel-button,
html.dark-mode .forum-admin-user-search-input[type="search"]::-webkit-search-cancel-button,
html.dark-mode .forum-messenger-search-input[type="search"]::-webkit-search-cancel-button,
html.dark-mode .forum-admin-chats-search-input[type="search"]::-webkit-search-cancel-button,
html.dark-mode .forum-admin-user-search .forum-inline-search-input[type="search"]::-webkit-search-cancel-button {
    background-color: rgba(255, 255, 255, 0.12);
}

.forum-admin-user-filter-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    padding: 0.25rem 1.35rem 0.25rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: lowercase;
    color: var(--text);
}

.forum-admin-user-filter-chip__label {
    line-height: 1.2;
}

.forum-admin-user-filter-chip__remove {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    font-size: 0.95rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.forum-admin-user-card-name {
    display: inline-flex;
    align-items: center;
    gap: 0.06rem;
}

.forum-admin-menu-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: lowercase;
    color: #0000FF;
    text-decoration: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.forum-admin-menu-link:hover {
    color: #FF0000;
    background: var(--glow);
    border-color: var(--purple);
    box-shadow: none;
}

.forum-admin-menu-link:focus,
.forum-admin-menu-link:active,
.forum-admin-menu-link:focus-visible {
    outline: none;
    box-shadow: none;
}

.forum-admin-menu-link:active {
    transform: none;
}

html.dark-mode .forum-admin-menu-link {
    color: #0000FF;
}

html.dark-mode .forum-admin-menu-link:hover {
    color: #FF0000;
    background: var(--glow);
    border-color: var(--purple);
    box-shadow: none;
}

.forum-admin-menu-link--active {
    border-color: var(--purple);
    background: var(--glow);
}

.forum-admin-labels-schema {
    margin-top: 0.35rem;
}

.forum-admin-labels-group {
    list-style: none;
    margin: 0;
    padding: 0;
}

.forum-admin-labels-row {
    min-height: 1.8rem;
}

.forum-admin-labels-schema .forum-admin-list-row:hover,
.forum-admin-labels-schema .forum-admin-list-row:focus-within {
    box-shadow: none;
    outline: none;
    background: transparent;
}

html.dark-mode .forum-admin-labels-schema .forum-admin-list-row:hover,
html.dark-mode .forum-admin-labels-schema .forum-admin-list-row:focus-within {
    box-shadow: none;
    outline: none;
    background: transparent;
}

.forum-admin-labels-schema .forum-label-chip__remove:focus,
.forum-admin-labels-schema .forum-label-chip__remove:focus-visible {
    outline: none;
    box-shadow: none;
}

.forum-admin-labels-category-name {
    font-weight: 700;
    color: var(--text);
}

.forum-admin-labels-box {
    margin: 0.35rem 0 0.85rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.forum-admin-labels-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
}

.forum-admin-labels-empty {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    color: var(--muted);
}

.forum-label-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.82rem;
    line-height: 1.2;
}

.forum-label-chip__remove {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1rem;
}

.forum-admin-label-add-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.forum-admin-label-add-input {
    flex: 1 1 10rem;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
    font: inherit;
    background: var(--surface);
    color: var(--text);
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.forum-admin-label-add-input:focus,
.forum-admin-label-add-input:focus-visible,
.forum-admin-label-add-input:active {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

.forum-admin-label-add-input:invalid,
.forum-admin-label-add-input:focus:invalid {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

.forum-admin-label-delete-form {
    margin: 0;
    display: inline;
}

.forum-admin-chats-split {
    position: relative;
    margin-top: 0.65rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    min-height: 0;
}

.forum-admin-chats-list-panel {
    position: relative;
    z-index: 1;
    grid-column: 1;
    min-width: 0;
    width: 100%;
}

.forum-admin-chats-detail-panel {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    width: var(--forum-admin-chat-panel-width, calc((100% - 0.65rem) * 0.5));
    min-width: 16rem;
    max-width: 100%;
    padding-bottom: 2rem;
    box-shadow: var(--shadow);
    overflow: visible;
}

.forum-admin-chats-list-panel,
.forum-admin-chats-detail-panel {
    align-self: start;
    min-height: 0;
    height: auto;
}

.forum-admin-chat-stage {
    position: relative;
    min-width: 0;
}

.forum-chat-resize-handle {
    position: absolute;
    z-index: 6;
    width: 1rem;
    height: 1rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: nwse-resize;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.forum-chat-resize-handle img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.forum-chat-resize-handle:hover,
.forum-chat-resize-handle:focus-visible {
    opacity: 1;
    outline: none;
}

.forum-chat-resize-handle--admin {
    left: 0;
    bottom: 0;
    top: auto;
    width: 3rem;
    height: 3rem;
    transform: translate(-50%, 50%);
    z-index: 30;
    opacity: 1;
    cursor: nesw-resize;
}

.forum-chat-window--dock.is-resizing {
    z-index: 10150;
}

body.forum-chat-resize-active {
    cursor: nwse-resize !important;
    user-select: none;
}

body.forum-chat-resize-active * {
    cursor: nwse-resize !important;
}

body.forum-admin-chat-resize-active {
    cursor: nesw-resize !important;
    user-select: none;
}

body.forum-admin-chat-resize-active * {
    cursor: nesw-resize !important;
}

.forum-admin-chats-heading {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: lowercase;
}

.forum-admin-chats-search-wrap {
    margin: 0 0 0.75rem;
}

.forum-admin-chats-search-input {
    width: 100%;
    min-height: 36px;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    line-height: 1.4;
    text-transform: lowercase;
}

.forum-admin-chats-search-input::placeholder {
    text-transform: lowercase;
}

.forum-admin-chats-search-input:focus,
.forum-admin-chats-search-input:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

html:not(.dark-mode) .forum-admin-chats-heading {
    color: #000;
}

html.dark-mode .forum-admin-chats-heading {
    color: var(--muted);
}

.forum-admin-chats-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.forum-admin-chats-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
    max-width: none;
}

.forum-admin-chats-link--active {
    border-color: var(--purple);
    background: var(--glow);
}

.forum-admin-chats-link__label {
    font-weight: 700;
}

.forum-admin-chats-link__meta {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.35;
}

.forum-admin-chats-link__preview {
    display: inline;
}

.forum-admin-chats-link--group {
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
}

.forum-admin-chats-link__avatar {
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.forum-admin-chats-link__avatar .forum-messenger-avatar,
.forum-admin-chats-link__avatar .forum-messenger-avatar--placeholder {
    width: 32px;
    height: 32px;
    font-size: 0.62rem;
    border-radius: var(--radius-sm);
}

.forum-admin-chats-link--group .forum-admin-chats-link__content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.forum-admin-chats-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.forum-admin-chat-title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: lowercase;
}

.forum-admin-chats-detail-panel .forum-admin-chats-heading {
    margin-bottom: 0.65rem;
}

.forum-admin-chat-window {
    width: 100%;
    min-height: 11rem;
    height: var(--forum-admin-chat-panel-height, 20rem);
    max-height: min(68vh, 640px);
    border-radius: var(--radius-sm);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.forum-admin-chat-window .forum-chat-window__head,
.forum-admin-chat-window .forum-group-chat-participants {
    flex-shrink: 0;
}

.forum-admin-chat-window .forum-chat-window__messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.forum-admin-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.forum-admin-user-search {
    margin-bottom: 1rem;
}

.forum-admin-user-search-input,
.forum-admin-user-search .forum-inline-search-input {
    width: 100%;
    max-width: 28rem;
}

.forum-admin-user-search-input:focus,
.forum-admin-user-search-input:focus-visible,
.forum-admin-user-search .forum-inline-search-input:focus,
.forum-admin-user-search .forum-inline-search-input:focus-visible {
    outline: none;
    border-color: var(--border);
    box-shadow: none;
}

.forum-admin-user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.55rem;
}

.forum-admin-user-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.65rem;
    font-size: 0.72rem;
    line-height: 1.35;
    background: rgba(0, 0, 0, 0.08);
}

html.dark-mode .forum-admin-user-card {
    background: rgba(255, 255, 255, 0.03);
}

.forum-admin-user-card-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.78rem;
}

.forum-admin-user-card-meta {
    margin-top: 0.25rem;
    color: var(--text-soft);
    word-break: break-word;
}

.forum-admin-user-last-login {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    white-space: nowrap;
}

.forum-admin-user-card-foot {
    margin-top: auto;
    padding-top: 0.45rem;
    text-align: left;
    color: var(--text-soft);
}

.forum-admin-user-last-login__icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 0.15rem;
    vertical-align: -0.12em;
    opacity: 0.88;
}

.forum-admin-user-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
    margin-top: 0.45rem;
}

.forum-admin-user-card-actions form {
    margin: 0;
}

.forum-admin-user-card-actions a.btn-ghost.btn-xs {
    color: var(--text);
    text-decoration: none;
}

.forum-admin-user-card-actions a.btn-ghost.btn-xs:hover,
.forum-admin-user-card-actions .btn-ghost.btn-xs:hover {
    background: #006400;
    border-color: #006400;
    color: #fff;
}

html.dark-mode .forum-admin-user-card-actions a.btn-ghost.btn-xs:hover,
html.dark-mode .forum-admin-user-card-actions .btn-ghost.btn-xs:hover {
    color: var(--muted);
}

html.dark-mode .forum-admin-user-card-actions .btn-danger.btn-xs {
    color: var(--muted);
}

html.dark-mode .forum-admin-user-card-actions .btn-danger.btn-xs:hover {
    color: var(--text-soft);
}

.forum-admin-user-empty {
    font-size: 0.85rem;
}

.forum-section-heading {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: lowercase;
}

.badge.badge-xs {
    font-size: 0.58rem;
    padding: 0.1rem 0.35rem;
}

.forum-admin-user-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.forum-admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.forum-admin-ban-form {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin: 0;
}

.forum-admin-ban-days {
    width: 4rem;
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: inherit;
}

@media (max-width: 768px), ((orientation: landscape) and (max-height: 500px)) {
    .forum-header-desktop-only {
        display: none !important;
    }

    .forum-mobile-menu-toggle {
        display: inline-flex !important;
    }

    .forum-footer > .forum-container {
        width: 100%;
        min-width: 0;
    }

    .forum-footer-inner {
        flex-wrap: nowrap;
        gap: 0.5rem 0.75rem;
    }

    .forum-footer-left {
        flex: 1 1 auto;
        min-width: 0;
    }

    .forum-footer-stats {
        flex: 0 0 auto;
    }
}

/* Mobile — vertical page scroll; header/footer move up/down, locked on horizontal axis */
@media (max-width: 768px), ((orientation: landscape) and (max-height: 500px)) {
    html,
    html.dark-mode {
        background: var(--bg) !important;
    }

    html,
    body {
        overflow-x: hidden;
    }

    body {
        background: var(--bg);
    }

    .forum-page {
        overflow-x: hidden;
    }

    .forum-main {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-x pan-y;
    }
}

/* Single-topic page: edge-to-edge box frames fully inside viewport (match main site listings) */
@media (max-width: 767.9px) {
    .forum-main:has(.forum-thread-posts) {
        overflow-x: hidden;
    }

    .forum-main:has(.forum-thread-posts) > .forum-container {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding-inline: 0;
        overflow-x: hidden;
    }

    .forum-main:has(.forum-thread-posts) .forum-breadcrumb-row--thread {
        padding-inline: var(--forum-body-gutter);
        max-width: 100%;
        box-sizing: border-box;
    }

    .forum-main:has(.forum-thread-posts) .forum-thread-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-main:has(.forum-thread-posts) .forum-thread-title-row,
    .forum-main:has(.forum-thread-posts) .forum-thread-title-bar,
    .forum-main:has(.forum-thread-posts) .forum-thread-posts,
    .forum-main:has(.forum-thread-posts) .forum-posts,
    .forum-main:has(.forum-thread-posts) .forum-post-box,
    .forum-main:has(.forum-thread-posts) .forum-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .forum-main:has(.forum-thread-posts) .forum-thread-title-bar {
        width: 100%;
    }

    .forum-main:has(.forum-thread-posts) .forum-thread-title-bar--admin {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: start;
        gap: 0.35rem;
        width: 100%;
    }

    .forum-main:has(.forum-thread-posts) .forum-thread-title-bar--admin .forum-thread-page-title,
    .forum-main:has(.forum-thread-posts) .forum-thread-title-bar--admin .forum-thread-admin-actions {
        grid-column: 1;
        min-width: 0;
    }

    .forum-main:has(.forum-thread-posts) .forum-thread-title-bar--admin .forum-thread-page-title {
        grid-row: 1;
    }

    .forum-main:has(.forum-thread-posts) .forum-thread-title-bar--admin .forum-thread-admin-actions {
        grid-row: 2;
        width: 100%;
        flex-wrap: wrap;
    }

    .forum-main:has(.forum-thread-posts) .forum-thread-page-title {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .forum-main:has(.forum-thread-posts) .forum-post-box {
        border-radius: var(--radius-sm);
        padding-inline: 0.65rem;
    }

    .forum-main:has(.forum-thread-posts) .forum-post-body,
    .forum-main:has(.forum-thread-posts) .forum-post-content {
        min-width: 0;
        max-width: 100%;
    }

    .forum-main:has(.forum-thread-posts) .forum-pic-gallery {
        width: 100%;
        max-width: 100%;
    }

    .forum-main:has(.forum-thread-posts) #reply-form.forum-panel-narrow,
    .forum-main:has(.forum-thread-posts) .forum-panel.forum-empty {
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
        border-radius: var(--radius-sm);
    }
}

@media (max-width: 767.9px) and (orientation: portrait) {
    .forum-breadcrumb-row--thread .forum-thread-title-bar:not(.forum-thread-title-bar--admin) {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Facebook-style messenger */
.forum-messenger-dock {
    position: fixed;
    right: 16px;
    bottom: 0;
    z-index: 10100;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

.forum-messenger-dock .forum-chat-window {
    background: var(--surface);
    isolation: isolate;
}

.forum-messenger-dock .forum-chat-window__messages {
    background: var(--surface-soft);
}

.forum-messenger-dock .forum-chat-window__footer,
.forum-messenger-dock .forum-chat-window__composer {
    background: var(--surface);
}

html.dark-mode .forum-messenger-dock .forum-chat-window,
html.dark-mode .forum-messenger-dock .forum-chat-window__footer,
html.dark-mode .forum-messenger-dock .forum-chat-window__composer {
    background: #272827;
}

html.dark-mode .forum-messenger-dock .forum-chat-window__messages {
    background: #242525;
}

.forum-messenger-launcher {
    pointer-events: auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #00FF00;
    color: #4B0082;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
    text-decoration: none;
    flex-shrink: 0;
    isolation: isolate;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.3s ease;
}

.forum-messenger-launcher::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #663399;
    transform: scale(0);
    transition: transform 0.35s ease-out;
    z-index: 0;
}

.forum-messenger-launcher[hidden] {
    display: none !important;
}

.forum-messenger-launcher:hover,
.forum-messenger-launcher:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    color: #ff0000;
}

.forum-messenger-launcher:hover::before,
.forum-messenger-launcher:focus-visible::before {
    transform: scale(1);
}

.forum-messenger-launcher__icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.forum-messenger-launcher__icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.forum-messenger-launcher__badge {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 2;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ff0000;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    box-sizing: border-box;
}

.forum-messenger-launcher__badge[hidden] {
    display: none !important;
}

body:has(.forum-messenger-page) .forum-messenger-launcher {
    display: none !important;
}

html.forum-has-horizontal-overflow body:has(.forum-messenger-page) .forum-messenger-launcher:not([hidden]) {
    display: inline-flex !important;
}

@media (max-width: 768px) {
    body:has(.forum-messenger-page) .forum-messenger-launcher:not([hidden]) {
        display: inline-flex !important;
    }
}

.forum-chat-window {
    pointer-events: auto;
    width: 328px;
    max-width: calc(100vw - 24px);
    height: 455px;
    max-height: calc(100vh - 96px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    position: relative;
}

.forum-chat-window.forum-chat-window--dock {
    overflow: visible;
}

.forum-chat-window.forum-chat-window--dock > .forum-chat-window__head {
    position: relative;
    z-index: 1;
    border-radius: 12px 12px 0 0;
}

.forum-chat-window.forum-chat-window--dock .forum-chat-resize-handle {
    width: 32px;
    height: 32px;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    z-index: 30;
    opacity: 1;
}

.forum-admin-chat-window.is-admin-resized {
    max-height: none;
}

.forum-chat-window--page {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    min-height: 0;
    border-radius: 12px;
    box-shadow: none;
}

.forum-chat-window__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    background: linear-gradient(135deg, #591e98, #6a11cf);
    color: #fff;
}

.forum-chat-window__head-main {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.forum-chat-window__avatar,
.forum-messenger-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: none;
    box-shadow: none;
    flex-shrink: 0;
    display: block;
}

.forum-chat-window__avatar--placeholder,
.forum-messenger-avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #006400;
    border: none;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.forum-chat-window__title {
    min-width: 0;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.forum-username--online {
    color: #228B22;
}

.forum-user-menu__toggle .forum-username--online {
    color: #228B22;
}

html.dark-mode .forum-username--online {
    color: #00FF00;
}

html.dark-mode .forum-user-menu__toggle .forum-username--online {
    color: #00FF00;
}

.forum-messenger-online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00FF00;
    border: none;
    box-shadow: none;
    flex-shrink: 0;
}

.forum-chat-window__head-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.forum-chat-window__expand,
.forum-chat-window__close {
    border: 0;
    background: transparent;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    line-height: 1;
}

.forum-chat-window__expand:visited {
    color: #fff;
}

.forum-chat-window__expand:hover,
.forum-chat-window__expand:focus-visible,
.forum-chat-window__close:hover,
.forum-chat-window__close:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.forum-chat-window__messages {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0.85rem;
    background: var(--bg);
}

.forum-chat-window__empty {
    color: var(--muted);
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.92rem;
}

.forum-chat-bubble-row {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.forum-chat-bubble-row.is-mine {
    justify-content: flex-end;
}

.forum-chat-bubble-row__avatar {
    flex-shrink: 0;
}

.forum-chat-bubble-row__avatar .forum-messenger-avatar,
.forum-chat-bubble-row__avatar .forum-messenger-avatar--placeholder {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
}

.forum-chat-bubble {
    max-width: min(82%, calc(100% - 36px));
    padding: 0.55rem 0.7rem;
    border-radius: 16px;
    background: #006400;
    border: 1px solid #006400;
    color: #fff;
}

.forum-chat-bubble-row.is-mine .forum-chat-bubble {
    max-width: 82%;
    background: #591e98;
    border-color: #591e98;
    color: #fff;
}

.forum-chat-bubble__body {
    word-break: break-word;
    font-size: 1rem;
    line-height: 1.45;
}

.forum-chat-bubble__body .forum-pic-gallery {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.45rem;
    width: 100%;
    max-width: 100%;
    margin: 0.45rem 0 0;
    padding: 0;
    border: none;
    border-radius: 0;
    cursor: pointer;
    box-sizing: border-box;
}

html.dark-mode .forum-chat-bubble__body .forum-pic-gallery {
    border: none;
}

.forum-chat-bubble__body .forum-pic-gallery:focus,
.forum-chat-bubble__body .forum-pic-gallery:focus-visible {
    outline: none;
}

.forum-chat-bubble__body .forum-pic-gallery__thumb {
    border: none;
    box-shadow: none;
}

.forum-chat-bubble__body .forum-pic-gallery__thumb:hover,
.forum-chat-bubble__body .forum-pic-gallery__thumb.is-active,
.forum-chat-bubble__body .forum-pic-gallery__thumb:focus-visible {
    border: none;
    box-shadow: none;
}

.forum-chat-composer {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.forum-chat-composer-images {
    margin: 0;
}

.forum-chat-composer.is-dragover .forum-chat-window__composer,
.forum-chat-composer.is-dragover .forum-chat-window__composer textarea {
    outline: 2px dashed var(--purple);
    outline-offset: 2px;
}

.forum-chat-upload-progress {
    margin: 0 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

.forum-chat-upload-progress__label {
    margin: 0 0 0.45rem;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #333;
    text-transform: lowercase;
}

.forum-chat-upload-progress__track {
    display: block;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: #d8d8d8;
    overflow: hidden;
}

.forum-chat-upload-progress__fill {
    display: block;
    height: 100%;
    width: 0%;
    min-width: 0;
    border-radius: 6px;
    background: linear-gradient(90deg, #1e7e34 0%, #28a745 50%, #34c759 100%);
    transition: width 0.2s ease;
}

.forum-chat-upload-progress__pct {
    margin: 0.35rem 0 0;
    padding: 0;
    font-size: 0.72rem;
    font-weight: 800;
    color: #1e7e34;
    text-align: right;
}

html.dark-mode .forum-chat-upload-progress {
    background: #591e98;
    border-color: #591e98;
}

html.dark-mode .forum-chat-upload-progress__label {
    color: #d1cbc1;
}

html.dark-mode .forum-chat-upload-progress__track {
    background: #3d1469;
}

html.dark-mode .forum-chat-upload-progress__pct {
    color: #34c759;
}

.forum-composer [data-forum-composer-upload-progress] {
    margin: 0.35rem 0 0.5rem;
}

.forum-composer.is-uploading .forum-composer-toolbar,
.forum-composer.is-uploading .forum-composer-body,
.forum-composer.is-uploading .forum-composer-images,
.forum-composer.is-uploading .forum-composer-emotions {
    opacity: 0.72;
    pointer-events: none;
}

.forum-form.is-uploading button[type="submit"],
.forum-form.is-uploading .forum-form-actions {
    opacity: 0.72;
    pointer-events: none;
}

.forum-chat-composer.is-uploading .forum-composer-toolbar,
.forum-chat-composer.is-uploading .forum-chat-window__composer {
    opacity: 0.72;
    pointer-events: none;
}

.forum-chat-bubble__body a,
.forum-chat-bubble__body a.forum-auto-link {
    color: #0000FF;
    text-decoration: none;
    transition: color 0.25s ease;
    word-break: break-all;
}

.forum-chat-bubble__body a:hover,
.forum-chat-bubble__body a:active,
.forum-chat-bubble__body a.forum-auto-link:hover,
.forum-chat-bubble__body a.forum-auto-link:active {
    color: #FF0000;
}

.forum-chat-bubble__body .forum-admin-added {
    color: #FF0000;
}

.forum-chat-bubble__body .forum-admin-added a,
.forum-chat-bubble__body .forum-admin-added a.forum-auto-link {
    color: #FF0000;
}

.forum-chat-bubble__body .forum-admin-added a:hover,
.forum-chat-bubble__body .forum-admin-added a:active,
.forum-chat-bubble__body .forum-admin-added a.forum-auto-link:hover,
.forum-chat-bubble__body .forum-admin-added a.forum-auto-link:active {
    color: #FF0000;
}

.forum-chat-bubble__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-top: 0.2rem;
}

.forum-chat-message-menu {
    position: relative;
    flex-shrink: 0;
}

.forum-chat-message-menu__toggle {
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.82;
    cursor: pointer;
    padding: 0 0.15rem;
    font-size: 1rem;
    line-height: 1;
}

.forum-chat-message-menu__toggle:hover,
.forum-chat-message-menu__toggle:focus-visible,
.forum-chat-message-menu.is-open .forum-chat-message-menu__toggle {
    opacity: 1;
    outline: none;
}

.forum-chat-bubble-row.is-mine .forum-chat-message-menu__toggle {
    color: rgba(255, 255, 255, 0.88);
}

.forum-chat-message-menu__popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.25rem);
    z-index: 40;
    min-width: 6.5rem;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.forum-chat-message-menu__popover[hidden] {
    display: none !important;
}

.forum-chat-message-menu__item {
    display: block;
    width: 100%;
    padding: 0.4rem 0.55rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
    text-align: left;
    text-transform: lowercase;
    cursor: pointer;
}

.forum-chat-message-menu__item:hover,
.forum-chat-message-menu__item:focus-visible {
    background: var(--glow);
    outline: none;
}

.forum-chat-composer.is-editing-message .forum-chat-window__composer .btn-primary {
    background: #006400;
    border-color: #006400;
}

html.dark-mode .forum-chat-composer.is-editing-message .forum-chat-window__composer .btn-primary {
    background: #006400;
    border-color: #006400;
}

.forum-chat-bubble__time {
    margin-top: 0;
    font-size: 0.72rem;
    opacity: 0.72;
}

html.dark-mode .forum-chat-window .forum-chat-bubble,
html.dark-mode .forum-chat-window .forum-chat-bubble-row.is-mine .forum-chat-bubble {
    color: #c7c1b6;
}

html.dark-mode .forum-chat-window .forum-chat-bubble__time {
    color: #c7c1b6;
    opacity: 0.78;
}

html.dark-mode .forum-chat-window .forum-chat-bubble__sender,
html.dark-mode .forum-chat-window .forum-chat-bubble__sender .forum-username,
html.dark-mode .forum-chat-window .forum-chat-bubble__sender .forum-username--online,
html.dark-mode .forum-chat-window .forum-chat-bubble__sender .forum-username--admin {
    color: #c7c1b6;
}

html.dark-mode .forum-chat-window .forum-chat-window__title,
html.dark-mode .forum-chat-window .forum-chat-window__title .forum-username,
html.dark-mode .forum-chat-window .forum-chat-window__title .forum-username--online,
html.dark-mode .forum-chat-window .forum-chat-window__title .forum-username--admin,
html.dark-mode .forum-group-chat-head-btn .forum-chat-window__title {
    color: #c7c1b6;
}

html.dark-mode .forum-chat-window .forum-group-chat-participants .forum-username,
html.dark-mode .forum-chat-window .forum-group-chat-participants .forum-username--online,
html.dark-mode .forum-chat-window .forum-group-chat-participants .forum-username--admin {
    color: #c7c1b6;
}

html.dark-mode .forum-chat-window .forum-chat-system-message {
    color: #c7c1b6;
}

.forum-chat-window__composer {
    display: flex;
    gap: 0.45rem;
    align-items: flex-end;
    padding: 0.65rem;
    background: var(--surface);
}

.forum-chat-window__footer {
    position: relative;
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.forum-chat-window__toolbar {
    padding: 0.45rem 0.65rem 0;
    margin: 0;
    border-top: 0;
    background: transparent;
}

.forum-chat-window__emotions {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    z-index: 12;
    margin: 0;
    max-height: min(200px, 34vh);
    overflow: auto;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.16);
}

.forum-chat-window__stickers,
.forum-composer-stickers {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    z-index: 13;
    display: flex;
    flex-direction: column;
    margin: 0;
    max-height: min(320px, 48vh);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px 10px 0 0;
    background: var(--surface-soft);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.16);
}

.forum-composer-stickers[hidden] {
    display: none !important;
}

.forum-composer-sticker-tabs {
    display: flex;
    gap: 0.15rem;
    padding: 0.45rem 0.55rem 0.35rem;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;
}

.forum-composer-sticker-pack-tab {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.72;
}

.forum-composer-sticker-pack-tab.is-active {
    opacity: 1;
    background: rgba(106, 17, 207, 0.14);
    box-shadow: inset 0 -2px 0 var(--purple);
}

.forum-composer-sticker-grids {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0.45rem 0.55rem 0.55rem;
}

.forum-composer-sticker-pack {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 0.3rem;
}

.forum-composer-sticker-pack.is-active {
    display: grid;
}

.forum-composer-sticker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    padding: 0.2rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.forum-composer-sticker:hover,
.forum-composer-sticker:focus-visible {
    background: rgba(106, 17, 207, 0.1);
}

.forum-composer-sticker img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    pointer-events: none;
}

.forum-chat-sticker {
    display: block;
    width: 128px;
    height: 128px;
    max-width: 100%;
    object-fit: contain;
    margin: 0;
}

.forum-chat-bubble__body .forum-chat-sticker {
    margin: 0;
}

.forum-chat-window__composer textarea {
    flex: 1;
    min-height: 38px;
    max-height: 120px;
    resize: vertical;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.45;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
}

.forum-chat-window__composer textarea:focus,
.forum-chat-window__composer textarea:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

html.dark-mode .forum-chat-window__composer textarea {
    background-color: #1e1f1e !important;
    border-color: var(--border);
    color: #c7c1b6 !important;
    caret-color: #c7c1b6;
}

html.dark-mode .forum-chat-window__composer textarea:focus,
html.dark-mode .forum-chat-window__composer textarea:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

html.dark-mode .forum-chat-window__composer textarea::placeholder {
    color: #9a9488;
    opacity: 1;
}

.forum-chat-window__composer .btn-primary {
    flex-shrink: 0;
    align-self: flex-end;
    min-height: 38px;
    height: 38px;
    padding: 0 0.85rem;
    border: 1px solid #006400;
    border-radius: var(--radius-sm);
    background: #006400;
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    box-shadow: none;
    text-transform: lowercase;
}

.forum-chat-window__composer .btn-primary:hover,
.forum-chat-window__composer .btn-primary:focus-visible {
    background: #218838;
    border-color: #218838;
    color: #fff;
}

html.dark-mode .forum-chat-window__composer .btn-primary,
html.dark-mode .forum-chat-window__composer .btn-primary:hover,
html.dark-mode .forum-chat-window__composer .btn-primary:focus-visible {
    background: #006400;
    border-color: #006400;
    color: #c7c1b6;
    box-shadow: none;
}

html.dark-mode .forum-chat-window__composer .btn-primary:hover,
html.dark-mode .forum-chat-window__composer .btn-primary:focus-visible {
    background: #218838;
    border-color: #218838;
    color: #c7c1b6;
}

.forum-messenger-page {
    padding: 0;
    overflow: hidden;
}

.forum-panel.forum-full-size-message-block {
    width: 100%;
    max-width: 10in;
    margin-inline: auto;
}

.forum-messenger-layout {
    display: grid;
    grid-template-columns: minmax(112px, 168px) minmax(0, 1fr);
    min-height: min(72vh, 720px);
    height: min(72vh, 720px);
}

.forum-messenger-sidebar {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    min-width: 0;
    max-width: 168px;
}

.forum-messenger-sidebar-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

.forum-messenger-sidebar-head__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
}

.forum-panel.forum-messenger-page h2.forum-messenger-sidebar-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font);
    color: #006400;
    text-transform: lowercase;
}

html.dark-mode .forum-panel.forum-messenger-page h2.forum-messenger-sidebar-title {
    color: #006400;
}

.forum-messenger-sidebar-head .btn-sm,
.forum-messenger-sidebar-head .forum-messenger-new-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
    text-transform: lowercase;
}

.forum-messenger-sidebar-head .forum-messenger-new-btn,
.forum-messenger-sidebar-head [data-forum-messenger-new],
.forum-messenger-sidebar-head .forum-messenger-new-btn:hover,
.forum-messenger-sidebar-head .forum-messenger-new-btn:focus-visible,
.forum-messenger-sidebar-head .forum-messenger-new-btn:active,
.forum-messenger-sidebar-head [data-forum-messenger-new]:hover,
.forum-messenger-sidebar-head [data-forum-messenger-new]:focus-visible,
.forum-messenger-sidebar-head [data-forum-messenger-new]:active,
html.dark-mode .forum-messenger-sidebar-head .forum-messenger-new-btn,
html.dark-mode .forum-messenger-sidebar-head [data-forum-messenger-new],
html.dark-mode .forum-messenger-sidebar-head .forum-messenger-new-btn:hover,
html.dark-mode .forum-messenger-sidebar-head .forum-messenger-new-btn:focus-visible,
html.dark-mode .forum-messenger-sidebar-head .forum-messenger-new-btn:active,
html.dark-mode .forum-messenger-sidebar-head [data-forum-messenger-new]:hover,
html.dark-mode .forum-messenger-sidebar-head [data-forum-messenger-new]:focus-visible,
html.dark-mode .forum-messenger-sidebar-head [data-forum-messenger-new]:active {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: #fff;
    box-shadow: none;
}

.forum-messenger-sidebar-head .forum-messenger-new-btn:hover,
.forum-messenger-sidebar-head .forum-messenger-new-btn:focus-visible,
.forum-messenger-sidebar-head .forum-messenger-new-btn:active,
.forum-messenger-sidebar-head [data-forum-messenger-new]:hover,
.forum-messenger-sidebar-head [data-forum-messenger-new]:focus-visible,
.forum-messenger-sidebar-head [data-forum-messenger-new]:active,
html.dark-mode .forum-messenger-sidebar-head .forum-messenger-new-btn:hover,
html.dark-mode .forum-messenger-sidebar-head .forum-messenger-new-btn:focus-visible,
html.dark-mode .forum-messenger-sidebar-head .forum-messenger-new-btn:active,
html.dark-mode .forum-messenger-sidebar-head [data-forum-messenger-new]:hover,
html.dark-mode .forum-messenger-sidebar-head [data-forum-messenger-new]:focus-visible,
html.dark-mode .forum-messenger-sidebar-head [data-forum-messenger-new]:active {
    background: #c82333;
    border-color: #c82333;
    color: #fff;
}

.forum-messenger-search-wrap {
    position: relative;
    z-index: 30;
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

.forum-messenger-search-input {
    width: 100%;
    min-height: 36px;
    padding: 0.45rem 0.55rem 0.45rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.82rem;
    line-height: 1.4;
    text-transform: lowercase;
}

.forum-messenger-search-input::placeholder {
    text-transform: lowercase;
}

.forum-messenger-search-input:focus,
.forum-messenger-search-input:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

.forum-messenger-search-dropdown {
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    top: calc(100% - 0.2rem);
    z-index: 100;
    margin: 0;
    list-style: none;
    max-height: 280px;
    overflow: auto;
}

.forum-messenger-search-dropdown__item,
.forum-messenger-search-dropdown__empty {
    display: block;
    width: 100%;
    padding: 0.55rem 0.9rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 0.92rem;
    line-height: 1.4;
}

.forum-messenger-search-dropdown__empty {
    cursor: default;
    opacity: 0.88;
}

.forum-messenger-conversation-list {
    position: relative;
    z-index: 1;
    overflow: auto;
    flex: 1;
}

.forum-messenger-conversation-item {
    display: flex;
    gap: 0.4rem;
    width: 100%;
    padding: 0.55rem 0.5rem;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.forum-messenger-conversation-item:hover,
.forum-messenger-conversation-item.is-active {
    background: rgba(106, 17, 207, 0.08);
}

.forum-messenger-conversation-item__avatar {
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.forum-messenger-conversation-item__avatar .forum-messenger-avatar,
.forum-messenger-conversation-item__avatar .forum-messenger-avatar--placeholder {
    width: 32px;
    height: 32px;
    font-size: 0.62rem;
    border-radius: var(--radius-sm);
}

.forum-messenger-conversation-item__body {
    min-width: 0;
    flex: 1;
}

.forum-messenger-conversation-item__top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: baseline;
}

.forum-messenger-conversation-item__name {
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #000;
}

.forum-messenger-conversation-item__name .forum-username:not(.forum-username--online),
.forum-messenger-conversation-item__name .forum-username--admin:not(.forum-username--online),
.forum-messenger-conversation-item:hover .forum-messenger-conversation-item__name,
.forum-messenger-conversation-item:hover .forum-messenger-conversation-item__name .forum-username:not(.forum-username--online),
.forum-messenger-conversation-item:hover .forum-messenger-conversation-item__name .forum-username--admin:not(.forum-username--online),
.forum-messenger-conversation-item.is-active .forum-messenger-conversation-item__name,
.forum-messenger-conversation-item.is-active .forum-messenger-conversation-item__name .forum-username:not(.forum-username--online),
.forum-messenger-conversation-item.is-active .forum-messenger-conversation-item__name .forum-username--admin:not(.forum-username--online),
.forum-messenger-conversation-item--group .forum-messenger-conversation-item__name {
    color: #000;
}

html.dark-mode .forum-messenger-conversation-item__name,
html.dark-mode .forum-messenger-conversation-item__name .forum-username:not(.forum-username--online),
html.dark-mode .forum-messenger-conversation-item__name .forum-username--admin:not(.forum-username--online),
html.dark-mode .forum-messenger-conversation-item:hover .forum-messenger-conversation-item__name,
html.dark-mode .forum-messenger-conversation-item:hover .forum-messenger-conversation-item__name .forum-username:not(.forum-username--online),
html.dark-mode .forum-messenger-conversation-item:hover .forum-messenger-conversation-item__name .forum-username--admin:not(.forum-username--online),
html.dark-mode .forum-messenger-conversation-item.is-active .forum-messenger-conversation-item__name,
html.dark-mode .forum-messenger-conversation-item.is-active .forum-messenger-conversation-item__name .forum-username:not(.forum-username--online),
html.dark-mode .forum-messenger-conversation-item.is-active .forum-messenger-conversation-item__name .forum-username--admin:not(.forum-username--online),
html.dark-mode .forum-messenger-conversation-item--group .forum-messenger-conversation-item__name {
    color: var(--text);
}

.forum-messenger-conversation-item__name .forum-username--online,
.forum-messenger-conversation-item:hover .forum-messenger-conversation-item__name .forum-username--online,
.forum-messenger-conversation-item.is-active .forum-messenger-conversation-item__name .forum-username--online {
    color: #228B22;
}

html.dark-mode .forum-messenger-conversation-item__name .forum-username--online,
html.dark-mode .forum-messenger-conversation-item:hover .forum-messenger-conversation-item__name .forum-username--online,
html.dark-mode .forum-messenger-conversation-item.is-active .forum-messenger-conversation-item__name .forum-username--online {
    color: #00FF00;
}

.forum-messenger-conversation-item__time {
    color: var(--muted);
    font-size: 0.68rem;
    flex-shrink: 0;
}

.forum-messenger-conversation-item__preview {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-messenger-unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 0.35rem;
    border-radius: 50%;
    background: #00ff00;
    vertical-align: middle;
}

.forum-messenger-main {
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.forum-messenger-empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #008000;
    padding: 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .forum-messenger-dock {
        display: flex;
        position: fixed;
        right: max(12px, env(safe-area-inset-right, 0px));
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
        z-index: 2147483000;
        transform: translateZ(0);
        flex-direction: column-reverse;
        align-items: flex-end;
        gap: 10px;
    }

    .forum-messenger-dock .forum-chat-window {
        width: min(100vw - 24px, 328px);
        height: min(70vh, 455px);
        max-height: calc(100vh - 88px);
        border-radius: 12px 12px 0 0;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    }

    .forum-messenger-layout {
        height: min(72vh, 720px);
        min-height: min(60vh, 600px);
    }
}

html.forum-has-horizontal-overflow .forum-messenger-dock {
    position: fixed;
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    z-index: 2147483000;
    transform: translateZ(0);
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 10px;
}

html.forum-has-horizontal-overflow .forum-messenger-dock .forum-chat-window {
    width: min(100vw - 24px, 328px);
    height: min(70vh, 455px);
    max-height: calc(100vh - 88px);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

@media (max-width: 480px) {
    .forum-messenger-layout {
        grid-template-columns: minmax(84px, 112px) minmax(0, 1fr);
    }

    .forum-messenger-sidebar {
        max-width: 112px;
    }

    .forum-panel.forum-messenger-page h2.forum-messenger-sidebar-title {
        font-size: 0.78rem;
    }

    .forum-messenger-search-input {
        min-height: 32px;
        padding: 0.35rem 0.45rem;
        font-size: 0.74rem;
    }

    .forum-messenger-conversation-item__preview {
        display: none;
    }

    .forum-messenger-conversation-item__time {
        display: none;
    }
}

.forum-messenger-sidebar-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

html.dark-mode .forum-messenger-sidebar-head .forum-messenger-group-btn,
html.dark-mode .forum-messenger-sidebar-head .forum-messenger-group-btn:hover,
html.dark-mode .forum-messenger-sidebar-head .forum-messenger-group-btn:focus-visible,
html.dark-mode .forum-messenger-sidebar-head .forum-messenger-group-btn:active {
    background: #0000CD;
    border: 1px solid #0000CD;
    color: #c7c1b6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
    text-transform: lowercase;
    box-shadow: none;
    outline: none;
}

.forum-messenger-sidebar-head .forum-messenger-group-btn,
.forum-messenger-sidebar-head .forum-messenger-group-btn:hover,
.forum-messenger-sidebar-head .forum-messenger-group-btn:focus-visible,
.forum-messenger-sidebar-head .forum-messenger-group-btn:active {
    background: #0000CD;
    border: 1px solid #0000CD;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    padding: 0.3rem 0.5rem;
    font-size: 0.72rem;
    text-transform: lowercase;
    box-shadow: none;
    outline: none;
}

.forum-messenger-group-btn__icon {
    display: inline-flex;
    line-height: 0;
}

.forum-messenger-avatar--group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.forum-messenger-avatar--group:not(.forum-messenger-avatar--placeholder) {
    color: var(--text-muted);
}

.forum-messenger-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.forum-messenger-modal[hidden] {
    display: none !important;
}

.forum-messenger-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.forum-messenger-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 22rem);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.forum-messenger-modal--group .forum-messenger-modal__panel {
    background: linear-gradient(135deg, #591e98, #6a11cf);
    border-color: #591e98;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.forum-messenger-modal__title {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    text-transform: lowercase;
}

.forum-messenger-modal--group .forum-messenger-modal__title {
    color: #fff;
}

.forum-messenger-modal__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    text-transform: lowercase;
    color: var(--text-muted);
}

.forum-messenger-modal--group .forum-messenger-modal__label {
    color: #fff;
}

.forum-messenger-modal__input {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
}

.forum-messenger-modal--group .forum-messenger-modal__input {
    border: none;
    background: rgba(255, 255, 255, 0.95);
    color: #111;
    outline: none;
    box-shadow: none;
}

html.dark-mode .forum-messenger-modal--group .forum-messenger-modal__input {
    background: #272827;
    color: #c7c1b6;
}

.forum-messenger-modal--group .forum-messenger-modal__input:focus,
.forum-messenger-modal--group .forum-messenger-modal__input:focus-visible {
    outline: none;
    border: none;
    box-shadow: none;
}

.forum-messenger-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}

.forum-messenger-modal--group .forum-messenger-modal__cancel-btn,
.forum-messenger-modal--group .forum-messenger-modal__cancel-btn:hover,
.forum-messenger-modal--group .forum-messenger-modal__cancel-btn:focus-visible,
.forum-messenger-modal--group .forum-messenger-modal__cancel-btn:active,
html.dark-mode .forum-messenger-modal--group .forum-messenger-modal__cancel-btn,
html.dark-mode .forum-messenger-modal--group .forum-messenger-modal__cancel-btn:hover,
html.dark-mode .forum-messenger-modal--group .forum-messenger-modal__cancel-btn:focus-visible,
html.dark-mode .forum-messenger-modal--group .forum-messenger-modal__cancel-btn:active {
    background: #778899;
    border: none;
    color: #fff;
    outline: none;
    box-shadow: none;
}

.forum-messenger-modal--group .forum-messenger-modal__create-btn,
.forum-messenger-modal--group .forum-messenger-modal__create-btn:hover,
.forum-messenger-modal--group .forum-messenger-modal__create-btn:focus-visible,
.forum-messenger-modal--group .forum-messenger-modal__create-btn:active {
    background: #006400;
    border: 1px solid #006400;
    color: #fff;
    outline: none;
    box-shadow: none;
}

.forum-chat-window--group .forum-chat-window__head-actions {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.forum-group-chat-leave-btn,
.forum-group-chat-leave-btn:hover,
.forum-group-chat-leave-btn:focus-visible,
html.dark-mode .forum-group-chat-leave-btn,
html.dark-mode .forum-group-chat-leave-btn:hover,
html.dark-mode .forum-group-chat-leave-btn:focus-visible {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: #fff;
    text-transform: lowercase;
}

.forum-group-chat-settings-btn,
.forum-group-chat-settings-btn:hover,
.forum-group-chat-settings-btn:focus-visible,
.forum-group-chat-settings-btn:active,
html.dark-mode .forum-group-chat-settings-btn,
html.dark-mode .forum-group-chat-settings-btn:hover,
html.dark-mode .forum-group-chat-settings-btn:focus-visible,
html.dark-mode .forum-group-chat-settings-btn:active {
    background: #006400;
    border: 1px solid #006400;
    color: #fff;
    box-shadow: none;
    text-transform: lowercase;
}

.forum-group-chat-settings .btn-register,
.forum-group-chat-settings .btn-register:hover,
.forum-group-chat-settings .btn-register:focus-visible,
.forum-group-chat-settings .btn-register:active,
html.dark-mode .forum-group-chat-settings .btn-register,
html.dark-mode .forum-group-chat-settings .btn-register:hover,
html.dark-mode .forum-group-chat-settings .btn-register:focus-visible,
html.dark-mode .forum-group-chat-settings .btn-register:active {
    background: #006400;
    border: 1px solid #006400;
    color: #fff;
    box-shadow: none;
}

.forum-group-chat-settings-btn,
.forum-group-chat-promote-btn,
.forum-group-chat-remove-btn {
    text-transform: lowercase;
}

.forum-group-chat-promote-btn,
.forum-group-chat-promote-btn:hover,
.forum-group-chat-promote-btn:focus-visible,
.forum-group-chat-promote-btn:active,
html.dark-mode .forum-group-chat-promote-btn,
html.dark-mode .forum-group-chat-promote-btn:hover,
html.dark-mode .forum-group-chat-promote-btn:focus-visible,
html.dark-mode .forum-group-chat-promote-btn:active {
    background: #006400;
    border: 1px solid #006400;
    color: #fff;
    box-shadow: none;
    outline: none;
}

.forum-group-chat-remove-btn,
.forum-group-chat-remove-btn:hover,
.forum-group-chat-remove-btn:focus-visible,
.forum-group-chat-remove-btn:active,
html.dark-mode .forum-group-chat-remove-btn,
html.dark-mode .forum-group-chat-remove-btn:hover,
html.dark-mode .forum-group-chat-remove-btn:focus-visible,
html.dark-mode .forum-group-chat-remove-btn:active {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: #fff;
    box-shadow: none;
    outline: none;
}

.forum-group-chat-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid var(--border);
    background: var(--panel-bg-alt, rgba(0, 0, 0, 0.03));
}

.forum-group-chat-participant {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
}

.forum-group-chat-participant .forum-messenger-avatar,
.forum-group-chat-participant .forum-messenger-avatar--placeholder {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
    border-radius: var(--radius-sm);
}

.forum-group-chat-participant__badge {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: lowercase;
}

.forum-group-chat-settings,
.forum-group-chat-admin {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border);
}

.forum-group-chat-settings__label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    text-transform: lowercase;
    color: var(--text-muted);
}

.forum-group-chat-settings__row {
    display: flex;
    gap: 0.35rem;
}

.forum-group-chat-settings__input,
.forum-group-chat-add-member__input {
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text);
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.forum-group-chat-settings__input:focus,
.forum-group-chat-settings__input:focus-visible,
.forum-group-chat-add-member__input:focus,
.forum-group-chat-add-member__input:focus-visible {
    outline: none;
    box-shadow: none;
    border-color: var(--border);
}

.forum-group-chat-settings__input {
    flex: 0 0 auto;
    width: 30%;
    min-width: 7rem;
    max-width: 11rem;
}

.forum-group-chat-add-member__input {
    flex: none;
    width: 11rem;
    max-width: 100%;
}

.forum-group-chat-add-member__input::-webkit-search-decoration,
.forum-group-chat-add-member__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.forum-group-chat-add-member {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 0.5rem;
}

.forum-group-chat-add-dropdown {
    position: absolute;
    left: 0;
    right: auto;
    top: calc(100% + 2px);
    z-index: 5;
    width: max-content;
    min-width: 0;
    max-width: 100%;
}

.forum-group-chat-add-dropdown .forum-messenger-search-dropdown__item,
.forum-group-chat-add-dropdown .forum-messenger-search-dropdown__empty {
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
    white-space: nowrap;
}

.forum-group-chat-add-member--modal {
    display: block;
    width: 100%;
    max-width: 100%;
}

.forum-group-chat-add-member--modal .forum-group-chat-add-member__input {
    width: 100%;
    max-width: 100%;
}

.forum-group-chat-head-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
    min-width: 0;
}

.forum-group-chat-head-btn:hover,
.forum-group-chat-head-btn:focus-visible {
    opacity: 0.92;
    outline: none;
}

.forum-group-members-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.forum-chat-window--members-open {
    z-index: 11999 !important;
}

.forum-group-members-modal[hidden] {
    display: none !important;
}

.forum-group-members-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

.forum-group-members-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 24rem);
    max-height: min(80vh, 32rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow);
}

html.dark-mode .forum-group-members-modal__panel {
    background: #2e2f2e;
}

.forum-group-members-modal__head {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.85rem 2.5rem 0.65rem;
    border-bottom: 1px solid var(--border);
}

.forum-group-members-modal__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    text-transform: lowercase;
    color: var(--text);
}

.forum-group-members-modal__close {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.forum-group-members-modal__close:hover,
.forum-group-members-modal__close:focus-visible {
    background: rgba(0, 0, 0, 0.08);
    outline: none;
}

html.dark-mode .forum-group-members-modal__close:hover,
html.dark-mode .forum-group-members-modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
}

.forum-group-members-modal__add {
    padding: 0.65rem 0.85rem 0.35rem;
    border-bottom: 1px solid var(--border);
}

.forum-group-members-modal__tabs {
    display: flex;
    gap: 1.25rem;
    padding: 0 0.85rem;
    border-bottom: 1px solid var(--border);
}

.forum-group-members-modal__tab {
    padding: 0.55rem 0.1rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: lowercase;
    cursor: pointer;
}

.forum-group-members-modal__tab.is-active {
    color: var(--purple);
    border-bottom-color: var(--purple);
}

.forum-group-members-modal__lists {
    overflow: auto;
    flex: 1;
    min-height: 0;
}

.forum-group-members-modal__list {
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
}

.forum-group-members-modal__member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
}

.forum-group-members-modal__member-main {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1;
}

.forum-group-members-modal__member-text {
    min-width: 0;
}

.forum-group-members-modal__member-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}

.forum-group-members-modal__member-meta {
    font-size: 0.74rem;
    color: var(--muted);
    text-transform: lowercase;
}

.forum-group-members-modal__member-menu-wrap {
    position: relative;
    flex-shrink: 0;
}

.forum-group-members-modal__menu-btn {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.forum-group-members-modal__menu-btn:hover,
.forum-group-members-modal__menu-btn:focus-visible {
    background: rgba(0, 0, 0, 0.08);
    outline: none;
}

html.dark-mode .forum-group-members-modal__menu-btn:hover,
html.dark-mode .forum-group-members-modal__menu-btn:focus-visible {
    background: #353635;
}

.forum-group-members-modal__menu {
    position: absolute;
    bottom: calc(100% + 0.2rem);
    top: auto;
    right: 0;
    z-index: 5;
    min-width: 10.5rem;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

html.dark-mode .forum-group-members-modal__menu {
    background: #2e2f2e;
}

.forum-group-members-modal__menu[hidden] {
    display: none !important;
}

.forum-group-members-modal__menu--floating {
    position: fixed;
    top: auto !important;
    left: auto !important;
    z-index: 12001;
}

.forum-group-members-modal__menu-item {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #000;
    font: inherit;
    font-size: 0.84rem;
    text-align: left;
    text-transform: lowercase;
    cursor: pointer;
}

html.dark-mode .forum-group-members-modal__menu-item {
    color: #c7c1b6;
}

.forum-group-members-modal__menu-item:hover,
.forum-group-members-modal__menu-item:focus-visible {
    background: rgba(0, 0, 0, 0.08);
    color: #000;
    outline: none;
}

html.dark-mode .forum-group-members-modal__menu-item:hover,
html.dark-mode .forum-group-members-modal__menu-item:focus-visible {
    background: #353635;
    color: #c7c1b6;
}

.forum-group-members-modal__menu-item--promote {
    color: #008000;
}

.forum-group-members-modal__menu-item--demote,
.forum-group-members-modal__menu-item--remove {
    color: #ff0000;
}

.forum-group-members-modal__menu-item--promote:hover,
.forum-group-members-modal__menu-item--promote:focus-visible {
    color: #008000;
}

.forum-group-members-modal__menu-item--demote:hover,
.forum-group-members-modal__menu-item--demote:focus-visible,
.forum-group-members-modal__menu-item--remove:hover,
.forum-group-members-modal__menu-item--remove:focus-visible {
    color: #ff0000;
}

html.dark-mode .forum-group-members-modal__menu-item--promote {
    color: #008000;
}

html.dark-mode .forum-group-members-modal__menu-item--demote,
html.dark-mode .forum-group-members-modal__menu-item--remove {
    color: #ff0000;
}

html.dark-mode .forum-group-members-modal__menu-item--promote:hover,
html.dark-mode .forum-group-members-modal__menu-item--promote:focus-visible {
    color: #008000;
}

html.dark-mode .forum-group-members-modal__menu-item--demote:hover,
html.dark-mode .forum-group-members-modal__menu-item--demote:focus-visible,
html.dark-mode .forum-group-members-modal__menu-item--remove:hover,
html.dark-mode .forum-group-members-modal__menu-item--remove:focus-visible {
    color: #ff0000;
}

.forum-group-members-modal__empty {
    padding: 1rem 0.85rem;
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: lowercase;
    list-style: none;
}

.forum-group-members-modal__rename {
    padding: 0.65rem 0.85rem 0.85rem;
    border-top: 1px solid var(--border);
}

.forum-chat-window--group {
    position: relative;
}

.forum-group-chat-member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.8rem;
}

.forum-group-chat-member-row__actions {
    display: inline-flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.forum-chat-system-message {
    text-align: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.forum-chat-date-separator {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0.85rem 0.65rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.2;
}

.forum-chat-date-separator::before,
.forum-chat-date-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(120, 120, 120, 0.35);
}

.forum-chat-date-separator__label {
    flex-shrink: 0;
    padding: 0 0.2rem;
    opacity: 0.9;
}

html.dark-mode .forum-chat-window .forum-chat-date-separator {
    color: #9a9590;
}

html.dark-mode .forum-chat-window .forum-chat-date-separator::before,
html.dark-mode .forum-chat-window .forum-chat-date-separator::after {
    background: rgba(199, 193, 182, 0.32);
}

.forum-chat-bubble__sender {
    margin-bottom: 0.15rem;
    font-size: 0.72rem;
}

/* Footer quick messenger */
.forum-footer-quick-chat-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0 0 0.15rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #006400;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: color 0.35s ease;
}

html.dark-mode .forum-footer-quick-chat-btn {
    color: #00FF00;
}

.forum-footer-quick-chat-btn:hover,
.forum-footer-quick-chat-btn:focus-visible {
    outline: none;
}

.forum-footer-quick-chat-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
}

.forum-footer-quick-chat-btn:hover .forum-footer-quick-chat-btn__icon,
.forum-footer-quick-chat-btn:focus-visible .forum-footer-quick-chat-btn__icon {
    animation: forum-footer-quick-chat-heartbeat 1.15s ease-in-out infinite;
}

.forum-footer-quick-chat-btn__icon svg {
    width: 2.7rem;
    height: 2.7rem;
    fill: currentColor;
    display: block;
}

@keyframes forum-footer-quick-chat-heartbeat {
    0%,
    100% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.08);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .forum-footer-quick-chat-btn:hover .forum-footer-quick-chat-btn__icon,
    .forum-footer-quick-chat-btn:focus-visible .forum-footer-quick-chat-btn__icon {
        animation: none;
    }
}

.forum-footer-quick-chat-btn__badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ff0000;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-sizing: border-box;
}

.forum-footer-quick-chat-btn__badge[hidden] {
    display: none !important;
}

.forum-footer-quick-chat-wrap {
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.forum-quick-chat {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.2rem);
    z-index: 1180;
    pointer-events: none;
    max-width: calc(100vw - 1.7rem);
}

.forum-quick-chat:not([hidden]) {
    pointer-events: auto;
    z-index: 10250;
    overflow: visible;
}

.forum-quick-chat__drawer {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 0;
    max-width: 100%;
    overflow: visible;
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
    pointer-events: auto;
}

.forum-quick-chat.is-open .forum-quick-chat__drawer {
    transform: translateY(0);
    opacity: 1;
}

.forum-quick-chat__windows {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 10px;
    max-width: calc(100vw - 12rem);
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    padding: 16px 10px 0 16px;
    margin-top: -16px;
}

.forum-quick-chat__windows:empty {
    display: none;
    padding: 0;
    margin-top: 0;
}

.forum-quick-chat__sidebar {
    --forum-quick-chat-item-height: 3.65rem;
    --forum-quick-chat-search-height: 2.75rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-self: flex-end;
    width: min(168px, 42vw);
    max-width: 168px;
    min-width: 112px;
    height: calc(var(--forum-quick-chat-search-height) + (6 * var(--forum-quick-chat-item-height)));
    min-height: calc(var(--forum-quick-chat-search-height) + (6 * var(--forum-quick-chat-item-height)));
    max-height: calc(var(--forum-quick-chat-search-height) + (6 * var(--forum-quick-chat-item-height)));
    background: var(--surface);
    border: 1px solid var(--purple);
    border-radius: var(--forum-frame-radius);
    box-shadow: none;
    pointer-events: none;
}

.forum-quick-chat__sidebar > * {
    pointer-events: auto;
}

.forum-quick-chat .forum-messenger-search-wrap {
    flex-shrink: 0;
    padding: 0.4rem 0.5rem;
}

.forum-quick-chat .forum-messenger-conversation-list {
    flex: 1;
    min-height: 0;
    max-height: calc(6 * var(--forum-quick-chat-item-height));
    overflow-y: auto;
    scrollbar-width: thin;
}

.forum-quick-chat .forum-chat-window--quick {
    flex-shrink: 0;
    border-radius: 12px;
    overflow: visible;
    box-shadow: none;
    isolation: isolate;
}

.forum-quick-chat .forum-chat-window--quick > .forum-chat-window__head {
    position: relative;
    z-index: 1;
    border-radius: 12px 12px 0 0;
    overflow: visible;
}

.forum-quick-chat .forum-chat-window--quick > .forum-chat-window__footer {
    border-radius: 0 0 12px 12px;
    overflow: visible;
}

.forum-quick-chat .forum-chat-window--quick .forum-chat-composer {
    position: relative;
    z-index: 2;
}

.forum-quick-chat .forum-chat-window--quick .forum-composer-toolbar {
    position: relative;
    z-index: 3;
}

.forum-quick-chat .forum-chat-window--quick .forum-chat-resize-handle {
    width: 32px;
    height: 32px;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    z-index: 30;
    opacity: 1;
    overflow: visible;
}

.forum-quick-chat .forum-chat-window--quick.is-resizing {
    z-index: 3;
}

.forum-quick-chat .forum-composer-toolbar .btn-register,
.forum-quick-chat .forum-composer-toolbar .btn-register:hover,
.forum-quick-chat .forum-composer-toolbar .btn-register:focus-visible,
.forum-quick-chat .forum-chat-window__composer .btn-primary,
.forum-quick-chat .forum-chat-window__composer .btn-primary:hover,
.forum-quick-chat .forum-chat-window__composer .btn-primary:focus-visible,
.forum-quick-chat .forum-composer-emotions,
.forum-quick-chat .forum-composer-stickers,
.forum-quick-chat .forum-chat-window__emotions,
.forum-quick-chat .forum-chat-window__stickers {
    box-shadow: none;
}

.forum-quick-chat__windows .forum-chat-window--quick .forum-chat-window__messages {
    background: var(--surface-soft);
}

html.dark-mode .forum-quick-chat .forum-chat-window--quick,
html.dark-mode .forum-quick-chat .forum-chat-window--quick .forum-chat-window__footer,
html.dark-mode .forum-quick-chat .forum-chat-window--quick .forum-chat-window__composer {
    background: #272827;
}

html.dark-mode .forum-quick-chat .forum-chat-window--quick .forum-chat-window__messages {
    background: #242525;
}

.forum-footer-quick-chat-btn[aria-expanded="true"] {
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .forum-quick-chat__sidebar {
        width: min(148px, 52vw);
        max-width: none;
    }

    .forum-quick-chat__windows {
        max-width: calc(100vw - 9rem);
    }

    .forum-quick-chat .forum-chat-window--quick {
        width: min(100vw - 24px, 328px);
        height: min(70vh, 455px);
        max-height: calc(100vh - 88px);
    }
}

.forum-write-processing {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.42);
    pointer-events: all;
}

.forum-write-processing[hidden] {
    display: none !important;
}

.forum-write-processing__panel {
    width: min(100%, 22rem);
    padding: 0.85rem 1rem 0.95rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 128, 0, 0.55);
    background: var(--surface, #fff);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

html.dark-mode .forum-write-processing__panel {
    background: #272827;
    border-color: rgba(0, 255, 0, 0.45);
}

.forum-write-processing__label {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: #008000;
    text-align: center;
}

html.dark-mode .forum-write-processing__label {
    color: #00ff00;
}

.forum-write-processing__bar {
    height: 0.42rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0, 128, 0, 0.16);
}

.forum-write-processing__fill {
    display: block;
    width: 35%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #008000, #00c853, #008000);
    animation: forum-write-processing-slide 1.1s ease-in-out infinite;
}

@keyframes forum-write-processing-slide {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(320%);
    }
}

