:root {
    color-scheme: dark;
    --bg: #0b1020;
    --bg-soft: #11182b;
    --panel: rgba(19, 27, 48, .86);
    --panel-solid: #151e34;
    --panel-hover: #1a2540;
    --text: #f4f7ff;
    --muted: #9eabc5;
    --line: rgba(255, 255, 255, .09);
    --primary: #6d7cff;
    --primary-strong: #5668ff;
    --primary-soft: rgba(109, 124, 255, .16);
    --success: #46d39a;
    --danger: #ff6f7d;
    --warning: #ffc857;
    --shadow: 0 22px 60px rgba(0, 0, 0, .28);
    --radius: 20px;
    --radius-sm: 12px;
    --container: 1240px;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f6fb;
    --bg-soft: #eef1f8;
    --panel: rgba(255, 255, 255, .92);
    --panel-solid: #ffffff;
    --panel-hover: #f8f9fd;
    --text: #172039;
    --muted: #68738c;
    --line: rgba(20, 33, 61, .1);
    --primary-soft: rgba(86, 104, 255, .1);
    --shadow: 0 22px 60px rgba(30, 44, 80, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% -10%, rgba(109, 124, 255, .20), transparent 32rem),
        radial-gradient(circle at 90% 12%, rgba(60, 210, 170, .08), transparent 24rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    backdrop-filter: blur(18px);
}
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #965cff); color: #fff; box-shadow: 0 10px 25px rgba(109, 124, 255, .35);
}
.header-search { flex: 1; max-width: 470px; margin-inline: auto; }
.header-search input, .large-search input {
    width: 100%; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); border-radius: 999px;
    padding: 11px 18px; outline: none; transition: .2s ease;
}
.header-search input:focus, .large-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.header-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.nav-link { padding: 8px 10px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.nav-link:hover { color: var(--text); }
.notification-link { position: relative; }
.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin-left: 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.inline-form { display: inline-flex; margin: 0; }

.page-shell { padding-top: 34px; padding-bottom: 70px; min-height: calc(100vh - 150px); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; font-size: 18px; }

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 9px 17px;
    border: 1px solid transparent; border-radius: 12px; font-weight: 750; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); color: inherit; }
.button-primary { background: linear-gradient(135deg, var(--primary), var(--primary-strong)); color: #fff; box-shadow: 0 10px 24px rgba(86, 104, 255, .26); }
.button-primary:hover { color: #fff; }
.button-ghost { border-color: var(--line); background: var(--panel); color: var(--text); }
.button-ghost:hover { background: var(--panel-hover); border-color: rgba(109, 124, 255, .4); }
.button-large { min-height: 50px; padding: 12px 22px; }
.button-small { min-height: 34px; padding: 6px 11px; font-size: 13px; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button-group, .hero-actions, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.alert { margin-bottom: 20px; padding: 14px 17px; border-radius: 14px; border: 1px solid; }
.alert ul { margin: 7px 0 0 20px; }
.alert-success { border-color: rgba(70, 211, 154, .35); background: rgba(70, 211, 154, .1); color: var(--success); }
.alert-error { border-color: rgba(255, 111, 125, .35); background: rgba(255, 111, 125, .1); color: var(--danger); }

.eyebrow { display: block; color: var(--primary); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 850; margin-bottom: 8px; }
.muted { color: var(--muted); }
.hero {
    position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr .8fr; gap: 40px; align-items: center;
    min-height: 330px; padding: 52px; margin-bottom: 42px; border: 1px solid var(--line); border-radius: 28px;
    background: linear-gradient(125deg, rgba(109, 124, 255, .16), rgba(150, 92, 255, .07) 50%, rgba(70, 211, 154, .06)), var(--panel);
    box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; width: 350px; height: 350px; right: -140px; top: -180px; border-radius: 50%; background: rgba(109, 124, 255, .18); filter: blur(5px); }
.hero-copy { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { margin: 0 0 14px; font-size: clamp(38px, 6vw, 68px); line-height: 1.02; letter-spacing: -.055em; }
.hero p { max-width: 680px; margin: 0 0 25px; color: var(--muted); font-size: 17px; }
.hero-stat-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-stat-grid div { min-height: 100px; display: flex; flex-direction: column; justify-content: center; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(8, 13, 28, .28); }
html[data-theme="light"] .hero-stat-grid div { background: rgba(255,255,255,.45); }
.hero-stat-grid strong { font-size: 26px; }
.hero-stat-grid span { color: var(--muted); font-size: 12px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.main-column, .side-column { min-width: 0; }
.side-column { display: grid; gap: 20px; position: sticky; top: 98px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 34px 0 16px; }
.section-heading:first-child { margin-top: 0; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.section-heading p { margin: 4px 0 0; color: var(--muted); }

.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.category-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; min-height: 112px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; transition: .18s ease; }
.category-card:hover { transform: translateY(-2px); color: var(--text); border-color: rgba(109,124,255,.4); background: var(--panel-hover); }
.category-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--primary-soft); font-size: 23px; }
.category-copy { min-width: 0; display: flex; flex-direction: column; }
.category-copy strong { font-size: 16px; }
.category-copy small { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.category-meta { text-align: right; color: var(--muted); font-size: 11px; line-height: 1.55; white-space: nowrap; }
.category-meta b { color: var(--text); }

.topic-list { overflow: hidden; }
.topic-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; padding: 21px 22px; border-bottom: 1px solid var(--line); }
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: var(--panel-hover); }
.avatar { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: linear-gradient(135deg, var(--primary-soft), rgba(150,92,255,.22)); border: 1px solid rgba(109,124,255,.25); color: var(--primary); font-weight: 900; }
.avatar-small { width: 38px; height: 38px; border-radius: 12px; }
.avatar-large { width: 78px; height: 78px; border-radius: 22px; font-size: 25px; }
.topic-row-copy { min-width: 0; }
.topic-row h3 { margin: 1px 0 4px; font-size: 17px; line-height: 1.35; }
.topic-row p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.topic-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; padding: 2px 7px; border-radius: 7px; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.topic-byline { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 12px; }
.topic-byline a { color: var(--muted); }
.topic-stats { display: grid; align-content: center; gap: 2px; text-align: right; color: var(--muted); font-size: 11px; white-space: nowrap; }
.topic-stats b { color: var(--text); }

.side-card { overflow: hidden; }
.mini-list a, .member-stack a { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mini-list a:last-child, .member-stack a:last-child { border-bottom: 0; }
.mini-list a:hover, .member-stack a:hover { background: var(--panel-hover); color: var(--text); }
.mini-list a > span:last-child, .member-stack a > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.mini-list strong, .member-stack strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mini-list small, .member-stack small { color: var(--muted); font-size: 11px; }
.rank { display: grid; place-items: center; flex: 0 0 auto; width: 27px; height: 27px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-weight: 900; }
.side-card > .muted { padding: 0 20px 20px; }

.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin: 8px 0 28px; }
.page-heading.compact { align-items: center; }
.page-heading h1 { margin: 0 0 8px; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: -.04em; }
.page-heading p { margin: 0; color: var(--muted); max-width: 760px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.topic-heading { max-width: 1000px; }

.form-stack { display: grid; gap: 18px; padding: 24px; }
.form-stack label { display: grid; gap: 7px; font-weight: 700; }
.form-stack small { color: var(--muted); font-weight: 450; }
input, textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); color: var(--text); padding: 12px 14px; outline: none; resize: vertical;
}
input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea { line-height: 1.7; }
.field-grid { display: grid; gap: 16px; }
.field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-actions { justify-content: flex-end; }
.form-note { margin: 0; text-align: center; color: var(--muted); }
.section-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.section-divider::before, .section-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.editor-card { max-width: 930px; margin-inline: auto; }

.auth-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: 590px; max-width: 1040px; margin: 20px auto; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: var(--panel); box-shadow: var(--shadow); }
.auth-panel { border: 0; border-radius: 0; box-shadow: none; }
.auth-copy { display: flex; flex-direction: column; justify-content: center; padding: 60px; background: linear-gradient(140deg, rgba(109,124,255,.19), rgba(150,92,255,.08)); }
.auth-copy h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.04em; margin: 0 0 18px; }
.auth-copy p { color: var(--muted); font-size: 17px; }
.auth-panel.card { display: flex; flex-direction: column; justify-content: center; padding: 28px; }
.auth-panel.card .card-header { padding-inline: 24px; }
.auth-panel.card .card-header h2 { font-size: 26px; }

