:root {
    --bg: #0b1017;
    --bg-soft: #101722;
    --bg-panel: rgba(17, 24, 34, 0.94);
    --bg-panel-strong: rgba(14, 20, 31, 0.98);
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-2: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #e6edf7;
    --text-soft: #a6b2c4;
    --heading: #f6f8fb;
    --accent: #ffbf63;
    --accent-soft: rgba(255, 191, 99, 0.14);
    --accent-cold: #7cb0ff;
    --success: #4db488;
    --danger: #df7575;
    --info: #6ea0f2;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.18);
    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --container: 1440px;
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
html {
    background: #070d15;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
}
body {
    color: var(--text);
    font: 400 16px/1.6 Inter, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #070d15;
    background-image:
        radial-gradient(circle at top left, rgba(255, 191, 99, 0.07), transparent 24%),
        radial-gradient(circle at top right, rgba(124, 176, 255, 0.08), transparent 26%),
        linear-gradient(180deg, #0c1118 0%, #091019 35%, #070d15 100%);
    letter-spacing: 0.01em;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
strong { font-weight: 350; }
h1, h2, h3, h4 { margin: 0; color: var(--heading); font-weight: 350; line-height: 1.14; letter-spacing: -0.02em; }
p { margin: 0; }
small { color: var(--text-soft); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.container { width: min(var(--container), calc(100% - 44px)); max-width: calc(100% - 44px); margin: 0 auto; }
.site-shell { min-height: 100vh; position: relative; width: 100%; max-width: 100%; overflow-x: clip; }
.page-content { padding: 28px 0 54px; }

.stack-lg, .stack-md, .two-col, .three-col, .four-col { display: grid; gap: 16px; }
.stack-md { gap: 12px; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.inline-actions, .hero-actions, .profile-actions, .topic-actions-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.top-gap { margin-top: 16px; }
.top-gap-xs { margin-top: 8px; }
.bottom-gap { margin-bottom: 18px; }
.muted { color: var(--text-soft); }
.narrow { max-width: 860px; }

.panel {
    background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-strong));
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(14px);
}
.panel-lite {
    background: rgba(10, 16, 24, 0.54);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}
.latest-panel, .form-panel, .topic-hero, .forum-page-head, .profile-hero, .auth-panel, .error-panel, .admin-sidebar { padding: 24px; }
.page-headline { margin-bottom: 18px; }
.page-headline h1, .forum-page-head h1, .topic-hero h1, .profile-hero h1, .hero-strip h1, .auth-panel h1, .error-panel h1 {
    font-size: clamp(30px, 3vw, 44px);
    margin-bottom: 10px;
}
.page-headline p, .forum-page-head p, .topic-hero p, .profile-hero p, .hero-strip p, .auth-panel p, .error-panel p,
.forum-row p, .member-card p, .application-card p, .comment-item p, .user-admin-card p { color: var(--text-soft); }
.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 191, 99, 0.08);
    border: 1px solid rgba(255, 191, 99, 0.14);
    color: var(--accent);
    font-size: 12px;
    font-weight: 450;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.empty-state { padding: 28px; text-align: center; color: var(--text-soft); }

.btn {
    min-height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-weight: 450;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }
.btn-primary {
    background: linear-gradient(135deg, rgba(255, 191, 99, 0.92), rgba(219, 150, 56, 0.92));
    color: #13181f;
    border-color: rgba(255, 191, 99, 0.7);
}
.btn-primary:hover { background: linear-gradient(135deg, #ffc671, #e2a347); color: #11161e; }
.btn-danger { background: rgba(223, 117, 117, 0.12); color: #ffd7d7; border-color: rgba(223, 117, 117, 0.28); }
.btn-danger:hover { background: rgba(223, 117, 117, 0.18); }
.btn-ghost { background: transparent; }
.accent-link { color: var(--accent); border-color: rgba(255, 191, 99, 0.16); background: rgba(255, 191, 99, 0.06); }

.tag, .role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 350;
    line-height: 1;
    white-space: nowrap;
}
.tag { background: rgba(255, 255, 255, 0.05); color: var(--text); border-color: var(--line); }
.tag.danger { background: rgba(223, 117, 117, 0.12); color: #ffd6d6; border-color: rgba(223, 117, 117, 0.22); }
.role-slate { background: rgba(158, 169, 189, 0.12); color: #d0d7e5; border-color: rgba(158, 169, 189, 0.22); }
.role-blue { background: rgba(80, 133, 240, 0.12); color: #b4cbff; border-color: rgba(80, 133, 240, 0.22); }
.role-cyan { background: rgba(77, 192, 215, 0.12); color: #b3f2ff; border-color: rgba(77, 192, 215, 0.22); }
.role-violet { background: rgba(138, 126, 248, 0.12); color: #ddd6ff; border-color: rgba(138, 126, 248, 0.22); }
.role-amber { background: rgba(255, 191, 99, 0.12); color: #ffd392; border-color: rgba(255, 191, 99, 0.22); }
.role-orange { background: rgba(255, 151, 83, 0.12); color: #ffd0af; border-color: rgba(255, 151, 83, 0.22); }
.role-pink { background: rgba(231, 118, 178, 0.12); color: #ffd3eb; border-color: rgba(231, 118, 178, 0.22); }
.role-red { background: rgba(223, 117, 117, 0.12); color: #ffd3d3; border-color: rgba(223, 117, 117, 0.22); }
.role-emerald { background: rgba(77, 180, 136, 0.12); color: #c8ffe6; border-color: rgba(77, 180, 136, 0.22); }
.role-gold { background: rgba(255, 208, 102, 0.16); color: #ffe7a1; border-color: rgba(255, 208, 102, 0.3); }

.avatar {
    border-radius: 50%;
    object-fit: cover;
    background: #10161f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.avatar.sm { width: 34px; height: 34px; }
.avatar.md { width: 44px; height: 44px; }
.avatar.lg { width: 68px; height: 68px; }
.avatar.xl { width: 86px; height: 86px; }
.avatar.xxl { width: 120px; height: 120px; }

/* ===== UNIVERSAL AVATAR ONLINE STATUS ===== */

.avatar-presence,
.forum-last-avatar-wrap,
.topics-last-avatar-wrap {
    --presence-dot-size: 11px;
    --presence-dot-border: #0b1017;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    border-radius: 999px;
    isolation: isolate;
    flex-shrink: 0;
}

.avatar-presence.sm  { --presence-dot-size: 9px; }
.avatar-presence.md  { --presence-dot-size: 10px; }
.avatar-presence.lg  { --presence-dot-size: 11px; }
.avatar-presence.xl  { --presence-dot-size: 12px; }
.avatar-presence.xxl { --presence-dot-size: 14px; }

.avatar-presence > img,
.avatar-presence > .avatar,
.avatar-presence > .classic-topic-avatar,
.avatar-presence > .forum-last-avatar,
.avatar-presence > .topics-last-avatar,
.forum-last-avatar-wrap > img,
.topics-last-avatar-wrap > img {
    display: block;
    border-radius: 999px;
}

.avatar-presence.is-online::before {
    content: "";
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.avatar-presence.is-online::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: var(--presence-dot-size);
    height: var(--presence-dot-size);
    border-radius: 50%;
    background: #43ff8f;
    border: 2px solid var(--presence-dot-border);
    box-shadow: 0 0 0 4px rgba(67, 255, 143, 0.16), 0 0 12px rgba(67, 255, 143, 0.65);
    z-index: 3;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(8, 12, 18, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
}
.topbar-inner {
    min-height: 92px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
}
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 10px 22px rgba(255, 191, 99, 0.14));
}
.brand-title { font-size: 24px; font-weight: 650; letter-spacing: 0.12em; }
.brand-subtitle { color: var(--text-soft); font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; }
.header-cluster {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    min-width: 0;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a, .header-actions > a {
    min-height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid transparent;
    color: #dbe3f1;
    font-size: 14px;
    font-weight: 450;
    white-space: nowrap;
    transition: .18s ease;
}
.main-nav a:hover, .main-nav a.active, .header-actions > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}
.main-nav a.active { box-shadow: inset 0 0 0 1px rgba(255, 191, 99, 0.2); }
.header-search input {
    width: 220px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 0 14px;
    outline: none;
}
.header-search input:focus, input:focus, textarea:focus, select:focus {
    border-color: rgba(124, 176, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(124, 176, 255, 0.14);
}
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}
.header-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}
.header-user img { width: 30px; height: 30px; }
.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); margin: 5px auto; border-radius: 999px; }

.subbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(90deg, rgba(11, 18, 27, 0.96), rgba(9, 13, 20, 0.96));
}
.subbar-inner {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.crumb-text { color: var(--text-soft); font-size: 13px; }
.subbar-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-soft); }
.subbar-stats b { color: var(--text); font-weight: 450; }

.banner-shell {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(9, 13, 21, 0.96), rgba(8, 11, 18, 0.94));
}
.banner-carousel { position: relative; }
.banner-track { position: relative; min-height: var(--banner-height, 320px); }
.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .45s ease;
    min-height: var(--banner-height, 320px);
}
.banner-slide.is-active { opacity: 1; pointer-events: auto; position: relative; }
.banner-slide img {
    width: 100%;
    height: var(--banner-height, 320px);
    object-fit: cover;
    filter: saturate(0.95) contrast(1.02);
}
.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 12, 18, 0.78), rgba(8, 12, 18, 0.22));
}
.banner-overlay-inner { height: 100%; display: flex; align-items: flex-end; }
.banner-copy {
    max-width: 560px;
    padding: 22px;
    margin: 0 0 28px;
}
.banner-copy h2 { font-size: clamp(24px, 2.2vw, 34px); margin: 8px 0 8px; }
.banner-copy p { color: #d7e0ec; }
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 12, 18, 0.58);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    backdrop-filter: blur(10px);
}
.banner-arrow.prev { left: 24px; }
.banner-arrow.next { right: 24px; }
.banner-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}
.banner-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.22);
    padding: 0;
}
.banner-dot.is-active { background: var(--accent); border-color: rgba(255, 191, 99, 0.8); }

.flash-stack { display: grid; gap: 12px; margin-bottom: 18px; }
.flash {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 450;
}
.flash-success { background: rgba(77, 180, 136, 0.12); border-color: rgba(77, 180, 136, 0.22); }
.flash-warning { background: rgba(255, 191, 99, 0.12); border-color: rgba(255, 191, 99, 0.22); }
.flash-danger { background: rgba(223, 117, 117, 0.12); border-color: rgba(223, 117, 117, 0.22); }
.flash-info { background: rgba(110, 160, 242, 0.12); border-color: rgba(110, 160, 242, 0.22); }

.hero-strip {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 22px;
    padding: 28px;
    margin-bottom: 22px;
    position: relative;
}
.hero-mini-stats, .stats-grid { display: grid; gap: 12px; }
.hero-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-mini-stats > div, .stats-grid > div {
    min-height: 110px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
}
.hero-mini-stats span, .stats-grid span, .stats-inline span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-soft);
    margin-bottom: 10px;
}
.hero-mini-stats strong, .stats-grid strong, .stats-inline strong { font-size: 32px; }
.stats-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.panel-head h2 { font-size: 24px; }
.panel-head span { color: var(--text-soft); font-size: 13px; }

.forum-section { margin-bottom: 18px; }
.forum-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.forum-section-head-copy {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.section-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 191, 99, 0.18), rgba(124, 176, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.section-icon::after {
    content: "";
    position: absolute;
    inset: 11px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.78);
    opacity: .55;
}
.section-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}
.forum-section-head h2 {
    font-size: 20px;
    font-weight:450;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 4px;
}
.forum-section-head h2 a {
    color: #eef3fb;
    font-weight: 450;
}
.forum-section-head h2 a:hover {
    color: var(--accent);
}
.forum-section-head span { color: var(--text-soft); }
.forum-section-head-copy > div > span {
    display: block;
    font-size: 14px;
    line-height: 1.45;
    color: #9aa8bc;
}
.forum-section-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-soft);
    font-size: 13px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
}
.forum-section-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text);
}
.forum-section-toggle i {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
    margin-top: -3px;
}
.forum-section.is-collapsed .forum-section-toggle i { transform: rotate(-135deg); margin-top: 3px; }
.forum-section.is-collapsed .forum-section-body { display: none; }

.forum-directory-head,
.forum-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 80px 90px minmax(240px, 320px);
    gap: 16px;
    align-items: center;
    padding: 14px 22px;
}
.forum-directory-head {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-soft);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.forum-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background .18s ease;
}
.forum-row:last-child { border-bottom: 0; }
.forum-row:hover { background: rgba(255,255,255,0.025); }

.forum-row-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.forum-icon.lg { width: 52px; height: 52px; }

.forum-row-copy {
    min-width: 0;
}
.forum-row-copy h3 {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 6px;
}
.forum-row-copy h3 a:hover { color: var(--accent); }
.forum-row-copy p {
    font-size: 14px;
    line-height: 1.45;
    color: #9aa8bc;
}

.forum-row-count {
    font-size: 16px;
    font-weight: 400;
    color: #dbe6f5;
    text-align: center;
}

.forum-row-last {
    display: grid;
    gap: 8px;
    min-width: 0;
    max-width: 320px;
}
.forum-row-last-topic {
    font-weight: 400;
    font-size: 14px;
    line-height: 1.35;
    color: #dde7f5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.forum-row-last-topic:hover { color: var(--accent); }

.user-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-inline > div { display: grid; gap: 2px; }
.user-inline span { font-size: 13px; }
.user-inline small {
    display: block;
    font-size: 12px;
}
.user-inline.muted-card {
    padding: 8px 10px;
    border-radius: 12px;
}
.muted-card {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 14px;
}
.breadcrumbs a:hover { color: #fff; }

.forum-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.forum-page-brand { display: flex; align-items: center; gap: 16px; }

.topics-header,
.topics-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, .8fr) 150px minmax(220px, .9fr);
    gap: 16px;
    align-items: center;
    padding: 16px 22px;
}
.topics-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 12px;
    color: var(--text-soft);
}
.topics-row { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.topics-row:last-child { border-bottom: 0; }
.topics-row-main { display: flex; align-items: flex-start; gap: 14px; }
.topic-status-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    margin-top: 5px;
    flex-shrink: 0;
}
.topic-status-icon.pinned { background: rgba(255, 191, 99, 0.9); }
.topic-status-icon.locked { background: rgba(223, 117, 117, 0.9); }
.topics-row-author, .topics-row-last { display: flex; align-items: center; gap: 12px; }
.topics-row-author > div, .topics-row-last > div { display: grid; gap: 4px; }
.topics-row-stats strong { display: block; font-size: 28px; }
.topic-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.topic-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    margin-bottom: 18px;
    overflow: visible !important;
}
.topic-actions-inline {
    position: relative;
    overflow: visible !important;
    align-self: flex-start;
    margin-left: auto;
    margin-top: 8px;
    width: min(470px, 100%);
    z-index: 80;
}
.topic-hero-main { display: grid; gap: 14px; }
.topic-starter-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    max-width: 440px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}
.posts-stack { display: grid; gap: 14px; margin-bottom: 20px; }
.post-card {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 220px;
}
.post-author {
    padding: 24px;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
}
.post-author-meta { display: grid; gap: 8px; justify-items: center; text-align: center; }
.post-author-meta small { font-size: 13px; }
.post-body { padding: 22px 24px; display: grid; gap: 16px; min-width: 0; }
.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-soft);
    font-size: 14px;
}
.post-index {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}
.post-content { min-width: 0; }
.formatted-content,
.formatted-content * { max-width: 100%; }
.formatted-content {
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}
.formatted-content p,
.formatted-content ul,
.formatted-content ol,
.formatted-content blockquote,
.formatted-content pre,
.formatted-content h1,
.formatted-content h2,
.formatted-content h3,
.formatted-content h4 { margin: 0 0 14px; }
.formatted-content h1 { font-size: 2rem; font-weight: 400; }
.formatted-content h2 { font-size: 1.6rem; font-weight: 400; }
.formatted-content h3 { font-size: 1.3rem; font-weight: 400; }
.formatted-content h4 { font-size: 1.1rem; font-weight: 400; }
.formatted-content blockquote {
    padding: 14px 16px;
    border-left: 3px solid rgba(255, 191, 99, 0.5);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: #dde5f0;
}
.formatted-content code, .formatted-content pre {
    background: rgba(0, 0, 0, 0.28);
    border-radius: 10px;
}
.formatted-content pre { padding: 14px; overflow-x: auto; }
.formatted-content img {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 560px;
    object-fit: contain;
}
.formatted-content a { color: #9cc2ff; text-decoration: underline; text-decoration-color: rgba(156, 194, 255, 0.45); }

.topic-mini-list { display: grid; gap: 10px; }
.topic-mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
}
.topic-mini-item span { display: block; color: var(--text-soft); margin-top: 4px; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="search"], textarea, select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    padding: 12px 14px;
    outline: none;
}
textarea { resize: vertical; min-height: 110px; }
label { display: grid; gap: 8px; color: var(--text-soft); font-size: 14px; }
.check, .admin-settings-form label > input[type="checkbox"] { display: inline-flex; }
input[type="checkbox"] { accent-color: var(--accent); }

.auth-layout { max-width: 580px; margin: 0 auto; }
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}
.member-card {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.03);
    display: grid;
    gap: 10px;
    align-content: start;
    justify-items: start;
}
.member-card span { color: var(--text-soft); }
.profile-main { display: flex; gap: 18px; align-items: center; }
.profile-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--text-soft); }
.profile-columns { align-items: start; }
.ban-box {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(223, 117, 117, 0.12);
    border: 1px solid rgba(223, 117, 117, 0.22);
}
.comment-list { display: grid; gap: 12px; }
.comment-item {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.03);
    display: grid;
    gap: 12px;
}
.comment-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comment-user { display: flex; align-items: center; gap: 12px; }
.comment-user > div { display: grid; gap: 6px; }

