/* Community forum: /forum. Solid colours and chunky borders to match the home page. */

body.forum-page main.container {
    max-width: 1140px;
}

/* Hides the browser's right-hand page scrollbar on forum pages; scrolling still works */
html:has(body.forum-page) {
    scrollbar-width: none;
}

body.forum-page::-webkit-scrollbar {
    display: none;
}

.fx {
    --c: var(--gx-blue);
    --c-dark: var(--gx-blue-dark);
    --c-soft: var(--cartoon-soft);
    --c-line: var(--cartoon-line);
    --fx-tint: #f7faf3;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0 16px;
    font-family: 'Baloo 2', Arial, sans-serif;
    color: var(--cartoon-ink);
}

/* Category colours: each category sets its own accent through these four variables */
.fx-c-green  { --c: #4caf24; --c-dark: #2e7d12; --c-soft: #eaf7df; --c-line: #cfe8bb; }
.fx-c-blue   { --c: #2f6fd6; --c-dark: #1d4fa3; --c-soft: #e6effc; --c-line: #bfd5f6; }
.fx-c-teal   { --c: #1f9d8f; --c-dark: #137065; --c-soft: #e0f5f2; --c-line: #b5e3dd; }
.fx-c-orange { --c: #e0822a; --c-dark: #a85a14; --c-soft: #fdeedd; --c-line: #f5d3ad; }
.fx-c-red    { --c: #d9473f; --c-dark: #a52f28; --c-soft: #fde9e7; --c-line: #f5c1bd; }
.fx-c-purple { --c: #8e5cd9; --c-dark: #5f3aa6; --c-soft: #f0e9fb; --c-line: #d9c8f3; }
.fx-c-yellow { --c: #e0a912; --c-dark: #a67c08; --c-soft: #fdf5d6; --c-line: #f4e3a0; }
.fx-c-pink   { --c: #e0629b; --c-dark: #a8416f; --c-soft: #fde8f1; --c-line: #f5c2d9; }

.fx a {
    color: var(--gx-blue-dark);
    text-decoration: none;
}

.fx a:hover {
    text-decoration: underline;
}

.fx-muted {
    color: var(--gx-muted);
    font-size: 14px;
}

/* Logo */
.fx-logo-link {
    display: block;
    margin: 0 auto;
    line-height: 0;
}

.fx-logo {
    display: block;
    width: 560px;
    max-width: 92vw;
    height: auto;
    margin: 0 auto 4px;
    filter: drop-shadow(0 4px 10px rgba(31, 42, 68, 0.2));
}

/* Cards */
.fx-panel {
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 18px;
    box-shadow: 0 3px 0 var(--cartoon-line);
}

/* Top bar: breadcrumb, search and notifications */
.fx-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 10px 14px 10px 18px;
}

.fx-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
}

.fx-crumbs .bi {
    font-size: 11px;
    color: var(--gx-muted);
}

.fx-crumbs span[aria-current] {
    color: var(--cartoon-ink);
}

.fx-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fx-search {
    position: relative;
}

.fx-search .bi {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--gx-blue);
    pointer-events: none;
}

.fx-search input {
    width: 230px;
    height: 40px;
    padding: 0 14px 0 36px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--cartoon-ink);
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fx-search input:focus {
    border-color: var(--gx-blue);
    box-shadow: 0 0 0 4px rgba(76, 175, 36, 0.18);
}

.fx-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--gx-blue-dark);
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 12px;
    box-shadow: 0 3px 0 var(--cartoon-line);
    font-size: 16px;
}

.fx-bell:hover {
    border-color: var(--gx-blue);
    text-decoration: none;
}

.fx-bell.has-unread {
    color: #fff;
    background: var(--gx-blue);
    border-color: var(--gx-blue-dark);
    box-shadow: 0 3px 0 var(--gx-blue-dark);
}

.fx-bell-count {
    position: absolute;
    top: -9px;
    right: -9px;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: #d9473f;
    border: 2px solid #fff;
    border-radius: 999px;
}

/* Buttons */
.fx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 18px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: #fff !important;
    white-space: nowrap;
    background: var(--gx-blue);
    border: 1px solid var(--gx-blue-dark);
    border-radius: 12px;
    box-shadow: 0 3px 0 var(--gx-blue-dark);
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}

.fx-btn:hover {
    background: #58b92e;
    transform: translateY(-1px);
    box-shadow: 0 4px 0 var(--gx-blue-dark);
}

.fx-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--gx-blue-dark);
}