.install-hero { margin: 10px 0 28px; }
.install-hero h1 { margin: 0 0 8px; font-size: 44px; letter-spacing: -.04em; }
.install-hero p { max-width: 780px; color: var(--muted); }
.install-grid { display: grid; grid-template-columns: .75fr 1.35fr; gap: 24px; align-items: start; }
.check-list { display: grid; padding: 12px 24px 20px; }
.check-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.check-item:last-child { border-bottom: 0; }
.check-item > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 9px; font-weight: 900; }
.check-item.is-ok > span { color: var(--success); background: rgba(70,211,154,.12); }
.check-item.is-bad > span { color: var(--danger); background: rgba(255,111,125,.12); }
.install-grid .card > .muted { padding: 0 24px 20px; }

.post-card { display: grid; grid-template-columns: 175px minmax(0, 1fr); margin-bottom: 16px; overflow: hidden; }
.original-post { border-color: rgba(109,124,255,.27); }
.post-author { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 27px 20px; border-right: 1px solid var(--line); background: rgba(0,0,0,.045); text-align: center; }
.post-author small { color: var(--muted); font-size: 11px; }
.role-label { padding: 3px 8px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.post-content { min-width: 0; display: flex; flex-direction: column; padding: 23px 26px; }
.post-meta { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.post-body { flex: 1; padding: 24px 0; font-size: 15.5px; line-height: 1.8; overflow-wrap: anywhere; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.reply-card { margin-top: 28px; }

.empty-state { padding: 48px 25px; text-align: center; }
.empty-state h3 { margin: 0 0 7px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin: 24px 0; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 39px; height: 39px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

.search-card { padding: 20px; }
.large-search { display: flex; gap: 12px; }
.large-search input { border-radius: 13px; }

.profile-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 25px; align-items: center; padding: 36px; background: linear-gradient(130deg, rgba(109,124,255,.14), transparent 55%), var(--panel); }
.profile-avatar { display: grid; place-items: center; width: 110px; height: 110px; border-radius: 30px; background: linear-gradient(135deg, var(--primary), #965cff); color: #fff; font-size: 38px; font-weight: 900; }
.profile-main h1 { margin: 0 0 4px; font-size: 38px; }
.profile-main p { color: var(--muted); }
.profile-meta { display: flex; flex-wrap: wrap; gap: 15px; color: var(--muted); font-size: 12px; }
.profile-stats { display: flex; gap: 12px; }
.profile-stats div { min-width: 100px; padding: 18px; text-align: center; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-soft); }
.profile-stats strong, .profile-stats span { display: block; }
.profile-stats strong { font-size: 26px; }
.profile-stats span { color: var(--muted); font-size: 11px; }

.notification-list { overflow: hidden; }
.notification-row { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.notification-row:last-child { border-bottom: 0; }
.notification-row:hover { background: var(--panel-hover); color: var(--text); }
.notification-row.unread { background: var(--primary-soft); }
.notification-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--bg-soft); color: var(--primary); }
.notification-row > span:nth-child(2) { display: flex; flex-direction: column; }
.notification-row small { color: var(--muted); }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }

.dashboard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.dashboard-stats .card { padding: 25px; }
.dashboard-stats span { color: var(--muted); }
.dashboard-stats strong { display: block; margin-top: 5px; font-size: 36px; }
.admin-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 22px; align-items: start; }
.category-admin-list { display: grid; }
.category-admin-list > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.category-admin-list > div:last-child { border-bottom: 0; }
.category-admin-list > div > span:nth-child(2) { display: flex; flex-direction: column; }
.category-admin-list small { color: var(--muted); }
.table-card { overflow: hidden; }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 17px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:hover { background: var(--panel-hover); }
.status-pill { display: inline-flex; padding: 4px 8px; border-radius: 8px; background: rgba(255,111,125,.12); color: var(--danger); font-size: 11px; font-weight: 800; }
.status-pill.active { background: rgba(70,211,154,.12); color: var(--success); }

.error-page { max-width: 670px; margin: 80px auto; text-align: center; }
.error-page > span { display: inline-grid; place-items: center; min-width: 110px; height: 110px; padding: 0 18px; border-radius: 32px; background: var(--primary-soft); color: var(--primary); font-size: 42px; font-weight: 950; }
.error-page h1 { margin: 25px 0 10px; font-size: 40px; letter-spacing: -.04em; }
.error-page p { color: var(--muted); margin-bottom: 25px; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 15px; font-size: 12px; }

@media (max-width: 1050px) {
    .content-grid { grid-template-columns: 1fr; }
    .side-column { position: static; grid-template-columns: 1fr 1fr; }
    .hero { grid-template-columns: 1fr; }
    .header-search { max-width: 300px; }
    .nav-link { display: none; }
    .notification-link { display: inline-flex; font-size: 0; }
    .notification-link .badge { font-size: 11px; }
}

@media (max-width: 760px) {
    .container { width: min(calc(100% - 20px), var(--container)); }
    .site-header { position: static; }
    .header-inner { min-height: 66px; gap: 10px; flex-wrap: wrap; padding: 10px 0; }
    .brand { flex: 1; }
    .brand > span:last-child { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
    .header-search { order: 3; flex-basis: 100%; max-width: none; }
    .header-actions { gap: 5px; }
    .header-actions .button-primary { padding-inline: 12px; }
    .page-shell { padding-top: 20px; }
    .hero { padding: 31px 23px; min-height: 0; margin-bottom: 28px; }
    .hero h1 { font-size: 42px; }
    .hero-stat-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .hero-stat-grid div { padding: 12px; min-height: 82px; }
    .hero-stat-grid strong { font-size: 20px; }
    .category-grid, .side-column, .field-grid.two, .dashboard-stats, .admin-grid, .install-grid, .auth-shell { grid-template-columns: 1fr; }
    .category-card { grid-template-columns: auto 1fr; }
    .category-meta { display: none; }
    .topic-row { grid-template-columns: auto minmax(0, 1fr); padding: 17px 15px; }
    .topic-stats { grid-column: 2; display: flex; gap: 12px; text-align: left; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading h1 { font-size: 34px; }
    .post-card { grid-template-columns: 1fr; }
    .post-author { flex-direction: row; justify-content: flex-start; padding: 15px 18px; border-right: 0; border-bottom: 1px solid var(--line); text-align: left; }
    .avatar-large { width: 48px; height: 48px; border-radius: 15px; font-size: 16px; }
    .post-author small { margin-left: auto; }
    .post-content { padding: 18px; }
    .auth-shell { min-height: 0; }
    .auth-copy { padding: 36px 28px; }
    .auth-copy h1 { font-size: 34px; }
    .auth-panel.card { padding: 8px; }
    .profile-hero { grid-template-columns: 1fr; text-align: center; }
    .profile-avatar { margin-inline: auto; }
    .profile-meta, .profile-stats { justify-content: center; }
    .large-search { flex-direction: column; }
    .install-hero h1 { font-size: 36px; }
    .footer-inner { flex-direction: column; justify-content: center; padding: 18px 0; }
}

@media (max-width: 430px) {
    .brand > span:last-child { display: none; }
    .hero-stat-grid { grid-template-columns: 1fr; }
    .topic-stats { flex-wrap: wrap; }
    .profile-stats { width: 100%; }
    .profile-stats div { flex: 1; min-width: 0; }
}

/* V0.2 components */
select {
    width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); color: var(--text);
    padding: 11px 13px; outline: none;
}
select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.button-danger { background: rgba(255,111,125,.1); border-color: rgba(255,111,125,.28); color: var(--danger); }
.button-danger:hover { background: rgba(255,111,125,.17); color: var(--danger); }
.avatar-image { display: block; object-fit: cover; border: 1px solid rgba(109,124,255,.25); background: var(--bg-soft); }
.avatar-nav { width: 28px; height: 28px; border-radius: 9px; }
.account-link { display: inline-flex; align-items: center; gap: 7px; }
.profile-avatar-image { padding: 0; object-fit: cover; }
.profile-actions-wrap { display: grid; justify-items: end; gap: 12px; }
.profile-topics { margin-top: 22px; overflow: hidden; }
.account-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: start; }
.avatar-editor { display: flex; align-items: center; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-soft); }
.avatar-editor .profile-avatar { flex: 0 0 auto; width: 82px; height: 82px; border-radius: 23px; font-size: 28px; }
.avatar-editor p { margin: 4px 0 0; font-size: 12px; }
.compact-form { margin: 0 24px 24px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px; border: 1px solid rgba(255,111,125,.25); border-radius: 15px; background: rgba(255,111,125,.06); }
.danger-zone span { display: grid; }
.danger-zone small { color: var(--muted); }
.security-note { padding: 16px 18px; border: 1px solid rgba(109,124,255,.27); border-radius: 15px; background: var(--primary-soft); }
.security-note p { margin: 4px 0 0; color: var(--muted); }
.report-menu { position: relative; }
.report-menu > summary { list-style: none; user-select: none; }
.report-menu > summary::-webkit-details-marker { display: none; }
.report-form { position: absolute; z-index: 20; right: 0; top: calc(100% + 8px); width: min(330px, calc(100vw - 42px)); display: grid; gap: 11px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-solid); box-shadow: var(--shadow); }
.report-form label { display: grid; gap: 5px; font-size: 12px; font-weight: 750; }
.report-form textarea { min-height: 85px; }
.admin-row-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.category-admin-list > div { grid-template-columns: auto minmax(0,1fr) auto; }
.dashboard-stats.four { grid-template-columns: repeat(4, 1fr); }
.update-banner { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 25px; margin-bottom: 22px; border-color: rgba(255,200,87,.32); background: linear-gradient(120deg, rgba(255,200,87,.09), transparent), var(--panel); }
.update-banner h2, .update-banner p { margin: 0; }
.update-banner p { color: var(--muted); }
.inline-select-form { display: flex; align-items: center; gap: 7px; }
.inline-select-form select { min-width: 120px; padding: 7px 10px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 22px; }
.filter-tabs a { padding: 9px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--muted); font-weight: 750; }
.filter-tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.report-list { display: grid; gap: 15px; }
.report-card { overflow: hidden; }
.report-card-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.report-card-head > div { display: flex; align-items: center; gap: 10px; }
.report-card-head time { color: var(--muted); font-size: 12px; }
.report-card-body { padding: 18px 20px; }
.report-card-body p { margin: 0 0 8px; }
.report-details { margin: 13px 0; padding: 14px; border-radius: 12px; background: var(--bg-soft); overflow-wrap: anywhere; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 15px 20px; border-top: 1px solid var(--line); }
.switch-row { display: flex !important; align-items: center; justify-content: space-between; gap: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg-soft); }
.switch-row > span { display: grid; }
.switch-row input { width: 24px; height: 24px; flex: 0 0 auto; accent-color: var(--primary); }
.update-card { max-width: 760px; margin-inline: auto; padding: 28px; }
.version-comparison { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; margin-bottom: 24px; }
.version-comparison > div { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--bg-soft); text-align: center; }
.version-comparison span, .version-comparison strong { display: block; }
.version-comparison span { color: var(--muted); font-size: 12px; }
.version-comparison strong { margin-top: 4px; font-size: 27px; }
.version-arrow { color: var(--primary) !important; font-size: 28px !important; }
.update-actions { justify-content: center; margin-top: 25px; }
.update-complete { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 24px; border: 1px solid rgba(70,211,154,.28); border-radius: 16px; background: rgba(70,211,154,.08); }
.update-complete > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(70,211,154,.15); color: var(--success); font-size: 24px; font-weight: 900; }
.update-complete p { margin: 3px 0 0; color: var(--muted); }

