:root {
    color-scheme: dark;
    --bg: #0f1115;
    --bg-deep: #0a0c10;
    --surface: #151922;
    --surface-2: #1b2230;
    --surface-3: #212a3a;
    --glass: rgba(21, 25, 34, .78);
    --line: rgba(201, 209, 217, .11);
    --line-strong: rgba(201, 209, 217, .18);
    --text: #ffffff;
    --muted: #c9d1d9;
    --soft: #8b949e;
    --accent: #ff4d6d;
    --accent-2: #ff5f7a;
    --accent-3: #ff7a95;
    --ok: #68e6b1;
    --danger: #ff6b7f;
    --shadow: 0 22px 60px rgba(0, 0, 0, .34);
    --shadow-soft: 0 12px 32px rgba(0, 0, 0, .24);
    --radius: 8px;
    --container: 1180px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    padding-bottom: 74px;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 77, 109, .075), rgba(15, 17, 21, 0) 340px),
        linear-gradient(135deg, rgba(27, 34, 48, .92), rgba(15, 17, 21, 0) 36%),
        var(--bg);
    font-family: Inter, Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

body::selection {
    color: #fff;
    background: rgba(255, 77, 109, .42);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

.narrow {
    max-width: 760px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(201, 209, 217, .08);
    background: rgba(10, 12, 16, .76);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03);
    backdrop-filter: blur(22px) saturate(1.3);
}

.nav-shell,
.nav-links,
.brand,
.mobile-actions,
.hero-actions,
.meta-row,
.topic-badges,
.post-actions,
.footer-grid,
.form-links,
.breadcrumbs,
.hero-kicker,
.hero-panel-head,
.feature-meta,
.panel-heading {
    display: flex;
    align-items: center;
}

.nav-shell {
    min-height: 76px;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    min-width: 0;
    gap: 12px;
    font-size: 1.08rem;
    font-weight: 850;
    letter-spacing: 0;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 12px 28px rgba(255, 77, 109, .25);
}

.mobile-actions {
    gap: 8px;
}

.mobile-icon-btn,
.nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(27, 34, 48, .78);
    transition: color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease), background .18s var(--ease);
}

.mobile-icon-btn svg,
.nav-toggle svg,
.mobile-bottom-nav svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-icon-btn:hover,
.nav-toggle:hover {
    color: var(--accent-3);
    border-color: rgba(255, 122, 149, .44);
    background: rgba(255, 77, 109, .08);
}

.nav-links {
    position: absolute;
    inset: 84px 16px auto 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    background: rgba(15, 17, 21, .96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s var(--ease);
}

.nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links > a {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 750;
    transition: color .18s var(--ease), background .18s var(--ease);
}

.nav-links > a:hover,
.text-link:hover {
    color: var(--accent-3);
}

.nav-links > a:hover {
    background: rgba(255, 255, 255, .035);
}

.nav-links > a.btn-primary,
.nav-links > a.btn-primary:hover {
    color: #fff;
}

.nav-search {
    min-width: 0;
}

.nav-search input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(15, 17, 21, .72);
    transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text);
    font-weight: 820;
    line-height: 1;
    transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 14px 34px rgba(255, 77, 109, .24);
}

.btn-primary:hover {
    box-shadow: 0 18px 42px rgba(255, 77, 109, .32);
}

.btn-ghost {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, .035);
}

.btn-ghost:hover {
    border-color: rgba(255, 122, 149, .38);
    background: rgba(255, 77, 109, .075);
}

.btn-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: .9rem;
}

.home-hero {
    position: relative;
    overflow: hidden;
    padding: 74px 0 54px;
    border-bottom: 1px solid rgba(201, 209, 217, .08);
    background:
        linear-gradient(135deg, rgba(255, 77, 109, .12), rgba(27, 34, 48, .06) 46%, rgba(255, 122, 149, .07)),
        linear-gradient(180deg, rgba(255, 255, 255, .026), rgba(255, 255, 255, 0));
}

.hero-grid,
.content-grid {
    display: grid;
    gap: 26px;
}

