.fx {
    --fx-panel: rgba(4, 12, 22, .86);
    --fx-panel2: rgba(8, 20, 32, .72);
    --fx-line: rgba(0, 173, 238, .14);
    --fx-line2: rgba(0, 173, 238, .30);
    --fx-hover: rgba(0, 173, 238, .06);
    --fx-pin: #fbbf24;
    --fx-lock: #f87171;
    --fx-new: #3ddc84;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    color: var(--c-text);
    font-family: var(--f-body);
}
.fx a { color: inherit; }
.fx mark { background: rgba(var(--c-cyan-rgb, 0, 173, 238), .22); color: var(--c-text-hi); padding: 0 2px; border-radius: 3px; }

.fx-hero {
    background: linear-gradient(rgba(6, 13, 20, .72), rgba(6, 13, 20, .94)), url("/img/icons/forum.webp") center / cover;
    border-bottom: 1px solid var(--fx-line2);
    position: relative;
}
.fx-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line-glow); }
.fx-hero-in {
    max-width: 1280px; margin: 0 auto; padding: 34px 24px 30px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.fx-hero h1 {
    font-family: var(--f-display); font-weight: 900; font-size: clamp(1.4rem, 3.4vw, 2.3rem);
    color: #b0e0ff; letter-spacing: 3px; text-transform: uppercase; line-height: 1.2;
    text-shadow: 0 0 20px rgba(var(--c-cyan-rgb, 0, 173, 238), .45);
}
.fx-hero p { color: var(--c-text-dim); font-size: 1.02rem; margin-top: 4px; }

.fx-member { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; border-radius: 4px; }
.fx-member:hover { color: var(--c-cyan); }
.fx-member:hover .fx-av { box-shadow: 0 0 0 2px var(--c-cyan); }
.fx-search {
    display: flex; align-items: center; gap: 8px; flex: 0 1 420px; min-width: 260px;
    background: var(--c-input); border: 1px solid var(--fx-line2); border-radius: 999px; padding: 4px 4px 4px 14px;
    transition: border-color .2s, box-shadow .2s;
}
.fx-search:focus-within { border-color: var(--c-cyan); box-shadow: 0 0 0 3px rgba(var(--c-cyan-rgb, 0, 173, 238), .15); }
.fx-search svg { width: 18px; height: 18px; fill: none; stroke: var(--c-muted); stroke-width: 2; flex-shrink: 0; }
.fx-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; padding: 6px 0; color: var(--c-text-hi); }
.fx-search input::-webkit-search-cancel-button { filter: invert(.6); }
.fx-search button {
    border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer;
    background: var(--c-cyan-dim); color: var(--c-text-hi); font-family: var(--f-display); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
    transition: background .2s;
}
.fx-search button:hover { background: rgba(var(--c-cyan-rgb, 0, 173, 238), .3); }

.fx-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 22px 24px 56px; }
.fx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.fx-main, .fx-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.fx-panel {
    position: relative; background: var(--fx-panel); border: 1px solid var(--fx-line);
    border-radius: var(--r-md); backdrop-filter: blur(6px);
    box-shadow: 0 0 16px rgba(0, 0, 0, .45);
}
.fx-panel::before { content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 1px; background: var(--line-glow); pointer-events: none; }
.fx-panel-head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 14px 18px; border-bottom: 1px solid var(--fx-line);
}
.fx-panel-head h2 {
    font-family: var(--f-display); font-size: .82rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    color: #b0e0ff; display: flex; align-items: center; gap: 8px;
}
.fx-panel-head h2::before { content: ''; width: 3px; height: 1em; background: var(--c-cyan); border-radius: 2px; box-shadow: 0 0 8px var(--c-glow-strong); }
.fx-panel-head h2 em { font-style: normal; color: var(--c-cyan); text-transform: none; letter-spacing: .5px; }
.fx-panel-body { padding: 18px; }
.fx-head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-head-actions form { display: contents; }
.fx-count-badge { font-family: var(--f-display); font-size: .62rem; color: var(--c-cyan); border: 1px solid var(--fx-line2); border-radius: 999px; padding: 2px 9px; }
.fx-panel-head .fx-btn.is-ghost { margin-left: auto; }