.search-main-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.admin-sidebar { position: sticky; top: 108px; }
.admin-sidebar-head { display: grid; gap: 12px; margin-bottom: 16px; }
.admin-nav-list { display: grid; gap: 8px; }
.admin-nav-list a {
    min-height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    border: 1px solid transparent;
    color: var(--text-soft);
    background: rgba(255,255,255,0.03);
}
.admin-nav-list a.active, .admin-nav-list a:hover { color: #fff; border-color: var(--line); background: rgba(255,255,255,0.06); }
.admin-main { min-width: 0; }
.admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.application-card, .user-admin-card, .banner-admin-card { padding: 22px; }
.application-head, .user-admin-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}
.permission-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}
.permission-item span { display: grid; gap: 4px; }
.permission-item small { color: var(--text-soft); }
.permissions-grid.is-disabled { opacity: 0.75; }
.log-list { display: grid; gap: 10px; }
.log-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}
.banner-admin-card {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 18px;
}
.banner-admin-preview {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}
.banner-admin-preview img { width: 100%; height: 100%; min-height: 180px; object-fit: cover; }
.banner-admin-body { display: grid; gap: 14px; align-content: start; }

.footer-watermark {
    position: absolute;
    inset: auto auto 90px max(20px, 3vw);
    font-size: clamp(54px, 12vw, 180px);
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.025);
    letter-spacing: 0.18em;
    pointer-events: none;
}
.site-footer {
    position: relative;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(180deg, rgba(8, 11, 17, 0.96), rgba(6, 9, 14, 0.98));
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr .9fr .9fr;
    gap: 18px;
    padding: 34px 0 44px;
}
.footer-panel {
    padding: 22px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.03);
    position: relative;
    z-index: 1;
}
.footer-panel h3 { margin-bottom: 12px; font-size: 20px; }
.footer-panel p { color: var(--text-soft); }
.footer-links { display: grid; gap: 10px; }
.footer-links a { color: var(--text-soft); }
.footer-links a:hover { color: #fff; }

.rich-editor-shell {
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.03);
    overflow: hidden;
}
.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
}
.rich-editor-toolbar button, .rich-editor-toolbar select, .rich-editor-toolbar label {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.04);
    color: var(--text);
}
.rich-editor-toolbar label { display: inline-flex; align-items: center; gap: 8px; }
.rich-editor-toolbar input { display: none; }
.rich-editor-area {
    min-height: 230px;
    padding: 16px;
    outline: none;
    color: var(--text);
}
.rich-editor-hint {
    padding: 0 16px 14px;
    color: var(--text-soft);
    font-size: 13px;
}

@media (max-width: 1280px) {
    .container { width: min(var(--container), calc(100% - 28px)); max-width: calc(100% - 28px); }
    .header-search input { width: 180px; }
    .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
    .topbar-inner { grid-template-columns: auto auto; }
    .nav-toggle { display: inline-block; justify-self: end; }
    .header-cluster {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 1px);
        background: rgba(9, 13, 20, 0.98);
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding: 16px max(14px, calc((100vw - min(var(--container), calc(100vw - 28px))) / 2));
        display: none;
        grid-template-columns: 1fr;
    }
    .topbar.is-open .header-cluster { display: grid; }
    .main-nav, .header-actions { flex-wrap: wrap; overflow: visible; }
    .header-search input { width: 100%; }
    .admin-layout, .footer-grid, .banner-admin-card, .hero-strip, .topic-hero, .forum-page-head, .post-card, .two-col, .three-col, .four-col { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; }
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .forum-directory-head, .forum-row, .topics-header, .topics-row { grid-template-columns: 1fr; }
    .forum-directory-head { display: none; }
    .forum-row, .topics-row { gap: 12px; }
    .forum-row-last { max-width: none; }
    .post-author { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
}

@media (max-width: 760px) {
    .page-content { padding-top: 20px; }
    .brand-logo { width: 56px; height: 56px; }
    .brand-title { font-size: 20px; }
    .subbar-inner, .comment-head, .application-head, .user-admin-head, .panel-head { flex-direction: column; align-items: flex-start; }
    .banner-arrow { display: none; }
    .banner-copy { margin: 0 0 22px; padding: 18px; }
    .banner-copy h2 { font-size: 22px; }
    .hero-mini-stats, .stats-grid.compact, .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .forum-row-copy h3, .forum-section-head h2 { font-size: 18px; }
    .topics-row-stats strong, .forum-row-count { font-size: 18px; }
    .profile-main { flex-direction: column; align-items: flex-start; }
    .search-main-form { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .container { width: min(var(--container), calc(100% - 18px)); max-width: calc(100% - 18px); }
    .latest-panel, .form-panel, .topic-hero, .forum-page-head, .profile-hero, .auth-panel, .error-panel, .admin-sidebar, .application-card, .user-admin-card, .banner-admin-card { padding: 18px; }
    .hero-mini-stats, .stats-grid.compact { grid-template-columns: 1fr; }
    .brand-title { font-size: 18px; letter-spacing: 0.1em; }
}

/* --- professional masthead redesign override --- */
body.has-masthead {
    background:
        radial-gradient(circle at top center, rgba(255, 191, 99, 0.09), transparent 18%),
        radial-gradient(circle at 82% 12%, rgba(124, 176, 255, 0.12), transparent 20%),
        linear-gradient(180deg, #07111d 0%, #08111a 24%, #071018 100%);
}

.masthead {
    position: relative;
    min-height: var(--banner-height, 520px);
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    background: #07101a;
}

.masthead-media,
.masthead-media .banner-track,
.masthead-media .banner-slide,
.masthead-media .banner-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.masthead-media {
    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 58%,
        rgba(0, 0, 0, 0.35) 86%,
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 58%,
        rgba(0, 0, 0, 0.35) 86%,
        rgba(0, 0, 0, 0) 100%
    );
}

.masthead-media .banner-track { min-height: 100%; }
.masthead-media .banner-slide { opacity: 0; transition: opacity .45s ease; }
.masthead-media .banner-slide.is-active { opacity: 1; }
.masthead-media .banner-slide img { object-fit: cover; }

.masthead::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(3, 7, 12, 0.4) 0%, rgba(4, 10, 16, 0.2) 40%, rgba(6, 12, 19, 0.6) 100%),
        radial-gradient(circle at 18% 35%, rgba(255, 191, 99, 0.1), transparent 18%),
        radial-gradient(circle at 86% 32%, rgba(124, 176, 255, 0.13), transparent 18%);
    z-index: 1;
    pointer-events: none;
}

.masthead-top,
.masthead-utility-wrap,
.masthead-content {
    position: relative;
    z-index: 2;
}
.masthead-top {
    padding-top: 16px;
    background: transparent;
    border-bottom: 0;
    backdrop-filter: none;
}
.topbar-inner-masthead {
    min-height: 72px;
    padding: 0 20px;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 22px;
    background: rgba(7, 13, 21, 0.72);
    box-shadow: 0 12px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}
.brand-on-banner .brand-logo {
    width: 50px;
    height: 50px;
}
.brand-on-banner .brand-title { font-size: 18px; letter-spacing: 0.1em; }
.brand-on-banner .brand-subtitle { color: rgba(220, 230, 243, 0.72); }
.main-nav-banner { justify-content: flex-end; }
.main-nav-banner a {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}
.main-nav-banner a.active,
.main-nav-banner a:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.12);
}
.masthead-utility-wrap {
    position: center;
    top: 0px;
    z-index: 999;
    margin-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(5, 10, 16, 0.34);
    backdrop-filter: blur(10px);
}
.masthead-utility {
    min-height: 56px;
    display: grid;
    grid-template-columns: 1.2fr auto auto;
    gap: 16px;
    align-items: center;
}
.masthead-utility-copy {
    color: rgba(222, 231, 243, 0.82);
    font-size: 13px;
    line-height: 1.45;
}
.utility-search input {
    width: 260px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
}
body.has-masthead .utility-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}
body:not(.has-masthead) .utility-search input::placeholder {
    color: rgba(166, 178, 196, 0.90);
}
.utility-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}
.utility-actions > a,
.utility-actions .role-badge,
.header-user {
    min-height: 38px;
    border-radius: 12px;
}
.header-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    min-height: auto;
    border: none;
    background: transparent;
    box-shadow: none;
}
.header-user img {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.08);
}
.masthead-content {
    min-height: 380px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 320px;
    align-items: end;
    gap: 22px;
    padding: 108px 0 42px;
}
.masthead-copy-card {
    max-width: 720px;
    padding: 28px 30px;
    background: linear-gradient(180deg, rgba(8, 15, 24, 0.68), rgba(8, 14, 24, 0.82));
}
.masthead-copy-card h1 {
    margin: 12px 0 14px;
    font-size: clamp(34px, 4.2vw, 68px);
    line-height: .98;
}
.masthead-copy-card p {
    max-width: 620px;
    color: #d4deeb;
    font-size: 18px;
}
.masthead-stats {
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-self: center;
}
.masthead-stats div {
    min-height: 112px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    display: grid;
    align-content: space-between;
}
.masthead-stats span { color: var(--text-soft); font-size: 13px; }
.masthead-stats strong { font-size: 34px; line-height: 1; }

.utility-subbar {
    background: rgba(7, 12, 18, 0.9);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.compact-utility { grid-template-columns: 1fr auto auto; }

.page-content { padding-top: 12px; }
.home-intro-panel {
    margin-top: 0;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    padding: 26px;
    border-radius: 24px;
}
.home-intro-panel h2 { font-size: clamp(28px, 2.6vw, 42px); margin: 12px 0 10px; }
.home-intro-stats div {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
}

.forum-section {
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(12, 20, 31, 0.96), rgba(9, 15, 24, 0.98));
}
.forum-section-head {
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
}
.forum-section-head h2 {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.forum-section-head h2 a {
    color: #eef3fb;
    font-weight: 400;
}
.forum-section-head h2 a:hover {
    color: var(--accent);
}
.forum-directory-head {
    padding: 14px 22px;
    background: rgba(255,255,255,0.02);
    color: #94a6bd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
}
.forum-row {
    padding: 14px 22px;
    border-top: 1px solid rgba(255,255,255,0.05);
    transition: background .18s ease;
}
.forum-row-copy p {
    font-size: 14px;
    line-height: 1.45;
    color: #9aa8bc;
}
.forum-row:hover { background: rgba(255,255,255,0.025); }
.forum-row-copy h3 {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 6px;
}
.forum-row-copy h3 a:hover { color: var(--accent); }
.forum-row-last-topic { font-weight: 400; }
.forum-row-last-topic:hover { color: var(--accent); }
.forum-row-count {
    font-size: 16px;
    font-weight: 400;
    color: #dbe6f5;
}
.latest-panel,
.forum-page-head,
.topic-hero,
.profile-hero,
.auth-panel,
.error-panel,
.form-panel {
    border-radius: 24px;
}
.topic-mini-item,
.topics-row,
.comment-item,
.post-card {
    border-radius: 18px;
}

@media (max-width: 1120px) {
    .masthead-content,
    .home-intro-panel,
    .masthead-utility,
    .compact-utility {
        grid-template-columns: 1fr;
    }
    .masthead-content { padding-top: 84px; }
    .masthead-stats { width: 100%; max-width: 720px; }
    .topbar-inner-masthead {
        grid-template-columns: auto auto;
        padding: 14px 16px;
    }
    .masthead-top .header-cluster {
        top: calc(100% + 10px);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 18px;
        background: rgba(8, 13, 21, 0.96);
    }
    .main-nav-banner { justify-content: flex-start; }
    .utility-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
    .masthead { min-height: 0; }
    .masthead-content { min-height: 0; padding: 38px 0 24px; }
    .masthead-copy-card { padding: 20px; }
    .masthead-copy-card h1 { font-size: 34px; }
    .masthead-copy-card p { font-size: 16px; }
    .masthead-stats { grid-template-columns: 1fr 1fr; }
    .utility-search input { width: 100%; }
    .brand-on-banner .brand-subtitle,
    .masthead-utility-copy { display: none; }
}

@media (max-width: 520px) {
    .masthead-stats,
    .home-intro-stats,
    .hero-mini-stats { grid-template-columns: 1fr; }
    .topbar-inner-masthead,
    .masthead-top .topbar-inner,
    .compact-topbar .topbar-inner { border-radius: 18px; }
    .masthead-copy-card h1 { font-size: 28px; }
}

/* ===== compact forum list / last activity ===== */

.forum-directory-head,
.forum-row {
    grid-template-columns: minmax(0, 1.7fr) 80px 90px minmax(260px, 360px);
    gap: 16px;
    align-items: center;
    padding: 14px 22px;
}

.forum-row {
    min-height: 82px;
}

.forum-row-main {
    min-width: 0;
}

.forum-row-copy h3 {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 4px;
}

.forum-row-copy p {
    font-size: 14px;
    line-height: 1.4;
    color: #98a7bc;
}

.forum-row-count {
    font-size: 15px;
    font-weight: 400;
    text-align: center;
    color: #d9e4f3;
}

.forum-row-last,
.forum-row-last-meta,
.forum-row-last-user,
.forum-row-last-topic-wrap {
    min-width: 0;
}

.forum-row-last {
    max-width: 360px;
    display: grid;
    gap: 8px;
    align-content: center;
}

.forum-row-last-topic-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.forum-row-last-topic-wrap .topic-prefix-tag {
    flex: 0 0 auto;
    margin: 0;
}

.forum-row-last-topic {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #eef3fb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-row-last-topic:hover {
    color: var(--accent);
}

.forum-row-last-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.forum-last-avatar-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
}

.forum-last-avatar {
    position: relative;
    z-index: 2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.forum-last-avatar-wrap.is-online::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(70, 255, 140, 0.34) 0%,
        rgba(70, 255, 140, 0.18) 45%,
        rgba(70, 255, 140, 0) 72%
    );
    filter: blur(6px);
    z-index: 1;
    pointer-events: none;
}

.forum-last-avatar-wrap.is-online::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #43ff8f;
    border: 2px solid #0b1017;
    box-shadow:
        0 0 0 4px rgba(67, 255, 143, 0.16),
        0 0 12px rgba(67, 255, 143, 0.65);
    z-index: 3;
}

.forum-row-last-user {
    display: grid;
    gap: 2px;
}

.forum-row-last-author {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #d9e4f3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-row-last-user small {
    font-size: 12px;
    color: #8797ad;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== topics page last message compact style ===== */

.topics-row-last {
    min-width: 0;
    display: grid;
    gap: 8px;
    align-content: center;
}

.topics-last-topic {
    display: block;
    max-width: 100%;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #eef3fb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topics-last-topic:hover {
    color: var(--accent);
}

.topics-last-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.topics-last-avatar-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
}

.topics-last-avatar {
    position: relative;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.topics-last-avatar-wrap.is-online::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(70, 255, 140, 0.34) 0%, rgba(70, 255, 140, 0.18) 45%, rgba(70, 255, 140, 0) 72%);
    filter: blur(6px);
    z-index: 1;
    pointer-events: none;
}

.topics-last-avatar-wrap.is-online::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #43ff8f;
    border: 2px solid #0b1017;
    box-shadow: 0 0 0 4px rgba(67, 255, 143, 0.16), 0 0 12px rgba(67, 255, 143, 0.65);
    z-index: 3;
}

.topics-last-user {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.topics-last-author {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #d9e4f3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topics-last-user small {
    font-size: 12px;
    color: #8797ad;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1120px) {
    .forum-row-last,
    .topics-row-last {
        max-width: none;
    }

    .forum-row-last-topic,
    .forum-row-last-author,
    .forum-row-last-user small,
    .topics-last-topic,
    .topics-last-author,
    .topics-last-user small {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

/* ===== forum icons & generic topic tags ===== */

.forum-icon-wrap {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0;
    overflow: visible;
    flex-shrink: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.forum-icon {
    width: auto;
    height: auto;
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
    display: block;
}

.topic-prefix-tag {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.topic-prefix-tag.info {
    background: #11a63a;
    color: #fff;
    border-color: #11a63a;
}

.topic-prefix-tag.pinned {
    background: #c58a12;
    color: #fff;
    border-color: #c58a12;
}

.topic-prefix-tag.open {
    background: #0e8fcb;
    color: #fff;
    border-color: #0e8fcb;
}

.topic-prefix-tag.closed {
    background: #c23a3a;
    color: #fff;
    border-color: #c23a3a;
}

.topic-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.topic-title-inline {
    display: inline;
    margin: 0;
}

.topic-title-inline a {
    display: inline;
}

.topic-title-line .topic-prefix-tag,
.topic-title-line .tag {
    margin: 0;
    flex: 0 0 auto;
}

/* ===== forum topics: adapted to site palette ===== */

.classic-topics-panel {
    padding: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
}

.classic-topics-list {
    display: grid;
}

.classic-topic-row {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) 64px 200px 210px;
    align-items: stretch;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.012)),
        linear-gradient(180deg, rgba(8,12,18,0.62), rgba(12,16,24,0.78));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.classic-topic-row:last-child {
    border-bottom: 0;
}

.classic-topic-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: stretch;
}

.classic-topic-avatar-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.classic-topic-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.classic-topic-copy {
    min-width: 0;
    padding: 16px 22px;
    display: grid;
    align-content: center;
    gap: 6px;
}

.classic-topic-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.classic-topic-prefix {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 350;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
    border: 1px solid transparent;
}

.classic-topic-prefix.info {
    background: #1ecb55;
    border-color: rgba(255,255,255,0.08);
}

.classic-topic-prefix.pinned {
    background: #d59b2d;
    border-color: rgba(255,255,255,0.08);
}

.classic-topic-prefix.open {
    background: #2d7be7;
    border-color: rgba(255,255,255,0.08);
}

.classic-topic-prefix.closed {
    background: #de5454;
    border-color: rgba(255,255,255,0.08);
}

.classic-topic-title {
    min-width: 0;
    color: var(--heading);
    font-size: 17px;
    font-weight: 350;
    line-height: 1.25;
    text-decoration: none;
}

.classic-topic-title:hover {
    color: #fff;
}

.classic-topic-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-soft);
}

.classic-topic-meta-author {
    font-weight: 400;
}

.presence-inline {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.presence-inline.online {
    color: #57e38f;
}

.presence-inline.offline {
    color: #8f9bad;
}

.classic-topic-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.015);
    color: #9aa4b4;
}

