:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.14);
    --text: #101828;
    --muted: #60687a;
    --accent: #3558ff;
    --accent-soft: rgba(53, 88, 255, 0.12);
    --danger: #f44336;
    --page-pad: clamp(1rem, 4vw, 3.5rem);
    --header-height: 64px;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 24px));
    overflow-x: hidden;
    touch-action: pan-y;
    overscroll-behavior-x: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
body * {
    touch-action: pan-y;
}
html {
    overflow-x: hidden;
    touch-action: pan-y;
    overscroll-behavior-x: none;
}
a {
    color: inherit;
    text-decoration: none;
}
input,
textarea {
    -webkit-user-select: text;
    user-select: text;
}
.allow-select {
    -webkit-user-select: text;
    user-select: text;
}
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    font-size: 1.05rem;
    color: inherit;
}
.icon i {
    line-height: 1;
}
.app-shell {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg);
    touch-action: pan-y;
}
.main-column {
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 100vh;
    touch-action: pan-y;
}
main {
    touch-action: pan-y;
}
.brand-wordmark {
    font-weight: 600;
    letter-spacing: 0.02em;
}
.btn {
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn.primary {
    background: var(--accent);
    color: #fff;
}
.btn.outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn.ghost {
    background: transparent;
    color: var(--text);
    border: 1px dashed var(--border);
}
.btn.danger {
    background: var(--danger);
    color: #fff;
}
.btn.full {
    width: 100%;
}
.btn.small {
    padding: 0.35rem 0.8rem;
    font-size: 0.9rem;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.icon-button {
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    border-radius: 999px;
    padding: 0.35rem;
}
.icon-button .icon {
    width: 1.1rem;
    height: 1.1rem;
    font-size: 1rem;
}
.timeline-wrapper {
    width: 100%;
    margin: 0;
    padding: 0 0 1rem;
    flex: 1;
}
.global-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.6rem var(--page-pad);
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    min-height: var(--header-height);
}
.header-avatar {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
}
.header-title {
    flex: 1 1 auto;
    font-size: 1.2rem;
    letter-spacing: 0.18rem;
    text-transform: uppercase;
    font-weight: 700;
    text-align: center;
}
.header-actions {
    position: static;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex: 0 0 auto;
    margin-left: auto;
}
.timeline-bar {
    position: sticky;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 25;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
}
.timeline-tabs {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    padding: 0.65rem var(--page-pad);
}
.timeline-sort-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 0.65rem var(--page-pad);
    border-top: 1px solid var(--border);
}
.sort-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.sort-copy strong {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.sort-copy span {
    font-size: 0.82rem;
    color: var(--muted);
}
.chip-group.compact {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.15rem;
}
.chip-group.compact .chip {
    white-space: nowrap;
}
@media (max-width: 768px) {
    .global-header {
        gap: 0.6rem;
        padding: 0.55rem var(--page-pad);
    }
    .header-title {
        font-size: 1.1rem;
        letter-spacing: 0.14rem;
    }
    .timeline-sort-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .chip-group.compact {
        width: 100%;
    }
}
.pill {
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    padding: 0.35rem 0;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.timeline-tabs .pill.active {
    color: var(--text);
    border-color: var(--accent);
}
.pill.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.page {
    padding: 0 0 3rem;
    width: 100%;
    display: flex;
    flex-direction: column;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.card.muted {
    background: rgba(29, 155, 240, 0.06);
    border-style: dashed;
}
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.chip {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.9rem;
    color: var(--muted);
    text-decoration: none;
}
.chip:hover {
    border-color: var(--accent);
    color: var(--text);
}
.chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.login-hint {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}
.inline-login-hint {
    margin: 1rem var(--page-pad) 0;
}
.feed {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0 var(--page-pad) 2rem;
    margin-top: 1.25rem;
}
.feed-post {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 1.35rem;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 1.35rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
}
.feed-post:focus-within,
.feed-post:focus,
.feed-post:hover {
    color: inherit;
    background: var(--card);
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}
.feed-post .post-header,
.post-header {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}
.feed-post .post-header .avatar,
.feed-post .post-header img.avatar,
.feed-post .post-header .avatar-initial {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
}
.feed-post .post-header .avatar-initial {
    font-size: 0.95rem;
}
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
}
img.avatar {
    width: 30px;
    height: 30px;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}
.avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #e4e8f5;
    color: #4c5672;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.avatar.small {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}
.avatar.medium {
    width: 56px;
    height: 56px;
    border-radius: 18px;
}
.avatar.large {
    width: 64px;
    height: 64px;
    border-radius: 20px;
}
.avatar.xl {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    border: 3px solid var(--card);
}
.name-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}
.display-name {
    color: var(--text);
    text-decoration: none;
}
.name-row .username,
.name-row .timestamp {
    white-space: nowrap;
}
.username,
.meta span,
.post-actions span,
.muted,
.comment-header span {
    color: var(--muted);
    font-size: 0.9rem;
}
.dot {
    padding: 0 0.35rem;
    color: var(--muted);
}
.post-body {
    font-size: 1.05rem;
    margin-top: 0.5rem;
    line-height: 1.65;
}

.post-media {
    margin-top: 0.75rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.04);
    max-width: 100%;
}
.post-media img {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: cover;
    background: #f0f2f5;
    display: block;
}
/* Force vertical stacking for post layout */
.feed-post,
.feed-post .post-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 20, 25, 0.05);
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}
.location-tag .icon {
    width: 1rem;
    height: 1rem;
}
.attachment-btn .icon,
.file-upload .icon,
.login-hint .icon {
    margin: 0;
}
.link-preview {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    margin-top: 0.75rem;
    text-decoration: none;
    color: var(--text);
}
.link-preview-thumb {
    width: 120px;
    background-size: cover;
    background-position: center;
    background-color: #f0f3f6;
}
.link-preview-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}
.post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    margin-left: 56px;
}
.post-actions .action {
    background: transparent;
    border: none;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    border: 1px solid transparent;
}
.post-actions .icon {
    margin: 0;
}
.post-actions .action:hover {
    color: var(--accent);
    border-color: var(--accent-soft);
}
.post-actions .action.danger,
.post-actions .action.danger .icon {
    color: var(--muted);
}
.post-actions .action.danger:hover,
.post-actions .action.danger:hover .icon {
    color: var(--danger);
}
.post-actions .action.active {
    color: var(--accent);
}
.post-actions .action.liked,
.post-actions .action.liked .icon {
    color: #f91880;
}
.post-actions .action.reposted,
.post-actions .action.reposted .icon {
    color: #17bf63;
}
.post-actions .action.share-copied,
.post-actions .action.share-copied .icon {
    color: var(--accent);
    border-color: var(--accent);
}
.repost-meta {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.verified-badge {
    width: 18px;
    height: 18px;
}
.org-badge {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    object-fit: cover;
}
.org-badge.small {
    width: 28px;
    height: 28px;
}
.org-badge.overlay {
    margin-left: -6px;
    border: 2px solid var(--card);
}
.badge-button {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}
.badge-button img {
    pointer-events: none;
}
.mention {
    color: var(--accent);
    text-decoration: none;
}
.alert {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
}
.alert.error {
    background: rgba(244, 33, 46, 0.2);
}
.alert.success {
    background: rgba(29, 155, 240, 0.2);
}
.alert.info {
    background: rgba(29, 155, 240, 0.15);
    color: var(--text);
}
.composer {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    margin-bottom: 0;
}
.composer.card {
    margin: 1.5rem var(--page-pad);
}
.composer-form {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem 1.5rem;
    align-items: flex-start;
}
.composer-avatar {
    flex-shrink: 0;
}
.composer-fields {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    flex: 1;
}
.composer-fields input,
.composer-fields textarea,
.search-form input,
.stack input,
.stack textarea {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    color: var(--text);
}
.composer-fields textarea {
    min-height: 180px;
    max-height: 420px;
    resize: vertical;
}
.composer-meta {
    display: flex;
    justify-content: flex-end;
    color: var(--muted);
    font-size: 0.85rem;
}
.composer-meta .char-count.danger {
    color: var(--danger);
}
.composer-extras {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.composer-extras input[type="text"] {
    flex: 1;
}
.file-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    color: var(--accent);
    font-size: 0.9rem;
}
.file-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.composer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}
.composer-toolbar small {
    color: var(--muted);
}
.composer-toolbar .icons {
    display: flex;
    gap: 0.75rem;
    color: var(--accent);
}
.composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.composer-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.composer-inline .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}
.composer-form .composer-meta {
    text-align: right;
    color: var(--muted);
    font-size: 0.85rem;
}
.attachment-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.attachment-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    padding: 0.4rem 0.9rem;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}
.attachment-btn.active {
    border-color: var(--accent);
    color: var(--accent);
}
.attachment-panel {
    display: none;
    border: 1px dashed var(--border);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(29, 155, 240, 0.03);
}
.attachment-panel.active {
    display: block;
}
.attachment-panel label {
    margin-top: 0.5rem;
    display: block;
}
.poll-panel .poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0;
}
.poll-panel .poll-options input {
    width: 100%;
    border-radius: 999px;
}
.poll-panel .btn.small {
    align-self: flex-start;
}
.right-rail {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1.5rem;
    height: calc(100vh - 3rem);
    flex: 0 0 320px;
    max-width: 320px;
}
.promo-card h2 {
    margin: 0 0 0.5rem;
}
.trends-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.trends-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.trends-card li:last-child {
    border-bottom: none;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
}
.footer-links a {
    color: var(--muted);
    text-decoration: none;
}
.profile {
    padding: 0;
}
.profile-cover {
    background: linear-gradient(135deg, #dfe9f5, #fdfbff);
    height: 140px;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
}
.profile-body {
    padding: 1.25rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.profile-avatar {
    margin-top: -68px;
}
.profile-details h1 {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.2;
}
.profile-details .username {
    margin: 0.25rem 0 0;
}
.profile-details .bio {
    margin: 0.75rem 0 0;
    max-width: 60ch;
}
.profile-meta,
.profile-stats {
    display: flex;
    gap: 0.75rem;
    color: var(--muted);
    flex-wrap: wrap;
}
.profile-meta .btn {
    padding: 0.3rem 0.85rem;
    font-size: 0.82rem;
}
.stat-button {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
}
.stat-button strong {
    color: var(--text);
    margin-right: 0.35rem;
}
.profile-tabs {
    margin-top: 0.75rem;
}
.profile-tabs a {
    flex: 1;
    text-align: center;
    padding: 0.6rem;
}
.profile-tabs a.active {
    border-bottom: 3px solid var(--accent);
}
.profile-tabs .tab.disabled {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    color: var(--muted);
}
.pinned-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--muted);
}
.follower-preview-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.followers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.follower-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    text-decoration: none;
    color: var(--text);
    background: rgba(15, 20, 25, 0.02);
}
.follower-pill .avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
}
.follower-pill img.avatar {
    object-fit: cover;
}
.follower-pill span {
    font-size: 0.85rem;
    color: var(--muted);
}
.follower-note {
    margin-top: 1rem;
    color: var(--muted);
}
.comments-card .comment {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.comment-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.comment-entry {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.comment-entry:last-child {
    border-bottom: none;
}
.comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.comment-action {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}
.comment-action .icon {
    margin: 0;
}
.comment-action:hover,
.comment-action.liked {
    color: var(--accent);
}
.comment-action.danger {
    color: var(--danger);
}
.comment-reply-form {
    margin-top: 0.75rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}
.comment-reply-form textarea {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    font-family: inherit;
}
.comment-reply-form.open {
    display: flex;
}
.comment-children {
    margin-left: 1.5rem;
    border-left: 2px solid rgba(29, 155, 240, 0.2);
    padding-left: 1rem;
}
.comment-entry .meta {
    font-size: 0.85rem;
}
.poll-block {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    background: rgba(29, 155, 240, 0.05);
}
.poll-block.closed {
    opacity: 0.9;
}
.poll-question {
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.poll-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.poll-option {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.poll-option input {
    margin: 0;
}
.poll-results {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.poll-result-bar {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}
.poll-result-bar .bar-fill {
    position: absolute;
    inset: 0;
    background: rgba(29, 155, 240, 0.2);
    transform-origin: left center;
}
.poll-result-bar .bar-label {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    z-index: 1;
}
.poll-result-bar.selected .bar-label {
    font-weight: 600;
}
.poll-meta {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.embedded-post {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    background: rgba(15, 20, 25, 0.04);
    display: block;
    cursor: pointer;
}
.embedded-post:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.embedded-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
}
.embedded-body {
    margin-bottom: 0.5rem;
}
.quote-note {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(29, 155, 240, 0.08);
    margin-top: 0.75rem;
}
.quoted-comment {
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    background: rgba(15, 20, 25, 0.02);
}
.quote-form {
    display: none;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}
.quote-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    font-family: inherit;
}
.quote-form.open {
    display: block;
}
.quote-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}
.comment-quote-form {
    margin-left: 2.5rem;
}
.table,
table {
    width: 100%;
    border-collapse: collapse;
}
table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.search-form .icon {
    color: var(--muted);
    flex-shrink: 0;
}
.split {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.split > div {
    flex: 2;
}
.search-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.trending-card .trend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.trending-card .trend-row:last-child {
    border-bottom: none;
}
.trend-topic {
    font-weight: 600;
    max-width: 70%;
}
.people-card .user-card {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.people-card .user-card:last-child {
    border-bottom: none;
}
.quoted-comment[data-comment-link],
.quoted-comment.standalone[data-comment-link] {
    cursor: pointer;
}
.quoted-comment[data-comment-link]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
@media (max-width: 900px) {
    .split {
        flex-direction: column;
    }
    .split > div,
    .search-sidebar {
        width: 100%;
    }
}
.edit-profile-card .profile-cover {
    height: 140px;
}
.edit-profile-card .edit-content {
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.edit-profile-card .edit-content.column {
    flex-direction: column;
}
.edit-photo {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--accent);
    border-radius: 999px;
    padding: 0.4rem;
}
.edit-profile-card .profile-avatar {
    position: relative;
    margin-top: -70px;
}
.edit-profile-modal .modal-dialog {
    padding: 1.75rem;
}
.edit-profile-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.edit-profile-summary .avatar.xl {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    border: none;
}
.edit-profile-summary h2 {
    margin: 0;
    font-size: 1.35rem;
}
.edit-profile-summary .username {
    margin: 0.25rem 0 0;
}
.edit-profile-modal .modal-actions {
    justify-content: flex-end;
}
.danger-card {
    border: 1px solid rgba(244, 33, 46, 0.2);
}
.auth-card {
    max-width: 420px;
    margin: 3rem auto;
}
.auth-card section.card {
    background: var(--card);
}
.footer-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem var(--page-pad) calc(env(safe-area-inset-bottom, 20px) + 0.45rem);
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border);
    box-shadow: 0 -20px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    z-index: 40;
    min-height: calc(68px + env(safe-area-inset-bottom, 20px));
}
.footer-nav a,
.footer-nav button {
    flex: 1;
    border: none;
    background: transparent;
    text-align: center;
    padding: 0.35rem 0;
    color: var(--muted);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    align-items: center;
    justify-content: center;
}
.footer-nav a.active {
    color: var(--accent);
}
.footer-nav .post-action {
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 18px 36px rgba(53, 88, 255, 0.25);
}
.footer-nav .icon {
    margin: 0;
    width: 1.25rem;
    height: 1.25rem;
}
@media (min-width: 768px) {
    .footer-nav {
        gap: 1rem;
    }
}
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}
.modal.open {
    display: flex;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 20, 25, 0.7);
    backdrop-filter: blur(6px);
}
.modal-dialog {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    width: min(520px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    box-shadow: 0 30px 70px rgba(15, 20, 25, 0.2);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.modal-header h3 {
    margin: 0;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.badge-modal .modal-dialog {
    width: min(320px, 90vw);
    text-align: center;
}
.badge-modal .modal-header {
    justify-content: center;
    gap: 0.5rem;
}
.badge-modal .modal-header .icon-button {
    position: absolute;
    right: 1rem;
}
.badge-modal p {
    margin-top: 0;
    color: var(--muted);
}
.badge-modal .modal-actions {
    justify-content: center;
}
.composer-modal .modal-dialog {
    width: min(480px, 95vw);
}
.followers-modal .modal-dialog {
    width: min(420px, 90vw);
    max-height: 80vh;
    overflow: hidden;
}
.followers-scroll {
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.5rem;
}
.followers-scroll .follower-pill {
    width: 100%;
}
.pin-form {
    margin-top: 0.75rem;
}
body.modal-open {
    overflow: hidden;
}
@media (max-width: 1200px) {
    .app-shell {
        flex-direction: column;
        padding: 1.25rem 1.25rem calc(7rem + env(safe-area-inset-bottom, 24px));
    }
    .right-rail {
        position: static;
        width: 100%;
        max-width: none;
        height: auto;
    }
}
@media (max-width: 768px) {
    .app-shell {
        padding: 1.25rem 1rem calc(7rem + env(safe-area-inset-bottom, 28px));
    }
    .global-bar {
        top: 0.5rem;
    }
    .profile-cover {
        height: 110px;
    }
    .profile-body {
        padding: 1rem;
        flex-direction: column;
        gap: 0.6rem;
    }
    .profile-avatar {
        margin-top: -56px;
    }
    .profile .avatar.xl {
        width: 88px;
        height: 88px;
        border-radius: 26px;
    }
    .profile-tabs a {
        padding: 0.55rem;
    }
    .timeline-wrapper {
        width: 100%;
        padding-bottom: calc(6.75rem + env(safe-area-inset-bottom, 24px));
    }
    .page {
        padding-bottom: calc(6.75rem + env(safe-area-inset-bottom, 24px));
    }
}
@media (max-width: 600px) {
    :root {
        --header-height: 56px;
    }
    body {
        padding-bottom: calc(6.25rem + env(safe-area-inset-bottom, 24px));
    }
    .app-shell {
        padding: 0 0 calc(6.5rem + env(safe-area-inset-bottom, 24px));
    }
    .global-header {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    .header-title {
        font-size: 1rem;
        letter-spacing: 0.12rem;
    }
    .header-actions {
        justify-content: flex-end;
        gap: 0.45rem;
        width: auto;
    }
    .header-actions .btn.small {
        padding: 0.3rem 0.65rem;
        font-size: 0.83rem;
    }
    .timeline-tabs {
        gap: 1.25rem;
        padding: 0.55rem 0.75rem;
    }
    .timeline-wrapper {
        padding-bottom: calc(6.25rem + env(safe-area-inset-bottom, 24px));
    }
    .page {
        padding-bottom: calc(6.25rem + env(safe-area-inset-bottom, 24px));
    }
    .card {
        border-radius: 1rem;
        padding: 1.25rem;
        margin-bottom: 1.1rem;
    }
    .feed {
        padding: 0 0.75rem 1.75rem;
        gap: 1rem;
        margin-top: 1rem;
    }
    .feed-post {
        padding: 1.1rem;
    }
    .footer-nav {
        gap: 0.4rem;
        padding: 0.3rem 0.65rem calc(env(safe-area-inset-bottom, 20px) + 0.4rem);
        min-height: calc(60px + env(safe-area-inset-bottom, 20px));
    }
    .footer-nav .post-action {
        width: 56px;
        height: 56px;
        font-size: 1rem;
    }
    .post-media img { max-height: 200px; }
    .feed-post > .post-media img { max-height: 200px; }
    .composer-form {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    .composer-avatar {
        align-self: flex-start;
    }
    .global-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .profile-cover { height: 100px; }
    .profile-body { padding: 0.9rem; }
    .profile-avatar { margin-top: -50px; }
    .profile .avatar.xl {
        width: 82px;
        height: 82px;
        border-radius: 24px;
    }
    .profile-tabs a { padding: 0.5rem; }
}
