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

:root {
    --purple: #6A11CF;
    --purple-deep: #591e98;
    --purple-dark: #4d2674;
    --pink: #FF004C;
    --pink-hover: #e00044;
    --bg: #f0ebf8;
    --surface: #ffffff;
    --surface-soft: #fcfbff;
    --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: 1280px;
    --forum-mobile-freeze-width: 768px;
    --forum-frame-radius: 16px;
    --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;
    --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;
}

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

.forum-page {
    width: min(var(--forum-max-width), calc(100% - 2rem));
    max-width: var(--forum-max-width);
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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: var(--shadow);
    border-radius: 0 0 var(--forum-frame-radius) var(--forum-frame-radius);
    flex-shrink: 0;
}

.forum-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.35rem;
    flex-wrap: wrap;
}

.forum-header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-left: auto;
    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.5rem;
}

.forum-logo {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    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.15rem;
    min-width: 0;
}

.forum-header-tagline,
.forum-footer-tagline {
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: 0.88rem;
    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-header-inner {
    padding-bottom: 0.65rem;
}

.forum-nav {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
}

.forum-nav a,
.forum-nav-link {
    color: #fff;
    font-weight: 600;
    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;
}

.forum-user-menu__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    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: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.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;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 0.35rem 0;
    z-index: 200;
}

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

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

.forum-user-menu__dropdown a:hover {
    background: var(--surface-soft);
    color: var(--text);
}

html.dark-mode .forum-user-menu__dropdown {
    background: #2e2f2e;
    border-color: var(--border);
}

html.dark-mode .forum-user-menu__dropdown a {
    color: #c7c1b6;
}

html.dark-mode .forum-user-menu__dropdown a:hover {
    background: #353635;
    color: #c7c1b6;
}