.classic-topic-state svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

.classic-topic-state.is-pinned {
    color: #d59b2d;
}

.classic-topic-state.is-locked {
    color: #de5454;
}

.classic-topic-stats,
.classic-topic-last {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.012);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.classic-topic-stats div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--text-soft);
}

.classic-topic-stats strong {
    color: var(--heading);
    font-size: 13px;
    font-weight: 400;
}

.classic-topic-last {
    justify-items: end;
    text-align: right;
}

.classic-topic-last-date {
    font-size: 16px;
    font-weight: 400;
    color: var(--heading);
    line-height: 1.2;
}

.classic-topic-last-author {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
}

.classic-topics-empty {
    padding: 24px;
    background: rgba(255, 255, 255, 0.012);
    color: var(--text-soft);
    font-size: 14px;
}

@media (max-width: 1180px) {
    .classic-topic-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .classic-topic-state,
    .classic-topic-stats,
    .classic-topic-last {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .classic-topic-state {
        justify-content: flex-start;
        padding: 12px 22px;
    }

    .classic-topic-stats,
    .classic-topic-last {
        padding: 14px 22px;
    }

    .classic-topic-last {
        justify-items: start;
        text-align: left;
    }
}

@media (max-width: 720px) {
    .classic-topic-main {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .classic-topic-avatar-cell {
        padding: 12px 8px;
    }

    .classic-topic-avatar {
        width: 36px;
        height: 36px;
    }

    .classic-topic-copy {
        padding: 12px 14px;
    }

    .classic-topic-title {
        font-size: 15px;
    }

    .classic-topic-last-date {
        font-size: 14px;
    }
}

/* ===== role text colors ===== */

.role-text-slate { color: #d0d7e5; }
.role-text-blue { color: #b4cbff; }
.role-text-cyan { color: #b3f2ff; }
.role-text-violet { color: #ddd6ff; }
.role-text-amber { color: #ffd392; }
.role-text-orange { color: #ffd0af; }
.role-text-pink { color: #ffd3eb; }
.role-text-red { color: #ffd3d3; }
.role-text-emerald { color: #c8ffe6; }
.role-text-gold { color: #ffe7a1; }

/* ===== topic hero tags ===== */

.topic-hero .topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.topic-hero .topic-tags .tag,
.topic-hero .topic-tags .topic-prefix-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.topic-hero .topic-tags .topic-prefix-tag.info {
    background: linear-gradient(180deg, #18bb49, #109738);
    border-color: rgba(70, 255, 140, 0.24);
    color: #fff;
}

.topic-hero .topic-tags .topic-prefix-tag.open {
    background: linear-gradient(180deg, #2b9df2, #1879d4);
    border-color: rgba(124, 176, 255, 0.28);
    color: #fff;
}

.topic-hero .topic-tags .topic-prefix-tag.closed {
    background: linear-gradient(180deg, #dc5454, #b93f3f);
    border-color: rgba(255, 120, 120, 0.24);
    color: #fff;
}

.topic-hero .topic-tags .tag:not(.topic-prefix-tag) {
    background: rgba(255,255,255,0.06);
    color: #dfe7f5;
    border-color: rgba(255,255,255,0.08);
}

/* ===== strict topic tags ===== */

.topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.topic-tags .tag,
.topic-prefix-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: none;
}

.topic-prefix-tag.info {
    background: #14853a;
    border-color: #1d9c47;
    color: #fff;
}

.topic-prefix-tag.open {
    background: #1d5fa8;
    border-color: #2f78c9;
    color: #fff;
}

.topic-prefix-tag.closed {
    background: #8d2e2e;
    border-color: #b24545;
    color: #fff;
}

.topic-tags .tag:not(.topic-prefix-tag) {
    background: rgba(255,255,255,0.04);
    color: #d9e2ef;
    border-color: rgba(255,255,255,0.08);
}

/* ===== topic moderation mini list redesign ===== */

.topic-actions-inline {
    position: relative;
    align-self: flex-start;
    margin-left: auto;
    width: min(290px, 100%);
    z-index: 120;
}

.topic-mod-menu {
    position: relative;
    width: 100%;
}

.topic-mod-trigger {
    list-style: none;
    width: 100%;
    min-height: 54px;
    padding: 10px 12px 10px 14px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(24,31,47,0.96), rgba(11,16,27,0.96));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 12px 26px rgba(0,0,0,0.14);
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.topic-mod-trigger:hover,
.topic-mod-menu[open] .topic-mod-trigger {
    border-color: rgba(255,196,108,0.22);
    background: linear-gradient(180deg, rgba(29,38,58,0.98), rgba(13,19,31,0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 16px 34px rgba(0,0,0,0.18);
    transform: translateY(-1px);
}

.topic-mod-trigger::-webkit-details-marker {
    display: none;
}

.topic-mod-trigger-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.topic-mod-trigger-kicker {
    color: #f4c66e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.topic-mod-trigger-title {
    color: #f1f5fb;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 800;
}

.topic-mod-trigger-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topic-mod-trigger-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: #e7edf7;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.topic-mod-trigger-status.info {
    background: rgba(20,133,58,0.16);
    border-color: rgba(29,156,71,0.32);
    color: #dbffe6;
}

.topic-mod-trigger-status.open {
    background: rgba(29,95,168,0.16);
    border-color: rgba(47,120,201,0.32);
    color: #ddeaff;
}

.topic-mod-trigger-status.closed {
    background: rgba(140,49,49,0.18);
    border-color: rgba(188,74,74,0.30);
    color: #ffdcdc;
}

.topic-mod-trigger-chevron {
    width: 9px;
    height: 9px;
    border-right: 2px solid #8fa0b7;
    border-bottom: 2px solid #8fa0b7;
    transform: rotate(45deg) translateY(-1px);
    transition: transform .18s ease, border-color .18s ease;
}

.topic-mod-menu[open] .topic-mod-trigger-chevron {
    transform: rotate(-135deg) translateY(-1px);
    border-color: #ffd08b;
}

.topic-mod-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(290px, calc(100vw - 44px));
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(circle at top right, rgba(255,198,108,0.08), transparent 36%),
        linear-gradient(180deg, rgba(10,15,24,0.985), rgba(7,11,19,0.99));
    box-shadow: 0 24px 48px rgba(0,0,0,0.28);
    backdrop-filter: blur(14px);
    display: grid;
    gap: 10px;
    z-index: 140;
}

.topic-mod-mini-head,
.topic-mod-mini-group {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
}

.topic-mod-mini-head strong {
    color: #f2f6fd;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
}

.topic-mod-mini-head span {
    color: #92a4bb;
    font-size: 12px;
    line-height: 1.4;
}

.topic-mod-mini-label {
    color: #90a2ba;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topic-mod-tags {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.topic-mod-tags form,
.topic-mod-actions form {
    margin: 0;
}

.topic-mod-tags form:last-child {
    grid-column: 1 / -1;
}

.topic-mod-tag-btn,
.topic-mod-action-btn {
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: #eef3fb;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.topic-mod-tag-btn:hover,
.topic-mod-action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 10px 20px rgba(0,0,0,0.14);
}

.topic-mod-tag-btn.is-active {
    box-shadow: 0 0 0 1px rgba(255,196,108,0.34) inset;
}

.topic-mod-tag-btn.info {
    background: rgba(20,133,58,0.16);
    border-color: rgba(29,156,71,0.34);
    color: #dbffe6;
}

.topic-mod-tag-btn.open {
    background: rgba(29,95,168,0.16);
    border-color: rgba(47,120,201,0.34);
    color: #ddeaff;
}

.topic-mod-tag-btn.neutral {
    color: #dde5f1;
}

.topic-mod-actions,
.topic-mod-actions-compact {
    display: grid;
    gap: 8px;
}

.topic-mod-action-btn {
    justify-content: flex-start;
    text-align: left;
    padding: 0 14px;
}

.topic-mod-action-btn.pinned {
    background: rgba(160,115,36,0.22);
    border-color: rgba(199,145,52,0.34);
    color: #ffe2a8;
}

.topic-mod-action-btn.closed {
    background: rgba(140,49,49,0.22);
    border-color: rgba(188,74,74,0.34);
    color: #ffd4d4;
}

.topic-mod-action-btn.danger {
    background: rgba(82,32,42,0.26);
    border-color: rgba(145,68,82,0.34);
    color: #ffd2da;
}

@media (max-width: 980px) {
    .topic-actions-inline {
        width: 100%;
        margin-left: 0;
    }

    .topic-mod-dropdown {
        position: static;
        width: 100%;
        margin-top: 10px;
    }
}

@media (max-width: 560px) {
    .topic-mod-trigger {
        padding: 10px 12px;
    }

    .topic-mod-trigger-title {
        font-size: 13px;
    }

    .topic-mod-trigger-meta {
        gap: 6px;
    }

    .topic-mod-trigger-status {
        padding: 0 8px;
        font-size: 9px;
    }

    .topic-mod-tags {
        grid-template-columns: 1fr;
    }

    .topic-mod-tags form:last-child {
        grid-column: auto;
    }
}


.panel.topic-hero {
    overflow: visible !important;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

/* НАВИГАЦИЯ — БЕЗ КВАДРАТОВ И КНОПОК */
.main-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    padding: 0;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: rgba(235, 241, 250, 0.78);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-decoration: none;
    transition:
        color .26s ease,
        text-shadow .26s ease,
        opacity .26s ease;
}

/* мягкий свет над линией */
.main-nav a::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 10px;
    width: 54px;
    height: 18px;
    transform: translateX(-50%) scale(0.45);
    transform-origin: center;
    opacity: 0;
    pointer-events: none;

    background: radial-gradient(
        circle,
        rgba(255, 196, 107, 0.34) 0%,
        rgba(255, 196, 107, 0.14) 45%,
        rgba(255, 196, 107, 0) 80%
    );

    filter: blur(10px);

    transition:
        transform .34s cubic-bezier(.22, 1, .36, 1),
        opacity .28s ease;
}

/* линия снизу */
.main-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 14px;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    opacity: 0;
    border-radius: 999px;
    pointer-events: none;

    background: linear-gradient(
        90deg,
        rgba(255, 196, 107, 0) 0%,
        rgba(255, 196, 107, 0.95) 20%,
        rgba(255, 230, 185, 1) 50%,
        rgba(255, 196, 107, 0.95) 80%,
        rgba(255, 196, 107, 0) 100%
    );

    box-shadow:
        0 0 10px rgba(255, 196, 107, 0.55),
        0 0 20px rgba(255, 196, 107, 0.14);

    transition:
        width .34s cubic-bezier(.22, 1, .36, 1),
        opacity .24s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow:
        0 0 10px rgba(255, 196, 107, 0.10),
        0 -2px 14px rgba(255, 196, 107, 0.08);
}

.main-nav a:hover::before,
.main-nav a.active::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: calc(100% + 10px);
    opacity: 1;
}

.main-nav a:focus-visible {
    outline: none;
    color: #fff;
}

.main-nav a:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.main-nav a:focus-visible::after {
    width: calc(100% + 10px);
    opacity: 1;
}

/* баннерная версия тоже без фонов */
.main-nav-banner {
    justify-content: flex-end;
}

.main-nav-banner a,
.main-nav-banner a:hover,
.main-nav-banner a.active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* КНОПКИ СПРАВА ОСТАЮТСЯ КНОПКАМИ */
.header-actions > a {
    min-height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid transparent;
    color: #dbe3f1;
    font-size: 14px;
    font-weight: 450;
    white-space: nowrap;
    transition: .18s ease;
}

.header-actions > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

/* ===== PROFILE REWORK ===== */

.forum-profile,
.forum-profile-settings {
    display: grid;
    gap: 18px;
}

.forum-profile-hero {
    padding: 0;
    overflow: hidden;
    border-radius: 22px;
}

.forum-profile-banner {
    position: relative;
    min-height: 300px;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 191, 99, 0.2), transparent 22%),
        linear-gradient(135deg, rgba(30, 35, 51, 0.98), rgba(14, 19, 30, 0.98));
    background-size: cover;
    background-position: center;
}

.forum-profile-banner.has-image {
    background-size: cover;
    background-position: center;
}

.forum-profile-banner-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 12, 18, 0.2) 0%, rgba(8, 12, 18, 0.55) 55%, rgba(8, 12, 18, 0.96) 100%);
    pointer-events: none;
}

.forum-profile-topline,
.forum-profile-head,
.forum-profile-strip {
    position: relative;
    z-index: 1;
}

.forum-profile-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 0;
}

.forum-profile-head {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    padding: 112px 20px 20px;
}

.forum-profile-avatar {
    position: relative;
    width: 128px;
    height: 128px;
}

.forum-profile-avatar img {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 191, 99, 0.45);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: border-color .22s ease, box-shadow .22s ease;
}

.forum-profile-avatar.is-online img {
    border: 3px solid rgba(67, 255, 143, 0.78);
    box-shadow:
        0 0 0 1px rgba(67, 255, 143, 0.18),
        0 0 10px rgba(67, 255, 143, 0.22),
        0 0 18px rgba(67, 255, 143, 0.10),
        0 10px 28px rgba(0, 0, 0, 0.34);
}

.forum-profile-avatar.is-online::after {
    content: none;
}

.forum-inline-avatar.is-online::after,
.forum-follower.is-online::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #43ff8f;
    border: 2px solid #0b1017;
    box-shadow: 0 0 0 4px rgba(67, 255, 143, 0.16), 0 0 12px rgba(67, 255, 143, 0.65);
}


.forum-profile-title h1 {
    margin: 0 0 8px;
    font-size: 42px;
    line-height: 1;
    color: #fff;
    font-weight: 500;
}

.forum-profile-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: rgba(230, 236, 246, 0.86);
    font-size: 14px;
}

.forum-profile-state {
    min-height: 28px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.forum-profile-state.online {
    color: #ceffe0;
    background: rgba(67, 255, 143, 0.12);
    border: 1px solid rgba(67, 255, 143, 0.22);
}

.forum-profile-state.offline {
    color: #dde5f1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.forum-profile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.forum-profile-lock {
    min-height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #d9e3f0;
    font-size: 14px;
}

.forum-profile-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(13, 18, 29, 0.88), rgba(11, 16, 26, 0.96));
}

.forum-profile-stat {
    padding: 16px 18px;
    border-right: 1px solid rgba(255,255,255,0.05);
    display: grid;
    gap: 6px;
}

.forum-profile-stat:last-child {
    border-right: 0;
}

.forum-profile-stat span {
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #8fa0b8;
}

.forum-profile-stat strong {
    color: #fff;
    font-size: 23px;
    line-height: 1.2;
    font-weight: 500;
}

.forum-profile-stat strong.is-online {
    color: #cffff0;
}

.forum-profile-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.forum-profile-sidebar,
.forum-profile-content {
    display: grid;
    gap: 18px;
}

.forum-side-card,
.forum-content-card,
.forum-settings-card {
    padding: 20px;
    border-radius: 20px;
}

.forum-side-danger {
    border-color: rgba(223, 117, 117, 0.22);
    background: linear-gradient(180deg, rgba(47, 19, 19, 0.96), rgba(30, 13, 13, 0.98));
}

.forum-side-title {
    margin-bottom: 14px;
    color: #d5e1f0;
    font-size: 18px;
    font-weight: 500;
}

.forum-side-text {
    color: #ffd4d4;
    line-height: 1.55;
}

.forum-side-table {
    display: grid;
    gap: 10px;
}

.forum-side-table div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.forum-side-table div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.forum-side-table span {
    color: #8ea0b9;
    font-size: 13px;
}

.forum-side-table strong {
    color: #f5f8fd;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 500;
}

.forum-followers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.forum-follower {
    position: relative;
    width: 44px;
    height: 44px;
}

.forum-follower img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.forum-inline-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.forum-inline-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.forum-visitor-list {
    display: grid;
    gap: 10px;
}

.forum-visitor-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.forum-visitor-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.forum-visitor-item strong {
    display: block;
    color: #eef4fc;
    font-size: 14px;
}

.forum-visitor-item span {
    display: block;
    color: #91a2bb;
    font-size: 12px;
    margin-top: 2px;
}

.forum-empty-small {
    color: #92a3bb;
    font-size: 14px;
}

.forum-content-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.forum-content-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
}

.forum-profile-bio {
    color: #d7e0eb;
    line-height: 1.7;
    font-size: 15px;
}

.forum-topic-list {
    display: grid;
    gap: 12px;
}

.forum-topic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.forum-topic-row:hover {
    border-color: rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.05);
}

.forum-topic-row strong {
    display: block;
    color: #edf4fc;
    margin-bottom: 4px;
}

.forum-topic-row span,
.forum-topic-row small {
    color: #8da0bb;
}

.forum-comment-form,
.forum-settings-form {
    display: grid;
    gap: 14px;
}

.forum-settings-head h1 {
    margin: 0 0 6px;
}

.forum-settings-head p {
    margin: 0;
    color: var(--text-soft);
}

.forum-settings-banner-preview {
    position: relative;
    min-height: 220px;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 191, 99, 0.18), transparent 22%),
        linear-gradient(135deg, rgba(30, 35, 51, 0.98), rgba(14, 19, 30, 0.98));
    background-size: cover;
    background-position: center;
}

.forum-settings-banner-preview.has-image {
    background-size: cover;
    background-position: center;
}

.forum-settings-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,12,18,0.22), rgba(8,12,18,0.72));
}

.forum-settings-banner-user {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
}

.forum-settings-banner-user strong {
    display: block;
    color: #fff;
    font-size: 22px;
}

.forum-settings-banner-user span {
    color: rgba(226,233,244,0.78);
}

.forum-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.forum-settings-full {
    grid-column: 1 / -1;
}

.forum-settings-switches {
    display: grid;
    gap: 10px;
}

.forum-check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dce4f0;
}