.fx-btn:focus-visible,
.fx-act:focus-visible,
.fx-like:focus-visible,
.fx-tools button:focus-visible,
.fx-tabs button:focus-visible {
    outline: 3px solid rgba(76, 175, 36, 0.4);
    outline-offset: 2px;
}

.fx-btn:disabled,
.fx-btn.is-busy {
    opacity: 0.65;
    cursor: wait;
    pointer-events: none;
}

.fx-btn-ghost {
    color: var(--gx-blue-dark) !important;
    background: #fff;
    border: 2px solid var(--cartoon-line);
    box-shadow: 0 3px 0 var(--cartoon-line);
}

.fx-btn-ghost:hover {
    background: var(--cartoon-soft);
    border-color: var(--gx-blue);
    box-shadow: 0 4px 0 var(--cartoon-line);
}

.fx-btn-danger {
    background: #d9473f;
    border-color: #a52f28;
    box-shadow: 0 3px 0 #a52f28;
}

.fx-btn-danger:hover {
    background: #e2574f;
    box-shadow: 0 4px 0 #a52f28;
}

.fx-btn-sm {
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 10px;
}

.fx-caret {
    font-size: 11px;
}

/* Headings */
.fx-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--cartoon-ink);
}

.fx-title .bi {
    color: var(--c);
    font-size: 0.85em;
}

.fx-title-img {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
}

.fx-title-sm {
    font-size: 24px;
}

.fx-title-thread {
    display: block;
    font-size: 30px;
    overflow-wrap: anywhere;
}

.fx-sub {
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--gx-muted);
}

/* Pills and tags */
.fx-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--gx-blue-dark);
    background: var(--cartoon-soft);
    border: 2px solid var(--cartoon-line);
    border-radius: 999px;
    vertical-align: middle;
}

.fx-pill-new {
    color: #fff;
    background: var(--gx-blue);
    border-color: var(--gx-blue-dark);
}

.fx-pill-lock {
    color: #a52f28;
    background: #fde9e7;
    border-color: #f5c1bd;
}

.fx-pill-op {
    color: #fff;
    background: #8e5cd9;
    border-color: #5f3aa6;
}

.fx-tag {
    display: inline-block;
    padding: 1px 10px;
    font-size: 12px;
    font-weight: 800;
    color: var(--c-dark) !important;
    background: var(--c-soft);
    border: 2px solid var(--c-line);
    border-radius: 999px;
}

.fx-tag:hover {
    border-color: var(--c);
    text-decoration: none !important;
}

.fx-role {
    display: inline-block;
    margin-left: 4px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.6;
    color: #fff;
    border-radius: 8px;
    vertical-align: middle;
}

.fx-role-admin { background: #d9473f; }
.fx-role-expert { background: #e0822a; }

.fx-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 2px;
    background: #aab4c5;
    border-radius: 50%;
    vertical-align: middle;
}

.fx-user {
    font-weight: 800;
    color: var(--cartoon-ink);
}

a.fx-user {
    color: var(--gx-blue-dark);
}

.fx-user-gone {
    color: var(--gx-muted);
    font-weight: 600;
    font-style: italic;
}

.fx-time {
    color: var(--gx-muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* Avatars: Minecraft heads in a chunky frame */
.fx-avatar {
    display: inline-block;
    flex: 0 0 var(--s, 40px);
    width: var(--s, 40px);
    height: var(--s, 40px);
    overflow: hidden;
    background: var(--cartoon-soft);
    border: 2px solid var(--cartoon-line);
    border-radius: calc(var(--s, 40px) * 0.22);
    line-height: 0;
}

.fx-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    object-fit: cover;
}

/* Flash messages */
.fx-flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-weight: 700;
    border: 2px solid;
    border-radius: 14px;
}

.fx-flash-success {
    color: var(--gx-blue-dark);
    background: var(--cartoon-soft);
    border-color: var(--cartoon-line);
}

.fx-flash-danger {
    color: #a52f28;
    background: #fdecef;
    border-color: #f5c2cc;
}

/* Page layout: main column plus sidebar */
.fx-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.fx-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fx-side-panel {
    padding: 16px 18px;
}

.fx-side-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
}

.fx-side-title .bi {
    color: var(--gx-blue);
}

/* Home hero */
.fx-hero {
    padding: 20px 22px;
}