.fx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 38px; padding: 8px 16px; border-radius: var(--r-sm); cursor: pointer;
    background: var(--c-cyan-dim); border: 1px solid var(--fx-line2); color: var(--c-text-hi);
    font-family: var(--f-display); font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
    transition: background .18s, border-color .18s, box-shadow .18s; text-decoration: none;
}
.fx-btn:hover { background: rgba(var(--c-cyan-rgb, 0, 173, 238), .26); border-color: var(--c-cyan); }
.fx-btn.is-primary { background: linear-gradient(135deg, rgba(var(--c-cyan-rgb, 0, 173, 238), .45), rgba(0, 120, 180, .45)); border-color: var(--c-cyan); box-shadow: 0 0 14px rgba(var(--c-cyan-rgb, 0, 173, 238), .18); }
.fx-btn.is-primary:hover { box-shadow: 0 0 20px rgba(var(--c-cyan-rgb, 0, 173, 238), .35); }
.fx-btn.is-ghost { background: transparent; border-color: rgba(122, 154, 170, .3); color: var(--c-text-dim); }
.fx-btn.is-ghost:hover { border-color: var(--c-muted); color: var(--c-text-hi); background: rgba(122, 154, 170, .08); }
.fx-btn.is-sm { min-height: 32px; padding: 5px 12px; font-size: .56rem; }
.fx-btn:disabled { opacity: .5; cursor: wait; }

.fx-meta { color: var(--c-muted); font-size: .9rem; }
.fx-meta time, .fx-post-head time { cursor: help; }