/* ── 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: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

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

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

.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 {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 45px;
    line-height: 1;
    padding: 0;
    margin-left: auto;
}

.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;
}

.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 {
    padding: 1.25rem 0 2rem;
    flex: 1;
}

.forum-main:has(.forum-breadcrumb-row) {
    padding-top: 0.35rem;
}

.forum-footer {
    background: transparent;
    border: 1px solid var(--purple);
    border-radius: var(--forum-frame-radius) var(--forum-frame-radius) 0 0;
    padding: 1.5rem 1.35rem 2rem;
    color: var(--muted);
    font-size: 0.92rem;
    flex-shrink: 0;
}

.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;
}

.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-block;
    flex-shrink: 0;
    font-family: var(--font);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    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;
}

.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-home-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    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;
}

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: var(--shadow);
}

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-user-stats {
    font-size: 0.86rem;
    line-height: 1.12;
    margin: 0;
}

.forum-panel:has(.forum-main-topics-heading) .forum-user-stats {
    margin-bottom: 0.05rem;
}

.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: #00FF00;
}

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

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;
}

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-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;
}

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

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

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

.forum-thread-title-row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
}

.forum-breadcrumb-row-end {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    flex: 1 1 18rem;
    max-width: 100%;
    margin-left: auto;
    justify-content: flex-end;
}

.forum-breadcrumb-row:not(.forum-breadcrumb-row--thread) .forum-site-search {
    margin-left: auto;
    margin-top: 0.45rem;
}

.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: rgb(123, 115, 101);
    background-color: #242525;
    color: #d1cbc1;
}

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-search-section-heading {
    margin: 1.25rem 0 0.65rem;
    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-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 90px 90px;
    gap: 0.75rem;
    align-items: center;
}

.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;
}

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

.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;
}

.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-post-box > .forum-view-count {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 1;
    pointer-events: none;
}

.forum-post-box:has(.forum-post-admin-bar) > .forum-view-count {
    top: 0.65rem;
    right: 0.65rem;
}

.forum-post-box:has(.forum-post-admin-bar) .forum-post-admin-bar {
    top: 2.15rem;
}

.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-popular-topic-link {
    display: inline;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: none;
    font-family: var(--font);
}

.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;
}

.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;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.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-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.45rem;
    margin-bottom: 1rem;
}

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

.forum-post-box {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    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-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-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-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-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
}

.forum-pic-gallery__thumb {
    display: block;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    line-height: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.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 {
    height: 100px;
    width: auto;
    min-width: 56px;
    max-width: 130px;
    object-fit: cover;
    display: block;
}

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

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

.forum-lightbox__close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.45rem;
    z-index: 3;
}

.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: 0;
    left: auto;
}

.forum-lightbox__main {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    overflow: visible;
}

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

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

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

.forum-lightbox__slide {
    flex: 0 0 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.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;
}

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

.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);
}

.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;
}

.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 .forum-view-count,
.forum-category-topic-row .forum-reply-count,
.forum-category-topic-row .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-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;
}

.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 {
    flex-wrap: nowrap;
}

.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 {
    display: flex;
    align-items: center;
}

.forum-breadcrumb-row--thread .forum-site-search {
    flex: 0 1 14rem;
    max-width: 28rem;
    min-width: 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;
    text-transform: uppercase;
    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;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    min-width: 0;
}

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

.forum-thread-title-edit-form .forum-thread-title-edit-input {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

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

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

.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;
    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-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-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;
    border: none;
    background: transparent;
    color: #ff0000;
    font-weight: 800;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.35rem;
}

.forum-composer-image-remove:hover,
.forum-composer-image-remove:focus {
    color: #cc0000;
}

.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: 1px solid var(--border);
    flex-shrink: 0;
}

.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: vertical;
    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;
}

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.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;
}

.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-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) h2,
html.dark-mode .forum-account-section:not(:first-of-type) .forum-label-text,
html.dark-mode .forum-account .forum-pw-btn {
    color: var(--purple);
}

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: 2px solid var(--border);
}

.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;
}

/* ── 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;
}

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-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);
}

.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-post-actions button[data-forum-reply-toggle] {
    font-weight: 700;
}

.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-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;
}

.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-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 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.forum-message-recipient-chip__remove:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text);
}

html.dark-mode .forum-message-recipient-chip__remove:hover {
    background: rgba(255, 255, 255, 0.12);
}

.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;
}

.forum-message-recipients-dropdown {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    max-height: 12rem;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.forum-message-recipients-dropdown[hidden] {
    display: none;
}

.forum-message-recipients-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    font-size: 0.92rem;
}

.forum-message-recipients-dropdown__item.is-active,
.forum-message-recipients-dropdown__item:hover {
    background: var(--glow);
}

html.dark-mode .forum-message-recipients {
    background-color: #1e1f1e !important;
}

html.dark-mode .forum-message-recipients-dropdown {
    background-color: #1e1f1e !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.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 0 0.65rem;
}

.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 {
    display: inline-flex;
    margin: 0 0 0 auto;
}

.forum-admin-user-per-page__select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    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: #0000FF;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.forum-admin-user-per-page__select:hover,
.forum-admin-user-per-page__select:focus {
    color: #FF0000;
    background: var(--glow);
    border-color: var(--purple);
    outline: none;
}

html.dark-mode .forum-admin-user-per-page__select {
    background: var(--surface);
    color: #0000FF;
}

html.dark-mode .forum-admin-user-per-page__select:hover,
html.dark-mode .forum-admin-user-per-page__select:focus {
    color: #FF0000;
    background: var(--glow);
    border-color: var(--purple);
}

.forum-admin-user-filter-bar__hint {
    color: var(--muted);
    font-size: 0.88rem;
    text-transform: lowercase;
}

.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;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff0000;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.forum-admin-user-filter-chip__remove:hover,
.forum-admin-user-filter-chip__remove:focus {
    background: #cc0000;
    color: #fff;
}

.forum-admin-user-card-name {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.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-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-table-head,
    .forum-table-row {
        grid-template-columns: 1fr;
    }

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

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

    .forum-thread-row--preview-foot .forum-thread-main {
        max-width: calc(100% - 3.5rem);
    }

    .forum-thread-metrics {
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: flex-end;
        align-self: flex-start;
        gap: 0.42rem;
        width: auto;
        min-width: 3rem;
        padding-top: 0.05rem;
    }

    .forum-home-split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0.65rem;
    }

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

    .forum-breadcrumb-row:not(.forum-breadcrumb-row--thread) {
        position: relative;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 0.5rem;
        min-height: 2.55rem;
        padding-bottom: 0.35rem;
        margin-bottom: 0.85rem;
    }

    .forum-breadcrumb-row:not(.forum-breadcrumb-row--thread) .forum-breadcrumb {
        flex: 1 1 auto;
        min-width: 0;
    }

    .forum-breadcrumb-row:not(.forum-breadcrumb-row--thread) .forum-site-search {
        position: absolute;
        right: 0;
        top: calc(50% + 0.12rem);
        flex: 0 0 auto;
        width: calc(153px * 1.2);
        max-width: calc(153px * 1.2);
        margin-left: 0;
        margin-top: 0;
        transform: translateY(-50%);
    }

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

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

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

    .forum-page {
        width: 100%;
        max-width: none;
        padding-inline: 0;
    }

    .forum-header {
        width: 100%;
        margin-inline: 0;
        border-radius: 0 0 var(--forum-frame-radius) var(--forum-frame-radius);
    }

    .forum-header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto;
        align-items: center;
        justify-items: stretch;
        gap: 0.08rem 0.45rem;
        padding: 0.38rem 0.7rem 0.42rem;
    }

    .forum-header-brand {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        justify-self: start;
        gap: 0.05rem;
    }

    .forum-header-brand .forum-logo {
        font-size: 0.95rem;
        line-height: 1.15;
    }

    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-brand .forum-header-tagline {
        font-size: 0.68rem;
        line-height: 1.2;
    }

    .forum-header-actions {
        display: contents;
    }

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

    .forum-mobile-menu-toggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
    }

    .forum-header-inner:not(:has(.forum-mobile-menu-toggle)) .forum-theme-switch.switch {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
        margin-top: 0;
        width: 44px;
        height: 24px;
    }

    .forum-header-inner:not(:has(.forum-mobile-menu-toggle)) .forum-theme-switch .slider:before {
        height: 16px;
        width: 16px;
    }

    .forum-header-inner:not(:has(.forum-mobile-menu-toggle)) .forum-theme-switch input:checked + .slider:before {
        transform: translateX(20px);
    }

    .forum-header-inner:not(:has(.forum-mobile-menu-toggle)) .forum-theme-switch .icon-moon svg,
    .forum-header-inner:not(:has(.forum-mobile-menu-toggle)) .forum-theme-switch .icon-sun svg {
        width: 12px;
        height: 12px;
    }

    .forum-main,
    .forum-footer {
        padding-inline: 0.85rem;
    }

    .forum-footer {
        width: 100%;
        margin-inline: 0;
        padding-top: 1.25rem;
        padding-bottom: 1.65rem;
    }

    /* Keep header/footer fluid; freeze middle content and scroll it instead. */
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    body {
        min-height: 100dvh;
    }

    .forum-page {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }

    .forum-main {
        padding-inline: 0;
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-x pan-y;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

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

/* Mobile — violet browser chrome above header (portrait + phone landscape) */
@media (max-width: 768px), ((orientation: landscape) and (max-height: 500px)) {
    html {
        background-color: #591e98;
    }

    html.dark-mode {
        background-color: #591e98 !important;
    }

    body {
        background: var(--bg);
    }
}

/* Facebook-style messenger */
.forum-messenger-dock {
    position: fixed;
    right: 16px;
    bottom: 0;
    z-index: 8500;
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

.forum-messenger-launcher {
    pointer-events: auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    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;
    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;
}

.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(--panel);
    border: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.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: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.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-messenger-online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00FF00;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
    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:hover,
.forum-chat-window__close:hover {
    background: rgba(255, 255, 255, 0.16);
}

.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: #00008B;
    border: 1px solid #00008B;
    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 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__time {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    opacity: 0.72;
}

.forum-chat-window__composer {
    display: flex;
    gap: 0.45rem;
    align-items: flex-end;
    padding: 0.65rem;
    background: var(--panel);
}

.forum-chat-window__footer {
    position: relative;
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: var(--panel);
}

.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__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);
}

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::placeholder {
    color: #9a9488;
    opacity: 1;
}