@media (max-width: 900px) {
    .account-grid, .dashboard-stats.four { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .update-banner { align-items: flex-start; flex-direction: column; }
    .admin-row-actions { justify-content: flex-start; grid-column: 2; }
}

@media (max-width: 760px) {
    .account-grid, .dashboard-stats.four { grid-template-columns: 1fr; }
    .profile-actions-wrap { justify-items: center; }
    .avatar-editor, .danger-zone { align-items: flex-start; flex-direction: column; }
    .report-form { position: fixed; left: 10px; right: 10px; bottom: 10px; top: auto; width: auto; max-height: calc(100vh - 20px); overflow-y: auto; }
    .category-admin-list > div { grid-template-columns: auto 1fr; }
    .inline-select-form { min-width: 260px; }
    .version-comparison { grid-template-columns: 1fr; }
    .version-arrow { transform: rotate(90deg); }
}
.anchor-target { display: block; position: relative; top: -95px; visibility: hidden; }

/* V0.3 social, messaging and moderation */
.alert-warning { border-color: rgba(255, 200, 87, .38); background: rgba(255, 200, 87, .1); color: var(--warning); }
.status-pill.danger { border-color: rgba(255, 111, 125, .3); background: rgba(255, 111, 125, .1); color: var(--danger); }
.profile-stats-wide { display: grid; grid-template-columns: repeat(4, minmax(70px, 1fr)); width: min(100%, 460px); }
.profile-stats-wide > a, .profile-stats-wide > div { display: grid; justify-items: center; padding: 8px 11px; border-radius: 12px; }
.profile-stats-wide > a:hover { background: var(--primary-soft); color: var(--text); }
.profile-stats-wide strong { font-size: 20px; }
.profile-stats-wide span { color: var(--muted); font-size: 11px; }
.profile-buttons { justify-content: flex-end; }
.connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.member-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.member-directory > a { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 17px; background: var(--panel-solid); }
.member-directory > a:hover { background: var(--panel-hover); color: var(--text); }
.member-directory > a > span:last-child { display: grid; min-width: 0; }
.member-directory strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-directory small { color: var(--muted); font-size: 11px; }
.member-directory .empty-state { grid-column: 1 / -1; background: var(--panel-solid); }

.conversation-list { overflow: hidden; max-width: 900px; margin-inline: auto; }
.conversation-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.conversation-row:last-child { border-bottom: 0; }
.conversation-row:hover { background: var(--panel-hover); color: var(--text); }
.conversation-row.unread { background: var(--primary-soft); }
.conversation-copy { min-width: 0; display: grid; gap: 4px; }
.conversation-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.conversation-head time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.conversation-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
.message-count { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 850; }

.message-thread { display: grid; gap: 15px; max-width: 980px; margin-inline: auto; padding: 24px; }
.message-bubble { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; max-width: 78%; }
.message-bubble.mine { justify-self: end; grid-template-columns: minmax(0, 1fr) auto; }
.message-bubble.mine .message-avatar { order: 2; }
.message-bubble > div:last-child { min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 6px 17px 17px 17px; background: var(--bg-soft); }
.message-bubble.mine > div:last-child { border-radius: 17px 6px 17px 17px; background: var(--primary-soft); border-color: rgba(109, 124, 255, .28); }
.message-avatar .avatar, .message-avatar .avatar-image { width: 38px; height: 38px; border-radius: 12px; }
.message-meta { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 5px; }
.message-meta time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.message-body { overflow-wrap: anywhere; }
.reply-card { max-width: 980px; margin: 18px auto 0; }

.moderation-profile { margin-top: 22px; overflow: hidden; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 24px; }
.form-grid label { display: grid; gap: 7px; font-weight: 700; }
.field-wide { grid-column: 1 / -1; }
.moderation-form { border-bottom: 1px solid var(--line); }
.moderation-unmute { padding: 18px 24px 0; }
.warning-history { display: grid; gap: 12px; padding: 24px; }
.warning-history h3 { margin: 0 0 3px; }
.warning-row { display: grid; gap: 7px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); }
.warning-row > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.warning-row small { color: var(--muted); }
.warning-row p { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 1080px) {
    .header-actions { gap: 3px; }
    .nav-link { padding-inline: 6px; font-size: 13px; }
}