.fx-tag {
    display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; vertical-align: middle;
    font-family: var(--f-display); font-size: .5rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
    border: 1px solid var(--fx-line2); color: var(--c-cyan); background: var(--c-cyan-dim);
}
.fx-tag.is-new { color: var(--fx-new); border-color: rgba(61, 220, 132, .4); background: rgba(61, 220, 132, .1); }
.fx-tag.is-pin { color: var(--fx-pin); border-color: rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .08); }
.fx-tag.is-lock { color: var(--fx-lock); border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .08); }
.fx-tag.is-staff { color: #f59e0b; border-color: rgba(245, 158, 11, .4); background: rgba(245, 158, 11, .08); }

.fx-av {
    --fx-hue: 200; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: hsl(var(--fx-hue) 55% 32%); color: #fff; font-family: var(--f-display); font-weight: 700; font-size: .85rem;
    border: 1px solid rgba(255, 255, 255, .14); vertical-align: middle;
}
.fx-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fx-av.is-xs { width: 22px; height: 22px; font-size: .55rem; }
.fx-av.is-sm { width: 32px; height: 32px; font-size: .72rem; }
.fx-av.is-lg { width: 64px; height: 64px; font-size: 1.4rem; border-color: var(--fx-line2); box-shadow: 0 0 14px rgba(var(--c-cyan-rgb, 0, 173, 238), .15); }

.fx-row {
    display: grid; align-items: center; gap: 14px;
    padding: 14px 18px; border-bottom: 1px solid var(--fx-line); position: relative;
    transition: background .18s;
}
.fx-row:last-child { border-bottom: 0; }
.fx-row:hover { background: var(--fx-hover); }
.fx-cat { grid-template-columns: 52px minmax(0, 1fr) 150px 250px auto; }
.fx-thread { grid-template-columns: 26px minmax(0, 1fr) 120px 190px auto; }
.fx-row-title { font-size: 1.12rem; font-weight: 700; color: var(--c-text-hi); line-height: 1.3; margin-right: 6px; transition: color .15s; overflow-wrap: anywhere; }
.fx-row-title:hover { color: var(--c-cyan); }
.fx-row.is-unread .fx-row-title { color: #fff; }
.fx-row-desc { color: var(--c-text-dim); font-size: .96rem; margin-top: 2px; line-height: 1.4; }
.fx-cat-icon {
    width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; background: rgba(var(--c-cyan-rgb, 0, 173, 238), .08); border: 1px solid var(--fx-line2); position: relative;
}
.fx-cat-icon.is-multi { font-size: .95rem; white-space: nowrap; letter-spacing: -2px; }
.fx-row.is-unread .fx-cat-icon { border-color: var(--c-cyan); box-shadow: 0 0 12px rgba(var(--c-cyan-rgb, 0, 173, 238), .3); }
.fx-row.is-unread .fx-cat-icon::after {
    content: ''; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%;
    background: var(--c-cyan); box-shadow: 0 0 8px var(--c-cyan);
}
.fx-stats { display: flex; flex-direction: column; gap: 1px; color: var(--c-muted); font-size: .9rem; text-align: right; }
.fx-stats b { color: var(--c-text-hi); font-family: var(--f-display); font-size: .78rem; margin-right: 2px; }
.fx-last { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fx-last > div { min-width: 0; display: flex; flex-direction: column; }
.fx-last a { color: var(--c-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-last a:hover { color: var(--c-cyan); }
.fx-last .fx-meta { font-size: .84rem; }

.fx-state { font-size: .85rem; color: var(--c-muted); text-align: center; }
.fx-thread.is-unread .fx-state { color: var(--c-cyan); text-shadow: 0 0 8px var(--c-cyan); }
.fx-thread.is-pinned { background: linear-gradient(90deg, rgba(251, 191, 36, .05), transparent 40%); }
.fx-thread.is-pinned .fx-state { color: var(--fx-pin); }
.fx-thread.is-locked .fx-state { color: var(--fx-lock); }
.fx-thread-main .fx-meta { display: block; margin-top: 2px; }
.fx-minipager { display: inline-flex; gap: 3px; margin-left: 8px; }
.fx-minipager a { font-size: .74rem; padding: 0 6px; border: 1px solid var(--fx-line); border-radius: 4px; color: var(--c-text-dim); }
.fx-minipager a:hover { border-color: var(--c-cyan); color: var(--c-cyan); }

.fx-toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 18px; border-bottom: 1px solid var(--fx-line); }
.fx-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.fx-tabs a { padding: 5px 12px; border-radius: 999px; font-size: .92rem; color: var(--c-text-dim); border: 1px solid transparent; transition: all .15s; }
.fx-tabs a:hover { color: var(--c-text-hi); background: var(--fx-hover); }
.fx-tabs a.is-on { color: var(--c-text-hi); border-color: var(--fx-line2); background: var(--c-cyan-dim); }

.fx-cat-head .fx-cat-icon { width: 54px; height: 54px; font-size: 1.7rem; }
.fx-cat-head .fx-cat-icon.is-multi { font-size: 1.1rem; }
.fx-cat-head h2 { font-size: .95rem; }
.fx-cat-head-text { min-width: 0; }

.fx-empty-cats { margin-top: 12px; padding: 10px 14px; border: 1px solid var(--fx-line2); border-radius: 10px; }
.fx-empty-cats summary { cursor: pointer; color: var(--c-text-dim); }
.fx-empty-cats ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; margin: 10px 0 2px; padding: 0; list-style: none; }

.fx-menu, .fx-emoji, .fx-react-add { position: relative; }
.fx-menu > summary, .fx-emoji > summary, .fx-react-add > summary { list-style: none; cursor: pointer; user-select: none; }
.fx-menu > summary::-webkit-details-marker, .fx-emoji > summary::-webkit-details-marker, .fx-react-add > summary::-webkit-details-marker { display: none; }
.fx-menu > summary {
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm);
    color: var(--c-text-dim); border: 1px solid transparent; font-size: 1.2rem; line-height: 1;
}
.fx-menu > summary:hover, .fx-menu[open] > summary { border-color: var(--fx-line2); background: var(--fx-hover); color: var(--c-text-hi); }
.fx-pop {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px;
    background: rgba(6, 16, 28, .98); border: 1px solid var(--fx-line2); border-radius: var(--r-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6); padding: 6px; display: flex; flex-direction: column;
}
.fx-pop form { display: contents; }
.fx-menu .fx-pop button {
    text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--c-text); font-size: .98rem;
}
.fx-menu .fx-pop button:hover { background: var(--c-cyan-dim); color: var(--c-text-hi); }
.fx-pop button.is-danger, .fx-post-actions .is-danger { color: var(--c-danger); }
.fx-pop button.is-danger:hover { background: rgba(248, 113, 113, .12); }

.fx-feed { list-style: none; padding: 6px 0; }
.fx-feed li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 18px; }
.fx-feed li + li { border-top: 1px solid rgba(var(--c-cyan-rgb, 0, 173, 238), .07); }
.fx-feed li > div { min-width: 0; display: flex; flex-direction: column; }
.fx-feed a { font-weight: 600; color: var(--c-text-hi); line-height: 1.3; overflow-wrap: anywhere; }
.fx-feed a:hover { color: var(--c-cyan); }
.fx-feed .fx-meta { font-size: .84rem; }
.fx-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--fx-line); border-radius: 0 0 var(--r-md) var(--r-md); overflow: hidden; }
.fx-kpis > div { background: var(--fx-panel); padding: 14px 18px; }
.fx-kpis dt { color: var(--c-muted); font-size: .86rem; }
.fx-kpis dd { font-family: var(--f-display); font-size: 1.25rem; color: var(--c-text-hi); }