.fx-hero-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.fx-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fx-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 0;
}

.fx-stat {
    padding: 8px 14px;
    background: var(--fx-tint);
    border: 2px solid var(--cartoon-line);
    border-radius: 14px;
}

.fx-stat dt {
    font-size: 13px;
    font-weight: 700;
    color: var(--gx-muted);
}

.fx-stat dd {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--gx-blue-dark);
}

.fx-stat-name {
    overflow: hidden;
    font-size: 18px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Category cards */
.fx-cats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fx-cat {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 96px 240px;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid var(--c-line);
    border-left: 8px solid var(--c);
    border-radius: 18px;
    box-shadow: 0 3px 0 var(--c-line);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.fx-cat:hover {
    transform: translateY(-2px);
    border-color: var(--c);
    box-shadow: 0 5px 0 var(--c-line);
}

.fx-cat-icon {
    display: inline-flex;
    flex: 0 0 var(--s, 56px);
    align-items: center;
    justify-content: center;
    width: var(--s, 56px);
    height: var(--s, 56px);
    color: var(--c-dark);
    font-size: calc(var(--s, 56px) * 0.5);
    background: var(--c-soft);
    border: 2px solid var(--c-line);
    border-radius: 16px;
}

.fx-cat-icon img {
    width: 68%;
    height: 68%;
    image-rendering: pixelated;
}

.fx-cat-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
}

.fx-cat-name a {
    color: var(--cartoon-ink) !important;
}

.fx-cat:hover .fx-cat-name a {
    color: var(--c-dark) !important;
    text-decoration: none;
}

.fx-stretch::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 16px;
}

.fx-cat-desc {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--gx-muted);
}

.fx-cat-counts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gx-muted);
}

.fx-cat-counts strong {
    font-size: 17px;
    color: var(--cartoon-ink);
}

.fx-cat-last {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding-left: 14px;
    border-left: 2px solid var(--cartoon-soft);
}

.fx-cat-last-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-size: 13px;
    line-height: 1.3;
    color: var(--gx-muted);
}

.fx-cat-last-title {
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Latest activity (sidebar) */
.fx-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 -8px;
    padding: 8px;
    color: var(--cartoon-ink) !important;
    border-radius: 12px;
}

.fx-mini:hover {
    background: var(--cartoon-soft);
    text-decoration: none !important;
}

.fx-mini-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fx-mini-title {
    overflow: hidden;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fx-mini.is-new .fx-mini-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    background: var(--gx-blue);
    border-radius: 50%;
}

.fx-mini-meta {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    color: var(--gx-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fx-mini-meta .fx-time {
    font-size: 12px;
}

.fx-rules ol {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 12px;
    padding-left: 20px;
    font-size: 14px;
}

.fx-rules li::marker {
    font-weight: 800;
    color: var(--gx-blue);
}

/* Category header */
.fx-cat-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-color: var(--c-line);
    border-left: 8px solid var(--c);
    box-shadow: 0 3px 0 var(--c-line);
}

.fx-cat-head-text {
    flex: 1 1 260px;
    min-width: 0;
}

/* List toolbar: sort tabs */
.fx-listbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fx-listbar > .fx-muted,
.fx-listbar > strong {
    padding: 3px 12px;
    font-weight: 800;
    color: var(--cartoon-ink);
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 999px;
}

.fx-listbar-flat > strong,
.fx-listbar-flat > .fx-muted {
    padding: 0;
    background: none;
    border: 0;
}

.fx-listbar-flat {
    margin-bottom: 14px;
}

.fx-sorts {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 14px;
}

.fx-sorts a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--cartoon-ink) !important;
    border-radius: 10px;
}

.fx-sorts a:hover {
    background: var(--cartoon-soft);
    text-decoration: none !important;
}

.fx-sorts a.is-active {
    color: #fff !important;
    background: var(--gx-blue);
}

/* Thread list */
.fx-thread-list {
    overflow: hidden;
}

.fx-thread-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 210px;
    gap: 14px;
    padding: 10px 18px 10px 76px;
    font-size: 13px;
    font-weight: 800;
    color: var(--gx-muted);
    background: var(--fx-tint);
    border-bottom: 2px solid var(--cartoon-line);
}

.fx-thread {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 110px 210px;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 2px solid #edf5e6;
    transition: background 0.15s ease;
}

.fx-thread:last-child {
    border-bottom: 0;
}