.forum-settings-actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 1100px) {
    .forum-profile-layout {
        grid-template-columns: 1fr;
    }

    .forum-profile-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .forum-profile-head {
        grid-template-columns: 128px minmax(0, 1fr);
    }

    .forum-profile-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .forum-profile-head {
        grid-template-columns: 1fr;
        padding-top: 72px;
    }

    .forum-profile-avatar {
        width: 110px;
        height: 110px;
    }

    .forum-profile-avatar img {
        width: 110px;
        height: 110px;
    }

    .verified-mark--avatar {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        right: -2px;
        bottom: 8px;
    }

    .forum-profile-title h1 {
        font-size: 32px;
    }

    .forum-profile-strip,
    .forum-settings-grid {
        grid-template-columns: 1fr;
    }

    .forum-side-table div {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}
.forum-profile-breadcrumbs-bar {
    margin-bottom: 10px;
}

.profile-breadcrumbs-outside {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(220, 228, 240, 0.78);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.profile-breadcrumbs-outside a {
    color: rgba(220, 228, 240, 0.85);
    text-decoration: none;
    transition: color .18s ease;
}

.profile-breadcrumbs-outside a:hover {
    color: #fff;
}

.profile-breadcrumbs-outside span:last-child {
    color: #ffffff;
}

.forum-profile-topline {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 16px;
    padding: 18px 20px 0;
}

.header-notifications {
    position: relative;
    isolation: isolate;
}

.header-notifications[open] {
}

.header-notifications summary {
    list-style: none;
}

.header-notifications summary::-webkit-details-marker {
    display: none;
}

.header-notifications-trigger {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: #e9f0fb;
    cursor: pointer;
    transition: .18s ease;
}

.header-notifications-trigger:hover {
    border-color: rgba(255, 191, 99, 0.22);
    background: rgba(255, 191, 99, 0.08);
}

.header-notifications-trigger svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-notifications-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #43ff8f, #27d96d);
    color: #06110b;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 0 0 4px rgba(67, 255, 143, 0.16);
    isolation: isolate;
}

.header-notifications-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(420px, calc(100vw - 28px));
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(9, 13, 20, 0.98);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42);
    display: none;
    z-index: 30;
}

.header-notifications[open] .header-notifications-dropdown {
    display: block;
}

.header-notifications-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.header-notifications-head strong {
    color: #f5f8fd;
    font-size: 15px;
}

.header-notifications-head a {
    color: var(--accent);
    font-size: 13px;
}

.header-notifications-list,
.notifications-list-page {
    display: grid;
    gap: 10px;
}

.header-notification-item,
.notification-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    transition: .18s ease;
}

.header-notification-item:hover,
.notification-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 191, 99, 0.18);
    background: rgba(255, 191, 99, 0.05);
}

.header-notification-item.is-unread,
.notification-card.is-unread {
    border-color: rgba(67, 255, 143, 0.22);
    background: rgba(67, 255, 143, 0.06);
}

.header-notification-copy,
.notification-card-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.header-notification-copy strong,
.notification-card-head strong {
    color: #f6f9ff;
    font-size: 14px;
    line-height: 1.35;
}

.header-notification-copy span,
.notification-card-copy p {
    margin: 0;
    color: #b7c4d8;
    font-size: 13px;
    line-height: 1.45;
}

.header-notification-copy small,
.notification-card-head small {
    color: #8395ae;
    font-size: 12px;
}

.header-notifications-empty {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    color: #90a2bb;
    text-align: center;
}

.notifications-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.notification-card-head,
.notification-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.notification-card-meta {
    color: #8ea0b9;
    font-size: 12px;
}

.notification-dot {
    min-height: 24px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(67, 255, 143, 0.12);
    border: 1px solid rgba(67, 255, 143, 0.24);
    color: #c8ffe0;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.topic-mini-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

@media (max-width: 720px) {
    .notifications-headline {
        align-items: stretch;
        flex-direction: column;
    }

    .header-notifications-dropdown {
        right: -90px;
    }
}
.footer-premium {
    position: relative;
    margin-top: 56px;
    background:
        linear-gradient(180deg, rgba(5, 10, 20, 0.98) 0%, rgba(3, 8, 16, 1) 100%);
    border-top: 1px solid rgba(110, 140, 190, 0.12);
    overflow: hidden;
}

.footer-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 20%, rgba(68, 110, 220, 0.12), transparent 28%),
        radial-gradient(circle at 85% 80%, rgba(60, 140, 255, 0.08), transparent 26%);
    pointer-events: none;
}

.footer-premium-shell {
    position: relative;
    z-index: 1;
    padding: 30px 0 16px;
}

.footer-premium-main {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    gap: 22px;
    align-items: start;
}

.footer-premium-brand {
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(122, 150, 196, 0.14);
    background:
        linear-gradient(180deg, rgba(12, 20, 34, 0.88) 0%, rgba(8, 15, 28, 0.95) 100%);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.footer-brand-top {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.footer-brand-mark {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid rgba(120, 145, 190, 0.16);
    flex-shrink: 0;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.footer-brand-mark img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.footer-eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(78, 112, 190, 0.14);
    border: 1px solid rgba(120, 145, 190, 0.18);
    color: rgba(226, 233, 245, 0.88);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-brand-copy h2 {
    margin: 0 0 10px;
    font-size: 1.62rem;
    line-height: 1.15;
    color: #f7f9fd;
    letter-spacing: -0.03em;
}

.footer-brand-copy p {
    margin: 0;
    max-width: 560px;
    color: rgba(212, 220, 235, 0.8);
    line-height: 1.8;
    font-size: 0.98rem;
}

.footer-brand-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.footer-brand-badges span {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(120, 145, 190, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(225, 232, 243, 0.78);
    font-size: 0.82rem;
}

.footer-community-strip {
    margin-top: 20px;
    padding: 18px 20px;
    border-radius: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(120, 145, 190, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
}

.footer-community-copy p {
    margin: 6px 0 0;
    color: rgba(209, 217, 230, 0.72);
    font-size: 0.92rem;
    line-height: 1.65;
}

.footer-socials-label {
    color: #f5f8ff;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.premium-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-social-link {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(124, 151, 196, 0.18);
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    color: #eff4fc;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255,255,255,0.05);
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.footer-social-link:hover {
    transform: translateY(-4px) scale(1.02);
    background: linear-gradient(180deg, rgba(78, 112, 190, 0.22), rgba(60, 140, 255, 0.14));
    border-color: rgba(135, 168, 230, 0.3);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.footer-social-link svg {
    width: 35px;
    height: 35px;
    fill: currentColor;
}

.footer-social-link.social-vk svg {
    width: 60px;
    height: 60px;
    fill: currentColor;
}

.footer-social-link.social-vk {
    color: #0077ff;
    background: rgba(0, 119, 255, 0.12);
    border-color: rgba(0, 119, 255, 0.28);
}

.footer-social-link.social-vk:hover {
    color: #ffffff;
    background: #0077ff;
    border-color: #0077ff;
    box-shadow: 0 14px 30px rgba(0, 119, 255, 0.35);
}

.footer-social-link.social-telegram {
    color: #229ed9;
    background: rgba(34, 158, 217, 0.12);
    border-color: rgba(34, 158, 217, 0.28);
}

.footer-social-link.social-telegram:hover {
    color: #ffffff;
    background: #229ed9;
    border-color: #229ed9;
    box-shadow: 0 14px 30px rgba(34, 158, 217, 0.35);
}

.footer-social-link.social-youtube {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.12);
    border-color: rgba(255, 0, 0, 0.28);
}

.footer-social-link.social-youtube:hover {
    color: #ffffff;
    background: #ff0000;
    border-color: #ff0000;
    box-shadow: 0 14px 30px rgba(255, 0, 0, 0.35);
}

.footer-social-link.social-tiktok {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.18), rgba(254, 44, 85, 0.18));
    border-color: rgba(255, 255, 255, 0.18);
}

.footer-social-link.social-tiktok:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #25f4ee, #fe2c55);
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(254, 44, 85, 0.25);
}

.footer-premium-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-content: start;
}

.footer-card {
    padding: 22px 22px 20px;
    border-radius: 24px;
    border: 1px solid rgba(120, 145, 190, 0.12);
    background:
        linear-gradient(180deg, rgba(10, 18, 31, 0.9) 0%, rgba(7, 13, 25, 0.96) 100%);
    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.footer-card h4 {
    margin: 0 0 14px;
    color: #f4f7fc;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.footer-card-head h4 {
    margin: 0;
}

.footer-card-head span {
    color: rgba(201, 211, 226, 0.64);
    font-size: 0.8rem;
}

.footer-card-compact {
    min-height: 0;
}

.footer-links.modern {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.footer-links.modern a {
    color: rgba(214, 222, 235, 0.82);
    text-decoration: none;
    transition: color 0.18s ease, transform 0.18s ease;
}

.footer-links.modern a:hover {
    color: #fff;
    transform: translateX(3px);
}

.footer-card-stats {
    grid-column: 1 / -1;
}

.footer-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.footer-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    min-height: 84px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(120, 145, 190, 0.1);
}

.footer-metric span {
    color: rgba(209, 217, 230, 0.74);
    font-size: 0.88rem;
}

.footer-metric strong {
    color: #ffffff;
    font-size: 1.16rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.footer-premium-bottom {
    margin-top: 18px;
    padding: 16px 20px;
    border-radius: 20px;
    border: 1px solid rgba(120, 145, 190, 0.1);
    background: rgba(255, 255, 255, 0.025);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.footer-premium-bottom-left,
.footer-premium-bottom-right {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: rgba(196, 205, 220, 0.62);
    font-size: 0.88rem;
}

@media (max-width: 1180px) {
    .footer-premium-main {
        grid-template-columns: 1fr;
    }

    .footer-premium-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .footer-community-strip {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .footer-premium-shell {
        padding-top: 24px;
    }

    .footer-brand-top {
        flex-direction: column;
    }

    .footer-premium-brand,
    .footer-card,
    .footer-premium-bottom {
        padding-left: 18px;
        padding-right: 18px;
    }

    .footer-premium-side {
        grid-template-columns: 1fr;
    }

    .footer-stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-premium-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .footer-social-link {
        width: 54px;
        height: 54px;
    }

    .footer-social-link svg {
        width: 22px;
        height: 22px;
    }

    .footer-stat-grid {
        grid-template-columns: 1fr;
    }
}

.footer-premium,
.footer-premium-shell,
.footer-premium-main,
.footer-premium-bottom,
.footer-community-strip {
    max-width: 100%;
}

/* ===== masthead notifications layering fix ===== */
body.has-masthead .masthead {
    overflow: visible;
}

body.has-masthead .masthead-media {
    overflow: hidden;
}

body.has-masthead .masthead,
body.has-masthead .masthead-top,
body.has-masthead .masthead-utility-wrap,
body.has-masthead .masthead-utility,
body.has-masthead .header-actions,
body.has-masthead .header-notifications {
    overflow: visible;
}

body.has-masthead .masthead-top {
    z-index: 1200;
}

body.has-masthead .masthead-utility-wrap {
    z-index: 1100;
}

body.has-masthead .header-notifications {
    z-index: 2000;
}

body.has-masthead .header-notifications-dropdown {
    z-index: 3000;
}

/* ===== notifications dropdown fix without banner ===== */
body:not(.has-masthead) .topbar,
body:not(.has-masthead) .utility-subbar,
body:not(.has-masthead) .masthead-utility,
body:not(.has-masthead) .header-actions,
body:not(.has-masthead) .utility-actions,
body:not(.has-masthead) .header-notifications {
    position: relative;
    overflow: visible;
}

body:not(.has-masthead) .topbar {
    z-index: 1200;
}

body:not(.has-masthead) .utility-subbar {
    z-index: 1190;
}

body:not(.has-masthead) .header-notifications {
    z-index: 2000;
}

body:not(.has-masthead) .header-notifications-dropdown {
    z-index: 4000;
}


/* ===== text-only role style override ===== */
.role-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: auto;
    padding: 0 0 6px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.role-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    flex: 0 0 auto;
    box-shadow: 0 0 10px currentColor;
    opacity: 0.95;
}

.role-badge::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, currentColor 0%, rgba(255,255,255,0) 100%);
    opacity: 0.32;
    pointer-events: none;
}

.utility-actions .role-badge {
    min-height: auto;
    padding: 0 0 6px;
    border-radius: 0 !important;
    font-size: 11px;
    letter-spacing: 0.09em;
}

.role-slate {
    color: #cfd7e6;
    text-shadow: 0 0 10px rgba(207, 215, 230, 0.10);
}

.role-blue {
    color: #7fb2ff;
    text-shadow: 0 0 12px rgba(127, 178, 255, 0.14);
}

.role-cyan {
    color: #7feeff;
    text-shadow: 0 0 12px rgba(127, 238, 255, 0.14);
}

.role-violet {
    color: #c7b2ff;
    text-shadow: 0 0 12px rgba(199, 178, 255, 0.14);
}

.role-amber {
    color: #ffcc74;
    text-shadow: 0 0 12px rgba(255, 204, 116, 0.14);
}

.role-orange {
    color: #ffb17d;
    text-shadow: 0 0 12px rgba(255, 177, 125, 0.14);
}

.role-pink {
    color: #ff9dd4;
    text-shadow: 0 0 12px rgba(255, 157, 212, 0.14);
}

.role-red {
    color: #ff9f9f;
    text-shadow: 0 0 12px rgba(255, 159, 159, 0.14);
}

.role-emerald {
    color: #7ff0bf;
    text-shadow: 0 0 12px rgba(127, 240, 191, 0.14);
}

.role-gold {
    color: #ffd86f;
    text-shadow: 0 0 14px rgba(255, 216, 111, 0.18);
}

@media (max-width: 560px) {
    .role-badge {
        font-size: 11px;
        letter-spacing: 0.06em;
    }

    .role-badge::before {
        width: 6px;
        height: 6px;
    }
}
/*===== role text alignment fix ===== */
.header-actions,
.utility-actions {
    align-items: center;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.utility-actions .role-badge {
    min-height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    align-self: center;
}

.role-badge::before {
    width: 6px;
    height: 6px;
    margin-top: 0;
}

.role-badge::after {
    left: 14px;
    right: 0;
    bottom: -4px;
}

@keyframes roleShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.role-gradient,
.role-text-gradient {
    --role-color-1: #7fb2ff;
    --role-color-2: #c7b2ff;
}

.role-badge__label {
    display: inline-block;
}

.role-badge.role-gradient {
    color: var(--role-color-1);
}

.role-badge.role-gradient .role-badge__label,
.role-text-gradient {
    display: inline-block;
    background-image: linear-gradient(90deg, var(--role-color-1) 0%, var(--role-color-2) 50%, var(--role-color-1) 100%);
    background-size: 200% auto;
    animation: roleShimmer 4.8s linear infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.role-badge.role-gradient::before {
    background: var(--role-color-1);
    box-shadow: 0 0 12px var(--role-color-1);
}

.role-badge.role-gradient::after {
    background: linear-gradient(90deg, var(--role-color-1) 0%, var(--role-color-2) 100%);
    opacity: 0.55;
}

.role-text-gradient {
    text-shadow: none;
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--role-color-1) 22%, transparent));
}

.admin-role-color-grid {
    align-items: end;
}

.admin-role-preview-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: -6px;
}


.header-user,
.utility-actions > a,
.header-notifications-trigger {
    align-self: center;
}

/* ===== upgraded profile comments ===== */

.forum-content-head-wide {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.forum-content-subtitle {
    margin: 6px 0 0;
    color: #94a6be;
    font-size: 14px;
    line-height: 1.5;
}

.profile-comments-section {
    gap: 18px;
}
.profile-comments-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-comments-sort-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    color: #d9e4f2;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    transition: 0.18s ease;
}

.profile-comments-sort-link:hover {
    color: #ffffff;
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.06);
}

.profile-comments-sort-link.is-active {
    color: #0f141c;
    background: linear-gradient(180deg, #efb55f, #dd9f45);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 12px 26px rgba(221, 159, 69, 0.24);
}

.profile-comments-compose {
    margin-bottom: 20px;
}

.profile-comments-compose-form,
.profile-comments-login-hint,
.profile-comment-inline-form {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02)),
        linear-gradient(180deg, rgba(13,18,28,0.94), rgba(10,14,22,0.98));
    box-shadow: 0 18px 38px rgba(0,0,0,0.22);
}

.profile-comments-compose-form {
    display: grid;
    gap: 14px;
}

.profile-comments-compose-head,
.profile-comment-inline-head {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #eef4fd;
}

.profile-comment-inline-head {
    font-size: 14px;
    font-weight: 600;
}

.profile-comments-compose-note {
    margin-top: 4px;
    color: #91a2b9;
    font-size: 13px;
    line-height: 1.45;
}

.profile-comments-compose-form textarea,
.profile-comment-inline-form textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    color: #eef5ff;
    font: inherit;
    line-height: 1.65;
    transition: 0.18s ease;
}

.profile-comment-inline-form textarea {
    min-height: 90px;
}

.profile-comments-compose-form textarea:focus,
.profile-comment-inline-form textarea:focus {
    outline: none;
    border-color: rgba(236, 173, 88, 0.72);
    box-shadow: 0 0 0 3px rgba(236, 173, 88, 0.15);
    background: rgba(255,255,255,0.045);
}

.profile-comments-compose-footer,
.profile-comment-inline-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-comments-login-hint {
    display: grid;
    gap: 10px;
    color: #e8eff8;
}

.profile-comments-login-hint span {
    color: #92a4bc;
    line-height: 1.55;
}

.profile-comment-counter {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #9bb0c8;
    font-size: 13px;
}

.profile-comments-feed {
    display: grid;
    gap: 14px;
}

.profile-comment-card {
    position: relative;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.048), rgba(255,255,255,0.022)),
        linear-gradient(180deg, rgba(11,16,25,0.96), rgba(9,13,21,0.98));
    box-shadow: 0 20px 40px rgba(0,0,0,0.22);
}

.profile-comment-card.is-pinned {
    border-color: rgba(237, 175, 90, 0.38);
    box-shadow: 0 24px 48px rgba(0,0,0,0.24), 0 0 0 1px rgba(237, 175, 90, 0.12) inset;
}

.profile-comment-card.depth-1,
.profile-comment-card.depth-2,
.profile-comment-card.depth-3,
.profile-comment-card.depth-4 {
    margin-left: 24px;
}