.fx-notice {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 14px 18px; border-radius: var(--r-md); border: 1px solid var(--fx-line2); background: rgba(var(--c-cyan-rgb, 0, 173, 238), .07); color: var(--c-text);
}
.fx-panel .fx-notice { border-radius: 0; border-width: 0 0 1px; }
.fx-notice.is-info { color: var(--c-text-dim); }
.fx-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 18px; color: var(--c-muted); text-align: center; }
.fx-empty span { font-size: 2rem; }

.fx-results { list-style: none; }
.fx-result { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border-bottom: 1px solid var(--fx-line); transition: background .15s; }
.fx-results li:last-child .fx-result { border-bottom: 0; }
.fx-result:hover { background: var(--fx-hover); }
.fx-result strong { color: var(--c-text-hi); font-size: 1.08rem; }
.fx-result-snip { color: var(--c-text-dim); font-size: .96rem; overflow-wrap: anywhere; }
.fx-result-kind { align-self: flex-start; font-family: var(--f-display); font-size: .5rem; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.fx-result-kind.is-thread { color: var(--c-cyan); }

.fx-crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; color: var(--c-muted); font-size: .96rem; }
.fx-crumbs a { color: var(--c-text-dim); }
.fx-crumbs a:hover { color: var(--c-cyan); }
.fx-crumbs [aria-current] { color: var(--c-text); overflow-wrap: anywhere; }
.fx-pager { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; padding: 14px; }
.fx-pager a, .fx-pager span {
    min-width: 36px; height: 36px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-sm); border: 1px solid var(--fx-line); font-family: var(--f-display); font-size: .66rem; color: var(--c-text-dim);
}
.fx-pager a:hover { border-color: var(--c-cyan); color: var(--c-cyan); }
.fx-pager .is-cur { background: var(--c-cyan-dim); border-color: var(--c-cyan); color: var(--c-text-hi); }
.fx-pager .is-off { opacity: .35; }
.fx-pager .is-gap { border: 0; min-width: 18px; }

.fx-thread-page { max-width: 1080px; }
.fx-thread-head { padding: 20px 22px 16px; margin-bottom: 4px; z-index: 3; }
.fx-menu[open] { z-index: 40; }
.fx-thread-title { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.fx-thread-title h1 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 700; color: var(--c-text-hi); line-height: 1.25; flex: 1 1 320px; overflow-wrap: anywhere; }
.fx-tags { display: flex; gap: 6px; padding-top: 6px; }
.fx-thread-meta { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; margin-top: 10px; color: var(--c-muted); font-size: .94rem; }
.fx-thread-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.fx-thread-meta b { color: var(--c-text-hi); }
.fx-thread-tools { margin-left: auto; gap: 8px !important; }