.fx-thread:hover {
    background: var(--fx-tint);
}

.fx-thread.is-pinned {
    background: #f4faee;
    box-shadow: inset 5px 0 0 var(--gx-blue);
}

.fx-thread-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.fx-thread-title a {
    color: var(--cartoon-ink) !important;
}

.fx-thread-title a:hover {
    color: var(--gx-blue-dark) !important;
}

.fx-thread.is-new .fx-thread-title a {
    font-weight: 800;
}

.fx-ico {
    margin-right: 4px;
    font-size: 0.85em;
}

.fx-ico-pin { color: var(--gx-blue); }
.fx-ico-lock { color: #d9473f; }

.fx-thread-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gx-muted);
}

.fx-thread-snippet {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--gx-muted);
}

.fx-thread-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gx-muted);
}

.fx-thread-stats .bi {
    width: 18px;
    color: var(--gx-blue);
}

.fx-thread-last {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.3;
}

.fx-thread-last > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fx-last-link {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Empty states */
.fx-empty {
    padding: 40px 24px;
    text-align: center;
}

.fx-empty-flat {
    padding: 28px 12px;
}

.fx-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 10px;
    font-size: 32px;
    color: var(--gx-blue);
    background: var(--cartoon-soft);
    border: 2px solid var(--cartoon-line);
    border-radius: 20px;
}

.fx-empty h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.fx-empty p {
    max-width: 440px;
    margin: 6px auto 16px;
    color: var(--gx-muted);
    font-weight: 500;
}

/* Pagination */
.fx-pager {
    display: flex;
    justify-content: center;
}

.fx-pager .pagination {
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.fx-pager .small.text-muted {
    display: none;
}

.fx-pager .page-link {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    color: var(--gx-blue-dark);
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 10px !important;
}

.fx-pager .page-item.active .page-link {
    color: #fff;
    background: var(--gx-blue);
    border-color: var(--gx-blue-dark);
}

.fx-pager .page-item.disabled .page-link {
    color: #aab4c5;
    background: #fff;
}

.fx-pager .page-link:hover {
    background: var(--cartoon-soft);
    border-color: var(--gx-blue);
    color: var(--gx-blue-dark);
}

/* Thread header card */
.fx-thread-card {
    padding: 20px 24px;
    border-color: var(--c-line);
    border-left: 8px solid var(--c);
    box-shadow: 0 3px 0 var(--c-line);
}

.fx-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.fx-thread-card .fx-thread-meta {
    margin-top: 10px;
    font-size: 14px;
}

.fx-crumb-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fx-modbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 12px;
    background: var(--fx-tint);
    border: 2px dashed var(--cartoon-line);
    border-radius: 14px;
}

.fx-modbar form {
    display: inline-flex;
    gap: 6px;
    margin: 0;
}

.fx-modbar-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--gx-blue-dark);
}

/* Form controls */
.fx-label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 800;
}

.fx-input,
.fx-select,
.fx-textarea {
    display: block;
    width: 100%;
    padding: 0 14px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--cartoon-ink);
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fx-input,
.fx-select {
    height: 46px;
}

.fx-select {
    width: auto;
    height: 34px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 700;
}

.fx-input:focus,
.fx-select:focus,
.fx-textarea:focus {
    border-color: var(--gx-blue);
    box-shadow: 0 0 0 4px rgba(76, 175, 36, 0.18);
}

.fx-error {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #d9473f;
}

.fx-form-card {
    padding: 22px 24px;
}

.fx-form-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.fx-form-head .fx-title {
    color: var(--cartoon-ink);
}

.fx-field {
    margin-bottom: 16px;
}

.fx-bigsearch {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

/* Composer */
.fx-composer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fx-editor {
    position: relative;
    overflow: visible;
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fx-editor:focus-within {
    border-color: var(--gx-blue);
    box-shadow: 0 0 0 4px rgba(76, 175, 36, 0.18);
}

.fx-editor-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    background: var(--fx-tint);
    border-bottom: 2px solid var(--cartoon-line);
    border-radius: 12px 12px 0 0;
}

.fx-tabs,
.fx-tools {
    display: inline-flex;
    gap: 4px;
}

.fx-tabs button {
    padding: 4px 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    color: var(--gx-muted);
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
}

.fx-tabs button.is-active {
    color: #fff;
    background: var(--gx-blue);
}

.fx-tools button {
    width: 34px;
    height: 32px;
    font-size: 16px;
    color: var(--cartoon-ink);
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
}

.fx-tools button:hover {
    color: var(--gx-blue-dark);
    background: var(--cartoon-soft);
}

.fx-textarea {
    min-height: 130px;
    padding: 12px 14px;
    line-height: 1.5;
    border: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: none !important;
    resize: vertical;
}

.fx-preview {
    min-height: 130px;
    padding: 12px 14px;
}

.fx-preview[hidden],
.fx-textarea[hidden] {
    display: none;
}

.fx-composer-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.fx-hint {
    flex: 1 1 280px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gx-muted);
}