.profile-comment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.profile-comment-user {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.profile-comment-user-meta {
    min-width: 0;
}

.profile-comment-user-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-comment-author {
    color: #f5f9ff;
    font-size: 16px;
    font-weight: 650;
}

.profile-comment-author:hover {
    color: var(--accent);
}

.profile-comment-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.08);
    color: #d8e4f4;
    font-size: 12px;
    font-weight: 600;
}

.profile-comment-badge.is-accent,
.profile-comment-badge.is-pinned {
    color: #11161f;
    background: linear-gradient(180deg, #efbc72, #de9d43);
    border-color: rgba(255,255,255,0.15);
}

.profile-comment-meta-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
    color: #91a3bc;
    font-size: 13px;
}

.profile-comment-parent-link {
    color: #97aac4;
    font-size: 13px;
    white-space: nowrap;
}

.profile-comment-parent-link:hover {
    color: var(--accent);
}

.profile-comment-body {
    color: #e4edf8;
    line-height: 1.72;
    font-size: 15px;
    word-break: break-word;
}

.profile-comment-body a {
    color: #f0b45d;
    text-decoration: underline;
    text-decoration-color: rgba(240, 180, 93, 0.45);
}

.profile-comment-footer {
    margin-top: 16px;
}

.profile-comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-comment-actions form {
    display: inline-flex;
}

.profile-comment-action {
    min-height: 36px;
}

.profile-comment-action span {
    margin-left: 6px;
    font-weight: 700;
}

.profile-comment-action.is-active {
    border-color: rgba(237, 174, 88, 0.28);
    color: #f2b760;
    background: rgba(237, 174, 88, 0.08);
}

.profile-comment-action.icon-only {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 14px;
    position: relative;
}

.profile-comment-action.icon-only svg {
    width: 18px;
    height: 18px;
    display: block;
}

.profile-comment-action.icon-only span {
    margin-left: 0;
}

.profile-comment-action.has-tooltip::after,
.profile-comment-action.has-tooltip::before {
    position: absolute;
    left: 50%;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 5;
}

.profile-comment-action.has-tooltip::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 10px);
    transform: translate(-50%, 6px);
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(8, 13, 23, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
    color: #edf2fb;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.profile-comment-action.has-tooltip::before {
    content: '';
    bottom: calc(100% + 4px);
    transform: translate(-50%, 6px) rotate(45deg);
    width: 10px;
    height: 10px;
    background: rgba(8, 13, 23, 0.96);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-comment-action.has-tooltip:hover::after,
.profile-comment-action.has-tooltip:hover::before,
.profile-comment-action.has-tooltip:focus-visible::after,
.profile-comment-action.has-tooltip:focus-visible::before {
    opacity: 1;
    transform: translate(-50%, 0);
}

.profile-comment-action.is-pinned-action {
    border-color: rgba(237, 174, 88, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 191, 99, 0.06);
}

.profile-comment-action.danger {
    color: #f2b8b8;
}

.profile-comment-action.danger:hover,
.profile-comment-action.danger:focus-visible {
    border-color: rgba(235, 101, 101, 0.28);
    background: rgba(235, 101, 101, 0.08);
    color: #ffd5d5;
}

.profile-comment-panel {
    margin-top: 14px;
}

.profile-comment-panel.is-hidden {
    display: none;
}

.profile-comment-children {
    display: grid;
    gap: 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.profile-comments-empty {
    display: grid;
    gap: 6px;
    justify-items: start;
}

.profile-comments-empty strong {
    color: #f3f7fc;
    font-size: 18px;
}

.profile-comments-empty span {
    color: #93a6bd;
    line-height: 1.55;
}
@media (max-width: 820px) {
    .forum-content-head-wide,
    .profile-comment-head,
    .profile-comments-compose-footer,
    .profile-comment-inline-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-comments-sort {
        width: 100%;
    }

    .profile-comments-sort-link {
        flex: 1 1 calc(50% - 10px);
    }

    .profile-comment-card.depth-1,
    .profile-comment-card.depth-2,
    .profile-comment-card.depth-3,
    .profile-comment-card.depth-4 {
        margin-left: 12px;
    }
}
@media (max-width: 640px) {
    .profile-comments-compose-form,
    .profile-comments-login-hint,
    .profile-comment-inline-form,
    .profile-comment-card {
        padding: 15px;
        border-radius: 18px;
    }

    .profile-comment-user-line,
    .profile-comment-meta-line,
    .profile-comment-actions {
        gap: 8px;
    }

    .profile-comment-body {
        font-size: 14px;
    }

    .profile-comment-action.has-tooltip::after,
    .profile-comment-action.has-tooltip::before {
        display: none;
    }
}
.profile-comments-compose-form textarea.is-limit-near,
.profile-comment-inline-form textarea.is-limit-near {
    border-color: rgba(237, 174, 88, 0.46);
}
.profile-comment-heart {
    font-size: 16px;
    line-height: 1;
}

.profile-comment-counter {
    gap: 6px;
}

.profile-comment-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-comment-action span {
    margin-left: 0;
}

.profile-comment-action.is-active .profile-comment-heart,
.profile-comment-counter .profile-comment-heart {
    color: #ff6b81;
}

/* ==== additive topic editor merge: preserved original CSS, added rich editor only ==== */
.topic-posts-thread { gap: 18px; }
.topic-post-card { overflow: hidden; }
.topic-post-card .post-body { grid-template-rows: auto 1fr auto; }
.post-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.post-action-btn { min-height: 38px; }
.topic-reply-panel { padding-top: 20px; }
.topic-reply-head { margin-bottom: 14px; }

/* ==== rich editor polish: additive final pass ==== */
select option,
select optgroup {
    background: #f8fafc !important;
    color: #0f172a !important;
}

.rich-editor-shell {
    border-radius: 24px;
    border: 1px solid rgba(134, 162, 205, 0.14);
    background: linear-gradient(180deg, rgba(13, 20, 33, 0.98), rgba(5, 11, 22, 0.99));
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}

.rich-editor-toolbar-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
    border-radius: 16px;
    border: 1px solid rgba(146, 171, 213, 0.1);
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.rich-editor-toolbar-group.is-end {
    margin-left: auto;
}

.rich-editor-btn,
.rich-editor-menu > summary,
.rich-editor-select,
.rich-editor-menu-action,
.rich-editor-option-button,
.rich-editor-file-label {
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
    color: #eef5ff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    transition: transform 0.16s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.rich-editor-btn:hover,
.rich-editor-menu > summary:hover,
.rich-editor-menu[open] > summary,
.rich-editor-menu-action:hover,
.rich-editor-option-button:hover,
.rich-editor-file-label:hover,
.rich-editor-btn.is-active {
    border-color: rgba(255, 196, 108, 0.42);
    background: linear-gradient(180deg, rgba(255, 196, 108, 0.18), rgba(255, 196, 108, 0.08));
    color: #fff8e5;
    box-shadow: 0 10px 22px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.04);
}

.rich-editor-btn:active,
.rich-editor-menu > summary:active,
.rich-editor-menu-action:active,
.rich-editor-option-button:active,
.rich-editor-file-label:active {
    transform: translateY(1px);
}

.rich-editor-toolbar-control,
.rich-editor-menu > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
}

.rich-editor-toolbar-control.is-icon,
.rich-editor-menu > summary.is-icon,
.rich-editor-btn.is-icon,
.rich-editor-btn.is-mini {
    width: 40px;
    min-width: 40px;
    padding: 0;
}

.rich-editor-toolbar-control.is-wide,
.rich-editor-menu > summary.is-wide {
    min-width: 146px;
    justify-content: space-between;
}

.rich-editor-toolbar-control.is-preview {
    min-width: 172px;
    justify-content: space-between;
}

.rich-editor-btn.is-row {
    width: 100%;
    justify-content: flex-start;
}

.rich-editor-btn.danger {
    color: #ffc4cc;
}

.rich-editor-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
}

.rich-editor-icon svg,
.rich-editor-btn-caret svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rich-editor-btn-text {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.rich-editor-btn-caret {
    width: 12px;
    height: 12px;
    color: #95a6be;
}

.rich-editor-chip {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.82);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.22);
}

.rich-editor-menu {
    position: relative;
}

.rich-editor-menu > summary {
    list-style: none;
}

.rich-editor-menu > summary::-webkit-details-marker {
    display: none;
}

.rich-editor-menu-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    min-width: 240px;
    max-width: min(420px, 92vw);
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(126, 154, 198, 0.14);
    background: linear-gradient(180deg, rgba(11,18,30,0.99), rgba(6,12,22,0.99));
    box-shadow: 0 26px 60px rgba(0,0,0,0.34);
    z-index: 120;
    display: grid;
    gap: 12px;
}

.rich-editor-menu-panel.is-table-panel {
    min-width: 260px;
}

.rich-editor-menu-list {
    display: grid;
    gap: 8px;
}

.rich-editor-menu-list.is-options {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 2px;
}

.rich-editor-menu-list.is-options::-webkit-scrollbar {
    width: 8px;
}

.rich-editor-menu-list.is-options::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
}

.rich-editor-menu-action,
.rich-editor-option-button,
.rich-editor-file-label {
    justify-content: flex-start;
    width: 100%;
    padding: 0 14px;
    font-weight: 700;
}

.rich-editor-menu-panel input[type="url"] {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.045);
    color: #eef5ff;
    padding: 0 14px;
    outline: none;
}

.rich-editor-menu-panel input[type="url"]::placeholder {
    color: #8fa2bc;
}

.rich-editor-menu-panel input[type="url"]:focus,
.rich-editor-color-input:focus {
    border-color: rgba(255,196,108,0.38);
    box-shadow: 0 0 0 3px rgba(255,196,108,0.12);
}

.rich-editor-color-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
}

.rich-editor-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
    transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.rich-editor-swatch:hover {
    transform: translateY(-1px) scale(1.04);
    border-color: rgba(255,255,255,0.34);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.rich-editor-color-input {
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    padding: 4px;
}

.rich-editor-emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.rich-editor-emoji-btn {
    min-height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
    font-size: 28px;
    cursor: pointer;
    transition: transform .16s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.rich-editor-emoji-btn:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: rgba(255,196,108,0.38);
    background: linear-gradient(180deg, rgba(255,196,108,0.18), rgba(255,196,108,0.08));
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.rich-editor-table-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #dbe7f8;
    font-size: 15px;
    font-weight: 800;
}

.rich-editor-table-grid {
    display: grid;
    grid-template-columns: repeat(8, 22px);
    gap: 6px;
    padding: 2px;
}

.rich-editor-table-grid button {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    cursor: pointer;
    transition: transform 0.14s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.rich-editor-table-grid button:hover,
.rich-editor-table-grid button.is-active {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(255,196,108,0.28), rgba(255,196,108,0.12));
    border-color: rgba(255,196,108,0.52);
    box-shadow: 0 8px 16px rgba(0,0,0,0.16);
}

.rich-editor-area {
    position: relative;
    min-height: 280px;
    padding: 22px;
    outline: none;
    color: #eef5ff;
    font-size: 15px;
    line-height: 1.72;
    overflow-wrap: anywhere;
}

.rich-editor-shell.is-empty .rich-editor-area::before {
    content: attr(data-placeholder);
    color: rgba(220, 228, 242, 0.42);
}

.rich-editor-area p,
.rich-editor-area ul,
.rich-editor-area ol,
.rich-editor-area blockquote,
.rich-editor-area pre,
.rich-editor-area table,
.rich-editor-area details {
    margin: 0 0 14px;
}

.rich-editor-area img {
    display: inline-block;
    vertical-align: top;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.rich-editor-area div[style*="text-align"] {
    width: 100%;
}

.rich-editor-area div.is-editor-selected {
    border-radius: 14px;
}

.rich-editor-area img.is-editor-selected-image {
    outline: 2px solid rgba(255,196,108,0.72);
    outline-offset: 4px;
}

.rich-editor-image-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
}

.rich-editor-image-tools.is-hidden {
    display: none;
}

.rich-editor-image-tools-label {
    color: #d9e6f7;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.rich-editor-image-tools-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.rich-editor-mini-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rich-editor-image-size {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: min(360px, 100%);
}

.rich-editor-image-size-label {
    color: #9cb0cc;
    font-size: 13px;
    font-weight: 700;
}

.rich-editor-image-size input[type="range"] {
    flex: 1 1 auto;
    accent-color: #ffbf63;
}

.rich-editor-image-size strong {
    min-width: 48px;
    color: #fff4dd;
    font-size: 13px;
    text-align: right;
}

.rich-editor-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

.rich-editor-draft-meta {
    color: #9cb0cc;
    font-size: 13px;
}

.rich-editor-draft-status[data-state="saved"],
.rich-editor-draft-status[data-state="loaded"] {
    color: #bfe7c8;
}

.rich-editor-draft-status[data-state="deleted"] {
    color: #ffd1a1;
}

.rich-editor-draft-status[data-state="error"] {
    color: #ffb8c0;
}

.rich-editor-preview {
    margin: 0 18px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.16);
    overflow: hidden;
}

.rich-editor-preview.is-hidden {
    display: none;
}

.rich-editor-preview-box {
    padding: 18px;
    min-height: 100px;
}

.rich-editor-preview-empty,
.rich-editor-hint {
    color: #91a4bf;
}

.rich-editor-hint {
    padding: 0 18px 18px;
    font-size: 13px;
}

.formatted-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 14px;
    overflow: hidden;
}

.formatted-content th,
.formatted-content td {
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    vertical-align: top;
}

.formatted-content blockquote {
    padding: 14px 16px;
    border-left: 3px solid rgba(255,196,108,0.75);
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
}

.formatted-content details {
    margin: 0 0 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    overflow: hidden;
}

.formatted-content details summary {
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 700;
}

.formatted-content details > div,
.formatted-content details > p {
    padding: 0 14px 14px;
}

.formatted-content pre {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(3, 8, 16, 0.88);
    border: 1px solid rgba(255,255,255,0.08);
    overflow-x: auto;
}

.formatted-content img {
    display: inline-block;
    vertical-align: top;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.formatted-content div[style*="text-align"] {
    width: 100%;
}

.formatted-content div[style*="text-align"] > img,
.rich-editor-preview-box div[style*="text-align"] > img {
    display: inline-block;
    vertical-align: top;
}

@media (max-width: 980px) {
    .rich-editor-toolbar-group.is-end {
        margin-left: 0;
    }
}

@media (max-width: 760px) {
    .rich-editor-toolbar {
        padding: 10px;
        gap: 8px;
    }

    .rich-editor-toolbar-group {
        width: 100%;
        justify-content: flex-start;
    }

    .rich-editor-toolbar-control.is-wide,
    .rich-editor-menu > summary.is-wide,
    .rich-editor-toolbar-control.is-preview {
        min-width: 0;
        flex: 1 1 auto;
    }

    .rich-editor-menu-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        max-width: none;
    }

    .rich-editor-image-tools {
        flex-direction: column;
        align-items: flex-start;
    }

    .rich-editor-image-size {
        min-width: 100%;
    }
}


/* ===== Create topic page ===== */
.create-topic-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.create-topic-panel {
    padding: 28px;
}

.create-topic-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.create-topic-forum {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.create-topic-forum-icon {
    flex: 0 0 auto;
}

.create-topic-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    margin-bottom: 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 191, 99, 0.18);
    background: rgba(255, 191, 99, 0.08);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.create-topic-head h1 {
    font-size: clamp(34px, 3.2vw, 46px);
    margin-bottom: 8px;
}

.create-topic-head-note {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.create-topic-form {
    gap: 18px;
}

.create-topic-fields {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 14px;
}

.create-topic-editor-wrap {
    display: grid;
    gap: 12px;
}

.create-topic-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.create-topic-check {
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.create-topic-check span {
    color: var(--text);
}

.create-topic-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 4px;
}

.create-topic-submit-note {
    max-width: 620px;
    color: var(--text-soft);
    font-size: 14px;
}

.create-topic-submit {
    min-width: 220px;
}

.create-topic-sidebar {
    display: grid;
    gap: 14px;
    position: sticky;
    top: 18px;
}

.create-topic-side-card {
    padding: 18px;
    border-radius: 20px;
}

.create-topic-side-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.create-topic-side-forum {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    align-items: start;
}

.create-topic-side-forum p {
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.55;
}

.create-topic-tips {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
    color: var(--text-soft);
}

.editor-fullscreen-open {
    overflow: hidden;
}

@media (max-width: 1180px) {
    .create-topic-layout {
        grid-template-columns: 1fr;
    }

    .create-topic-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .create-topic-panel {
        padding: 20px;
    }

    .create-topic-head,
    .create-topic-submit-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .create-topic-head-note {
        justify-content: flex-start;
    }

    .create-topic-fields,
    .create-topic-sidebar {
        grid-template-columns: 1fr;
    }

    .create-topic-forum {
        flex-direction: column;
    }

    .create-topic-submit {
        width: 100%;
    }
}

.topic-reply-panel.is-classic-reply {
    border-radius: 0;
    border: 0;
    background: #ededed;
    box-shadow: none;
    padding: 28px 24px 32px;
}

.topic-reply-panel.is-classic-reply .topic-reply-head {
    display: none;
}

.topic-reply-editor-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    align-items: start;
}

.topic-reply-avatar-col {
    display: flex;
    justify-content: center;
}

.topic-reply-avatar {
    width: 172px;
    height: 172px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.topic-reply-editor-main {
    min-width: 0;
}

.topic-reply-submit-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
}

.topic-reply-submit {
    position: relative;
    min-height: 46px;
    padding: 0 26px 0 52px;
    border: 0;
    border-radius: 4px;
    background: #f0bf12;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: none;
}

.topic-reply-submit::before {
    content: '↩';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    line-height: 1;
}

.topic-reply-submit:hover,
.topic-reply-submit:focus-visible {
    background: #e2b20b;
    color: #fff;
}