.fx-posts { display: flex; flex-direction: column; gap: 14px; }
.fx-post {
    display: grid; grid-template-columns: 170px minmax(0, 1fr);
    background: var(--fx-panel); border: 1px solid var(--fx-line); border-radius: var(--r-md); position: relative;
    scroll-margin-top: 90px; transition: border-color .3s, box-shadow .3s;
}
.fx-post.is-op { border-color: var(--fx-line2); }
.fx-post.is-new { border-left: 3px solid var(--fx-new); }
.fx-post:target, .fx-post.is-flash { border-color: var(--c-cyan); box-shadow: 0 0 0 1px var(--c-cyan), 0 0 24px rgba(var(--c-cyan-rgb, 0, 173, 238), .25); }
.fx-post-author {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
    padding: 18px 12px; background: var(--fx-panel2); border-right: 1px solid var(--fx-line);
    border-radius: var(--r-md) 0 0 var(--r-md);
}
.fx-raise { z-index: 50 !important; }
.fx-post-author > div { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.fx-post-name { color: var(--c-text-hi); font-size: 1.05rem; overflow-wrap: anywhere; }
.fx-post-author .fx-meta { font-size: .82rem; }
.fx-rank { font-family: var(--f-display); font-size: .5rem; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.fx-rank.is-admin { color: #f59e0b; }
.fx-rank.is-mod { color: var(--c-cyan); }
.fx-rank.is-editor { color: #a78bfa; }
.fx-rank.is-vip { color: var(--c-gold); }
.fx-rank.is-veteran { color: #c084fc; }
.fx-rank.is-active { color: var(--c-success); }
.fx-rank.is-member { color: var(--c-text-dim); }
.fx-rank.is-newbie { color: var(--c-muted); }

.fx-post-main { display: flex; flex-direction: column; min-width: 0; }
.fx-post-head {
    display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid rgba(var(--c-cyan-rgb, 0, 173, 238), .08);
    color: var(--c-muted); font-size: .9rem;
}
.fx-edited { font-style: italic; cursor: help; }
.fx-post-num { margin-left: auto; font-family: var(--f-display); font-size: .62rem; color: var(--c-muted); padding: 2px 6px; border-radius: 4px; }
.fx-post-num:hover { color: var(--c-cyan); background: var(--fx-hover); }

.fx-post-body { padding: 16px 18px; font-size: 1.06rem; line-height: 1.65; overflow-wrap: anywhere; flex: 1; }
.fx-post-body a, .fx-preview a { color: var(--c-cyan); text-decoration: underline; text-underline-offset: 2px; }
.fx-post-body a:hover, .fx-preview a:hover { color: var(--c-cyan-hi); }
.fx-quote {
    margin: 8px 0; padding: 8px 14px; border-left: 3px solid var(--c-cyan); background: rgba(var(--c-cyan-rgb, 0, 173, 238), .06);
    border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--c-text-dim);
}
.fx-quote cite { display: block; font-style: normal; font-weight: 700; color: var(--c-cyan); font-size: .9rem; margin-bottom: 2px; }
.fx-code {
    margin: 8px 0; padding: 12px 14px; background: rgba(0, 0, 0, .45); border: 1px solid var(--fx-line); border-radius: var(--r-sm);
    overflow-x: auto; font-family: var(--f-mono); font-size: .86rem; line-height: 1.5; color: #d6f1ff; white-space: pre;
}
.fx-spoiler { margin: 8px 0; border: 1px dashed var(--fx-line2); border-radius: var(--r-sm); }
.fx-align { margin: 4px 0; }
.fx-spoiler summary { cursor: pointer; padding: 6px 12px; color: var(--c-text-dim); font-weight: 600; }
.fx-spoiler > div { padding: 4px 12px 10px; }
.fx-list { margin: 6px 0 6px 22px; }
.fx-modnote { margin: 0 18px 10px; color: var(--fx-pin); font-size: .88rem; font-style: italic; }
.fx-sig { margin: 4px 18px 6px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.08); }
.fx-sig img { display: block; max-width: 100%; height: auto; border-radius: 6px; }

.fx-post-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 18px 12px; }
.fx-reactions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fx-react, .fx-react-add > summary {
    display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--fx-line); background: rgba(var(--c-cyan-rgb, 0, 173, 238), .04); color: var(--c-text); font-size: .95rem;
    transition: border-color .15s, background .15s;
}
.fx-react span { font-family: var(--f-display); font-size: .62rem; }
.fx-react:hover:not(:disabled), .fx-react-add > summary:hover { border-color: var(--c-cyan); }
.fx-react.is-on { border-color: var(--c-cyan); background: var(--c-cyan-dim); }
.fx-react:disabled { cursor: default; }
.fx-react-add > summary { color: var(--c-muted); font-size: .85rem; }
.fx-react-add .fx-pop { top: auto; bottom: calc(100% + 6px); }
.fx-react-add .fx-pop, .fx-emoji .fx-pop { left: 0; right: auto; flex-direction: row; flex-wrap: wrap; min-width: 0; width: max-content; max-width: 260px; gap: 2px; }
.fx-react-add .fx-pop button, .fx-emoji .fx-pop button {
    width: 38px; height: 38px; border: 0; background: none; border-radius: 6px; cursor: pointer; font-size: 1.25rem;
}
.fx-react-add .fx-pop button:hover, .fx-emoji .fx-pop button:hover { background: var(--c-cyan-dim); transform: scale(1.12); }
.fx-post-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.fx-post-actions form { display: contents; }
.fx-post-actions button, .fx-post-actions a {
    background: none; border: 0; cursor: pointer; padding: 5px 10px; border-radius: 6px; color: var(--c-muted); font-size: .94rem;
}
.fx-post-actions button:hover, .fx-post-actions a:hover { color: var(--c-text-hi); background: var(--fx-hover); }

.fx-reply { margin-top: 18px; scroll-margin-top: 90px; }
.fx-thread-foot { margin-top: 18px; }

.fx-composer { display: flex; flex-direction: column; gap: 12px; }
.fx-post .fx-composer { padding: 14px 18px 16px; }
.fx-field { display: flex; flex-direction: column; gap: 5px; }
.fx-field > span { font-size: .9rem; color: var(--c-text-dim); font-weight: 600; }
.fx-field input, .fx-field select {
    width: 100%; padding: 10px 12px; min-height: 44px; border-radius: var(--r-sm); background: var(--c-input);
    border: 1px solid var(--fx-line2); color: var(--c-text-hi); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.fx-field input:focus, .fx-field select:focus { border-color: var(--c-cyan); box-shadow: 0 0 0 3px rgba(var(--c-cyan-rgb, 0, 173, 238), .14); }
.fx-check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--c-text); }
.fx-check input { width: 18px; height: 18px; accent-color: var(--c-cyan); }