.fx-hint kbd {
    padding: 0 6px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    color: var(--gx-blue-dark);
    background: var(--cartoon-soft);
    border: 1px solid var(--cartoon-line);
    border-radius: 6px;
    box-shadow: 0 2px 0 var(--cartoon-line);
}

.fx-counter {
    font-size: 13px;
    font-weight: 700;
    color: var(--gx-muted);
}

.fx-counter.is-near {
    color: #e0822a;
}

.fx-counter.is-over {
    color: #d9473f;
}

.fx-composer-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.fx-quote-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #a85a14;
    background: #fdeedd;
    border: 2px solid #f5d3ad;
    border-radius: 12px;
}

.fx-quote-chip[hidden] {
    display: none;
}

.fx-quote-chip span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fx-quote-chip button {
    padding: 2px 6px;
    color: var(--gx-muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.fx-quote-chip button:hover {
    color: #d9473f;
    background: #fff;
}

/* @mention suggestions */
.fx-mention-list {
    position: absolute;
    left: 14px;
    z-index: 20;
    min-width: 200px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(31, 45, 26, 0.16);
}

.fx-mention-list[hidden] {
    display: none;
}

.fx-mention-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
}

.fx-mention-list li img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    image-rendering: pixelated;
}

.fx-mention-list li.is-active,
.fx-mention-list li:hover {
    background: var(--cartoon-soft);
    color: var(--gx-blue-dark);
}

/* Posts */
.fx-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fx-post {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    overflow: hidden;
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 18px;
    box-shadow: 0 3px 0 var(--cartoon-line);
    scroll-margin-top: 84px;
}

.fx-post:target,
.fx-post.is-target {
    border-color: var(--gx-blue);
    box-shadow: 0 3px 0 var(--gx-blue), 0 0 0 4px rgba(76, 175, 36, 0.18);
}

.fx-post.is-op {
    border-color: var(--c-line);
}

.fx-post-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 12px;
    text-align: center;
    background: var(--fx-tint);
    border-right: 2px solid var(--cartoon-line);
}

.fx-post-author-info {
    min-width: 0;
    max-width: 100%;
}

.fx-post-author-name {
    font-size: 17px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.fx-post-author-role {
    margin-top: 4px;
}

.fx-post-author-role .fx-role {
    margin-left: 0;
}

.fx-author-stats {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--gx-muted);
}

.fx-post-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 14px 20px 12px;
}

.fx-post-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #edf5e6;
}

.fx-post-when {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fx-post-num {
    font-size: 13px;
    font-weight: 800;
    color: var(--gx-muted) !important;
}

.fx-quote {
    display: block;
    margin-bottom: 12px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--cartoon-ink) !important;
    background: var(--cartoon-soft);
    border-left: 5px solid var(--gx-blue);
    border-radius: 4px 12px 12px 4px;
}

.fx-quote:hover {
    text-decoration: none !important;
    background: #e2f3d3;
}

.fx-quote strong {
    display: block;
    color: var(--gx-blue-dark);
}

.fx-quote span {
    display: block;
    color: var(--gx-muted);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.fx-edited {
    margin: 12px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--gx-muted);
}

.fx-post-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.fx-post-actions form {
    display: inline;
    margin: 0;
}

.fx-actions-left,
.fx-actions-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.fx-act {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--gx-muted) !important;
    background: transparent;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
}

.fx-act:hover {
    color: var(--gx-blue-dark) !important;
    background: var(--cartoon-soft);
    text-decoration: none !important;
}

.fx-act-danger:hover {
    color: #d9473f !important;
    background: #fde9e7;
}

