:root {
    --bg: #050505;
    --panel: #111;
    --text: #f7f7f7;
    --muted: #b9b9b9;
    --line: #2a2a2a;
    --green: #16a34a;
    --red: #dc2626;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--text); text-decoration: none; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(16px, 4vw, 48px);
    background: rgba(5, 5, 5, .94);
    border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 22px; }
nav, .inline, .post footer, .message-form { display: flex; align-items: center; gap: 10px; }
.container { width: min(980px, calc(100% - 32px)); margin: 28px auto; }
.auth-card, .composer, .post, .profile, .messages {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 8px;
    padding: 20px;
}
.auth-card { width: min(440px, 100%); margin: 56px auto; }
h1 { margin: 0 0 14px; font-size: clamp(28px, 4vw, 40px); }
h2 { margin-top: 28px; }
label { display: grid; gap: 6px; margin: 12px 0; color: var(--muted); }
input, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #050505;
    color: var(--text);
    padding: 12px 13px;
}
textarea { min-height: 110px; resize: vertical; }
.btn {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}
.btn.ok { background: var(--green); }
.btn.danger { background: var(--red); }
.btn.ghost { background: #202020; color: var(--text); border: 1px solid var(--line); }
.alert { background: #3b0d0d; border: 1px solid var(--red); padding: 10px; border-radius: 8px; }
.muted, time, .empty { color: var(--muted); }
.feed-list { display: grid; gap: 14px; margin-top: 18px; }
.post header, .profile { display: flex; gap: 14px; align-items: flex-start; }
.post p { white-space: normal; overflow-wrap: anywhere; }
.avatar { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; background: #222; }
.avatar.large { width: 112px; height: 112px; }
.badge { width: 18px; height: 18px; vertical-align: -3px; object-fit: contain; margin-left: 4px; }
.comment-form { display: flex; gap: 8px; flex: 1; }
.message-list { display: grid; gap: 10px; margin: 16px 0; }
.message { max-width: 78%; background: #202020; border-radius: 8px; padding: 10px 12px; margin: 0; }
.message.mine { justify-self: end; background: #0f6b32; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; }
@media (max-width: 640px) {
    .post footer, .comment-form, .profile, nav { align-items: stretch; flex-direction: column; }
    .inline { flex-direction: row; }
}