@media (min-width: 761px) {
    .topic-reply-panel.is-classic-reply .topic-reply-editor-layout {
        grid-template-columns: 148px minmax(0, 1fr);
        gap: 20px;
    }

    .topic-reply-panel.is-classic-reply .topic-reply-avatar {
        width: 120px;
        height: 120px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar {
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 12px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group {
        flex-wrap: nowrap;
        gap: 4px;
        padding: 3px;
        border-radius: 14px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end {
        margin-left: auto;
        flex-shrink: 0;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-btn,
    .topic-reply-panel.is-classic-reply .rich-editor-menu > summary,
    .topic-reply-panel.is-classic-reply .rich-editor-select,
    .topic-reply-panel.is-classic-reply .rich-editor-menu-action,
    .topic-reply-panel.is-classic-reply .rich-editor-option-button,
    .topic-reply-panel.is-classic-reply .rich-editor-file-label {
        min-height: 36px;
        border-radius: 10px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-control,
    .topic-reply-panel.is-classic-reply .rich-editor-menu > summary {
        gap: 6px;
        padding: 0 10px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-icon,
    .topic-reply-panel.is-classic-reply .rich-editor-menu > summary.is-icon,
    .topic-reply-panel.is-classic-reply .rich-editor-btn.is-icon,
    .topic-reply-panel.is-classic-reply .rich-editor-btn.is-mini {
        width: 36px;
        min-width: 36px;
        min-height: 36px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-preview {
        width: 36px;
        min-width: 36px;
        padding: 0;
        justify-content: center;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-preview .rich-editor-btn-text {
        display: none;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }
}

@media (max-width: 1180px) {
    .rich-editor-toolbar-group.is-end {
        margin-left: 0;
    }

    .topic-reply-editor-layout {
        grid-template-columns: 1fr;
    }

    .topic-reply-avatar-col {
        justify-content: flex-start;
    }

    .topic-reply-avatar {
        width: 96px;
        height: 96px;
    }
}

@media (max-width: 760px) {
    .rich-editor-toolbar {
        gap: 10px;
        padding: 10px 12px;
    }

    .rich-editor-toolbar-group {
        width: 100%;
        border-left: 0 !important;
        padding-left: 0 !important;
    }

    .rich-editor-toolbar-control.is-preview {
        min-width: 0;
        width: 100%;
        justify-content: center;
    }

    .rich-editor-menu-panel,
    .rich-editor-menu-panel.is-emoji-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        max-width: none;
    }

    .rich-editor-emoji-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .topic-reply-panel.is-classic-reply {
        padding: 20px 12px 24px;
    }
}


/* ===== Classic forum reply editor remake: premium dark polish ===== */
.topic-reply-panel.is-classic-reply {
    border-radius: 24px;
    border: 1px solid rgba(112, 142, 190, 0.16);
    background: radial-gradient(circle at top, rgba(27, 45, 76, 0.22), transparent 34%), linear-gradient(180deg, #09111d 0%, #06101a 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    padding: 28px 24px 32px;
}

.topic-reply-panel.is-classic-reply .topic-reply-form-layout {
    margin: 0;
}

.topic-reply-panel.is-classic-reply .topic-reply-editor-layout {
    display: grid;
    grid-template-columns: clamp(96px, 11vw, 160px) minmax(0, 1fr);
    gap: clamp(18px, 2vw, 28px);
    align-items: start;
}

.topic-reply-panel.is-classic-reply .topic-reply-avatar-col {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.topic-reply-panel.is-classic-reply .topic-reply-avatar {
    width: clamp(96px, 11vw, 160px);
    height: clamp(96px, 11vw, 160px);
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(134, 162, 205, 0.18);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.04);
}

.topic-reply-panel.is-classic-reply .topic-reply-editor-main {
    min-width: 0;
}

.topic-reply-panel.is-classic-reply .rich-editor-shell {
    border-radius: 20px;
    border: 1px solid rgba(134, 162, 205, 0.15);
    background: linear-gradient(180deg, rgba(16, 26, 42, 0.98), rgba(8, 15, 26, 0.995));
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.03);
    overflow: visible;
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar {
    position: relative;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    max-width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar-group + .rich-editor-toolbar-group {
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end {
    margin-left: auto;
    justify-content: flex-end;
}

.topic-reply-panel.is-classic-reply .rich-editor-btn,
.topic-reply-panel.is-classic-reply .rich-editor-menu > summary,
.topic-reply-panel.is-classic-reply .rich-editor-select,
.topic-reply-panel.is-classic-reply .rich-editor-menu-action,
.topic-reply-panel.is-classic-reply .rich-editor-option-button,
.topic-reply-panel.is-classic-reply .rich-editor-file-label,
.topic-reply-panel.is-classic-reply .rich-editor-picker-close {
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: #c8d5e6;
    box-shadow: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.topic-reply-panel.is-classic-reply .rich-editor-btn:hover,
.topic-reply-panel.is-classic-reply .rich-editor-btn:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-menu > summary:hover,
.topic-reply-panel.is-classic-reply .rich-editor-menu > summary:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-menu[open] > summary,
.topic-reply-panel.is-classic-reply .rich-editor-menu-action:hover,
.topic-reply-panel.is-classic-reply .rich-editor-menu-action:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-option-button:hover,
.topic-reply-panel.is-classic-reply .rich-editor-option-button:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-file-label:hover,
.topic-reply-panel.is-classic-reply .rich-editor-file-label:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-btn.is-active,
.topic-reply-panel.is-classic-reply .rich-editor-picker-close:hover,
.topic-reply-panel.is-classic-reply .rich-editor-picker-close:focus-visible {
    border-color: rgba(245, 195, 88, 0.26);
    background: rgba(245, 195, 88, 0.09);
    color: #fff4d6;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.topic-reply-panel.is-classic-reply .rich-editor-btn:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-menu > summary:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-menu-action:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-option-button:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-file-label:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-picker-close:focus-visible,
.topic-reply-panel.is-classic-reply .rich-editor-menu-panel input[type="url"]:focus,
.topic-reply-panel.is-classic-reply .rich-editor-menu-panel input[type="search"]:focus,
.topic-reply-panel.is-classic-reply .rich-editor-color-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 195, 88, 0.12);
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar-control,
.topic-reply-panel.is-classic-reply .rich-editor-menu > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 11px;
    max-width: 100%;
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-icon,
.topic-reply-panel.is-classic-reply .rich-editor-menu > summary.is-icon,
.topic-reply-panel.is-classic-reply .rich-editor-btn.is-icon,
.topic-reply-panel.is-classic-reply .rich-editor-btn.is-mini {
    min-width: 44px;
    padding: 0 10px;
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-preview {
    min-width: 0;
    max-width: 100%;
    padding: 0 16px;
    justify-content: flex-start;
    font-weight: 700;
}

.topic-reply-panel.is-classic-reply .rich-editor-icon {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
}

.topic-reply-panel.is-classic-reply .rich-editor-icon svg,
.topic-reply-panel.is-classic-reply .rich-editor-btn-caret svg {
    stroke: currentColor;
    fill: none;
    stroke-width: 1.65;
}

.topic-reply-panel.is-classic-reply .rich-editor-icon[data-icon="bold"] svg,
.topic-reply-panel.is-classic-reply .rich-editor-icon[data-icon="italic"] svg,
.topic-reply-panel.is-classic-reply .rich-editor-icon[data-icon="eraser"] svg {
    fill: currentColor;
    stroke: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-btn-text {
    font-size: 14px;
    font-weight: 700;
    color: inherit;
    white-space: nowrap;
}

.topic-reply-panel.is-classic-reply .rich-editor-btn-caret {
    display: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu {
    position: relative;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 10px);
    min-width: 220px;
    max-width: min(480px, calc(100vw - 48px));
    max-height: min(72vh, 560px);
    overflow: auto;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(126, 154, 198, 0.18);
    background: linear-gradient(180deg, rgba(12, 21, 36, 0.99), rgba(7, 13, 24, 0.995));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
    z-index: 220;
    display: grid;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(141, 163, 191, 0.45) rgba(255,255,255,0.03);
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end .rich-editor-menu-panel {
    left: auto;
    right: 0;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel::before {
    display: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-emoji-panel {
    min-width: min(720px, calc(100vw - 56px));
    max-width: min(720px, calc(100vw - 56px));
    padding: 0 0 18px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-media-panel {
    min-width: min(320px, calc(100vw - 48px));
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
    min-width: 260px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-list {
    display: grid;
    gap: 8px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-list.is-options {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-list.is-options::-webkit-scrollbar,
.topic-reply-panel.is-classic-reply .rich-editor-menu-panel::-webkit-scrollbar {
    width: 8px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-list.is-options::-webkit-scrollbar-thumb,
.topic-reply-panel.is-classic-reply .rich-editor-menu-panel::-webkit-scrollbar-thumb {
    background: rgba(142, 163, 191, 0.35);
    border-radius: 999px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-list.is-font-options {
    max-height: 180px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-action,
.topic-reply-panel.is-classic-reply .rich-editor-option-button,
.topic-reply-panel.is-classic-reply .rich-editor-file-label {
    justify-content: flex-start;
    width: 100%;
    padding: 0 14px;
    font-weight: 700;
    color: #d8e4f2;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel input[type="url"],
.topic-reply-panel.is-classic-reply .rich-editor-menu-panel input[type="search"] {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: #edf4fd;
    padding: 0 15px;
    outline: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel input[type="url"]::placeholder,
.topic-reply-panel.is-classic-reply .rich-editor-menu-panel input[type="search"]::placeholder,
.topic-reply-panel.is-classic-reply .rich-editor-shell.is-empty .rich-editor-area::before {
    color: #7e91ad;
}

.topic-reply-panel.is-classic-reply .rich-editor-more-label,
.topic-reply-panel.is-classic-reply .rich-editor-picker-title {
    color: #f1f6fc;
}

.topic-reply-panel.is-classic-reply .rich-editor-extra-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-align-panel {
    min-width: 92px;
    padding: 12px;
}

.topic-reply-panel.is-classic-reply .rich-editor-align-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.topic-reply-panel.is-classic-reply .rich-editor-align-list .rich-editor-toolbar-control {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    justify-content: center;
    padding: 0;
}

.topic-reply-panel.is-classic-reply .rich-editor-color-grid {
    display: grid;
    grid-template-columns: repeat(7, 44px);
    justify-content: start;
    gap: 8px;
}

.topic-reply-panel.is-classic-reply .rich-editor-swatch {
    width: 44px;
    height: 44px;
    aspect-ratio: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}

.topic-reply-panel.is-classic-reply .rich-editor-swatch.is-clear {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    color: #f3c558;
}

.topic-reply-panel.is-classic-reply .rich-editor-swatch.is-clear .rich-editor-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.topic-reply-panel.is-classic-reply .rich-editor-color-input {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #edf4fd;
    padding: 0 14px;
}

.topic-reply-panel.is-classic-reply .rich-editor-swatch:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.68), 0 10px 22px rgba(0,0,0,0.18);
}

.topic-reply-panel.is-classic-reply .rich-editor-picker-head {
    display: grid;
    grid-template-columns: 1fr 56px;
    gap: 14px;
    padding: 12px 12px 0;
}

.topic-reply-panel.is-classic-reply .rich-editor-picker-close {
    font-size: 28px;
    line-height: 1;
}

.topic-reply-panel.is-classic-reply .rich-editor-picker-title {
    padding: 6px 16px 0;
    font-size: 18px;
    font-weight: 800;
}

.topic-reply-panel.is-classic-reply .rich-editor-emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 14px;
    padding: 8px 16px 0;
}

.topic-reply-panel.is-classic-reply .rich-editor-emoji-btn {
    min-height: 46px;
    border: 0;
    background: transparent;
    font-size: 32px;
    line-height: 1;
    border-radius: 12px;
    box-shadow: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-emoji-btn:hover {
    transform: translateY(-1px) scale(1.05);
    background: rgba(255,255,255,0.03);
    box-shadow: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: #d6e2f1;
    font-size: 14px;
    font-weight: 700;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid {
    display: grid;
    grid-template-columns: repeat(8, 24px);
    gap: 4px;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
    box-shadow: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button:hover,
.topic-reply-panel.is-classic-reply .rich-editor-table-grid button.is-active {
    transform: none;
    background: rgba(245, 195, 88, 0.14);
    border-color: rgba(245, 195, 88, 0.34);
    box-shadow: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-area {
    position: relative;
    min-height: 280px;
    padding: 22px 20px 24px;
    outline: none;
    color: #ebf2fb;
    font-size: 15px;
    line-height: 1.72;
    overflow-wrap: anywhere;
    background: transparent;
}

.topic-reply-panel.is-classic-reply .rich-editor-area a {
    color: #8db8ff;
}

.topic-reply-panel.is-classic-reply .rich-editor-area img {
    display: inline-block;
    vertical-align: top;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.topic-reply-panel.is-classic-reply .rich-editor-area img.is-editor-selected-image {
    outline: 2px solid rgba(245, 195, 88, 0.72);
    outline-offset: 2px;
}

.topic-reply-panel.is-classic-reply .rich-editor-image-tools {
    gap: 14px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

.topic-reply-panel.is-classic-reply .rich-editor-image-tools-label,
.topic-reply-panel.is-classic-reply .rich-editor-image-size-label,
.topic-reply-panel.is-classic-reply .rich-editor-image-size strong {
    color: #c9d7e9;
}

.topic-reply-panel.is-classic-reply .rich-editor-footer,
.topic-reply-panel.is-classic-reply .rich-editor-hint {
    display: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-preview {
    margin: 0 16px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.025);
    overflow: hidden;
}

.topic-reply-panel.is-classic-reply .rich-editor-preview-box {
    padding: 16px;
    min-height: 90px;
    color: #ebf2fb;
}

.topic-reply-panel.is-classic-reply .rich-editor-preview-empty {
    color: #8ea3bf;
}

.topic-reply-panel.is-classic-reply .rich-editor-shell.is-fullscreen {
    position: fixed;
    inset: 18px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 36px);
}

.topic-reply-panel.is-classic-reply .rich-editor-shell.is-fullscreen .rich-editor-area {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.topic-reply-panel.is-classic-reply .rich-editor-shell.is-fullscreen .rich-editor-preview {
    flex: 0 0 auto;
}

.topic-reply-panel.is-classic-reply .rich-editor-embed {
    width: 100%;
    margin: 0 0 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    background: #02060c;
}

.topic-reply-panel.is-classic-reply .rich-editor-embed iframe,
.topic-reply-panel.is-classic-reply .rich-editor-embed video {
    display: block;
    width: 100%;
    min-height: 320px;
    border: 0;
}

.topic-reply-panel.is-classic-reply .inline-spoiler {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #0f1723;
    color: #0f1723;
    transition: color 0.18s ease, background 0.18s ease;
}

.topic-reply-panel.is-classic-reply .inline-spoiler:hover {
    color: #ffffff;
    background: #111c2a;
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar [data-tooltip] {
    position: relative;
}

@media (hover: hover) and (pointer: fine) {
    .topic-reply-panel.is-classic-reply .rich-editor-toolbar [data-tooltip]:hover::after,
    .topic-reply-panel.is-classic-reply .rich-editor-toolbar [data-tooltip]:focus-visible::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 0;
        bottom: calc(100% + 12px);
        padding: 10px 14px;
        border-radius: 10px;
        background: rgba(18, 24, 34, 0.98);
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
        z-index: 260;
        pointer-events: none;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end [data-tooltip]:hover::after,
    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end [data-tooltip]:focus-visible::after {
        left: auto;
        right: 0;
    }
}

.topic-reply-panel.is-classic-reply .topic-reply-submit-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
}

.topic-reply-panel.is-classic-reply .topic-reply-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px 0 56px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #f4c14d 0%, #d89b2f 100%);
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(216, 155, 47, 0.28);
}

.topic-reply-panel.is-classic-reply .topic-reply-submit::before {
    content: '↩';
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    line-height: 1;
}

.topic-reply-panel.is-classic-reply .topic-reply-submit:hover,
.topic-reply-panel.is-classic-reply .topic-reply-submit:focus-visible {
    background: linear-gradient(180deg, #f6c95c 0%, #dfa53a 100%);
    color: #111;
    box-shadow: 0 12px 30px rgba(216, 155, 47, 0.34);
    transform: translateY(-1px);
}

@media (max-width: 1320px) {
    .topic-reply-panel.is-classic-reply .rich-editor-toolbar {
        gap: 10px;
        padding: 12px 14px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group {
        gap: 6px;
    }
}

@media (max-width: 1180px) {
    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
        border-left: 0 !important;
        padding-left: 0 !important;
    }

    .topic-reply-panel.is-classic-reply .topic-reply-editor-layout {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .topic-reply-panel.is-classic-reply .topic-reply-avatar {
        width: 96px;
        height: 96px;
    }
}

@media (max-width: 920px) {
    .topic-reply-panel.is-classic-reply {
        padding: 20px 16px 24px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group {
        width: 100%;
        border-left: 0 !important;
        padding-left: 0 !important;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-preview {
        justify-content: center;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-emoji-panel {
        min-width: min(640px, calc(100vw - 36px));
        max-width: min(640px, calc(100vw - 36px));
    }

    .topic-reply-panel.is-classic-reply .rich-editor-emoji-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .topic-reply-panel.is-classic-reply {
        border-radius: 18px;
        padding: 18px 12px 22px;
    }

    .topic-reply-panel.is-classic-reply .topic-reply-editor-layout {
        grid-template-columns: 1fr;
    }

    .topic-reply-panel.is-classic-reply .topic-reply-avatar-col {
        justify-content: flex-start;
    }

    .topic-reply-panel.is-classic-reply .topic-reply-avatar {
        width: 84px;
        height: 84px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-shell {
        border-radius: 16px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar {
        gap: 8px;
        padding: 10px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group {
        width: 100%;
        gap: 6px;
        border-left: 0 !important;
        padding-left: 0 !important;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end {
        justify-content: space-between;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-control,
    .topic-reply-panel.is-classic-reply .rich-editor-menu > summary {
        min-height: 40px;
        padding: 0 10px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-preview {
        flex: 1 1 100%;
        justify-content: center;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel,
    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-emoji-panel {
        position: fixed;
        left: 12px !important;
        right: 12px !important;
        top: auto;
        bottom: 12px;
        width: auto;
        min-width: 0;
        max-width: none;
        max-height: min(70vh, 560px);
        overflow: auto;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel::before {
        display: none;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-picker-head {
        grid-template-columns: 1fr 48px;
        gap: 10px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-emoji-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-emoji-btn {
        min-height: 42px;
        font-size: 28px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-area {
        min-height: 220px;
        padding: 18px 16px 20px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-shell.is-fullscreen {
        inset: 8px;
        max-height: calc(100vh - 16px);
    }

    .topic-reply-panel.is-classic-reply .topic-reply-submit-row {
        padding-top: 16px;
    }

    .topic-reply-panel.is-classic-reply .topic-reply-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .topic-reply-panel.is-classic-reply .rich-editor-btn-text {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-preview .rich-editor-btn-text {
        max-width: none;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-picker-title {
        font-size: 16px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-emoji-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


/* ===== reply editor final ui tuning ===== */
.topic-reply-panel.is-classic-reply .rich-editor-toolbar {
    overflow: visible;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu {
    overflow: visible;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-align-panel,
.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
    overflow: visible;
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar [data-tooltip],
.topic-reply-panel.is-classic-reply .rich-editor-menu-panel [data-tooltip] {
    position: relative;
}

@media (hover: hover) and (pointer: fine) {
    .topic-reply-panel.is-classic-reply .rich-editor-toolbar [data-tooltip]:hover::after,
    .topic-reply-panel.is-classic-reply .rich-editor-toolbar [data-tooltip]:focus-visible::after,
    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel [data-tooltip]:hover::after,
    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel [data-tooltip]:focus-visible::after {
        left: 50%;
        right: auto;
        top: calc(100% + 10px);
        bottom: auto;
        transform: translateX(-50%);
        padding: 10px 14px;
        border-radius: 10px;
        background: rgba(20, 24, 31, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.06);
        color: #ffffff;
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
        z-index: 420;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end [data-tooltip]:hover::after,
    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end [data-tooltip]:focus-visible::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-align-panel {
    min-width: 108px;
    padding: 12px;
}

.topic-reply-panel.is-classic-reply .rich-editor-align-list {
    gap: 10px;
}

.topic-reply-panel.is-classic-reply .rich-editor-align-list .rich-editor-toolbar-control {
    min-height: 44px;
    border-radius: 14px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-emoji-panel {
    min-width: min(740px, calc(100vw - 56px));
    max-width: min(740px, calc(100vw - 56px));
    padding: 22px 22px 24px;
    gap: 18px;
    background: linear-gradient(180deg, rgba(29, 30, 35, 0.995), rgba(21, 22, 27, 0.998));
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.46);
}

.topic-reply-panel.is-classic-reply .rich-editor-picker-head {
    grid-template-columns: minmax(0, 1fr) 56px;
    gap: 18px;
    padding: 0;
    align-items: center;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-emoji-panel input[type="search"] {
    min-height: 56px;
    padding: 0 18px;
    border-radius: 14px;
    border-color: rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.18);
}

.topic-reply-panel.is-classic-reply .rich-editor-picker-close {
    min-width: 56px;
    min-height: 56px;
    padding: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.topic-reply-panel.is-classic-reply .rich-editor-picker-title {
    padding: 0;
    font-size: 18px;
    font-weight: 800;
    color: #f2f4f7;
}

.topic-reply-panel.is-classic-reply .rich-editor-emoji-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 22px;
    padding: 0 6px 0 0;
    align-items: center;
}

.topic-reply-panel.is-classic-reply .rich-editor-emoji-btn {
    width: 38px;
    height: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: transparent;
    font-size: 34px;
    line-height: 1;
}

.topic-reply-panel.is-classic-reply .rich-editor-emoji-btn.is-hidden,
.topic-reply-panel.is-classic-reply .rich-editor-table-grid button.is-hidden-row {
    display: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-emoji-btn:hover {
    transform: translateY(-1px) scale(1.04);
    background: rgba(255, 255, 255, 0.035);
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
    min-width: 356px;
    max-width: 356px;
    max-height: none;
    overflow: visible;
    padding: 18px 18px 16px;
    gap: 12px;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-label {
    width: 100%;
    min-height: 0;
    padding: 0;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #eef3fb;
    font-size: 18px;
    font-weight: 500;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid {
    display: grid;
    grid-template-columns: repeat(10, 20px);
    gap: 8px;
    justify-content: center;
    padding: 12px 14px 14px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.035);
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button {
    width: 20px;
    height: 20px;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(18, 22, 31, 0.62);
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button:hover,
.topic-reply-panel.is-classic-reply .rich-editor-table-grid button.is-active {
    background: rgba(24, 27, 36, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 920px) {
    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-emoji-panel {
        min-width: min(680px, calc(100vw - 36px));
        max-width: min(680px, calc(100vw - 36px));
        padding: 18px 18px 20px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-emoji-grid {
        gap: 16px 18px;
    }
}

@media (max-width: 760px) {
    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-emoji-panel,
    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel,
    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-align-panel {
        overflow: auto;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-emoji-grid {
        gap: 14px 16px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-table-grid {
        grid-template-columns: repeat(10, 18px);
        gap: 6px;
        padding: 10px 10px 12px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-table-grid button {
        width: 18px;
        height: 18px;
    }
}

/* ===== final editor fixes: transparent png, table menu, preview button ===== */
.topic-reply-panel.is-classic-reply {
    overflow: visible;
}

.topic-reply-panel.is-classic-reply .topic-reply-editor-main {
    position: relative;
    z-index: 6;
}

.topic-reply-panel.is-classic-reply .topic-reply-submit-row {
    position: relative;
    z-index: 1;
}

.formatted-content img.is-transparent-image,
.rich-editor-area img.is-transparent-image,
.rich-editor-preview-box img.is-transparent-image,
.topic-reply-panel.is-classic-reply .rich-editor-area img.is-transparent-image,
.topic-reply-panel.is-classic-reply .rich-editor-preview-box img.is-transparent-image {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-preview {
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    padding: 0;
    justify-content: center;
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-preview .rich-editor-btn-text {
    display: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-toolbar-control.is-preview .rich-editor-icon {
    margin: 0;
}

@media (hover: hover) and (pointer: fine) {
    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end [data-tooltip]:hover::after,
    .topic-reply-panel.is-classic-reply .rich-editor-toolbar-group.is-end [data-tooltip]:focus-visible::after {
        left: auto !important;
        right: 0 !important;
        transform: none !important;
    }
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
    min-width: 286px;
    max-width: 286px;
    max-height: none;
    overflow: visible;
    padding: 14px;
    gap: 10px;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-label {
    width: 100%;
    min-height: 0;
    padding: 0;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 16px;
    font-weight: 800;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid {
    grid-template-columns: repeat(10, 18px);
    gap: 5px;
    justify-content: center;
    padding: 10px 8px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button {
    width: 18px;
    height: 18px;
    border-radius: 0;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button.is-hidden-row {
    display: inline-block !important;
}

@media (max-width: 760px) {
    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
        min-width: min(286px, calc(100vw - 24px));
        max-width: min(286px, calc(100vw - 24px));
        overflow: auto;
    }
}


/* ===== final editor polish: emoji panel, table growth, format persistence, transparent media ===== */
.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-emoji-panel {
    min-width: min(560px, calc(100vw - 40px));
    max-width: min(560px, calc(100vw - 40px));
    padding: 18px 18px 20px;
    gap: 14px;
}

.topic-reply-panel.is-classic-reply .rich-editor-picker-head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.topic-reply-panel.is-classic-reply .rich-editor-picker-close {
    order: 0;
    min-width: 52px;
    min-height: 52px;
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 14px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-emoji-panel input[type="search"] {
    order: 1;
    min-height: 52px;
}

.topic-reply-panel.is-classic-reply .rich-editor-emoji-grid {
    gap: 14px 16px;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
    min-width: 272px;
    max-width: 272px;
    padding: 14px 12px 12px;
    gap: 8px;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid {
    grid-template-columns: repeat(10, 16px);
    gap: 4px;
    padding: 10px 8px 8px;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button {
    width: 16px;
    height: 16px;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button.is-hidden-row {
    display: none !important;
}

.formatted-content img.is-transparent-image,
.rich-editor-area img.is-transparent-image,
.rich-editor-preview-box img.is-transparent-image,
.formatted-content img[src$=".png"],
.formatted-content img[src*=".png?"],
.formatted-content img[src$=".webp"],
.formatted-content img[src*=".webp?"],
.formatted-content img[src$=".gif"],
.formatted-content img[src*=".gif?"],
.formatted-content img[src$=".svg"],
.formatted-content img[src*=".svg?"],
.rich-editor-area img[src^="data:image/png"],
.rich-editor-area img[src^="data:image/webp"],
.rich-editor-area img[src^="data:image/gif"],
.rich-editor-area img[src^="data:image/svg+xml"],
.rich-editor-preview-box img[src^="data:image/png"],
.rich-editor-preview-box img[src^="data:image/webp"],
.rich-editor-preview-box img[src^="data:image/gif"],
.rich-editor-preview-box img[src^="data:image/svg+xml"],
.topic-reply-panel.is-classic-reply .rich-editor-area img[src$=".png"],
.topic-reply-panel.is-classic-reply .rich-editor-area img[src*=".png?"],
.topic-reply-panel.is-classic-reply .rich-editor-area img[src$=".webp"],
.topic-reply-panel.is-classic-reply .rich-editor-area img[src*=".webp?"],
.topic-reply-panel.is-classic-reply .rich-editor-area img[src$=".gif"],
.topic-reply-panel.is-classic-reply .rich-editor-area img[src*=".gif?"],
.topic-reply-panel.is-classic-reply .rich-editor-area img[src$=".svg"],
.topic-reply-panel.is-classic-reply .rich-editor-area img[src*=".svg?"] {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

@media (max-width: 760px) {
    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-emoji-panel {
        min-width: min(520px, calc(100vw - 24px));
        max-width: min(520px, calc(100vw - 24px));
    }

    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
        min-width: min(272px, calc(100vw - 24px));
        max-width: min(272px, calc(100vw - 24px));
    }
}


/* ===== reply pagination + final rich text fixes ===== */
.formatted-content strong,
.formatted-content b {
    font-weight: 700;
}

.formatted-content em,
.formatted-content i {
    font-style: italic;
}

.formatted-content s,
.formatted-content strike,
.formatted-content del {
    text-decoration: line-through;
}

.topic-pagination {
    margin: 18px 0 22px;
    padding: 12px 16px;
}

.topic-pagination-bottom {
    margin-top: 20px;
}

.topic-pagination-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--text-soft);
}

.topic-pagination-inner a,
.topic-pagination-inner span {
    min-width: 42px;
    min-height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    color: #d8e0ee;
    white-space: nowrap;
}

.topic-pagination-inner a:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.topic-pagination-inner .is-active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.topic-pagination-inner .is-disabled,
.topic-pagination-ellipsis {
    color: rgba(216, 224, 238, 0.56);
}

.topic-pagination-ellipsis {
    min-width: 28px !important;
    padding: 0 4px !important;
    background: transparent !important;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid,
.topic-reply-panel.is-classic-reply .rich-editor-table-grid button {
    box-sizing: border-box;
}

.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
    min-width: 294px;
    max-width: 294px;
    padding: 14px 14px 16px;
    overflow: visible;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid {
    grid-template-columns: repeat(10, 22px);
    gap: 6px;
    justify-content: center;
    padding: 12px 14px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    padding: 0;
    flex: 0 0 22px;
    display: block;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(18, 22, 31, 0.7);
    box-shadow: none;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button:hover,
.topic-reply-panel.is-classic-reply .rich-editor-table-grid button.is-active {
    transform: none;
    background: rgba(255, 196, 108, 0.18);
    border-color: rgba(255, 196, 108, 0.34);
}

@media (max-width: 760px) {
    .topic-pagination-inner {
        gap: 8px;
    }

    .topic-pagination-inner a,
    .topic-pagination-inner span {
        min-width: 38px;
        min-height: 38px;
        padding: 0 12px;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
        min-width: min(294px, calc(100vw - 24px));
        max-width: min(294px, calc(100vw - 24px));
    }
}


/* ===== 2026-04-04 refresh: download rebuild, table panel frame polish ===== */
.topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
    min-width: min(324px, calc(100vw - 28px)) !important;
    max-width: min(324px, calc(100vw - 28px)) !important;
    padding: 12px !important;
    gap: 10px !important;
    border-radius: 22px !important;
    border: 1px solid rgba(126, 154, 198, 0.18) !important;
    background: linear-gradient(180deg, rgba(9, 18, 32, 0.995), rgba(6, 12, 22, 0.995)) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42) !important;
    overflow: hidden !important;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-label {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #eef4fd !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid {
    grid-template-columns: repeat(10, 22px) !important;
    justify-content: center !important;
    gap: 6px !important;
    width: max-content !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 12px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    padding: 0 !important;
    border-radius: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    background: rgba(18, 22, 31, 0.62) !important;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button:hover,
.topic-reply-panel.is-classic-reply .rich-editor-table-grid button.is-active {
    background: linear-gradient(180deg, rgba(255, 196, 108, 0.28), rgba(255, 196, 108, 0.12)) !important;
    border-color: rgba(255, 196, 108, 0.52) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16) !important;
}

.topic-reply-panel.is-classic-reply .rich-editor-table-grid button.is-hidden-row {
    display: none !important;
}

@media (max-width: 760px) {
    .topic-reply-panel.is-classic-reply .rich-editor-menu-panel.is-table-panel {
        min-width: min(306px, calc(100vw - 24px)) !important;
        max-width: min(306px, calc(100vw - 24px)) !important;
        padding: 10px !important;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-table-grid {
        grid-template-columns: repeat(10, 20px) !important;
        gap: 5px !important;
        padding: 10px !important;
    }

    .topic-reply-panel.is-classic-reply .rich-editor-table-grid button {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
    }
}


/* ===== topic moderation mini list compact two-row override ===== */
.topic-hero {
    isolation: isolate;
}

.topic-actions-inline {
    width: min(292px, 100%);
    z-index: 260;
}

.topic-mod-menu {
    z-index: 300;
}

.topic-mod-trigger {
    min-height: 56px;
    padding: 10px 12px 10px 14px;
    align-items: flex-start;
}

.topic-mod-trigger-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.topic-mod-trigger-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.topic-mod-trigger-meta {
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
}

.topic-mod-trigger-status {
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-mod-dropdown {
    top: calc(100% + 8px);
    width: min(292px, calc(100vw - 28px));
    padding: 10px;
    border-radius: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    z-index: 320;
}

.topic-mod-mini-head {
    grid-column: 1 / -1;
    min-height: 0;
    padding: 12px 13px;
    gap: 4px;
}

.topic-mod-mini-group {
    min-height: 0;
    padding: 12px;
    gap: 8px;
}

.topic-mod-mini-group:last-child {
    align-content: start;
}

.topic-mod-mini-head strong {
    font-size: 13px;
}

.topic-mod-mini-head span {
    font-size: 11px;
    line-height: 1.35;
}

.topic-mod-mini-label {
    font-size: 9px;
    letter-spacing: 0.11em;
}

.topic-mod-tags,
.topic-mod-actions-compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.topic-mod-tags form:last-child,
.topic-mod-actions-compact form:last-child {
    grid-column: 1 / -1;
}

.topic-mod-tag-btn,
.topic-mod-action-btn {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 11px;
    font-size: 10px;
    line-height: 1.15;
}

.topic-mod-action-btn {
    justify-content: center;
    text-align: center;
}

@media (max-width: 980px) {
    .topic-mod-dropdown {
        position: static;
        width: 100%;
        margin-top: 10px;
        grid-template-columns: 1fr;
    }

    .topic-mod-mini-head {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .topic-mod-trigger {
        padding: 10px 12px;
    }

    .topic-mod-trigger-meta {
        gap: 5px;
    }

    .topic-mod-trigger-status {
        max-width: 90px;
        font-size: 9px;
    }

    .topic-mod-dropdown,
    .topic-mod-tags,
    .topic-mod-actions-compact {
        grid-template-columns: 1fr;
    }

    .topic-mod-tags form:last-child,
    .topic-mod-actions-compact form:last-child {
        grid-column: auto;
    }
}


/* ===== topic moderation adaptive polish final ===== */
.topic-actions-inline {
    width: clamp(268px, 24vw, 304px);
    max-width: 100%;
}

.topic-mod-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 10px;
    row-gap: 6px;
}

.topic-mod-trigger-copy {
    display: grid;
    align-content: start;
    min-width: 0;
}

.topic-mod-trigger-title {
    max-width: 100%;
    word-break: break-word;
}

.topic-mod-trigger-meta {
    min-width: 0;
}

.topic-mod-dropdown {
    box-sizing: border-box;
    overflow: hidden;
}

.topic-mod-mini-head,
.topic-mod-mini-group {
    min-width: 0;
}

.topic-mod-mini-head strong,
.topic-mod-mini-head span,
.topic-mod-mini-label {
    min-width: 0;
}

.topic-mod-mini-head span {
    overflow-wrap: anywhere;
}

.topic-mod-tags,
.topic-mod-actions-compact {
    align-items: stretch;
}

.topic-mod-tags form,
.topic-mod-actions-compact form {
    min-width: 0;
}

.topic-mod-tag-btn,
.topic-mod-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: center;
}

@media (max-width: 1180px) {
    .topic-actions-inline {
        width: min(292px, 100%);
    }
}

@media (max-width: 720px) {
    .topic-actions-inline {
        width: 100%;
        max-width: 340px;
    }
}

@media (max-width: 380px) {
    .topic-mod-dropdown {
        width: min(100%, calc(100vw - 18px));
        padding: 9px;
        gap: 8px;
        grid-template-columns: 1fr;
    }

    .topic-mod-mini-head,
    .topic-mod-mini-group {
        padding: 11px;
        border-radius: 14px;
    }

    .topic-mod-tags,
    .topic-mod-actions-compact {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .topic-mod-tags form:last-child,
    .topic-mod-actions-compact form:last-child {
        grid-column: auto;
    }

    .topic-mod-tag-btn,
    .topic-mod-action-btn {
        min-height: 36px;
        padding: 8px 10px;
        font-size: 11px;
    }
}

@media (min-width: 381px) and (max-width: 520px) {
    .topic-mod-dropdown {
        width: min(304px, calc(100vw - 18px));
        padding: 9px;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topic-mod-mini-head {
        grid-column: 1 / -1;
    }

    .topic-mod-tags,
    .topic-mod-actions-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .topic-mod-tag-btn,
    .topic-mod-action-btn {
        min-height: 34px;
        padding: 7px 8px;
        font-size: 10px;
    }
}


/* ===== Create topic page aligned with reply composer ===== */
.create-topic-compose-panel {
    margin-top: 14px;
}

.create-topic-compose-panel .topic-reply-form-layout {
    margin: 0;
}

.create-topic-compose-panel .create-topic-editor-layout {
    align-items: stretch;
}

.create-topic-compose-panel .create-topic-avatar-col {
    align-self: stretch;
}

.create-topic-compose-panel .create-topic-avatar {
    width: clamp(120px, 12vw, 178px);
    height: clamp(120px, 12vw, 178px);
}

.create-topic-compose-panel .create-topic-editor-main {
    display: grid;
    gap: 0;
}

.create-topic-title-wrap {
    margin-bottom: 0;
}

.create-topic-title-input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid rgba(134, 162, 205, 0.15);
    background: linear-gradient(180deg, rgba(16, 26, 42, 0.92), rgba(10, 18, 31, 0.98));
    color: #e5edf8;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255,255,255,0.03);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    margin-bottom: 16px;
}

.create-topic-title-input::placeholder {
    color: rgba(196, 209, 228, 0.62);
    font-weight: 500;
}

.create-topic-title-input:focus {
    outline: none;
    border-color: rgba(245, 195, 88, 0.32);
    box-shadow: 0 0 0 3px rgba(245, 195, 88, 0.10), 0 18px 34px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255,255,255,0.03);
}

.create-topic-compose-panel .rich-editor-shell {
    min-height: 100%;
}

.create-topic-submit-row-simple {
    padding-top: 18px;
}

.create-topic-submit-btn {
    min-width: 272px;
}

@media (max-width: 900px) {
    .create-topic-compose-panel .create-topic-avatar {
        width: 108px;
        height: 108px;
    }

    .create-topic-title-input {
        font-size: 17px;
    }
}

@media (max-width: 760px) {
    .create-topic-compose-panel .topic-reply-editor-layout {
        grid-template-columns: 1fr;
    }

    .create-topic-compose-panel .create-topic-avatar-col {
        justify-content: flex-start;
    }

    .create-topic-compose-panel .create-topic-avatar {
        width: 96px;
        height: 96px;
    }

    .create-topic-submit-btn {
        width: 100%;
        min-width: 0;
    }
}

/* --- Role management polish --- */
.admin-role-toolbar {
    display: flex;
    justify-content: flex-end;
    width: min(340px, 100%);
}
.admin-role-search {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(120, 146, 191, 0.2);
    background: linear-gradient(135deg, rgba(22, 32, 50, 0.94), rgba(12, 20, 36, 0.96));
    color: #eff5ff;
    padding: 0 16px;
}
.permission-groups {
    display: grid;
    gap: 16px;
}
.permission-group-card {
    border: 1px solid rgba(120, 146, 191, 0.14);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(18, 27, 46, 0.78), rgba(10, 17, 32, 0.9));
    padding: 16px;
}
.permission-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.permission-group-head strong {
    color: #f3f6ff;
}
.permission-group-head span {
    color: #8ea0be;
    font-size: 12px;
}
.permissions-grid.compact {
    gap: 12px;
}
.role-card-head {
    align-items: center;
}
.role-cards-list {
    display: grid;
    gap: 20px;
}
.admin-role-actions {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

/* --- Hidden posts moderation --- */
.post-hidden-shell {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    border: 1px dashed rgba(239, 180, 74, 0.42);
    background: linear-gradient(135deg, rgba(34, 28, 18, 0.56), rgba(18, 20, 32, 0.78));
}
.post-hidden-banner {
    display: grid;
    gap: 4px;
}
.post-hidden-banner strong {
    color: #ffe4a4;
    font-size: 15px;
}
.post-hidden-banner span {
    color: #b8c3d8;
    font-size: 13px;
}
.post-hidden-details {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(120, 146, 191, 0.16);
    background: rgba(6, 13, 27, 0.46);
}
.post-hidden-details summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 16px;
    color: #f4f7ff;
    font-weight: 700;
}
.post-hidden-details summary::-webkit-details-marker {
    display: none;
}
.post-content-hidden {
    padding: 0 16px 16px;
}
.post-action-moderation {
    color: #ffd392;
    border-color: rgba(255, 191, 99, 0.28);
}
.post-action-restore {
    color: #b8ffd6;
    border-color: rgba(77, 180, 136, 0.28);
}
.post-action-danger {
    color: #ffd3d3;
    border-color: rgba(223, 117, 117, 0.28);
}

/* --- Extra role colors --- */
.role-graphite { background: rgba(116, 126, 146, 0.12); color: #dce4ef; border-color: rgba(116, 126, 146, 0.24); }
.role-sky { background: rgba(88, 182, 255, 0.12); color: #c7ebff; border-color: rgba(88, 182, 255, 0.24); }
.role-teal { background: rgba(70, 191, 181, 0.12); color: #c2fff7; border-color: rgba(70, 191, 181, 0.24); }
.role-green { background: rgba(91, 196, 106, 0.12); color: #d8ffe0; border-color: rgba(91, 196, 106, 0.24); }
.role-lime { background: rgba(170, 218, 76, 0.12); color: #f0ffd2; border-color: rgba(170, 218, 76, 0.24); }
.role-purple { background: rgba(161, 114, 255, 0.12); color: #ead8ff; border-color: rgba(161, 114, 255, 0.24); }
.role-rose { background: rgba(234, 98, 136, 0.12); color: #ffd6e3; border-color: rgba(234, 98, 136, 0.24); }
.role-text-graphite { color: #dce4ef; }
.role-text-sky { color: #c7ebff; }
.role-text-teal { color: #c2fff7; }
.role-text-green { color: #d8ffe0; }
.role-text-lime { color: #f0ffd2; }
.role-text-purple { color: #ead8ff; }
.role-text-rose { color: #ffd6e3; }

@media (max-width: 1024px) {
    .admin-role-toolbar {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .admin-role-create-panel .panel-head,
    .role-card-head,
    .permission-group-head {
        align-items: flex-start;
        flex-direction: column;
    }
}


.role-text-inline,
.user-text-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
    flex-wrap: nowrap;
}

.verified-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 6px rgba(64, 156, 255, 0.28));
}

.verified-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.verified-mark--sm {
    width: 15px;
    height: 15px;
    flex-basis: 15px;
}

.verified-mark--md {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
}

.verified-mark--avatar {
    position: absolute;
    right: -8px;
    bottom: 6px;
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: none;
    z-index: 3;
}

.forum-profile-avatar .verified-mark--avatar img {
    width: 75%;
    height: 75%;
    object-fit: contain;
    filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.checkbox-row input[type='checkbox'] {
    width: 16px;
    height: 16px;
}

/* ===== 2026-04-05 homepage latest topics premium redesign ===== */
.latest-topics-premium {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top center, rgba(71, 122, 214, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(8, 15, 27, 0.97), rgba(7, 13, 23, 0.99));
}
.latest-topics-premium::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(91, 138, 226, 0.06), transparent 22%, transparent 78%, rgba(255, 255, 255, 0.02)),
        radial-gradient(circle at 15% 50%, rgba(18, 73, 164, 0.10), transparent 26%);
}
.latest-topics-premium__head,
.latest-topics-premium__list {
    position: relative;
    z-index: 1;
}
.latest-topics-premium__head {
    margin-bottom: 16px;
}
.latest-topics-premium__search {
    min-height: 42px;
    padding-inline: 18px;
}
.latest-topics-premium__list {
    display: grid;
    gap: 10px;
}
.latest-topic-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    align-items: center;
    gap: 18px;
    min-height: 98px;
    padding: 15px 18px 15px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(12, 22, 37, 0.92), rgba(8, 16, 28, 0.96)),
        linear-gradient(90deg, rgba(61, 104, 180, 0.06), transparent 40%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 10px 30px rgba(0, 0, 0, 0.14);
    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
    overflow: hidden;
}
.latest-topic-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(103, 156, 255, 0.10), rgba(103, 156, 255, 0.75), rgba(103, 156, 255, 0.12));
    opacity: 0;
    transition: opacity .18s ease, box-shadow .18s ease;
}
.latest-topic-row::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(96, 145, 238, 0.08), transparent 20%, transparent 75%, rgba(255, 255, 255, 0.015));
    opacity: 0.55;
}
.latest-topic-row:hover {
    transform: translateY(-1px);
    border-color: rgba(102, 151, 240, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 16px 36px rgba(0, 0, 0, 0.18);
}
.latest-topic-row:hover::before {
    opacity: 1;
    box-shadow: 0 0 18px rgba(103, 156, 255, 0.30);
}
.latest-topic-row__main,
.latest-topic-row__aside {
    position: relative;
    z-index: 1;
}
.latest-topic-row__main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.latest-topic-row__avatar {
    flex-shrink: 0;
}
.latest-topic-row__avatar .avatar,
.latest-topic-row__avatar.avatar-presence > .avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.latest-topic-row__content {
    display: grid;
    gap: 7px;
    min-width: 0;
}
.latest-topic-row__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.latest-topic-row__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.latest-topic-chip {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid rgba(95, 141, 225, 0.24);
    background: rgba(95, 141, 225, 0.11);
    color: #dbe6ff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.latest-topic-chip.is-open {
    background: rgba(95, 141, 225, 0.13);
    border-color: rgba(95, 141, 225, 0.24);
    color: #dce7ff;
}
.latest-topic-chip.is-locked {
    background: rgba(215, 115, 115, 0.10);
    border-color: rgba(215, 115, 115, 0.22);
    color: #ffd7d7;
}
.latest-topic-chip.is-pinned {
    background: rgba(219, 169, 84, 0.12);
    border-color: rgba(219, 169, 84, 0.24);
    color: #ffe0af;
}
.latest-topic-row__title {
    display: block;
    color: var(--text-main);
    font-size: 17px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.latest-topic-row__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.35;
}
.latest-topic-row__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}
.latest-topic-row__author .user-text-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.latest-topic-row__online {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #68efac;
}
.latest-topic-row__online::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 10px rgba(104, 239, 172, 0.5);
}
.latest-topic-row__aside {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding-left: 18px;
}
.latest-topic-row__aside::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}
.latest-topic-row__metrics {
    display: grid;
    gap: 10px;
}
.latest-topic-metric {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.latest-topic-metric span,
.latest-topic-row__activity span {
    color: var(--text-soft);
    font-size: 12px;
}
.latest-topic-metric strong {
    font-size: 18px;
    line-height: 1;
    font-weight: 650;
    letter-spacing: -0.03em;
    color: #f1f5ff;
}
.latest-topic-row__activity {
    display: grid;
    gap: 6px;
    justify-items: end;
    text-align: right;
}
.latest-topic-row__activity strong {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    color: #edf3ff;
}

@media (max-width: 1100px) {
    .latest-topic-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .latest-topic-row__aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding-left: 0;
        padding-top: 12px;
    }
    .latest-topic-row__aside::before {
        left: 0;
        right: 0;
        top: 0;
        bottom: auto;
        width: auto;
        height: 1px;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
    }
}

@media (max-width: 760px) {
    .latest-topics-premium__head {
        gap: 12px;
    }
    .latest-topic-row {
        padding: 14px 14px 13px 16px;
        border-radius: 18px;
    }
    .latest-topic-row__main {
        gap: 12px;
    }
    .latest-topic-row__avatar .avatar,
    .latest-topic-row__avatar.avatar-presence > .avatar {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }
    .latest-topic-row__title {
        font-size: 16px;
    }
    .latest-topic-row__meta {
        font-size: 12px;
        gap: 6px;
    }
    .latest-topic-row__aside {
        grid-template-columns: 1fr;
    }
    .latest-topic-row__activity {
        justify-items: start;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .latest-topic-row__main {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .latest-topic-row__avatar {
        display: none;
    }
    .latest-topic-row__content {
        gap: 8px;
    }
    .latest-topic-row__badges {
        gap: 5px;
    }
    .latest-topic-chip {
        min-height: 21px;
        padding: 0 8px;
        font-size: 9px;
    }
    .latest-topic-row__title {
        font-size: 15px;
    }
}


/* ===== 2026-04-05 profile latest topics redesign ===== */
.profile-latest-topics-card {
    overflow: hidden;
}

.profile-latest-topics-head {
    margin-bottom: 12px;
}

.profile-latest-topics-list {
    display: grid;
    gap: 10px;
}

.profile-latest-topic-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) 50px 164px 188px;
    align-items: stretch;
    overflow: hidden;
    min-height: 78px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 18px;
    background:
        linear-gradient(90deg, rgba(12, 23, 41, 0.74), rgba(7, 14, 26, 0.82) 56%, rgba(9, 17, 31, 0.84));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 10px 22px rgba(2, 8, 20, 0.12);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.profile-latest-topic-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(86, 146, 245, 0), rgba(86, 146, 245, 0.76), rgba(86, 146, 245, 0));
    opacity: 0.44;
    transition: opacity 0.18s ease, background 0.18s ease;
}

.profile-latest-topic-card:hover {
    border-color: rgba(106, 152, 235, 0.1);
    background: linear-gradient(90deg, rgba(14, 26, 46, 0.78), rgba(8, 16, 30, 0.86) 56%, rgba(10, 18, 34, 0.88));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 14px 26px rgba(2, 8, 20, 0.16);
}

.profile-latest-topic-card:hover::before {
    opacity: 0.82;
}

.profile-latest-topic-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: stretch;
}

.profile-latest-topic-avatar-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.018);
    border-right: 1px solid rgba(255, 255, 255, 0.045);
}

.profile-latest-topic-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
}

.profile-latest-topic-copy {
    min-width: 0;
    padding: 13px 18px;
    display: grid;
    align-content: center;
    gap: 6px;
}

.profile-latest-topic-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.profile-latest-topic-title {
    min-width: 0;
    color: var(--heading);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.24;
}

.profile-latest-topic-card:hover .profile-latest-topic-title {
    color: #f6f9ff;
}

.profile-latest-topic-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-soft);
}

.profile-latest-topic-meta-author {
    font-weight: 500;
}

.profile-latest-topic-state,
.profile-latest-topic-stats,
.profile-latest-topic-last {
    border-left: 1px solid rgba(255, 255, 255, 0.045);
    background: rgba(255, 255, 255, 0.01);
}

.profile-latest-topic-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    color: #8d98ab;
}

.profile-latest-topic-state.is-empty {
    color: transparent;
}

.profile-latest-topic-state svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 1.85;
    fill: none;
}

.profile-latest-topic-state.is-pinned {
    color: #d59b2d;
}

.profile-latest-topic-state.is-locked {
    color: #d86a6a;
}

.profile-latest-topic-stats,
.profile-latest-topic-last {
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 13px 16px;
}

.profile-latest-topic-stats div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--text-soft);
}

.profile-latest-topic-stats strong {
    color: var(--heading);
    font-size: 13px;
    font-weight: 700;
}

.profile-latest-topic-last {
    justify-items: end;
    text-align: right;
    padding-left: 14px;
    padding-right: 18px;
}

.profile-latest-topic-last-date {
    color: var(--heading);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.24;
}

.profile-latest-topic-last-author {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

@media (max-width: 1220px) {
    .profile-latest-topic-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-latest-topic-state,
    .profile-latest-topic-stats,
    .profile-latest-topic-last {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        background: rgba(255, 255, 255, 0.012);
    }

    .profile-latest-topic-state {
        justify-content: flex-start;
        padding: 11px 18px;
    }

    .profile-latest-topic-state.is-empty {
        display: none;
    }

    .profile-latest-topic-stats,
    .profile-latest-topic-last {
        padding: 12px 18px;
    }

    .profile-latest-topic-last {
        justify-items: start;
        text-align: left;
    }
}

@media (max-width: 720px) {
    .profile-latest-topics-head {
        margin-bottom: 10px;
    }

    .profile-latest-topics-list {
        gap: 8px;
    }

    .profile-latest-topic-main {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .profile-latest-topic-avatar-cell {
        padding: 11px 6px;
    }

    .profile-latest-topic-avatar {
        width: 34px;
        height: 34px;
    }

    .profile-latest-topic-copy {
        padding: 12px 14px;
        gap: 5px;
    }

    .profile-latest-topic-title {
        font-size: 14px;
    }

    .profile-latest-topic-meta,
    .profile-latest-topic-stats div,
    .profile-latest-topic-last-author {
        font-size: 11px;
    }

    .profile-latest-topic-last-date {
        font-size: 13px;
    }
}


.profile-comments-pagination {
    margin-top: 18px;
}

@media (max-width: 640px) {
    .profile-comments-pagination {
        margin-top: 14px;
    }
}


/* === profile birth date + personal signature === */
.forum-settings-field-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    color: #eef4ff;
    font-weight: 700;
}

.forum-settings-field-head small {
    color: rgba(202, 216, 255, 0.72);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

.forum-settings-signature-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-signature-composer {
    margin-top: 2px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.profile-signature-composer .topic-reply-form-layout {
    gap: 0;
}

.profile-signature-composer .topic-reply-editor-layout {
    display: block;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0;
    align-items: stretch;
}

.profile-signature-composer .topic-reply-avatar-col {
    display: none !important;
}

.profile-signature-composer .topic-reply-editor-main {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.post-signature {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed rgba(120, 146, 191, 0.28);
}

.post-signature-label {
    margin-bottom: 10px;
    color: rgba(170, 191, 235, 0.82);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.post-signature-content {
    opacity: 0.96;
}

.post-signature-content > :first-child {
    margin-top: 0;
}

.post-signature-content > :last-child {
    margin-bottom: 0;
}