@media (max-width: 900px) {
    .connection-grid { grid-template-columns: 1fr; }
    .profile-stats-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .header-search { display: none; }
    .header-inner { flex-wrap: wrap; padding: 12px 0; }
    .header-actions { width: 100%; overflow-x: auto; padding-bottom: 2px; }
}

@media (max-width: 760px) {
    .member-directory { grid-template-columns: 1fr; }
    .message-bubble { max-width: 94%; }
    .form-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .conversation-row { padding-inline: 14px; }
    .profile-buttons { justify-content: center; }
}

@media (max-width: 480px) {
    .message-thread { padding: 14px; }
    .message-bubble { max-width: 100%; grid-template-columns: 1fr; }
    .message-bubble.mine { grid-template-columns: 1fr; }
    .message-bubble.mine .message-avatar { display: none; }
    .message-avatar { display: none; }
    .conversation-row { grid-template-columns: auto minmax(0, 1fr); }
    .message-count { grid-column: 2; justify-self: start; }
}

/* V1.0 production UI */
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 999; padding: 10px 14px; border-radius: 10px; background: var(--primary); color: #fff; }
.skip-link:focus { top: 12px; }
.mobile-menu-button, .mobile-bottom-nav { display: none; }
.button-danger { background: rgba(255,111,125,.12); border-color: rgba(255,111,125,.32); color: var(--danger); }
.button-success { background: rgba(70,211,154,.13); border-color: rgba(70,211,154,.32); color: var(--success); }
.full-width { width: 100%; }
.muted { color: var(--muted); }
.success-text { color: var(--success); }
.break-all { overflow-wrap: anywhere; }
.card-body { padding: 20px 24px; }
.section-card { margin-top: 22px; overflow: hidden; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:22px; padding:28px; margin-bottom:22px; }
.page-heading h1 { margin:3px 0 4px; font-size:clamp(27px,4vw,42px); line-height:1.15; }
.page-heading p { margin:0; color:var(--muted); }
.eyebrow { display:block; color:var(--primary); text-transform:uppercase; letter-spacing:.12em; font-size:11px; font-weight:850; }
.breadcrumbs { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:15px; color:var(--muted); font-size:13px; }
.hero { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr); gap:34px; padding:48px; overflow:hidden; }
.hero h1 { margin:8px 0 15px; max-width:780px; font-size:clamp(36px,6vw,68px); line-height:1.02; letter-spacing:-.05em; }
.hero-copy p { max-width:690px; color:var(--muted); font-size:18px; }
.hero-stats { display:grid; grid-template-columns:1fr; gap:12px; align-content:center; }
.hero-stats div { display:flex; justify-content:space-between; align-items:center; padding:18px 20px; border:1px solid var(--line); border-radius:16px; background:var(--bg-soft); }
.hero-stats b { font-size:25px; }
.hero-stats span { color:var(--muted); }
.home-grid { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:22px; align-items:start; margin-top:22px; }
.main-column, .sidebar-stack, .settings-sections { display:grid; gap:22px; }
.compact-card { overflow:hidden; }
.category-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:20px; }
.category-grid.compact { grid-template-columns:repeat(3,minmax(0,1fr)); }
.category-card { padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--bg-soft); }
.category-heading, .category-link { display:flex; gap:14px; align-items:flex-start; }
.category-heading > span:last-child, .category-link > span:nth-child(2) { display:grid; gap:4px; min-width:0; }
.category-heading small, .category-link small { color:var(--muted); }
.category-icon { display:grid; place-items:center; width:44px; height:44px; flex:0 0 auto; border-radius:14px; background:var(--primary-soft); font-size:21px; }
.category-counts { display:flex; gap:14px; margin:14px 0 0 58px; color:var(--muted); font-size:12px; }
.subcategories { display:grid; gap:7px; margin-top:15px; padding-top:13px; border-top:1px solid var(--line); }
.subcategories a { display:grid; grid-template-columns:auto 1fr auto; gap:8px; padding:7px 9px; border-radius:10px; color:var(--muted); }
.subcategories a:hover { background:var(--panel-hover); color:var(--text); }
.topic-list { display:grid; }
.topic-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:14px; align-items:center; padding:17px 21px; border-bottom:1px solid var(--line); }
.topic-row:last-child { border-bottom:0; }
.topic-row:hover { background:var(--panel-hover); }
.topic-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:13px; background:var(--primary-soft); }
.topic-main h3 { display:flex; flex-wrap:wrap; gap:7px; align-items:center; margin:0; font-size:15px; }
.topic-meta { margin:4px 0 0; color:var(--muted); font-size:12px; }
.topic-stats { display:flex; gap:18px; color:var(--muted); font-size:11px; text-align:right; }
.topic-stats span { display:grid; }
.topic-stats b { color:var(--text); font-size:14px; }
.status-pill { display:inline-flex; align-items:center; padding:3px 8px; border:1px solid var(--line); border-radius:999px; color:var(--muted); font-size:10px; font-weight:800; }
.status-pill.solved { color:var(--success); border-color:rgba(70,211,154,.3); background:rgba(70,211,154,.08); }
.sidebar-stack .topic-row { grid-template-columns:auto minmax(0,1fr); padding:13px 16px; }
.sidebar-stack .topic-stats { display:none; }
.tag-cloud { display:flex; flex-wrap:wrap; gap:8px; padding:18px; }
.tag-cloud.inline { padding:10px 0 0; }
.tag-cloud a { display:inline-flex; gap:6px; padding:6px 9px; border-radius:999px; background:var(--primary-soft); color:var(--primary); font-size:12px; }
.tag-cloud small { color:var(--muted); }
.member-list { display:grid; }
.member-list > a, .member-management-row { display:flex; align-items:center; gap:12px; padding:13px 17px; border-bottom:1px solid var(--line); }
.member-list > a:last-child, .member-management-row:last-child { border-bottom:0; }
.member-list > a > span, .member-management-row > a > span { display:grid; }
.member-list small { color:var(--muted); }
.member-management-row { justify-content:space-between; }
.member-management-row > a { display:flex; align-items:center; gap:12px; }
.avatar-fallback, .avatar-image { display:grid; place-items:center; flex:0 0 auto; object-fit:cover; border-radius:14px; background:linear-gradient(135deg,var(--primary),#965cff); color:#fff; font-weight:850; }
.avatar-small { width:34px; height:34px; border-radius:11px; }
.avatar-medium { width:48px; height:48px; }
.avatar-large { width:74px; height:74px; border-radius:20px; }
.avatar-xlarge { width:110px; height:110px; border-radius:28px; font-size:36px; }
.avatar-nav { width:28px; height:28px; border-radius:9px; }
.empty-state { display:grid; justify-items:center; gap:5px; padding:38px 20px; color:var(--muted); text-align:center; }
.empty-state strong { color:var(--text); }
.large-search { display:flex; gap:10px; padding:18px; margin-bottom:22px; }
.large-search.compact { margin:0; padding:0; background:none; border:0; box-shadow:none; min-width:min(100%,420px); }
.editor-layout { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:22px; align-items:start; }
.form-card { overflow:hidden; }
.form-card.narrow { max-width:760px; margin:auto; }
.form-body { display:grid; gap:18px; padding:24px; }
.field { display:grid; gap:7px; font-weight:750; }
.field input, .field textarea, .field select, textarea, select { width:100%; border:1px solid var(--line); border-radius:12px; background:var(--bg-soft); color:var(--text); padding:11px 13px; outline:none; }
.field input:focus, .field textarea:focus, .field select:focus, textarea:focus, select:focus { border-color:var(--primary); box-shadow:0 0 0 4px var(--primary-soft); }
.field small { color:var(--muted); font-weight:500; }
.field-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.check-row, .check-card { display:flex; gap:10px; align-items:flex-start; }
.check-row input, .check-card input { margin-top:5px; }
.check-card { padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--bg-soft); }
.check-card span { display:grid; }
.check-card small { color:var(--muted); }
.toggle-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.form-details { border:1px solid var(--line); border-radius:14px; }
.form-details summary { padding:14px 16px; font-weight:800; cursor:pointer; }
.details-body { display:grid; gap:14px; padding:0 16px 16px; }
.editor-help { position:sticky; top:98px; padding:22px; }
.editor-help h3 { margin-top:0; }
.editor-help ul { padding-left:20px; color:var(--muted); }
.draft-status { color:var(--muted); font-size:11px; }
.input-with-action { display:grid; grid-template-columns:1fr auto; gap:8px; }
.attachment-list { display:grid; gap:8px; }
.attachment-list > div { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:12px; }
.topic-heading { display:flex; justify-content:space-between; gap:20px; padding:28px; margin-bottom:18px; }
.topic-heading h1 { margin:7px 0 5px; font-size:clamp(28px,4vw,45px); line-height:1.12; }
.topic-heading p { margin:0; color:var(--muted); }
.topic-badges { display:flex; flex-wrap:wrap; gap:6px; }
.post-card { display:grid; grid-template-columns:190px minmax(0,1fr); margin-top:16px; overflow:hidden; scroll-margin-top:95px; }
.post-card.is-solution { border-color:rgba(70,211,154,.5); box-shadow:0 0 0 2px rgba(70,211,154,.09),var(--shadow); }
.post-author { display:flex; flex-direction:column; align-items:center; gap:7px; padding:24px 16px; border-right:1px solid var(--line); background:var(--bg-soft); text-align:center; }
.post-author small { color:var(--muted); font-size:11px; }
.role-badge { padding:3px 8px; border-radius:999px; background:var(--primary-soft); color:var(--primary); font-size:10px; font-weight:800; }
.role-admin { color:var(--danger); background:rgba(255,111,125,.1); }
.role-moderator { color:var(--warning); background:rgba(255,200,87,.1); }
.post-content { min-width:0; padding:22px 24px; }
.post-content > header { display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; color:var(--muted); font-size:11px; }
.formatted-content { min-height:90px; margin:18px 0; overflow-wrap:anywhere; font-size:15px; }
.formatted-content p { margin:0 0 1em; }
.formatted-content blockquote { margin:14px 0; padding:13px 16px; border-left:4px solid var(--primary); border-radius:0 12px 12px 0; background:var(--bg-soft); }
.formatted-content pre { overflow:auto; padding:16px; border-radius:12px; background:#080d19; color:#e9efff; }
.formatted-content code { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.formatted-content img { border-radius:14px; }
.post-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding-top:14px; border-top:1px solid var(--line); }
.reaction-picker { display:flex; gap:4px; }
.reaction-picker form { display:inline-flex; }
.reaction-button { display:flex; gap:5px; align-items:center; min-height:34px; border:1px solid var(--line); border-radius:10px; background:var(--panel); color:var(--muted); }
.reaction-button.active, .reaction-button:hover { border-color:var(--primary); color:var(--text); background:var(--primary-soft); }
.solution-label { margin-right:auto; color:var(--success); font-weight:800; }
.attachment-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; margin:18px 0; }
.attachment-item { display:grid; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--bg-soft); }
.attachment-item img { width:100%; height:150px; object-fit:cover; }
.attachment-item > span { display:grid; padding:10px; overflow-wrap:anywhere; }
.attachment-item small { color:var(--muted); }
.poll-card { margin-bottom:18px; overflow:hidden; }
.poll-body { display:grid; gap:12px; padding:22px; }
.poll-option { position:relative; display:grid; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--bg-soft); }
.poll-option > span { z-index:1; display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; padding:12px; }
.poll-option small { color:var(--muted); }
.poll-option progress { position:absolute; inset:0; width:100%; height:100%; border:0; appearance:none; opacity:.24; }
.poll-option progress::-webkit-progress-bar { background:transparent; }
.poll-option progress::-webkit-progress-value { background:var(--primary); }
.poll-option progress::-moz-progress-bar { background:var(--primary); }
.login-prompt, .moderation-bar, .danger-zone { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:18px; padding:22px; }
.report-dialog { width:min(92vw,520px); border:1px solid var(--line); border-radius:18px; background:var(--panel-solid); color:var(--text); padding:24px; }
.report-dialog::backdrop { background:rgba(0,0,0,.66); backdrop-filter:blur(4px); }
.report-dialog > form:last-child { display:grid; gap:15px; }
.dialog-close { float:right; border:0; background:none; color:var(--muted); font-size:28px; }
.profile-hero { display:flex; justify-content:space-between; gap:22px; align-items:center; padding:28px; }
.profile-identity { display:flex; gap:20px; align-items:center; }
.profile-identity h1 { margin:0; }
.profile-identity p { max-width:640px; color:var(--muted); }
.online-row { display:flex; align-items:center; gap:8px; }
.online-dot { width:9px; height:9px; border-radius:50%; background:var(--muted); }
.online-dot.is-online { background:var(--success); box-shadow:0 0 0 4px rgba(70,211,154,.12); }
.profile-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.profile-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:16px 0 22px; }
.profile-stats > * { display:grid; justify-items:center; padding:17px; }
.profile-stats b { font-size:23px; }
.profile-stats span { color:var(--muted); }
.settings-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,.7fr); gap:22px; align-items:start; }
.profile-avatar-edit { display:flex; gap:18px; align-items:center; }
.profile-avatar-edit div { display:grid; }
.auth-shell { min-height:65vh; display:grid; place-items:center; }
.auth-shell.wide .auth-card { max-width:680px; }
.auth-card { width:min(100%,500px); overflow:hidden; }
.auth-heading { display:grid; justify-items:center; gap:8px; padding:32px 28px 12px; text-align:center; }
.auth-heading h1 { margin:7px 0 0; }
.auth-heading p { margin:0; color:var(--muted); }
.auth-links { display:flex; justify-content:space-between; gap:12px; color:var(--primary); font-size:13px; }
.security-icon, .system-icon { font-size:42px; }
.secret-box { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:14px; border:1px dashed var(--primary); border-radius:12px; }
.recovery-codes { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; padding:24px; }
.recovery-codes code { padding:10px; border:1px solid var(--line); border-radius:10px; background:var(--bg-soft); text-align:center; }
.two-column, .admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; align-items:start; }
.member-strip { display:flex; gap:14px; overflow:auto; padding:18px; }
.member-strip a { display:grid; justify-items:center; gap:6px; min-width:70px; }
.conversation-header { display:flex; align-items:center; justify-content:space-between; padding:18px 22px; margin-bottom:15px; }
.message-thread { display:grid; gap:12px; padding:22px; }
.message-bubble { width:min(78%,700px); padding:14px; border:1px solid var(--line); border-radius:8px 18px 18px; background:var(--bg-soft); }
.message-bubble.mine { justify-self:end; border-radius:18px 8px 18px 18px; background:var(--primary-soft); }
.message-bubble header { display:flex; align-items:center; gap:8px; }
.message-bubble time { margin-left:auto; color:var(--muted); font-size:10px; }
.conversation-main { display:grid; min-width:0; }
.conversation-main small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); }
.conversation-meta { display:grid; justify-items:end; color:var(--muted); font-size:11px; }
.conversation-meta b { display:grid; place-items:center; min-width:24px; height:24px; border-radius:99px; background:var(--primary); color:#fff; }
.admin-nav { display:flex; gap:5px; overflow:auto; margin-bottom:18px; padding:7px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.admin-nav a { padding:9px 13px; border-radius:10px; color:var(--muted); white-space:nowrap; }
.admin-nav a:hover { background:var(--primary-soft); color:var(--text); }
.dashboard-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:22px; }
.dashboard-stats > * { display:grid; gap:3px; padding:20px; }
.dashboard-stats b { font-size:31px; }
.dashboard-stats small { color:var(--muted); }
.activity-list, .backup-list, .warning-list { display:grid; }
.activity-list > div, .backup-list > div, .warning-list > div { display:flex; gap:10px; padding:13px 17px; border-bottom:1px solid var(--line); }
.activity-list p, .backup-list p { display:grid; margin:0; }
.activity-list small, .backup-list small, .warning-list span { color:var(--muted); }
.table-card { overflow:hidden; }
.responsive-table { overflow:auto; }
table { width:100%; border-collapse:collapse; }
th, td { padding:13px 15px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; }
td small { display:block; color:var(--muted); }
.user-cell { display:flex; align-items:center; gap:10px; }
.filter-tabs { display:flex; gap:8px; margin-bottom:15px; }
.filter-tabs a { padding:8px 13px; border:1px solid var(--line); border-radius:999px; }
.filter-tabs a.active { background:var(--primary); border-color:var(--primary); color:#fff; }
.report-list { display:grid; gap:14px; }
.report-card { overflow:hidden; }
.report-card-head, .report-actions { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:14px 18px; border-bottom:1px solid var(--line); }
.report-card-body { padding:18px; }
.report-details { padding:13px; border-radius:12px; background:var(--bg-soft); }
.report-actions { justify-content:flex-end; border-top:1px solid var(--line); border-bottom:0; }
.sticky-actions { position:sticky; bottom:18px; display:flex; justify-content:flex-end; padding:12px; border:1px solid var(--line); border-radius:14px; background:color-mix(in srgb,var(--panel-solid) 88%,transparent); backdrop-filter:blur(12px); }
.card-footer-form { display:flex; justify-content:flex-end; padding:15px 24px; border-top:1px solid var(--line); }
.update-card { max-width:820px; margin:auto; padding:30px; }
.version-comparison { display:grid; grid-template-columns:1fr auto 1fr; gap:20px; align-items:center; text-align:center; }
.version-comparison div { display:grid; padding:20px; border:1px solid var(--line); border-radius:16px; background:var(--bg-soft); }
.version-comparison strong { font-size:28px; }
.security-note { margin:24px 0; padding:16px; border:1px solid rgba(255,200,87,.3); border-radius:14px; background:rgba(255,200,87,.08); }
.update-complete { display:flex; justify-content:center; gap:15px; align-items:center; padding:30px; color:var(--success); }
.update-complete > span { font-size:40px; }
.install-shell { display:grid; gap:22px; }
.install-hero { display:flex; gap:17px; align-items:center; }
.install-hero h1 { margin:3px 0; }
.install-grid { display:grid; grid-template-columns:minmax(280px,.75fr) minmax(0,1.25fr); gap:22px; align-items:start; }
.requirement-list { display:grid; }
.requirement-list > div { display:flex; gap:11px; align-items:center; padding:12px 17px; border-bottom:1px solid var(--line); }
.requirement-list > div > span { display:grid; place-items:center; width:27px; height:27px; border-radius:50%; }
.requirement-list .pass > span { background:rgba(70,211,154,.12); color:var(--success); }
.requirement-list .fail > span { background:rgba(255,111,125,.12); color:var(--danger); }
.requirement-list .warn > span { background:rgba(255,200,87,.12); color:var(--warning); }
.requirement-list p { display:grid; margin:0; }
.requirement-list small { color:var(--muted); }
.system-state { display:grid; justify-items:center; gap:10px; max-width:720px; margin:12vh auto; padding:50px; text-align:center; }
.pagination { display:flex; justify-content:center; gap:7px; margin-top:20px; }
.pagination > * { display:grid; place-items:center; min-width:38px; height:38px; border:1px solid var(--line); border-radius:10px; }
.pagination .active { background:var(--primary); border-color:var(--primary); color:#fff; }

@media (max-width: 1050px) {
    .home-grid, .settings-grid, .install-grid { grid-template-columns:1fr; }
    .sidebar-stack { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .editor-layout { grid-template-columns:1fr; }
    .editor-help { position:static; }
    .category-grid.compact { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .toggle-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
    body { padding-bottom:70px; }
    .container { width:min(calc(100% - 20px),var(--container)); }
    .header-inner { min-height:62px; gap:10px; }
    .brand-text, .header-search { display:none; }
    .mobile-menu-button { display:grid; margin-left:auto; }
    .header-actions { display:none; position:absolute; top:64px; left:10px; right:10px; padding:12px; border:1px solid var(--line); border-radius:15px; background:var(--panel-solid); box-shadow:var(--shadow); }
    .header-actions.is-open { display:grid; }
    .header-actions .nav-link, .header-actions form, .header-actions .button { width:100%; justify-content:flex-start; }
    .mobile-bottom-nav { position:fixed; display:grid; grid-template-columns:repeat(5,1fr); left:0; right:0; bottom:0; z-index:70; min-height:62px; padding-bottom:env(safe-area-inset-bottom); border-top:1px solid var(--line); background:color-mix(in srgb,var(--panel-solid) 93%,transparent); backdrop-filter:blur(18px); }
    .mobile-bottom-nav a { display:grid; place-items:center; align-content:center; gap:0; color:var(--muted); font-size:18px; }
    .mobile-bottom-nav span { font-size:9px; }
    .hero { grid-template-columns:1fr; padding:30px 23px; }
    .hero-stats { grid-template-columns:repeat(3,1fr); }
    .hero-stats div { display:grid; justify-items:center; padding:12px 7px; }
    .hero-stats span { font-size:10px; }
    .category-grid, .sidebar-stack, .two-column, .admin-grid { grid-template-columns:1fr; }
    .post-card { grid-template-columns:1fr; }
    .post-author { flex-direction:row; justify-content:flex-start; border-right:0; border-bottom:1px solid var(--line); text-align:left; }
    .post-author .avatar-large { width:50px; height:50px; border-radius:14px; }
    .topic-heading, .profile-hero, .page-heading { flex-direction:column; align-items:flex-start; }
    .profile-actions { justify-content:flex-start; }
    .dashboard-stats { grid-template-columns:repeat(2,1fr); }
    .field-row, .toggle-grid { grid-template-columns:1fr; }
    .profile-stats { grid-template-columns:repeat(2,1fr); }
    .topic-stats { display:none; }
    .topic-row { grid-template-columns:auto minmax(0,1fr); }
    .large-search { flex-direction:column; }
}
@media (max-width: 520px) {
    .page-shell { padding-top:20px; }
    .hero h1 { font-size:38px; }
    .hero-stats { grid-template-columns:1fr; }
    .category-grid { padding:12px; }
    .category-grid.compact { grid-template-columns:1fr; }
    .topic-row { padding:14px; }
    .post-content { padding:17px; }
    .post-actions { align-items:stretch; }
    .reaction-picker { width:100%; overflow:auto; }
    .profile-identity { align-items:flex-start; }
    .profile-identity .avatar-xlarge { width:72px; height:72px; border-radius:19px; }
    .dashboard-stats { grid-template-columns:1fr; }
    .recovery-codes { grid-template-columns:1fr; }
    .message-bubble { width:95%; }
}