.fx-like {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    color: var(--gx-muted);
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.fx-like:hover {
    color: #d9473f;
    border-color: #f5c1bd;
    background: #fff5f4;
}

.fx-like.is-liked {
    color: #d9473f;
    background: #fde9e7;
    border-color: #f5c1bd;
}

.fx-like.pop {
    transform: scale(1.18);
}

.fx-like.is-static {
    cursor: default;
}

.fx-like.is-static:hover {
    color: var(--gx-muted);
    background: #fff;
    border-color: var(--cartoon-line);
}

/* Rendered post text */
.fx-body {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.fx-body > :first-child { margin-top: 0; }
.fx-body > :last-child { margin-bottom: 0; }

.fx-body p,
.fx-body ul,
.fx-body ol,
.fx-body pre,
.fx-body blockquote,
.fx-body table {
    margin: 0 0 12px;
}

.fx-body ul,
.fx-body ol {
    padding-left: 24px;
}

.fx-body h4 {
    margin: 16px 0 8px;
    font-size: 18px;
    font-weight: 800;
}

.fx-body a {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fx-body code {
    padding: 1px 6px;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.88em;
    color: var(--gx-blue-dark);
    background: #f1f5ee;
    border-radius: 6px;
}

.fx-body pre {
    padding: 12px 14px;
    overflow-x: auto;
    color: #e6f5d8;
    background: var(--cartoon-ink);
    border-radius: 12px;
}

.fx-body pre code {
    padding: 0;
    color: inherit;
    background: transparent;
}

.fx-body blockquote {
    padding: 8px 14px;
    color: var(--gx-muted);
    background: var(--fx-tint);
    border-left: 5px solid var(--cartoon-line);
    border-radius: 4px 10px 10px 4px;
}

.fx-body table {
    border-collapse: collapse;
}

.fx-body th,
.fx-body td {
    padding: 4px 10px;
    border: 2px solid var(--cartoon-line);
}

.fx-body hr {
    border-color: var(--cartoon-line);
    opacity: 1;
}

.fx-mention {
    padding: 0 6px;
    font-weight: 800;
    color: var(--gx-blue-dark) !important;
    background: var(--cartoon-soft);
    border-radius: 7px;
    text-decoration: none !important;
}

/* Reply box and gate */
.fx-reply {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fx-reply-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 14px 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--cartoon-ink);
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 18px;
    box-shadow: 0 3px 0 var(--cartoon-line);
}

.fx-reply-title .bi {
    color: var(--gx-blue);
}

.fx-reply-card {
    padding: 18px 20px;
}

.fx-gate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    padding: 20px 24px;
}

.fx-gate-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    font-size: 24px;
    color: var(--gx-blue);
    background: var(--cartoon-soft);
    border: 2px solid var(--cartoon-line);
    border-radius: 16px;
}

.fx-gate-text {
    display: flex;
    flex: 1 1 240px;
    flex-direction: column;
    line-height: 1.35;
}

.fx-gate-text strong {
    font-size: 18px;
}

.fx-gate-text span {
    font-weight: 500;
    color: var(--gx-muted);
}

/* Tips and formatting table */
.fx-tips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    font-weight: 500;
}

.fx-tips li::marker {
    color: var(--gx-blue);
}

.fx-format {
    width: 100%;
    font-size: 13px;
}

.fx-format td {
    padding: 4px 0;
    border-bottom: 1px solid #edf5e6;
}

.fx-format tr:last-child td {
    border-bottom: 0;
}

.fx-format code {
    padding: 1px 6px;
    font-family: 'JetBrains Mono', Consolas, monospace;
    color: var(--gx-blue-dark);
    background: #f1f5ee;
    border-radius: 6px;
}

/* Notifications */
.fx-notes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fx-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--cartoon-ink) !important;
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 14px;
}

.fx-note:hover {
    background: var(--fx-tint);
    border-color: var(--gx-blue);
    text-decoration: none !important;
}

.fx-note.is-new {
    background: var(--cartoon-soft);
    border-color: var(--gx-blue);
}

.fx-note-icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: var(--gx-blue);
    border-radius: 10px;
}

