:root {
    --gold: #d6ad55;
    --gold-bright: #f0ce78;
    --gold-deep: #8f6926;
    --bg: #090a0c;
    --bg-soft: #101216;
    --surface: #14161a;
    --surface-2: #1a1d22;
    --surface-3: #21252b;
    --text: #f7f4ed;
    --muted: #969aa4;
    --line: rgba(255,255,255,.09);
    --line-gold: rgba(214,173,85,.28);
    --success: #4fc28b;
    --danger: #ef6a6a;
    --warning: #f3b95f;
    --info: #69a9ff;
    --shadow: 0 18px 60px rgba(0,0,0,.28);
    --radius: 18px;
    --header: 72px;
    --content: 1440px;
}

html[data-theme="ivory"] {
    --bg: #f3f1ea;
    --bg-soft: #ebe8df;
    --surface: #fffefa;
    --surface-2: #f7f4ec;
    --surface-3: #eae5d9;
    --text: #171613;
    --muted: #706d65;
    --line: rgba(21,20,17,.10);
    --line-gold: rgba(143,105,38,.25);
    --shadow: 0 18px 48px rgba(43,35,18,.09);
}

html[data-theme="midnight"] {
    --gold: #e7c56f;
    --bg: #06080e;
    --bg-soft: #0b0e17;
    --surface: #0e1320;
    --surface-2: #151b2a;
    --surface-3: #1c2435;
    --line: rgba(158,177,214,.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% -10%, rgba(214,173,85,.10), transparent 30rem),
        radial-gradient(circle at 92% 12%, rgba(214,173,85,.06), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.gold { color: var(--gold-bright); }
.danger { color: var(--danger); }
.success { color: var(--success); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

.topbar {
    height: var(--header);
    position: sticky;
    inset: 0 0 auto;
    z-index: 100;
    display: flex;
    align-items: center;
    background: color-mix(in srgb, var(--bg-soft) 86%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(22px);
}
.topbar-inner {
    width: min(var(--content), calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(260px, 620px) 1fr;
    align-items: center;
    gap: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-gold);
    border-radius: 13px;
    color: #111;
    background: linear-gradient(145deg, var(--gold-bright), var(--gold-deep));
    box-shadow: 0 8px 28px rgba(214,173,85,.22);
    font: 900 13px/1 Inter, sans-serif;
    letter-spacing: -.5px;
}
.brand-copy { line-height: 1.05; min-width: 0; }
.brand-name { display: block; font-weight: 850; font-size: 16px; letter-spacing: -.35px; }
.brand-tagline { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .6px; text-transform: uppercase; }
.searchbar { position: relative; }
.searchbar svg { width: 18px; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbar input {
    width: 100%;
    height: 43px;
    padding: 0 18px 0 45px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    color: var(--text);
    background: var(--surface);
    transition: .2s ease;
}
.searchbar input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,173,85,.11); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.icon-btn {
    width: 42px; height: 42px; display: grid; place-items: center; color: var(--muted);
    border: 1px solid transparent; border-radius: 13px; background: transparent; transition: .18s ease;
}
.icon-btn:hover, .icon-btn.active { color: var(--gold-bright); background: var(--surface); border-color: var(--line); }
.icon-btn svg { width: 20px; height: 20px; }
.avatar {
    width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center;
    border: 1px solid var(--line-gold); border-radius: 50%; overflow: hidden;
    background: linear-gradient(145deg, var(--surface-3), var(--gold-deep)); color: #fff7dc;
    font-weight: 800; font-size: 13px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: 11px; }
.avatar.lg { width: 76px; height: 76px; font-size: 22px; border-width: 2px; }
.avatar.xl { width: 112px; height: 112px; font-size: 30px; border-width: 3px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--surface); }

.shell {
    width: min(var(--content), calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr) 310px;
    gap: 26px;
    align-items: start;
}
.left-rail, .right-rail {
    height: calc(100vh - var(--header));
    position: sticky;
    top: var(--header);
    overflow-y: auto;
    padding: 24px 2px 90px;
    scrollbar-width: none;
}
.left-rail::-webkit-scrollbar, .right-rail::-webkit-scrollbar { display: none; }
.main-feed { min-width: 0; padding: 24px 0 90px; }
.nav-section { margin-bottom: 24px; }
.nav-label { margin: 0 12px 9px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.nav-link {
    min-height: 45px; display: flex; align-items: center; gap: 13px; margin: 3px 0; padding: 9px 12px;
    border: 1px solid transparent; border-radius: 13px; color: var(--muted); font-weight: 650; transition: .17s ease;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--gold-bright); background: linear-gradient(90deg, rgba(214,173,85,.13), transparent); border-color: var(--line-gold); }
.nav-link svg { width: 19px; height: 19px; flex: 0 0 auto; }
.nav-link .badge { margin-left: auto; }
.rail-user { padding: 14px; margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rail-user-top { display: flex; align-items: center; gap: 10px; }
.rail-user-copy { min-width: 0; line-height: 1.3; }
.rail-user-name { font-weight: 750; }
.rail-user-handle { color: var(--muted); font-size: 12px; }

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 1px 0 rgba(255,255,255,.015);
}
.card + .card { margin-top: 16px; }
.card-pad { padding: 20px; }
.card-header { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card-title { margin: 0; font-size: 17px; font-weight: 820; letter-spacing: -.25px; }
.card-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.side-card { padding: 18px; margin-bottom: 16px; }
.side-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; font-size: 13px; font-weight: 820; }
.side-title a { color: var(--gold); font-size: 11px; }
.side-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.side-row + .side-row { border-top: 1px solid var(--line); }
.side-copy { min-width: 0; flex: 1; line-height: 1.25; }
.side-name { font-weight: 700; font-size: 13px; }
.side-meta { margin-top: 3px; color: var(--muted); font-size: 11px; }
.rank { width: 22px; color: var(--gold); font-size: 11px; font-weight: 900; }
.topic { display: inline-flex; align-items: center; padding: 7px 10px; margin: 0 5px 7px 0; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
.topic:hover { color: var(--gold-bright); border-color: var(--line-gold); }

.hero-strip {
    position: relative; overflow: hidden; margin-bottom: 17px; padding: 25px;
    background: linear-gradient(120deg, var(--surface), var(--surface-2));
    border: 1px solid var(--line-gold); border-radius: 22px;
}
.hero-strip::after {
    content: ""; position: absolute; width: 230px; height: 230px; right: -60px; top: -100px;
    border: 1px solid var(--line-gold); border-radius: 50%; box-shadow: 0 0 0 30px rgba(214,173,85,.03), 0 0 0 65px rgba(214,173,85,.018);
}
.hero-eyebrow { color: var(--gold); font-size: 10px; font-weight: 850; letter-spacing: 1.5px; text-transform: uppercase; }
.hero-title { max-width: 520px; margin: 7px 0 6px; font-size: clamp(22px, 4vw, 32px); line-height: 1.16; letter-spacing: -1px; }
.hero-copy { max-width: 530px; margin: 0; color: var(--muted); }
.hero-actions { display: flex; gap: 10px; margin-top: 17px; }

.composer { padding: 16px; margin-bottom: 16px; }
.composer-row { display: flex; align-items: center; gap: 11px; }
.composer-trigger {
    height: 43px; flex: 1; display: flex; align-items: center; padding: 0 17px; border: 1px solid var(--line);
    border-radius: 999px; color: var(--muted); background: var(--surface-2);
}
.composer-trigger:hover { border-color: var(--line-gold); color: var(--text); }
.composer-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.composer-action { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 8px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 650; }
.composer-action:hover { color: var(--gold-bright); background: var(--surface-2); }
.composer-action svg { width: 16px; }

.feed-tabs { display: flex; gap: 7px; overflow-x: auto; margin: 0 0 16px; padding-bottom: 2px; scrollbar-width: none; }
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-tab { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); white-space: nowrap; font-size: 12px; font-weight: 720; }
.feed-tab:hover, .feed-tab.active { color: #15120c; border-color: var(--gold); background: linear-gradient(135deg, var(--gold-bright), var(--gold)); }

.post { overflow: hidden; transition: border-color .2s ease, transform .2s ease; }
.post:hover { border-color: var(--line-gold); }
.post-head { display: flex; align-items: center; gap: 10px; padding: 17px 19px 8px; }
.post-author { min-width: 0; flex: 1; line-height: 1.25; }
.post-author-line { display: flex; align-items: center; gap: 5px; min-width: 0; }
.post-author-name { font-size: 13px; font-weight: 780; }
.verified { width: 15px; height: 15px; display: inline-grid; place-items: center; border-radius: 50%; color: #101114; background: var(--gold); font-size: 9px; font-weight: 950; }
.post-context { color: var(--muted); font-size: 11px; }
.post-menu { border: 0; background: transparent; color: var(--muted); padding: 8px; border-radius: 9px; }
.post-menu:hover { color: var(--text); background: var(--surface-2); }
.post-menu svg { width: 18px; }
.sponsored { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid var(--line-gold); border-radius: 999px; color: var(--gold); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.post-body { padding: 10px 19px 15px; }
.post-title { margin: 0 0 7px; font-size: 20px; line-height: 1.3; letter-spacing: -.35px; }
.post-text { margin: 0; color: color-mix(in srgb, var(--text) 88%, var(--muted)); white-space: pre-wrap; overflow-wrap: anywhere; }
.post-text.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.post-link { display: flex; align-items: center; gap: 11px; margin-top: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; color: var(--gold-bright); background: var(--surface-2); overflow: hidden; }
.post-link svg { width: 18px; flex: 0 0 auto; }
.post-media { display: grid; background: #050608; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.post-media.count-2 { grid-template-columns: 1fr 1fr; }
.post-media.count-3, .post-media.count-4 { grid-template-columns: 1fr 1fr; }
.post-media img, .post-media video { width: 100%; max-height: 620px; object-fit: cover; }
.post-media.count-2 img, .post-media.count-3 img, .post-media.count-4 img { height: 300px; }
.post-media audio { width: calc(100% - 36px); margin: 24px 18px; }
.poll { display: grid; gap: 9px; margin-top: 15px; }
.poll-option { position: relative; width: 100%; overflow: hidden; padding: 11px 13px; text-align: left; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--text); }
.poll-option:hover { border-color: var(--line-gold); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: rgba(214,173,85,.12); pointer-events: none; }
.poll-label { position: relative; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 670; }
.post-stats { display: flex; align-items: center; justify-content: space-between; padding: 10px 19px 7px; color: var(--muted); font-size: 11px; }
.post-actions { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 17px; border-top: 1px solid var(--line); }
.post-action { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; border: 0; color: var(--muted); background: transparent; font-size: 12px; font-weight: 680; }
.post-action:hover, .post-action.active { color: var(--gold-bright); }
.post-action svg { width: 17px; height: 17px; }
.post-action-form { display: flex; }
.post-action-form .post-action { width: 100%; }
.quick-comment { display: flex; gap: 9px; padding: 11px 18px 17px; }
.quick-comment input { flex: 1; min-width: 0; }

.btn {
    min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 16px; border: 1px solid transparent; border-radius: 12px; color: #15120b;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold)); font-size: 12px; font-weight: 800; transition: .18s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(214,173,85,.16); }
.btn svg { width: 17px; height: 17px; }
.btn-sm { min-height: 34px; padding: 7px 12px; border-radius: 10px; font-size: 11px; }
.btn-lg { min-height: 49px; padding: 12px 21px; font-size: 13px; }
.btn-secondary { color: var(--text); border-color: var(--line); background: var(--surface-2); }
.btn-secondary:hover { border-color: var(--line-gold); box-shadow: none; }
.btn-danger { color: #fff; background: var(--danger); }
.btn-success { color: #06150e; background: var(--success); }
.btn-ghost { color: var(--muted); border-color: transparent; background: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); box-shadow: none; }

.form-card { padding: clamp(20px, 4vw, 34px); }
.form-title { margin: 0 0 4px; font-size: clamp(23px, 4vw, 32px); letter-spacing: -.8px; }
.form-intro { margin: 0 0 25px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .2px; }
.input, .textarea, .select {
    width: 100%; min-height: 45px; padding: 11px 13px; outline: 0; border: 1px solid var(--line);
    border-radius: 12px; color: var(--text); background: var(--surface-2); transition: .18s ease;
}
.textarea { min-height: 130px; resize: vertical; }
.textarea.tall { min-height: 340px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,173,85,.10); }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.select option { background: var(--surface); color: var(--text); }
.field-hint { margin-top: 6px; color: var(--muted); font-size: 10px; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.check input { width: 17px; height: 17px; accent-color: var(--gold); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.error-text { margin-top: 6px; color: var(--danger); font-size: 11px; }
.alert { margin-bottom: 16px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); font-size: 12px; }
.alert-success { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.alert-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip, .badge { display: inline-flex; align-items: center; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: 9px; font-weight: 750; letter-spacing: .25px; }
.badge-gold { color: var(--gold-bright); border-color: var(--line-gold); background: rgba(214,173,85,.08); }
.badge-success { color: var(--success); border-color: rgba(79,194,139,.3); background: rgba(79,194,139,.08); }
.badge-danger { color: var(--danger); border-color: rgba(239,106,106,.3); background: rgba(239,106,106,.08); }

.cover { position: relative; height: 240px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(125deg, var(--surface-3), rgba(143,105,38,.55)); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(0,0,0,.55)); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-main { position: relative; padding: 0 25px 23px; }
.profile-avatar { position: relative; z-index: 2; margin-top: -56px; }
.profile-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.profile-copy { margin-top: 11px; }
.profile-name { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 25px; letter-spacing: -.5px; }
.profile-handle { color: var(--muted); font-size: 13px; }
.profile-headline { margin: 10px 0 0; font-weight: 650; }
.profile-bio { margin: 10px 0 0; color: var(--muted); }
.profile-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 13px; color: var(--muted); font-size: 11px; }
.profile-meta span { display: inline-flex; align-items: center; gap: 5px; }
.profile-meta svg { width: 14px; }
.profile-stats { display: flex; gap: 19px; margin-top: 16px; font-size: 12px; }
.profile-stats strong { color: var(--gold-bright); }

.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.directory-card { position: relative; overflow: hidden; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.directory-card:hover { border-color: var(--line-gold); transform: translateY(-2px); transition: .2s ease; }
.directory-cover { height: 75px; margin: -18px -18px 0; background: linear-gradient(130deg, var(--surface-3), rgba(214,173,85,.32)); }
.directory-logo { width: 58px; height: 58px; display: grid; place-items: center; margin-top: -28px; overflow: hidden; border: 3px solid var(--surface); border-radius: 15px; background: var(--surface-2); color: var(--gold); font-weight: 900; }
.directory-logo.round { border-radius: 50%; }
.directory-logo img { width: 100%; height: 100%; object-fit: cover; }
.directory-name { margin: 12px 0 3px; font-size: 15px; font-weight: 800; }
.directory-desc { min-height: 40px; margin: 0; color: var(--muted); font-size: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.directory-stats { display: flex; justify-content: space-between; margin-top: 13px; color: var(--muted); font-size: 10px; }

.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 11px 13px; color: var(--muted); border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; letter-spacing: .7px; text-transform: uppercase; }
.table td { padding: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 12px; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(214,173,85,.025); }
.table-user { display: flex; align-items: center; gap: 9px; min-width: 180px; }
.money { color: var(--gold-bright); font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { padding: 18px; overflow: hidden; position: relative; }
.stat-label { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .6px; text-transform: uppercase; }
.stat-value { margin-top: 7px; font-size: 27px; font-weight: 850; letter-spacing: -1px; }
.stat-icon { position: absolute; width: 70px; height: 70px; right: -12px; bottom: -15px; color: rgba(214,173,85,.11); }
.admin-shell { width: min(1520px, calc(100% - 32px)); margin: 0 auto; display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 24px; }
.admin-main { min-width: 0; padding: 24px 0 90px; }
.admin-rail { height: calc(100vh - var(--header)); position: sticky; top: var(--header); overflow-y: auto; padding: 24px 0 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.page-title { margin: 0; font-size: 27px; letter-spacing: -.8px; }
.page-copy { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 18px; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: var(--bg); }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 48px; background: radial-gradient(circle at 20% 20%, rgba(214,173,85,.22), transparent 25rem), linear-gradient(145deg, #16181c, #08090b); }
.auth-visual::before, .auth-visual::after { content: ""; position: absolute; border: 1px solid rgba(214,173,85,.13); border-radius: 50%; }
.auth-visual::before { width: 560px; height: 560px; right: -230px; top: -180px; box-shadow: 0 0 0 55px rgba(214,173,85,.025), 0 0 0 115px rgba(214,173,85,.016); }
.auth-visual::after { width: 330px; height: 330px; left: -180px; bottom: -170px; }
.auth-quote { position: relative; z-index: 2; max-width: 620px; }
.auth-quote h1 { margin: 0; font-size: clamp(40px, 6vw, 75px); line-height: .99; letter-spacing: -3.5px; }
.auth-quote h1 span { color: var(--gold-bright); }
.auth-quote p { max-width: 500px; margin: 22px 0 0; color: #aaaeb8; font-size: 16px; }
.auth-features { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 9px; }
.auth-feature { padding: 8px 11px; border: 1px solid rgba(255,255,255,.10); border-radius: 999px; color: #b6b8bd; font-size: 11px; backdrop-filter: blur(10px); }
.auth-panel { display: grid; place-items: center; padding: 35px; background: var(--surface); }
.auth-card { width: min(430px, 100%); }
.auth-card .brand { margin-bottom: 42px; }
.auth-title { margin: 0; font-size: 31px; letter-spacing: -1px; }
.auth-subtitle { margin: 7px 0 25px; color: var(--muted); }
.auth-card .field { margin-bottom: 15px; }
.auth-footer { margin-top: 22px; color: var(--muted); font-size: 12px; text-align: center; }
.auth-footer a { color: var(--gold-bright); font-weight: 700; }

.messages-shell { height: calc(100vh - var(--header) - 50px); min-height: 560px; display: grid; grid-template-columns: 290px 1fr; overflow: hidden; }
.conversation-list { border-right: 1px solid var(--line); overflow-y: auto; }
.conversation-item { display: flex; gap: 10px; padding: 13px; border-bottom: 1px solid var(--line); }
.conversation-item:hover, .conversation-item.active { background: var(--surface-2); }
.chat { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.chat-body { flex: 1; display: flex; flex-direction: column-reverse; gap: 10px; overflow-y: auto; padding: 18px; }
.bubble { max-width: min(72%, 620px); padding: 10px 13px; border-radius: 15px 15px 15px 4px; background: var(--surface-3); overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; border-radius: 15px 15px 4px 15px; color: #181309; background: linear-gradient(135deg, var(--gold-bright), var(--gold)); }
.bubble-time { margin-top: 4px; opacity: .6; font-size: 9px; }
.chat-form { display: flex; gap: 9px; padding: 13px; border-top: 1px solid var(--line); }
.chat-form .input { flex: 1; }

.empty { padding: 48px 25px; text-align: center; color: var(--muted); }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 13px; border: 1px solid var(--line-gold); border-radius: 18px; color: var(--gold); background: rgba(214,173,85,.05); }
.empty-icon svg { width: 26px; }
.empty h3 { margin: 0 0 5px; color: var(--text); font-size: 16px; }
.pagination { display: flex; justify-content: center; gap: 5px; margin: 24px 0 0; padding: 0; list-style: none; }
.page-item .page-link { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface); font-size: 11px; }
.page-item.active .page-link { color: #17120a; border-color: var(--gold); background: var(--gold); }
.page-item.disabled .page-link { opacity: .4; }
.mobile-nav { display: none; }
.mobile-menu-btn { display: none; }
.impersonation {
    position: sticky; top: var(--header); z-index: 99; display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 8px 16px; color: #161108; background: var(--gold); font-size: 11px; font-weight: 800;
}

@media (max-width: 1180px) {
    .shell { grid-template-columns: 220px minmax(0, 1fr); }
    .right-rail { display: none; }
    .topbar-inner { grid-template-columns: 220px minmax(250px, 1fr) auto; }
    .directory-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
    :root { --header: 61px; }
    body { padding-bottom: 65px; }
    .topbar-inner { width: calc(100% - 22px); grid-template-columns: 1fr auto; gap: 10px; }
    .brand-tagline, .top-actions .desktop-only { display: none; }
    .topbar .searchbar { display: none; }
    .top-actions { gap: 2px; }
    .shell { width: min(690px, calc(100% - 20px)); display: block; }
    .left-rail, .right-rail { display: none; }
    .main-feed { padding-top: 14px; }
    .mobile-nav {
        position: fixed; inset: auto 0 0; z-index: 110; height: 64px; display: grid; grid-template-columns: repeat(5, 1fr);
        border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg-soft) 92%, transparent); backdrop-filter: blur(20px);
    }
    .mobile-nav a { display: grid; place-items: center; color: var(--muted); }
    .mobile-nav a.active { color: var(--gold-bright); }
    .mobile-nav svg { width: 21px; }
    .mobile-create { width: 44px; height: 44px; border-radius: 15px; color: #181209 !important; background: var(--gold); }
    .form-grid, .split { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .admin-shell { width: calc(100% - 20px); display: block; }
    .admin-rail { display: none; }
    .admin-main { padding-top: 14px; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { min-height: 100vh; padding: 25px; }
    .messages-shell { height: calc(100vh - var(--header) - 78px); grid-template-columns: 1fr; }
    .messages-shell.show-chat .conversation-list { display: none; }
    .messages-shell:not(.show-chat) .chat { display: none; }
}

@media (max-width: 560px) {
    .hero-strip { padding: 20px; }
    .hero-title { font-size: 24px; }
    .hero-actions { flex-wrap: wrap; }
    .composer-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .composer-action { font-size: 0; }
    .composer-action svg { width: 19px; }
    .post-head { padding: 14px 14px 7px; }
    .post-body { padding: 9px 14px 13px; }
    .post-title { font-size: 18px; }
    .post-stats { padding-inline: 14px; }
    .post-actions { margin-inline: 10px; }
    .post-action span { display: none; }
    .quick-comment { padding-inline: 13px; }
    .directory-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 22px; }
    .cover { height: 175px; }
    .profile-main { padding-inline: 17px; }
    .profile-row { align-items: flex-start; flex-direction: column; }
    .profile-row .profile-actions { width: 100%; display: flex; }
    .profile-row .profile-actions .btn { flex: 1; }
    .profile-avatar { margin-top: -46px; }
    .avatar.xl { width: 92px; height: 92px; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .page-head .btn { width: 100%; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .auth-panel { padding: 23px 19px; }
}