.hero-copy {
    align-self: center;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--text);
    letter-spacing: 0;
}

h1 {
    max-width: 860px;
    margin-bottom: 18px;
    font-size: clamp(2.5rem, 7vw, 5.7rem);
    line-height: .98;
    font-weight: 900;
}

h2 {
    margin-bottom: 10px;
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    line-height: 1.15;
    font-weight: 850;
}

h3 {
    margin-bottom: 8px;
    font-size: 1.08rem;
    line-height: 1.28;
    font-weight: 820;
}

.lead {
    max-width: 720px;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.75;
}

.lead.compact {
    max-width: 760px;
    margin-bottom: 0;
    font-size: 1rem;
}

.eyebrow,
.hero-kicker {
    color: var(--accent-3);
    font-size: .76rem;
    font-weight: 860;
    letter-spacing: 0;
    text-transform: uppercase;
}

.eyebrow {
    margin-bottom: 8px;
}

.hero-kicker {
    gap: 9px;
    margin-bottom: 18px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent-3);
    box-shadow: 0 0 20px rgba(255, 122, 149, .66);
}

.hero-actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-panel,
.stat-pill,
.stat-card,
.panel,
.topic-card,
.forum-card,
.form-panel,
.post-card,
.topic-head,
.reply-panel,
.admin-panel,
.notice,
.empty-state,
.search-panel,
.feature-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(27, 34, 48, .86), rgba(21, 25, 34, .72));
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.hero-panel {
    align-self: center;
    padding: 18px;
}

.hero-panel-head,
.panel-heading {
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    color: var(--soft);
    font-size: .9rem;
}

.hero-panel-head strong {
    color: var(--accent-3);
}

.pulse-list,
.topic-list,
.category-stack,
.post-stack,
.activity-feed,
.user-list {
    display: grid;
    gap: 12px;
}

.pulse-list a,
.activity-feed a,
.user-list a {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(201, 209, 217, .08);
    border-radius: 8px;
    background: rgba(15, 17, 21, .42);
    transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}

.pulse-list a:hover,
.activity-feed a:hover,
.user-list a:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 122, 149, .34);
    background: rgba(255, 77, 109, .055);
}

.pulse-list small,
.activity-feed small,
.user-list small {
    color: var(--soft);
    font-size: .84rem;
}

.home-section,
.page-section {
    padding-block: 38px;
}

.home-dashboard,
.content-grid {
    align-items: start;
    padding-block: 36px;
}

.section-heading,
.admin-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-heading h2,
.panel h2,
.admin-panel h2 {
    margin-bottom: 0;
}

.text-link,
.text-button {
    border: 0;
    padding: 0;
    color: var(--accent-3);
    background: transparent;
    font-weight: 800;
}

.featured-topic-grid {
    display: grid;
    gap: 14px;
}

.feature-card,
.topic-card {
    position: relative;
    overflow: hidden;
    transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}

.feature-card {
    padding: 18px;
}

.feature-card h3 a:hover,
.topic-card h2 a:hover,
.topic-card h3 a:hover {
    color: var(--accent-3);
}

.feature-card p,
.topic-card p {
    margin-bottom: 16px;
    color: var(--muted);
}

.feature-meta {
    flex-wrap: wrap;
    gap: 9px;
    color: var(--soft);
    font-size: .86rem;
}

.topic-card {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.topic-card:hover,
.feature-card:hover,
.forum-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 122, 149, .34);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
}

.topic-badges {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 11px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(201, 209, 217, .12);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, .035);
    font-size: .78rem;
    font-weight: 780;
}

.badge-hot {
    border-color: rgba(255, 122, 149, .34);
    color: var(--accent-3);
    background: rgba(255, 77, 109, .08);
}

.meta-row {
    flex-wrap: wrap;
    gap: 10px;
    color: var(--soft);
    font-size: .9rem;
}

.meta-row a {
    color: var(--accent-3);
    font-weight: 780;
}