.fx-editor { border: 1px solid var(--fx-line2); border-radius: var(--r-sm); background: var(--c-input); transition: border-color .15s, box-shadow .15s; }
.fx-editor:focus-within { border-color: var(--c-cyan); box-shadow: 0 0 0 3px rgba(var(--c-cyan-rgb, 0, 173, 238), .12); }
.fx-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 6px; border-bottom: 1px solid var(--fx-line); }
.fx-toolbar > button, .fx-emoji > summary {
    min-width: 34px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: none;
    color: var(--c-text-dim); cursor: pointer; font-size: .98rem; display: inline-flex; align-items: center; justify-content: center;
}
.fx-toolbar > button:hover, .fx-emoji > summary:hover, .fx-emoji[open] > summary { color: var(--c-text-hi); background: var(--fx-hover); border-color: var(--fx-line); }
.fx-sep { width: 1px; height: 20px; background: var(--fx-line2); margin: 0 4px; }
.fx-tb-preview { margin-left: auto; font-family: var(--f-display); font-size: .56rem !important; letter-spacing: .08em; text-transform: uppercase; }
.fx-tb-preview[aria-pressed="true"] { color: var(--c-cyan) !important; border-color: var(--fx-line2) !important; background: var(--c-cyan-dim) !important; }
.fx-editor textarea {
    display: block; width: 100%; min-height: 150px; resize: vertical; border: 0; outline: none; background: none;
    padding: 12px 14px; color: var(--c-text-hi); font-size: 16px; line-height: 1.6;
}
.fx-editor textarea[hidden], .fx-preview[hidden] { display: none; }
.fx-preview { padding: 12px 14px; min-height: 150px; font-size: 1.04rem; line-height: 1.65; overflow-wrap: anywhere; }
.fx-preview:empty::before { content: attr(data-empty); color: var(--c-muted); font-style: italic; }
.fx-editor-foot { display: flex; align-items: center; gap: 12px; padding: 6px 12px; border-top: 1px solid var(--fx-line); color: var(--c-muted); font-size: .84rem; }
.fx-draft { flex: 1; min-height: 1em; }
.fx-count { font-family: var(--f-display); font-size: .58rem; }
.fx-count.is-warn { color: var(--c-warn); }
.fx-count.is-max { color: var(--c-danger); }
.fx-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.fx-dlg { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 460px; margin: 0 auto; padding: 22px; color: var(--c-text); font-family: var(--f-body); }
.fx-dlg h3 { font-family: var(--f-display); font-size: .85rem; letter-spacing: 2px; text-transform: uppercase; color: #b0e0ff; }
.fx-dlg p { color: var(--c-text-dim); font-size: 1.04rem; line-height: 1.5; }
.fx-dlg .fx-field input, .fx-dlg .fx-field select {
    width: 100%; padding: 10px 12px; min-height: 44px; border-radius: var(--r-sm); background: var(--c-input);
    border: 1px solid var(--c-border-cyan); color: var(--c-text-hi); font-size: 16px; outline: none;
}
.fx-dlg .fx-field input:focus, .fx-dlg .fx-field select:focus { border-color: var(--c-cyan); }
.fx-dlg .fx-field > span { font-size: .9rem; color: var(--c-text-dim); font-weight: 600; }
.fx-dlg .fx-field { display: flex; flex-direction: column; gap: 5px; }
.fx-dlg .fx-check { display: flex; align-items: center; gap: 8px; }
.fx-dlg .fx-actions { display: flex; justify-content: flex-end; gap: 10px; }
.fx-dlg .fx-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px; border-radius: var(--r-sm); cursor: pointer;
    background: var(--c-cyan-dim); border: 1px solid var(--c-border-cyan); color: var(--c-text-hi);
    font-family: var(--f-display); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
}
.fx-dlg .fx-btn.is-primary { background: rgba(var(--c-cyan-rgb, 0, 173, 238), .4); border-color: var(--c-cyan); }
.fx-dlg .fx-btn.is-danger { background: rgba(248, 113, 113, .2); border-color: var(--c-danger); }
.fx-dlg .fx-btn.is-ghost { background: transparent; border-color: rgba(122, 154, 170, .3); color: var(--c-text-dim); }
.fx-dlg .fx-err { color: var(--c-danger); font-size: .92rem; }