.forum-messenger-page {
    padding: 0;
    overflow: hidden;
}

.forum-messenger-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 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;
}

.forum-messenger-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid var(--border);
}

.forum-messenger-sidebar-title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--purple-deep);
}

.forum-messenger-search-wrap {
    position: relative;
    z-index: 30;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--border);
}

.forum-messenger-search-input {
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.05rem;
    line-height: 1.4;
}

.forum-messenger-search-input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 2px rgba(106, 17, 207, 0.15);
}

.forum-messenger-search-dropdown {
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    top: calc(100% - 0.2rem);
    z-index: 100;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: #4B0082;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    max-height: 280px;
    overflow: auto;
}

.forum-messenger-search-dropdown__item,
.forum-messenger-search-dropdown__empty {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.4;
}

.forum-messenger-search-dropdown__empty {
    cursor: default;
    opacity: 0.88;
}

.forum-messenger-search-dropdown__item:hover,
.forum-messenger-search-dropdown__item:focus {
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}

.forum-messenger-search-dropdown .forum-username {
    color: #fff;
    font-size: inherit;
}

.forum-messenger-search-dropdown .forum-username--admin {
    color: #ffd54f;
}

.forum-messenger-conversation-list {
    position: relative;
    z-index: 1;
    overflow: auto;
    flex: 1;
}

.forum-messenger-conversation-item {
    display: flex;
    gap: 0.65rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    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 .forum-messenger-avatar,
.forum-messenger-conversation-item__avatar .forum-messenger-avatar--placeholder {
    width: 44px;
    height: 44px;
}

.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.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.forum-messenger-conversation-item__time {
    color: var(--muted);
    font-size: 0.76rem;
    flex-shrink: 0;
}

.forum-messenger-conversation-item__preview {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.84rem;
    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: var(--muted);
    padding: 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .forum-messenger-dock {
        display: flex;
    }

    .forum-messenger-dock .forum-chat-window {
        display: none !important;
    }

    .forum-messenger-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 70vh;
    }

    .forum-messenger-main:not(:has(.forum-chat-window)) {
        display: none;
    }

    .forum-messenger-page:has(.forum-chat-window--page) .forum-messenger-sidebar {
        display: none;
    }
}