.topic-metrics {
    display: flex;
    gap: 10px;
    color: var(--soft);
    font-size: .86rem;
}

.topic-metrics span {
    min-width: 98px;
}

.topic-metrics strong {
    display: block;
    color: var(--text);
    font-size: 1.16rem;
    line-height: 1.1;
}

.side-column {
    display: grid;
    gap: 14px;
}

.panel,
.admin-panel {
    padding: 18px;
}

.panel p,
.admin-panel p,
.notice {
    color: var(--muted);
}

.accent-panel {
    border-color: rgba(255, 122, 149, .22);
}

.mini-list {
    display: grid;
    gap: 8px;
}

.mini-list a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(201, 209, 217, .08);
}

.mini-list small {
    color: var(--soft);
}

.forum-group {
    display: grid;
    gap: 14px;
}

.group-heading p {
    color: var(--muted);
}

.forum-grid {
    display: grid;
    gap: 14px;
}

.forum-card {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
}

.forum-icon,
.avatar {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 77, 109, .95), rgba(255, 122, 149, .86));
    font-weight: 880;
    box-shadow: 0 10px 26px rgba(255, 77, 109, .18);
}

.avatar-img {
    object-fit: cover;
}

.mini-avatar {
    width: 38px;
    height: 38px;
}

.forum-card small {
    display: block;
    color: var(--muted);
}

.forum-count {
    color: var(--soft);
    font-size: .86rem;
    white-space: nowrap;
}

.premium-forum-grid .forum-card {
    min-height: 112px;
}

.breadcrumbs {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--soft);
    font-size: .9rem;
}

.breadcrumbs a {
    color: var(--accent-3);
    font-weight: 760;
}

.notice {
    margin-bottom: 18px;
    padding: 14px;
}

.topic-head {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
    padding: 20px;
}

.topic-head h1 {
    max-width: 980px;
    font-size: clamp(2rem, 5vw, 4rem);
}

.post-card {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.post-author {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 2px 12px;
    align-items: center;
}

.post-author a {
    font-weight: 820;
}

.post-author small {
    color: var(--soft);
}

.post-body {
    min-width: 0;
}

.post-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--soft);
    font-size: .86rem;
}

.rich-text {
    color: #eef2f6;
    overflow-wrap: anywhere;
    font-size: 1rem;
    line-height: 1.78;
}

.post-actions {
    position: sticky;
    bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(27, 34, 48, .82);
}

.icon-btn:hover {
    color: var(--accent-3);
    border-color: rgba(255, 122, 149, .36);
}

.score {
    min-width: 34px;
    color: var(--accent-3);
    text-align: center;
    font-weight: 860;
}

.reply-panel {
    margin-top: 18px;
    padding: 18px;
}

.form-panel,
.empty-state,
.search-panel {
    padding: 22px;
}

.stack-form {
    display: grid;
    gap: 15px;
}

.stack-form label,
.admin-form-grid label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 760;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    color: var(--text);
    background: rgba(10, 12, 16, .64);
    outline: none;
    transition: border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(255, 122, 149, .62);
    background: rgba(15, 17, 21, .88);
    box-shadow: 0 0 0 4px rgba(255, 77, 109, .1);
}

.check-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start;
    gap: 10px !important;
}

.check-row input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--accent);
}

.form-links {
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    color: var(--accent-3);
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 220px);
}

.auth-shell .form-panel {
    width: min(100%, 520px);
}

.flash-stack {
    position: fixed;
    top: 92px;
    left: 50%;
    z-index: 80;
    display: grid;
    gap: 10px;
    width: min(calc(100% - 32px), var(--container));
    margin: 0;
    transform: translateX(-50%);
    pointer-events: none;
}

.flash {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 13px 15px;
    background: rgba(21, 25, 34, .96);
    box-shadow: var(--shadow);
    pointer-events: auto;
    backdrop-filter: blur(16px);
}

.flash-success {
    border-color: rgba(104, 230, 177, .34);
    color: var(--ok);
}

.flash-error {
    border-color: rgba(255, 107, 127, .34);
    color: var(--danger);
}