@media (max-width: 1080px) {
    .fx-grid { grid-template-columns: 1fr; }
    .fx-cat { grid-template-columns: 48px minmax(0, 1fr) 210px auto; }
    .fx-cat .fx-stats { display: none; }
}
@media (max-width: 760px) {
    .fx-hero { background-image: linear-gradient(rgba(6, 13, 20, .9), rgba(6, 13, 20, .97)), url("/img/icons/forum.webp"); }
    .fx-hero-in { padding: 24px 16px 22px; }
    .fx-search { flex: 1 1 100%; min-width: 0; }
    .fx-wrap { padding: 16px 16px 40px; }
    .fx-row { padding: 12px 14px; gap: 10px; }
    .fx-cat { grid-template-columns: 44px minmax(0, 1fr) auto; }
    .fx-cat .fx-cat-icon { width: 42px; height: 42px; font-size: 1.25rem; }
    .fx-cat .fx-cat-icon.is-multi { font-size: .8rem; }
    .fx-cat .fx-last { grid-column: 2 / -1; }
    .fx-thread { grid-template-columns: 20px minmax(0, 1fr) auto; }
    .fx-thread .fx-stats { grid-column: 2; grid-row: 2; flex-direction: row; gap: 14px; text-align: left; }
    .fx-thread .fx-last { display: none; }
    .fx-row > .fx-menu { grid-column: -2; grid-row: 1; }
    .fx-post { grid-template-columns: 1fr; }
    .fx-post-author { flex-direction: row; text-align: left; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--fx-line); border-radius: var(--r-md) var(--r-md) 0 0; }
    .fx-post-author > div { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
    .fx-post-author .fx-av.is-lg { width: 40px; height: 40px; font-size: .9rem; }
    .fx-post-head, .fx-post-body, .fx-post-foot { padding-left: 14px; padding-right: 14px; }
    .fx-post .fx-composer { padding: 12px 14px; }
    .fx-thread-tools { margin-left: 0; width: 100%; }
    .fx-hint { display: none; }
    .fx-pop { max-width: calc(100vw - 32px); }
}