.fx-note-like .fx-note-icon { background: #d9473f; }
.fx-note-mention .fx-note-icon { background: #8e5cd9; }
.fx-note-quote .fx-note-icon { background: #2f6fd6; }

.fx-note-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    font-weight: 700;
    line-height: 1.3;
}

/* Moderator reports */
.fx-reports {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fx-report {
    padding: 16px 18px;
    background: var(--fx-tint);
    border: 2px solid var(--cartoon-line);
    border-radius: 16px;
}

.fx-report-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.fx-report-details {
    margin: 10px 0 0;
    font-style: italic;
    font-weight: 600;
}

.fx-report-post {
    margin-top: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 12px;
}

.fx-report-post-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
}

.fx-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* Report dialog */
.fx-modal .modal-content {
    font-family: 'Baloo 2', Arial, sans-serif;
    border: 2px solid var(--cartoon-line);
    border-radius: 18px;
    box-shadow: 0 6px 0 var(--cartoon-line);
}

.fx-modal .modal-header,
.fx-modal .modal-footer {
    border-color: var(--cartoon-line);
    border-width: 2px;
}

.fx-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.fx-modal .modal-title .bi {
    color: #d9473f;
}

.fx-modal-close {
    width: 36px;
    height: 36px;
    margin-left: auto;
    color: var(--gx-muted);
    background: transparent;
    border: 0;
    border-radius: 10px;
}

.fx-modal-close:hover {
    color: var(--gx-blue-dark);
    background: var(--cartoon-soft);
}

.fx-reasons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fx-reason {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-weight: 700;
    background: #fff;
    border: 2px solid var(--cartoon-line);
    border-radius: 12px;
    cursor: pointer;
}

.fx-reason:has(input:checked) {
    background: var(--cartoon-soft);
    border-color: var(--gx-blue);
}

.fx-reason input {
    width: 18px;
    height: 18px;
    accent-color: var(--gx-blue);
}

.fx-modal .fx-textarea {
    min-height: 0;
    border: 2px solid var(--cartoon-line);
    border-radius: 12px;
}

/* Bootstrap dropdown, restyled */
.fx-dropdown {
    min-width: 260px;
    padding: 6px;
    font-family: 'Baloo 2', Arial, sans-serif;
    border: 2px solid var(--cartoon-line);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(31, 45, 26, 0.16);
}

.fx-dropdown .dropdown-header {
    font-size: 13px;
    font-weight: 800;
}

.fx-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
}

.fx-dropdown .dropdown-item:hover,
.fx-dropdown .dropdown-item:focus {
    color: var(--gx-blue-dark);
    background: var(--cartoon-soft);
}

.fx-dropdown .fx-cat-icon {
    border-radius: 8px;
}

/* Tablet */
@media (max-width: 991.98px) {
    .fx-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .fx-cat {
        grid-template-columns: auto minmax(0, 1fr) 190px;
    }

    .fx-cat-counts {
        display: none;
    }
}

/* Phone */
@media (max-width: 767.98px) {
    .fx-title {
        font-size: 26px;
    }

    .fx-title-thread {
        font-size: 24px;
    }

    .fx-search,
    .fx-search input {
        width: 100%;
    }

    .fx-topbar-actions {
        flex: 1 1 100%;
    }

    .fx-search {
        flex: 1;
    }

    .fx-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fx-cat {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px 14px;
    }

    .fx-cat-last {
        grid-column: 1 / -1;
        padding: 10px 0 0;
        border-top: 2px solid var(--cartoon-soft);
        border-left: 0;
    }

    .fx-thread-head {
        display: none;
    }

    .fx-thread {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px 12px;
        padding: 12px 14px;
    }

    .fx-thread-stats {
        flex-direction: row;
        grid-column: 2;
        gap: 14px;
    }

    .fx-thread-last {
        display: none;
    }

    .fx-post {
        grid-template-columns: minmax(0, 1fr);
    }

    .fx-post-author {
        flex-direction: row;
        gap: 12px;
        padding: 10px 14px;
        text-align: left;
        border-right: 0;
        border-bottom: 2px solid var(--cartoon-line);
    }

    .fx-post-author .fx-avatar {
        --s: 44px !important;
    }

    .fx-author-stats {
        display: flex;
        gap: 10px;
        margin-top: 2px;
    }

    .fx-post-main {
        padding: 12px 14px 10px;
    }

    .fx-bigsearch {
        flex-direction: column;
    }

    .fx-form-card,
    .fx-thread-card {
        padding: 16px;
    }

    .fx-composer-buttons {
        width: 100%;
    }

    .fx-composer-buttons .fx-btn {
        flex: 1;
    }

    .fx-counter {
        order: 3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fx-cat,
    .fx-btn,
    .fx-like,
    .fx-thread {
        transition: none;
    }

    .fx-cat:hover,
    .fx-btn:hover {
        transform: none;
    }
}