.admin-main .flash-stack {
    position: static;
    width: auto;
    margin-bottom: 18px;
    transform: none;
    pointer-events: auto;
}

.profile-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 77, 109, .16), rgba(27, 34, 48, .78)),
        var(--surface);
    box-shadow: var(--shadow-soft);
}

.avatar-large {
    width: 76px;
    height: 76px;
    font-size: 1.6rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    padding: 17px;
}

.stat-card strong {
    display: block;
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1.15;
}

.stat-card span,
.muted {
    color: var(--muted);
}

.search-panel {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.site-footer {
    margin-top: 38px;
    padding: 30px 0 88px;
    border-top: 1px solid rgba(201, 209, 217, .08);
    color: var(--muted);
    background: rgba(10, 12, 16, .28);
}

.footer-grid {
    justify-content: space-between;
    gap: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.mobile-bottom-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 55;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(10, 12, 16, .9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.mobile-bottom-nav a {
    display: grid;
    place-items: center;
    gap: 3px;
    min-height: 48px;
    border-radius: 8px;
    color: var(--soft);
    font-size: .72rem;
    font-weight: 760;
}

.mobile-bottom-nav a:hover {
    color: var(--accent-3);
    background: rgba(255, 77, 109, .08);
}

.admin-body {
    display: grid;
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 12, 16, .92);
    backdrop-filter: blur(18px);
}

.admin-menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.admin-menu a {
    white-space: nowrap;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--muted);
}

.admin-menu a:hover {
    color: var(--accent-3);
    background: rgba(255, 77, 109, .07);
}

.admin-main {
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 24px 0 48px;
}

.admin-form-grid {
    display: grid;
    gap: 12px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid rgba(201, 209, 217, .08);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--soft);
    font-size: .82rem;
    font-weight: 860;
    text-transform: uppercase;
}

.inline-admin-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.inline-admin-form select {
    width: auto;
    min-width: 120px;
}

.inline-report {
    align-self: start;
}

.skeleton-line {
    height: 58px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
    background-size: 220% 100%;
    animation: skeleton 1.6s ease-in-out infinite;
}

.skeleton-line.short {
    width: 72%;
}

@keyframes skeleton {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

@media (prefers-reduced-motion: no-preference) {
    .home-hero,
    .home-section,
    .content-grid,
    .page-section {
        animation: fadeUp .42s var(--ease) both;
    }

    @keyframes fadeUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (min-width: 680px) {
    .featured-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (min-width: 760px) {
    body {
        padding-bottom: 0;
    }

    .mobile-actions,
    .mobile-bottom-nav {
        display: none;
    }

    .nav-links {
        position: static;
        flex-direction: row;
        align-items: center;
        padding: 0;
        border: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .nav-search input {
        width: 260px;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
        align-items: center;
    }

    .content-grid {
        grid-template-columns: minmax(0, 1fr) 340px;
    }

    .topic-card {
        grid-template-columns: minmax(0, 1fr) 178px;
        align-items: center;
    }

    .topic-metrics {
        justify-content: end;
    }

    .topic-head {
        grid-template-columns: minmax(0, 1fr) auto;
    }

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

    .search-panel {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .admin-form-grid {
        grid-template-columns: repeat(5, minmax(120px, 1fr));
        align-items: end;
    }

    .site-footer {
        padding-bottom: 30px;
    }
}

@media (min-width: 1080px) {
    .featured-topic-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .admin-body {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .admin-sidebar {
        align-items: stretch;
        flex-direction: column;
        min-height: 100vh;
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }

    .admin-menu {
        flex-direction: column;
        overflow: visible;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

    .brand span:last-child {
        max-width: 148px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-hero {
        padding: 46px 0 34px;
    }

    .section-heading,
    .footer-grid,
    .profile-head {
        align-items: stretch;
        flex-direction: column;
    }

    .forum-card {
        grid-template-columns: 44px 1fr;
    }

    .forum-count {
        grid-column: 2;
    }

    .post-actions {
        position: static;
    }
}
