:root {
    --bg: #050607;
    --panel: #080b10;
    --panel-soft: #0d1118;
    --panel-hover: #111720;
    --text: #f4f7fb;
    --muted: #8d97a7;
    --muted-strong: #b8c0cc;
    --border: #232a35;
    --accent: #27a8ff;
    --accent-strong: #6d5cff;
    --danger: #ff5470;
    --success: #20d49b;
    --shadow: 0 24px 80px rgba(0, 0, 0, .38);
    --radius: 8px;
    --sidebar: 278px;
    --rightbar: minmax(360px, 1fr);
    --feed: minmax(560px, 760px);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Speakly design-system normalization layer */
.ui-section,
.settings-card,
.admin-section,
.bookmark-tools,
.side-card {
    border-color: rgba(122, 140, 166, .22);
    background: linear-gradient(180deg, rgba(13, 17, 24, .94), rgba(7, 9, 13, .92));
    box-shadow: 0 18px 54px rgba(0, 0, 0, .18);
}

.settings-card,
.admin-section {
    padding: 22px;
}

.settings-card h2,
.admin-section h2,
.side-card h2 {
    margin-top: 0;
    letter-spacing: 0;
}

.settings-card-head,
.admin-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.settings-card-head p,
.settings-subcard p,
.moderation-card p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.settings-subcard {
    padding: 16px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
}

.settings-subcard h3 {
    margin: 0;
    font-size: 17px;
}

.settings-subcard .stack-form {
    margin-top: 14px;
}

.settings-subcard-wide {
    grid-column: 1 / -1;
}

.danger-zone {
    border-color: rgba(255, 84, 112, .28);
    background: rgba(255, 84, 112, .045);
}

.status-pill,
.priority-pill {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(122, 140, 166, .25);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .04);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.status-pill.is-good,
.status-resolved {
    border-color: rgba(32, 212, 155, .36);
    color: #8ef2d2;
}

.status-pill.is-warning,
.status-open,
.priority-high {
    border-color: rgba(255, 190, 90, .42);
    color: #ffd18a;
}

.status-rejected,
.priority-medium {
    border-color: rgba(39, 168, 255, .34);
    color: #8ed6ff;
}

.priority-low {
    color: var(--muted-strong);
}

.style-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.style-picker-buttons {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
}

.js-enabled .style-picker-buttons {
    display: flex;
}

.js-enabled .style-picker-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.style-btn {
    min-height: 34px;
    min-width: 38px;
    padding: 0 10px;
    border: 1px solid rgba(122, 140, 166, .25);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .035);
    font-weight: 850;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.style-btn:hover,
.style-btn.is-active {
    color: var(--text);
    border-color: rgba(39, 168, 255, .58);
    background: rgba(39, 168, 255, .12);
}

.style-btn:hover {
    transform: translateY(-1px);
}

.poll-builder {
    min-width: min(100%, 420px);
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
}

.poll-builder summary {
    min-height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-strong);
    cursor: pointer;
}

.poll-builder[open] {
    padding: 0 10px 10px;
}

.media-alt-grid input {
    border-radius: var(--radius);
}

.dynamic-quote-preview {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.dynamic-quote-preview img {
    width: 74px;
    height: 58px;
    border-radius: var(--radius);
    object-fit: cover;
}

.side-live-post {
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid rgba(39, 168, 255, .24);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 10px;
    background: rgba(39, 168, 255, .055);
}

.side-live-post strong,
.side-live-post small {
    display: block;
}

.side-live-post strong {
    line-height: 1.28;
}

.side-live-post small {
    margin-top: 6px;
    color: var(--muted);
}

.live-dot {
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(32, 212, 155, .12);
}

.moderation-queue {
    display: grid;
    gap: 12px;
}

.moderation-card {
    padding: 16px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 16px;
    background: rgba(255, 255, 255, .025);
}

.moderation-meta,
.moderation-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.moderation-meta {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.moderation-post {
    display: block;
    color: var(--text);
    font-weight: 800;
    line-height: 1.35;
}

.moderation-details {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.moderation-actions {
    align-self: start;
}

.moderation-actions textarea {
    min-height: 92px;
}

.moderation-actions div {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.empty-state {
    border-color: rgba(122, 140, 166, .2);
    background:
        radial-gradient(circle at 50% 0%, rgba(39, 168, 255, .09), transparent 36%),
        rgba(8, 11, 16, .38);
}

.compact-empty {
    min-height: auto;
    padding: 26px;
}

.btn.is-submitting,
button.is-submitting {
    position: relative;
    opacity: .74;
    cursor: progress;
}

.btn.is-submitting::after,
button.is-submitting::after {
    content: "";
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: speakly-spin .7s linear infinite;
}

@keyframes speakly-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 760px) {
    html,
    body {
        overscroll-behavior-y: contain;
    }

    .mobile-nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .settings-grid,
    .moderation-card {
        grid-template-columns: 1fr;
    }

    .settings-card,
    .admin-section {
        padding: 16px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .settings-card-head {
        display: grid;
    }

    .style-picker {
        align-items: flex-start;
        flex-direction: column;
    }

    .style-picker-buttons {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .moderation-actions div {
        flex-wrap: wrap;
    }
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(180deg, #07090d 0%, var(--bg) 34rem);
}

a {
    color: inherit;
    text-decoration: none;
}

:where(a, button, input, textarea, select, summary, .post-card):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

.icon {
    width: 1.25em;
    height: 1.25em;
    display: block;
    flex: 0 0 auto;
}

.app-shell {
    width: min(100%, 1660px);
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--sidebar) var(--feed) var(--rightbar);
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px 18px 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 12px;
    width: fit-content;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(145deg, #131a24, #06080d);
    box-shadow: inset 0 0 18px rgba(39, 168, 255, .18);
}

.brand-mark img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    min-height: 52px;
    padding: 0 14px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    color: var(--muted-strong);
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-item:hover,
.nav-item.is-active {
    background: var(--panel-hover);
    color: var(--text);
}

.nav-item:hover {
    transform: translateX(2px);
}

.nav-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 25px;
    line-height: 1;
}

.nav-icon .icon,
.mobile-nav-item .icon {
    width: 27px;
    height: 27px;
}

.nav-label {
    font-size: 20px;
    font-weight: 650;
}

.nav-badge {
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #00121f;
    font-size: 12px;
    font-weight: 800;
}

.nav-compose {
    width: 100%;
    min-height: 54px;
    margin-top: 4px;
    font-size: 17px;
}

.nav-compose .icon {
    width: 21px;
    height: 21px;
}

.sidebar-spacer {
    flex: 1;
}

.mini-profile,
.guest-box {
    min-height: 66px;
    padding: 10px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.mini-profile:hover,
.guest-box:hover {
    background: var(--panel-hover);
}

.mini-profile-text {
    min-width: 0;
    flex: 1;
}

.mini-profile-text strong,
.mini-profile-text span,
.guest-box strong,
.guest-box span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-profile-text strong,
.guest-box strong {
    color: var(--text);
}

.mini-profile-more {
    color: var(--muted);
    font-weight: 900;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
}

.mini-profile-more:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .06);
}

.mini-profile-more .icon {
    width: 20px;
    height: 20px;
}

.main-column {
    min-height: 100vh;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    background: rgba(5, 6, 7, .72);
}

.feed-header {
    min-height: 68px;
    padding: 14px 22px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
    background: rgba(5, 6, 7, .82);
    display: grid;
    gap: 12px;
}

.feed-header.single {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding-bottom: 14px;
}

.feed-header h1 {
    margin: 0;
    font-size: 21px;
    line-height: 1.1;
}

.feed-header span {
    color: var(--muted);
    font-size: 13px;
}

.back-link {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 24px;
}

.back-link:hover {
    background: var(--panel-hover);
}

.feed-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 -22px;
}

.feed-tabs a {
    min-height: 46px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 700;
    position: relative;
}

.feed-tabs a:hover {
    background: rgba(255, 255, 255, .04);
    color: var(--text);
}

.feed-tabs a.is-active {
    color: var(--text);
}

.feed-tabs a.is-active::after {
    content: "";
    width: 68px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    position: absolute;
    bottom: 0;
}

.compose-card {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    background: rgba(8, 11, 16, .48);
}

.main-composer {
    position: relative;
    z-index: 1;
    background: rgba(8, 11, 16, .62);
}

.guest-compose {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.guest-compose p {
    margin: 0;
    color: var(--muted-strong);
}

.compose-avatar {
    padding-top: 3px;
}

.compose-body textarea {
    width: 100%;
    min-height: 84px;
    resize: none;
    border: 0;
    outline: 0;
    padding: 8px 0;
    background: transparent;
    color: var(--text);
    font-size: 21px;
    line-height: 1.45;
}

.compose-advanced {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 12px;
}

.compact-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 800;
}

.compact-control select,
.poll-builder input,
.poll-builder select {
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #080b10;
    color: var(--text);
    padding: 0 10px;
}

.poll-builder {
    position: relative;
}

.poll-builder summary {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.poll-builder summary::-webkit-details-marker {
    display: none;
}

.poll-builder[open] {
    display: grid;
    gap: 8px;
    width: min(100%, 420px);
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(8, 11, 16, .78);
}

.compose-body textarea::placeholder {
    color: #6e7786;
}

.compose-tools {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 12px;
}

.icon-file,
.file-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--accent);
    font-weight: 700;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

.icon-file:hover,
.file-control:hover {
    border-color: rgba(39, 168, 255, .65);
    background: rgba(39, 168, 255, .08);
}

.icon-file input,
.file-control input {
    display: none;
}

.char-counter {
    margin-left: auto;
    color: var(--muted);
    font-size: 13px;
}

.char-counter.is-warn {
    color: #ffd166;
}

.char-counter.is-danger {
    color: var(--danger);
}

.post-list {
    display: grid;
}

.feed-update-anchor {
    position: sticky;
    top: 104px;
    z-index: 26;
    height: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.feed-update-pill {
    transform: translateY(12px);
    min-height: 48px;
    max-width: min(calc(100% - 32px), 430px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 7px 18px 7px 10px;
    border: 1px solid rgba(135, 210, 255, .48);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(41, 166, 255, .96), rgba(104, 92, 255, .96));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 18px 54px rgba(33, 150, 243, .32), 0 0 0 1px rgba(255, 255, 255, .08) inset;
    cursor: pointer;
    pointer-events: auto;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.feed-update-pill[hidden] {
    display: none;
}

.feed-update-pill:hover,
.feed-update-pill:focus-visible {
    transform: translateY(10px) scale(1.015);
    filter: brightness(1.04);
    box-shadow: 0 20px 62px rgba(33, 150, 243, .42), 0 0 0 1px rgba(255, 255, 255, .12) inset;
}

.feed-update-pill.is-loading {
    cursor: progress;
    opacity: .82;
}

.feed-update-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    flex: 0 0 auto;
}

.feed-update-icon .icon {
    width: 18px;
    height: 18px;
}

.feed-update-avatars {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.feed-update-pill .feed-update-avatar {
    width: 30px;
    height: 30px;
    margin-left: -9px;
    border: 2px solid rgba(255, 255, 255, .9);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}

.feed-update-pill .feed-update-avatar:first-child {
    margin-left: 0;
}

.feed-update-pill .feed-update-avatar span {
    font-size: 11px;
}

.feed-update-label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (max-width: 760px) {
    .feed-update-anchor {
        top: 94px;
    }

    .feed-update-pill {
        min-height: 44px;
        max-width: calc(100% - 22px);
        padding: 7px 14px 7px 8px;
        gap: 8px;
        font-size: 14px;
    }

    .feed-update-icon {
        width: 28px;
        height: 28px;
    }

    .feed-update-pill .feed-update-avatar {
        width: 28px;
        height: 28px;
    }
}

.post-card {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    transition: background .16s ease;
    position: relative;
}

.post-card:hover {
    background: rgba(255, 255, 255, .025);
}

.post-card[data-post-url] {
    cursor: pointer;
}

.post-card[data-post-url]:focus-visible {
    background: rgba(39, 168, 255, .06);
}

.post-card.has-image {
    padding-bottom: 16px;
}

.thread-parent {
    opacity: .72;
    border-bottom: 1px solid var(--border);
}

.thread-parent .post-card {
    border-bottom: 0;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .12);
}

.avatar-small {
    width: 42px;
    height: 42px;
}

.avatar-large {
    width: 116px;
    height: 116px;
    border: 4px solid var(--bg);
}

.avatar-fallback {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    isolation: isolate;
    background:
        radial-gradient(circle at var(--avatar-x, 26%) var(--avatar-y, 22%), hsl(var(--avatar-hue, 202deg) 96% 72% / .62), transparent var(--avatar-grain, 42%)),
        radial-gradient(circle at 82% 18%, hsl(var(--avatar-hue-2, 260deg) 92% 68% / .34), transparent 34%),
        linear-gradient(var(--avatar-angle, 142deg), hsl(var(--avatar-hue, 202deg) 72% 35%), hsl(var(--avatar-hue-2, 260deg) 64% 24%) 52%, hsl(var(--avatar-hue-3, 20deg) 62% 18%));
    color: #f6fbff;
    font-weight: 900;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13);
}

.avatar-fallback::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .24), transparent 32%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 8px);
    mix-blend-mode: screen;
}

.avatar-fallback::after {
    content: "";
    position: absolute;
    inset: 7px;
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, .17);
    box-shadow: inset 0 0 24px rgba(0, 0, 0, .2);
}

.avatar-fallback span {
    position: relative;
    z-index: 2;
    line-height: 1;
    letter-spacing: 0;
    transform: translateY(-1px);
}

.avatar-small.avatar-fallback span {
    font-size: 14px;
}

.avatar-large.avatar-fallback span {
    font-size: clamp(34px, 6vw, 54px);
}

.post-content {
    min-width: 0;
}

.post-topline {
    min-height: 26px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.post-author {
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-author:hover,
.text-link:hover {
    text-decoration: underline;
}

.post-handle,
.post-time {
    color: var(--muted);
    white-space: nowrap;
}

.post-menu {
    margin-left: auto;
    position: relative;
}

.post-menu summary {
    list-style: none;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--muted);
    cursor: pointer;
}

.post-menu summary .icon {
    width: 20px;
    height: 20px;
}

.post-menu summary::-webkit-details-marker {
    display: none;
}

.post-menu summary:hover {
    color: var(--accent);
    background: rgba(39, 168, 255, .09);
}

.post-menu-panel {
    position: absolute;
    right: 0;
    top: 36px;
    width: min(320px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #080b10;
    box-shadow: var(--shadow);
    display: grid;
    gap: 10px;
    z-index: 20;
}

.post-menu-panel form {
    display: grid;
    gap: 10px;
}

.post-menu label,
.stack-form label,
.settings-form label {
    display: grid;
    gap: 7px;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 700;
}

.form-help {
    display: block;
    margin-top: -1px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.form-help.is-good {
    color: #34d399;
}

.form-help.is-error {
    color: #fb7185;
}

.form-help.is-checking {
    color: var(--accent);
}

.password-meter {
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, .16);
}

.password-meter i {
    display: block;
    height: 100%;
    width: 8%;
    border-radius: inherit;
    background: #fb7185;
    transition: width .18s ease, background .18s ease;
}

.password-meter i[data-score="3"],
.password-meter i[data-score="4"] {
    background: linear-gradient(90deg, #27a8ff, #34d399);
}

.stack-form input.is-invalid,
.settings-form input.is-invalid {
    border-color: rgba(251, 113, 133, .72);
    box-shadow: 0 0 0 3px rgba(251, 113, 133, .12);
}

.post-menu textarea {
    min-height: 76px;
}

.post-edit-form textarea {
    min-height: 110px;
}

.post-text {
    margin-top: 2px;
    display: block;
    color: #eef3fb;
    font-size: 16px;
    line-height: 1.52;
    overflow-wrap: anywhere;
}

.post-inline-link {
    position: relative;
    z-index: 2;
    word-break: break-word;
}

.post-style-bold {
    font-weight: 800;
}

.post-style-italic {
    font-style: italic;
}

.post-style-mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 15px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .035);
}

.post-edited {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.text-link {
    color: var(--accent);
}

.post-image-wrap {
    display: block;
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}

.post-image {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
}

.post-video {
    background: #000;
}

.poll-card {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    gap: 9px;
    background: rgba(255, 255, 255, .025);
}

.poll-card > strong {
    font-size: 15px;
}

.poll-card form {
    margin: 0;
}

.poll-option,
.poll-result {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 12px;
    background: transparent;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.poll-option:hover {
    border-color: rgba(39, 168, 255, .7);
    background: rgba(39, 168, 255, .08);
}

.poll-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: rgba(39, 168, 255, .18);
}

.poll-label,
.poll-percent {
    position: relative;
    z-index: 1;
}

.poll-result.is-selected {
    border-color: rgba(39, 168, 255, .62);
}

.poll-card small {
    color: var(--muted);
}

.post-actions {
    height: 38px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: min(7vw, 48px);
}

.post-actions form {
    margin: 0;
}

.action-btn {
    min-width: 54px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    padding: 0 10px;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.action-btn .icon {
    width: 20px;
    height: 20px;
}

.action-btn strong {
    font-size: 13px;
    font-weight: 700;
}

.action-btn:hover {
    color: var(--accent);
    background: rgba(39, 168, 255, .08);
}

.action-btn.is-liked {
    color: var(--danger);
}

.action-btn.is-liked:hover {
    background: rgba(255, 84, 112, .1);
}

.action-btn.is-reposted {
    color: var(--success);
}

.action-btn.is-reposted:hover {
    background: rgba(32, 212, 155, .1);
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #03111d;
    background: #eff7ff;
    font-weight: 850;
    transition: transform .18s ease, filter .18s ease, background .18s ease, border-color .18s ease;
}

.btn .icon {
    width: 18px;
    height: 18px;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #fff;
}

.btn-secondary {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
}

.btn-danger {
    border: 1px solid rgba(255, 84, 112, .4);
    background: rgba(255, 84, 112, .12);
    color: #ffdce4;
}

.btn-small {
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

.btn-wide {
    width: 100%;
}

.rightbar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    overflow: visible;
    padding: 12px clamp(16px, 1.8vw, 32px) 30px 28px;
}

.search-box,
.search-page-form {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(0, 0, 0, .58);
}

.search-box {
    position: sticky;
    top: 12px;
    z-index: 8;
    margin-bottom: 16px;
}

.search-box > .icon {
    color: var(--muted);
    width: 21px;
    height: 21px;
}

.search-box input,
.search-page-form input,
.stack-form input,
.settings-form input,
.settings-form textarea,
.settings-form select,
.post-menu select,
.post-menu textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: 0;
    background: #080b10;
    color: var(--text);
    padding: 13px 14px;
}

.search-box input {
    border: 0;
    padding: 0;
    background: transparent;
    font-size: 16px;
}

.search-box:focus-within,
.search-page-form:focus-within,
.stack-form input:focus,
.settings-form input:focus,
.settings-form textarea:focus,
.settings-form select:focus,
.post-menu select:focus,
.post-menu textarea:focus {
    border-color: rgba(39, 168, 255, .75);
    box-shadow: 0 0 0 3px rgba(39, 168, 255, .12);
}

.side-card {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, .42);
}

.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.15;
}

.side-card p {
    color: var(--muted-strong);
    line-height: 1.5;
}

.side-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.side-card-head span {
    color: var(--muted);
}

.side-card-head span .icon {
    width: 20px;
    height: 20px;
}

.policy-card {
    padding: 16px;
}

.policy-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.policy-card-title .icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.policy-card-title h2 {
    margin: 0;
    font-size: 17px;
}

.policy-card p {
    margin: 0 0 10px;
    font-size: 14px;
}

.trend-list,
.suggest-list,
.notification-list {
    display: grid;
}

.trend-item {
    padding: 12px 0;
    display: grid;
    gap: 3px;
}

.trend-item + .trend-item,
.suggest-item + .suggest-item {
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.trend-item span,
.trend-item small,
.muted {
    color: var(--muted);
}

.trend-item strong {
    font-size: 17px;
}

.suggest-item {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggest-text {
    min-width: 0;
    flex: 1;
}

.suggest-text strong,
.suggest-text span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggest-text span {
    color: var(--muted);
}

.flash {
    margin: 14px 22px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
}

.flash-success {
    border-color: rgba(32, 212, 155, .45);
    background: rgba(32, 212, 155, .1);
}

.flash-error {
    border-color: rgba(255, 84, 112, .5);
    background: rgba(255, 84, 112, .1);
}

.empty-state {
    padding: 44px 22px;
    color: var(--muted);
    text-align: center;
}

.empty-state h1,
.empty-state h2 {
    margin: 0 0 8px;
    color: var(--text);
}

.empty-state p {
    margin: 0;
}

.profile-hero {
    border-bottom: 1px solid var(--border);
}

.profile-cover {
    height: 190px;
    background:
        linear-gradient(130deg, rgba(39, 168, 255, .34), rgba(109, 92, 255, .2) 48%, rgba(32, 212, 155, .14)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 18px);
    background-size: cover;
    background-position: center;
}

.profile-info {
    padding: 0 22px 22px;
    position: relative;
}

.profile-info .avatar-large {
    margin-top: -58px;
}

.profile-actions {
    position: absolute;
    right: 22px;
    top: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    max-width: min(100% - 44px, 430px);
}

.profile-actions form {
    margin: 0;
}

.profile-info h1 {
    margin: 12px 0 2px;
    font-size: 26px;
}

.profile-username {
    margin: 0;
    color: var(--muted);
}

.profile-bio {
    margin: 14px 0;
    line-height: 1.5;
}

.profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
}

.profile-stats a {
    color: var(--muted-strong);
}

.profile-stats a:hover {
    color: var(--text);
}

.profile-stats strong {
    color: var(--text);
}

.status-pill {
    display: inline-flex;
    min-height: 30px;
    padding: 0 10px;
    align-items: center;
    border-radius: 999px;
    color: #ffd166;
    background: rgba(255, 209, 102, .1);
    margin-bottom: 12px;
}

.search-page-form {
    margin: 18px 22px;
    border-radius: var(--radius);
    padding: 12px;
}

.search-page-form input {
    flex: 1;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--text);
    outline: 0;
}

.result-section,
.settings-form,
.admin-section {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.result-section h2,
.section-title,
.settings-card h2,
.admin-section h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.user-row,
.notification-item {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.notification-context {
    display: block;
    color: var(--muted-strong);
    font-style: normal;
    line-height: 1.35;
    margin-top: 3px;
}

.user-row span,
.notification-item span {
    display: grid;
    gap: 3px;
}

.user-row small,
.notification-item small {
    color: var(--muted);
}

.notification-item {
    padding: 16px 22px;
    border-top: 0;
    border-bottom: 1px solid var(--border);
}

.notification-item.is-new {
    background: rgba(39, 168, 255, .06);
}

.settings-form {
    display: grid;
    gap: 18px;
}

.settings-card {
    display: grid;
    gap: 14px;
}

.avatar-edit {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.check-row {
    grid-template-columns: 20px 1fr;
    align-items: start;
}

.check-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.notification-toggles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-stats {
    padding: 18px 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.admin-stats div {
    min-height: 88px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-soft);
    display: grid;
    align-content: center;
}

.admin-stats strong {
    font-size: 28px;
}

.admin-stats span {
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.auth-body {
    background:
        linear-gradient(140deg, rgba(39, 168, 255, .18), transparent 34rem),
        linear-gradient(220deg, rgba(109, 92, 255, .14), transparent 28rem),
        var(--bg);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.auth-card {
    width: min(100%, 440px);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(5, 6, 7, .82);
    box-shadow: var(--shadow);
}

.auth-brand {
    padding: 0;
    margin-bottom: 26px;
}

.auth-card h1 {
    margin: 0 0 8px;
    font-size: 32px;
}

.auth-card p {
    color: var(--muted-strong);
    line-height: 1.5;
}

.stack-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.auth-switch {
    text-align: center;
    margin: 18px 0 0;
}

.mobile-nav {
    display: none;
}

.mobile-compose-fab {
    display: none;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 88px minmax(520px, 720px) minmax(300px, 1fr);
    }

    .sidebar {
        align-items: center;
        padding-left: 8px;
        padding-right: 8px;
    }

    .brand-name,
    .nav-label,
    .mini-profile-text,
    .mini-profile-more,
    .guest-box span,
    .guest-box strong {
        display: none;
    }

    .brand {
        padding: 0;
    }

    .nav-item {
        width: 56px;
        justify-content: center;
        padding: 0;
    }

    .nav-compose {
        width: 56px;
        min-height: 56px;
        padding: 0;
    }

    .nav-compose span {
        display: none;
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 88px minmax(0, 720px);
        justify-content: center;
    }

    .rightbar {
        display: none;
    }
}

@media (max-width: 760px) {
    body {
        padding-bottom: 68px;
    }

    .app-shell {
        display: block;
        width: 100%;
    }

    .sidebar {
        display: none;
    }

    .main-column {
        width: 100%;
        border-left: 0;
        border-right: 0;
    }

    .feed-header {
        min-height: 62px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .feed-tabs {
        margin-left: -16px;
        margin-right: -16px;
    }

    .compose-card,
    .post-card {
        grid-template-columns: 48px 1fr;
        gap: 10px;
        padding: 15px 16px;
    }

    .main-composer {
        position: static;
        top: auto;
    }

    .compose-body textarea {
        font-size: 18px;
    }

    .post-actions {
        justify-content: space-between;
        gap: 0;
    }

    .action-btn {
        min-width: 0;
        flex: 1 1 0;
        padding: 0 5px;
        gap: 5px;
    }

    .action-btn .icon {
        width: 19px;
        height: 19px;
    }

    .action-btn strong {
        font-size: 12px;
    }

    .rightbar {
        display: none;
    }

    .mobile-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        height: 64px;
        border-top: 1px solid var(--border);
        background: rgba(5, 6, 7, .92);
        backdrop-filter: blur(16px);
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    }

    .mobile-nav-item {
        position: relative;
        display: grid;
        place-items: center;
        color: var(--muted);
        font-size: 24px;
    }

    .mobile-nav-item.is-active {
        color: var(--text);
    }

    .mobile-nav-item b {
        position: absolute;
        top: 9px;
        right: 18%;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 999px;
        display: grid;
        place-items: center;
        background: var(--accent);
        color: #00121f;
        font-size: 11px;
    }

    .mobile-compose-fab {
        position: fixed;
        left: 50%;
        bottom: 74px;
        z-index: 60;
        width: 58px;
        height: 58px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        color: #fff;
        background: linear-gradient(135deg, var(--accent), var(--accent-strong));
        box-shadow: 0 18px 50px rgba(39, 168, 255, .28);
        transform: translateX(-50%);
    }

    .mobile-compose-fab:hover {
        filter: brightness(1.06);
    }

    .mobile-compose-fab .icon {
        width: 28px;
        height: 28px;
    }

    .post-menu[open]::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(0, 0, 0, .52);
        backdrop-filter: blur(4px);
    }

    .post-menu-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        top: auto;
        width: auto;
        z-index: 80;
        padding: 16px;
        border-radius: 16px;
    }

    .notification-toggles {
        grid-template-columns: 1fr;
    }

    .profile-cover {
        height: 145px;
    }

    .profile-info {
        padding-left: 16px;
        padding-right: 16px;
    }

    .profile-actions {
        right: 16px;
        max-width: calc(100% - 132px);
        gap: 6px;
    }

    .profile-actions .btn {
        min-height: 34px;
        padding: 0 11px;
        font-size: 13px;
    }

    .avatar-large {
        width: 96px;
        height: 96px;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .search-page-form {
        margin-left: 16px;
        margin-right: 16px;
        display: grid;
        border-radius: var(--radius);
    }

    .guest-compose {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .post-topline {
        flex-wrap: wrap;
        gap: 3px 6px;
    }

    .post-menu {
        margin-left: 0;
    }

    .compose-tools {
        flex-wrap: wrap;
    }

    .char-counter {
        margin-left: 0;
    }

    .auth-page {
        padding: 16px;
    }

    .auth-card {
        padding: 22px;
    }
}

@media (max-width: 760px) {
    .mobile-nav {
        grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    }

    .main-composer.is-mobile-open {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 80;
        max-height: min(86vh, 720px);
        overflow: auto;
        border-top: 1px solid var(--border);
        border-radius: 18px 18px 0 0;
        background: rgba(8, 11, 16, .98);
        box-shadow: 0 -20px 70px rgba(0, 0, 0, .48);
        padding-top: 48px;
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
        animation: composer-sheet-in .2s ease;
    }

    .main-composer.is-mobile-open .mobile-composer-close {
        position: absolute;
        right: 12px;
        top: 10px;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 999px;
        display: grid;
        place-items: center;
        color: var(--muted);
        background: rgba(255, 255, 255, .06);
    }

    .main-composer.is-mobile-open .mobile-composer-close:hover {
        color: var(--text);
    }

    .hashtag-header {
        grid-template-columns: 1fr;
    }

    .header-action-form {
        justify-self: stretch;
    }

    .header-action-form .btn {
        width: 100%;
    }

    .hashtag-summary,
    .privacy-grid {
        grid-template-columns: 1fr;
    }

    .quote-preview {
        grid-template-columns: 1fr;
    }

    .quote-thumb {
        width: 100%;
        height: 150px;
    }

    .toast-stack {
        left: 12px;
        right: 12px;
        bottom: 144px;
    }
}

@keyframes composer-sheet-in {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

body.theme-contrast {
    --bg: #000;
    --panel: #05070b;
    --panel-soft: #090c12;
    --panel-hover: #151b25;
    --text: #fff;
    --muted: #aab4c3;
    --border: #364051;
    --accent: #44c8ff;
    --accent-strong: #8b75ff;
}

body.modal-open {
    overflow: hidden;
}

.media-clear {
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 10px;
    background: transparent;
    color: var(--muted-strong);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.media-clear .icon {
    width: 16px;
    height: 16px;
}

.media-preview,
.current-media {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255, 255, 255, .025);
}

.media-preview img,
.media-preview video,
.current-media img,
.current-media video {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    background: #000;
}

.compose-card.is-dragging,
.post-modal.is-dragging {
    border-color: rgba(39, 168, 255, .78);
    box-shadow: 0 0 0 4px rgba(39, 168, 255, .12);
}

.link-preview-card {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
}

.link-preview-card:hover {
    border-color: rgba(39, 168, 255, .45);
    background: rgba(39, 168, 255, .055);
}

.link-preview-card:not(:has(.link-preview-media)) {
    grid-template-columns: minmax(0, 1fr);
}

.link-preview-media {
    order: 2;
    min-height: 112px;
    background: #05070a;
}

.link-preview-media img {
    width: 100%;
    height: 100%;
    min-height: 112px;
    object-fit: cover;
}

.link-preview-body {
    min-width: 0;
    padding: 12px;
    display: grid;
    align-content: center;
    gap: 5px;
}

.link-preview-body small,
.link-preview-body span {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.link-preview-body strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.composer-link-preview {
    color: var(--muted);
    font-size: 14px;
}

.current-media {
    padding: 10px;
    display: grid;
    gap: 10px;
}

.current-media > span {
    color: var(--muted);
    font-size: 13px;
}

.post-menu-panel .post-edit-form {
    display: none;
}

.menu-action {
    min-height: 38px;
    border: 0;
    border-radius: var(--radius);
    padding: 0 10px;
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    text-align: left;
}

.menu-action:hover {
    background: var(--panel-hover);
}

.quote-preview {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
    background: rgba(255, 255, 255, .025);
}

.quote-preview:hover {
    border-color: rgba(39, 168, 255, .48);
    background: rgba(39, 168, 255, .05);
}

.quote-author {
    display: flex;
    gap: 6px;
    align-items: baseline;
    min-width: 0;
}

.quote-author small,
.quote-media {
    color: var(--muted);
}

.quote-text {
    display: block;
    color: var(--muted-strong);
    line-height: 1.42;
}

.quote-media {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.quote-main {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.quote-thumb {
    width: 96px;
    min-height: 76px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #000;
}

.quote-thumb img,
.quote-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.action-btn.is-bookmarked {
    color: #ffd166;
}

.action-btn.is-bookmarked:hover {
    background: rgba(255, 209, 102, .1);
}

.action-btn.pulse {
    transform: scale(1.08);
}

.verify-badge {
    width: 17px;
    height: 17px;
    display: inline-block;
    margin-left: 5px;
    vertical-align: -3px;
}

.profile-info h1 .verify-badge {
    width: 22px;
    height: 22px;
    vertical-align: -4px;
}

.post-style-serif {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
}

.post-style-accent {
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    background: rgba(39, 168, 255, .07);
    color: #eaf7ff;
    font-weight: 750;
}

.post-style-large {
    font-size: 24px;
    line-height: 1.28;
    font-weight: 800;
}

.post-style-quote {
    padding-left: 14px;
    border-left: 3px solid rgba(255, 255, 255, .28);
    color: var(--muted-strong);
    font-style: italic;
}

.load-more {
    min-height: 52px;
    display: grid;
    place-items: center;
    border-bottom: 1px solid var(--border);
    color: var(--accent);
    font-weight: 800;
}

.load-more:hover {
    background: rgba(39, 168, 255, .06);
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    place-items: center;
    padding: 18px;
}

.modal-shell.is-open {
    display: grid;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(7px);
}

.post-modal {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    max-height: min(86vh, 760px);
    overflow: auto;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.post-modal h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.post-modal form,
.post-edit-modal-form {
    display: grid;
    gap: 12px;
}

.post-modal textarea {
    width: 100%;
    min-height: 126px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #080b10;
    color: var(--text);
    padding: 13px 14px;
    resize: vertical;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: transparent;
}

.modal-close:hover {
    color: var(--text);
    background: var(--panel-hover);
}

.profile-tabs,
.notification-tabs {
    position: static;
    margin: 0;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 11, 16, .44);
}

.profile-tabs {
    grid-template-columns: repeat(3, 1fr);
}

.profile-tabs.has-bookmarks {
    grid-template-columns: repeat(4, 1fr);
}

.notification-tabs {
    grid-template-columns: repeat(4, 1fr);
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.admin-filters a {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: var(--muted-strong);
}

.admin-filters a.is-active,
.admin-filters a:hover {
    color: var(--text);
    border-color: rgba(39, 168, 255, .6);
    background: rgba(39, 168, 255, .08);
}

.admin-action-form {
    min-width: 220px;
    display: grid;
    gap: 8px;
}

.admin-action-form textarea,
td input[name="resolution"] {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #080b10;
    color: var(--text);
    padding: 9px 10px;
}

td small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.thread-parent,
.post-list.replies .post-card {
    position: relative;
}

.thread-parent::after,
.post-list.replies .post-card::before {
    content: "";
    position: absolute;
    left: 45px;
    top: 70px;
    bottom: -1px;
    width: 2px;
    background: var(--border);
}

@media (max-width: 760px) {
    .mobile-nav {
        grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    }

    .modal-shell {
        align-items: end;
        padding: 0;
    }

    .post-modal {
        width: 100%;
        max-height: 88vh;
        border-radius: 18px 18px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }
}

.sr-live {
    position: fixed;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.feed-header .feed-tabs {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.feed-header .home-feed-tabs {
    margin: 0 -6px 0;
    padding: 4px;
    border: 1px solid rgba(122, 140, 166, .14);
    border-radius: 999px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    background: rgba(255, 255, 255, .025);
    scrollbar-width: none;
}

.feed-header .home-feed-tabs::-webkit-scrollbar {
    display: none;
}

.feed-header .home-feed-tabs a {
    flex: 1 0 max-content;
    min-width: 112px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
}

.feed-header .home-feed-tabs a:hover {
    background: rgba(255, 255, 255, .055);
}

.feed-header .home-feed-tabs a.is-active {
    color: #f7fbff;
    background: linear-gradient(135deg, rgba(39, 168, 255, .24), rgba(116, 91, 255, .18));
    box-shadow: inset 0 0 0 1px rgba(39, 168, 255, .34);
}

.feed-header .home-feed-tabs a.is-active::after {
    display: none;
}

.feed-header .notification-tabs,
.feed-header .search-tabs,
.notification-tabs,
.search-tabs {
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
}

.post-media-grid {
    margin-top: 12px;
    display: grid;
    gap: 2px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--border);
}

.post-media-grid .post-image-wrap {
    margin: 0;
    border: 0;
    border-radius: 0;
    min-height: 170px;
    position: relative;
}

.post-media-grid.media-count-2,
.post-media-grid.media-count-4 {
    grid-template-columns: repeat(2, 1fr);
}

.post-media-grid.media-count-3 {
    grid-template-columns: 1.25fr .9fr;
}

.post-media-grid.media-count-3 .post-image-wrap:first-child {
    grid-row: span 2;
}

.post-media-grid .post-image {
    height: 100%;
    min-height: 170px;
    max-height: 520px;
    object-fit: cover;
}

.media-more {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, .58);
    color: #fff;
    font-size: 28px;
    font-weight: 900;
}

.repost-context {
    margin: 3px 0 5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.repost-context .icon {
    width: 15px;
    height: 15px;
}

.media-preview.media-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

.media-preview-item {
    min-height: 120px;
    background: #000;
}

.media-preview-item img,
.media-preview-item video {
    height: 100%;
}

.media-alt-grid {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.media-alt-grid input,
.current-media-row input,
.inline-form input,
.folder-create input,
.bookmark-move-form select,
.bookmark-folder-quick select,
.user-mini-action input,
.admin-action-form input,
.stack-form textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #080b10;
    color: var(--text);
    padding: 9px 10px;
}

.bookmark-folder-quick label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
}

.bookmark-folder-quick select {
    grid-column: 1 / -1;
}

.current-media-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
    align-items: center;
}

.current-media-row img,
.current-media-row video {
    width: 90px;
    height: 72px;
    border-radius: var(--radius);
    object-fit: cover;
}

.compose-card.is-dragging,
.post-modal.is-dragging {
    outline: 2px dashed var(--accent);
    outline-offset: -8px;
    background: rgba(39, 168, 255, .08);
}

.upload-progress {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    opacity: 0;
}

.upload-progress.is-visible {
    opacity: 1;
}

.upload-progress span {
    display: block;
    width: 18%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transition: width .16s ease;
}

.autocomplete-popover {
    position: absolute;
    z-index: 200;
    display: none;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #080b10;
    box-shadow: var(--shadow);
}

.autocomplete-popover.is-open {
    display: grid;
    gap: 4px;
}

.autocomplete-popover button {
    min-height: 42px;
    border: 0;
    border-radius: var(--radius);
    padding: 6px 10px;
    display: grid;
    gap: 2px;
    text-align: left;
    background: transparent;
    color: var(--text);
}

.autocomplete-popover button:hover,
.autocomplete-popover button.is-active {
    background: var(--panel-hover);
}

.autocomplete-popover small {
    color: var(--muted);
}

.profile-popover {
    position: absolute;
    z-index: 2100;
    padding: 0 14px 14px;
    border: 1px solid rgba(135, 153, 174, .22);
    border-radius: 16px;
    display: grid;
    gap: 10px;
    background:
        linear-gradient(180deg, rgba(8, 11, 16, .99), rgba(1, 2, 4, .99)),
        #010204;
    box-shadow: 0 22px 70px rgba(0, 0, 0, .72);
    overflow: hidden;
}

.profile-popover[hidden] {
    display: none;
}

.profile-popover-cover {
    height: 92px;
    margin: 0 -14px -38px;
    background:
        linear-gradient(135deg, rgba(14, 165, 255, .18), rgba(124, 92, 255, .12), rgba(15, 23, 42, .72)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 14px),
        #071019;
    background-size: cover;
    background-position: center;
}

.profile-popover-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-end;
    position: relative;
}

.profile-popover-top > a:first-child {
    display: inline-flex;
    border: 4px solid #010204;
    border-radius: 999px;
    background: #010204;
}

.profile-popover-top .avatar-large {
    width: 78px;
    height: 78px;
}

.profile-popover-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.profile-popover-open {
    white-space: nowrap;
}

.profile-popover-name {
    display: grid;
    gap: 2px;
    color: var(--text);
    margin-top: -2px;
}

.profile-popover-name strong {
    font-size: 19px;
}

.profile-popover-name span,
.profile-popover p {
    color: var(--muted);
}

.profile-popover p {
    margin: 0;
    line-height: 1.45;
}

.profile-popover-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: var(--muted);
}

.profile-popover-stats strong {
    color: var(--text);
}

.profile-sheet-shell,
.share-sheet-shell {
    position: fixed;
    inset: 0;
    z-index: 2700;
    display: none;
    padding: 18px;
}

.profile-sheet-shell.is-open,
.share-sheet-shell.is-open {
    display: grid;
    place-items: center;
}

.profile-sheet-backdrop,
.share-sheet-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, .68);
    backdrop-filter: blur(10px);
}

.profile-sheet-panel.profile-popover {
    position: relative;
    width: min(380px, calc(100vw - 28px));
    max-height: min(620px, calc(100vh - 36px));
    overflow: auto;
}

.profile-sheet-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    border-color: rgba(255, 255, 255, .16);
    background: rgba(0, 0, 0, .54);
    backdrop-filter: blur(8px);
}

.profile-sheet-loading,
.profile-sheet-error {
    min-height: 220px;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    color: var(--muted);
}

.profile-sheet-error strong {
    color: var(--text);
    font-size: 18px;
}

.share-sheet {
    position: relative;
    width: min(450px, calc(100vw - 28px));
    border: 1px solid rgba(135, 153, 174, .22);
    border-radius: 22px;
    padding: 16px;
    display: grid;
    gap: 14px;
    background:
        linear-gradient(180deg, rgba(9, 13, 20, .98), rgba(2, 4, 8, .99)),
        #020408;
    box-shadow: 0 26px 84px rgba(0, 0, 0, .72);
}

.sheet-handle {
    display: none;
}

.share-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.share-sheet-head h2 {
    margin: 2px 0 0;
    font-size: 22px;
    line-height: 1.15;
}

.share-url-row {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.share-url-row input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 13px;
    color: var(--text);
    background: rgba(255, 255, 255, .035);
    font: inherit;
}

.share-qr-card {
    border: 1px solid rgba(135, 153, 174, .18);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    grid-template-columns: 132px 1fr;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, .035);
}

.share-qr-card img {
    width: 132px;
    height: 132px;
    border-radius: 14px;
    background: #fff;
}

.share-qr-card span {
    color: var(--muted);
    line-height: 1.45;
}

.share-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.share-actions-grid .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
}

@keyframes shimmer {
    from {
        background-position: -220px 0;
    }
    to {
        background-position: 220px 0;
    }
}

.thread-reply {
    position: relative;
}

.thread-reply.depth-2,
.thread-reply.depth-3,
.thread-reply.depth-4,
.thread-reply.depth-5,
.thread-reply.depth-6 {
    margin-left: clamp(10px, 3vw, 42px);
    border-left: 2px solid var(--border);
}

.thread-reply.depth-3,
.thread-reply.depth-4,
.thread-reply.depth-5,
.thread-reply.depth-6 {
    margin-left: clamp(18px, 5vw, 62px);
}

.thread-reply .post-card {
    border-left: 0;
}

.bookmark-tools,
.mute-user-list,
.muted-terms,
.interest-cloud {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 12px;
}

.folder-create,
.inline-form,
.bookmark-move-form,
.user-mini-action {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bookmark-move-form {
    margin: -1px 22px 14px 84px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .022);
}

.bookmark-move-form label {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.folder-tabs,
.search-tabs,
.suggestions-strip,
.interest-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.folder-tabs a,
.interest-cloud span,
.tag-form button {
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted-strong);
    background: transparent;
}

.folder-tabs a.is-active,
.folder-tabs a:hover,
.tag-form button:hover {
    color: var(--text);
    border-color: rgba(39, 168, 255, .55);
    background: rgba(39, 168, 255, .08);
}

.search-tabs.feed-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(8, 11, 16, .44);
}

.search-tabs.feed-tabs a {
    min-height: 48px;
    border-radius: 0;
    text-align: center;
}

.search-page-form .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.suggestions-strip {
    padding: 12px 22px;
    border-bottom: 1px solid var(--border);
}

.post-list > .section-title {
    margin: 0;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    font-size: 22px;
    line-height: 1.2;
}

.search-empty {
    min-height: 250px;
    display: grid;
    place-content: center;
    gap: 12px;
}

.search-empty p {
    max-width: 430px;
}

.notification-toolbar {
    padding: 12px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.security-code,
.recovery-code-list code {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #080b10;
    color: var(--text);
    overflow-wrap: anywhere;
}

.recovery-code-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(39, 168, 255, .35);
    border-radius: var(--radius);
    background: rgba(39, 168, 255, .06);
}

.skip-onboarding-form {
    margin-top: 12px;
    text-align: center;
}

.skip-onboarding-form button {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.rightbar .trend-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.side-more {
    display: inline-flex;
    margin-top: 12px;
}

.header-action-form {
    align-self: start;
    justify-self: end;
}

.hashtag-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-bottom: 14px;
}

.hashtag-summary,
.hot-topic-strip {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .018);
}

.hashtag-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.hashtag-summary h2 {
    margin: 0 0 10px;
    font-size: 17px;
}

.compact-suggest-list {
    gap: 4px;
}

.hashtag-metrics,
.hot-mini-list {
    display: grid;
    gap: 10px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.metric-grid span,
.hot-mini-list a,
.rich-user-row {
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
}

.metric-grid span {
    padding: 10px;
    display: grid;
    gap: 2px;
}

.metric-grid strong {
    font-size: 22px;
}

.metric-grid small {
    color: var(--muted);
}

.hot-mini-list a {
    padding: 10px;
    display: grid;
    gap: 4px;
}

.hot-mini-list small {
    color: var(--muted);
}

.people-list {
    display: grid;
    gap: 0;
}

.rich-user-row {
    margin: 12px 22px 0;
    padding: 12px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.rich-user-row span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.rich-user-avatar {
    display: inline-flex;
}

.rich-user-text {
    min-width: 0;
    display: grid;
    gap: 3px;
    color: inherit;
}

.rich-user-text strong,
.rich-user-text small,
.rich-user-text em {
    overflow: hidden;
    text-overflow: ellipsis;
}

.rich-user-text strong,
.rich-user-text small {
    white-space: nowrap;
}

.rich-user-text em {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rich-user-row small,
.rich-user-row em {
    color: var(--muted);
    font-style: normal;
}

.rich-user-row > form {
    margin: 0;
}

.follow-list-row {
    margin: 0;
    padding: 14px 22px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    transition: background .16s ease;
}

.follow-list-row:hover {
    background: rgba(255, 255, 255, .035);
}

.follow-list-row .btn {
    justify-self: end;
    white-space: nowrap;
}

.list-manager {
    padding: 16px 22px 28px;
    display: grid;
    gap: 16px;
}

.list-tabs {
    margin-top: 0;
}

.embedded-post-list {
    border: 1px solid rgba(148, 163, 184, .12);
    border-radius: var(--radius);
    overflow: hidden;
}

.embedded-post-list .post-card {
    border-left: 0;
    border-right: 0;
}

.embedded-post-list .empty-state {
    margin: 0;
}

.settings-cover-preview {
    height: 130px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(39, 168, 255, .14), rgba(124, 92, 255, .12)),
        #070a10;
    background-size: cover;
    background-position: center;
}

.privacy-check-row {
    align-self: end;
}

.hot-topic-strip,
.profile-interest-row,
.interest-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .025);
    font-weight: 800;
}

.tag-chip:hover {
    color: var(--text);
    border-color: rgba(39, 168, 255, .56);
    background: rgba(39, 168, 255, .08);
}

.tag-chip small {
    color: var(--muted);
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 10px 0;
    color: var(--muted-strong);
}

.profile-meta span,
.profile-meta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-meta .icon {
    width: 16px;
    height: 16px;
}

.pinned-post-block {
    border-bottom: 1px solid var(--border);
    background: rgba(39, 168, 255, .025);
}

.pinned-post-block .post-card {
    border-bottom: 0;
}

.section-kicker {
    padding: 12px 22px 0 84px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.toast-stack {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 140;
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.toast {
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(8, 11, 16, .96);
    color: var(--text);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-error {
    border-color: rgba(255, 84, 112, .55);
}

.toast-info {
    border-color: rgba(39, 168, 255, .55);
}

.skeleton-block {
    display: grid;
}

.skeleton-post {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
}

.skeleton-post span,
.skeleton-post b,
.skeleton-post p {
    display: block;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.12), rgba(255,255,255,.06));
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.25s linear infinite;
}

.skeleton-post span {
    width: 48px;
    height: 48px;
}

.skeleton-post b {
    width: 42%;
    height: 16px;
    margin-bottom: 12px;
}

.skeleton-post p {
    height: 12px;
    margin: 8px 0;
}

.skeleton-post p:last-child {
    width: 68%;
}

@keyframes skeleton-shimmer {
    to {
        background-position: -200% 0;
    }
}

.mobile-composer-close {
    display: none;
}

.composer-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    border: 0;
    background: rgba(0, 0, 0, .58);
}

body.composer-sheet-open {
    overflow: hidden;
}

.compact-feed .post-card {
    padding-top: 12px;
    padding-bottom: 12px;
}

.compact-feed .post-text {
    line-height: 1.35;
}

.compact-feed .post-media-grid .post-image {
    max-height: 340px;
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.choice-grid,
.follow-choice-list {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 10px;
}

.choice-grid legend,
.follow-choice-list legend {
    margin-bottom: 8px;
    color: var(--muted-strong);
    font-weight: 850;
}

.choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-grid label,
.follow-choice-list label {
    min-height: 42px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .025);
}

.follow-choice-list label span {
    display: grid;
}

.follow-choice-list small {
    color: var(--muted);
}

.onboarding-card {
    width: min(100%, 760px);
}

.onboarding-skip {
    justify-self: center;
}

.auth-page:has(.onboarding-card) {
    place-items: start center;
    min-height: 100dvh;
    padding: clamp(28px, 6vh, 72px) 24px 48px;
}

.onboarding-card {
    padding: clamp(28px, 4vw, 44px);
    border-color: rgba(148, 163, 184, .24);
    background:
        linear-gradient(180deg, rgba(14, 18, 27, .92), rgba(5, 6, 7, .9)),
        radial-gradient(circle at 15% 0%, rgba(39, 168, 255, .14), transparent 28rem);
    overflow: hidden;
}

.onboarding-card .auth-brand {
    margin-bottom: clamp(24px, 4vw, 36px);
}

.onboarding-card h1 {
    max-width: 680px;
    font-size: clamp(34px, 5vw, 46px);
    line-height: 1.05;
}

.onboarding-card > p {
    max-width: 680px;
    margin-bottom: 22px;
    font-size: 17px;
}

.onboarding-card .stack-form {
    gap: 18px;
}

.onboarding-avatar {
    min-height: 58px;
    padding: 0 16px;
    border-radius: 999px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, .025);
}

.choice-grid legend,
.follow-choice-list legend {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    color: #dfe8f5;
    font-size: 16px;
}

.choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.follow-choice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-grid label,
.follow-choice-list label {
    min-width: 0;
    justify-content: flex-start;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.choice-grid label {
    min-height: 52px;
    padding: 12px 14px;
}

.follow-choice-list label {
    min-height: 78px;
    padding: 12px 14px;
}

.choice-grid label:hover,
.follow-choice-list label:hover,
.choice-grid label:has(input:checked),
.follow-choice-list label:has(input:checked) {
    border-color: rgba(39, 168, 255, .54);
    background: rgba(39, 168, 255, .08);
}

.choice-grid label:active,
.follow-choice-list label:active {
    transform: translateY(1px);
}

.choice-grid input[type="checkbox"],
.follow-choice-list input[type="checkbox"],
.settings-form input[type="checkbox"],
.stack-form input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    flex: 0 0 18px;
    border-radius: 5px;
    accent-color: var(--accent);
    box-shadow: none;
}

.choice-grid label span,
.follow-choice-list label span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.follow-choice-list .avatar {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
}

.follow-choice-list label strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-form {
    padding: 20px 22px 22px;
    background: linear-gradient(180deg, rgba(13, 17, 24, .38), rgba(5, 6, 7, .18));
}

.settings-card {
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: var(--radius);
    background: rgba(8, 11, 16, .72);
}

.settings-card h2 {
    margin-bottom: 2px;
    font-size: 21px;
    letter-spacing: 0;
}

.settings-card label:not(.check-row) {
    gap: 8px;
}

.settings-card .check-row {
    min-height: 48px;
    padding: 11px 12px;
    border: 1px solid rgba(148, 163, 184, .15);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    background: rgba(255, 255, 255, .025);
}

.settings-card .check-row:hover {
    border-color: rgba(39, 168, 255, .32);
    background: rgba(39, 168, 255, .045);
}

.settings-card > .stack-form {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.avatar-edit {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .15);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
}

.notification-toggles {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.privacy-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-bottom: 8px;
}

.security-code {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(39, 168, 255, .34);
    border-radius: var(--radius);
    color: #dceeff;
    background: rgba(39, 168, 255, .08);
    overflow-wrap: anywhere;
}

.session-row,
.appeal-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.appeal-row {
    grid-template-columns: 1fr;
}

.user-mini-action {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
}

.bookmark-tools {
    padding: 18px 22px 16px;
    background:
        linear-gradient(180deg, rgba(13, 17, 24, .58), rgba(5, 6, 7, .18)),
        rgba(5, 6, 7, .52);
}

.bookmark-tools .search-page-form {
    margin: 0;
    min-height: 56px;
    padding: 8px 10px 8px 16px;
    border-radius: 999px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    background: rgba(0, 0, 0, .36);
}

.bookmark-tools .search-page-form input {
    min-height: 40px;
}

.folder-create {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, .15);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
}

.folder-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.folder-tabs::-webkit-scrollbar {
    display: none;
}

.folder-tabs a {
    flex: 0 0 auto;
}

.bookmark-move-form {
    margin: -12px 22px 16px 84px;
    padding: 0;
    border: 0;
    justify-content: flex-end;
    background: transparent;
}

.bookmark-move-form label {
    width: auto;
    max-width: min(100%, 260px);
    min-height: 38px;
    padding: 6px 8px 6px 12px;
    border: 1px solid rgba(122, 140, 166, .22);
    border-radius: 999px;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    background: rgba(8, 11, 16, .86);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
    overflow: hidden;
}

.bookmark-move-form .icon {
    width: 17px;
    height: 17px;
    color: var(--muted);
}

.bookmark-move-form select {
    width: 100%;
    min-width: 0;
    max-width: 150px;
    min-height: 28px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    background: transparent;
    padding: 0 22px 0 0;
    font-size: 13px;
    text-overflow: ellipsis;
}

.bookmark-move-form select:focus {
    box-shadow: none;
}

.rightbar .search-box,
.rightbar .side-card {
    width: 100%;
}

.side-card {
    background:
        linear-gradient(180deg, rgba(13, 17, 24, .72), rgba(5, 6, 7, .7)),
        rgba(0, 0, 0, .42);
}

.trend-item,
.suggest-item {
    border-radius: var(--radius);
    transition: background .16s ease;
}

.trend-item:hover,
.suggest-item:hover {
    background: rgba(255, 255, 255, .035);
}

@media (max-width: 760px) {
    .auth-page:has(.onboarding-card) {
        padding: 14px 12px 28px;
    }

    .onboarding-card {
        padding: 22px 16px;
    }

    .choice-grid,
    .follow-choice-list {
        grid-template-columns: 1fr;
    }

    .settings-form,
    .bookmark-tools {
        padding-left: 16px;
        padding-right: 16px;
    }

    .bookmark-tools .search-page-form,
    .folder-create {
        grid-template-columns: 1fr;
        border-radius: var(--radius);
    }

    .bookmark-move-form {
        margin: -8px 16px 14px 64px;
        justify-content: stretch;
    }

    .bookmark-move-form label {
        width: 100%;
        max-width: none;
    }

    .bookmark-move-form select {
        min-width: 0;
        max-width: none;
        flex: 1;
    }
}

.tag-form {
    display: inline-flex;
}

.user-mini-action,
.session-row,
.appeal-row {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .025);
}

.user-mini-action span,
.session-row span,
.appeal-row {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.user-mini-action small,
.appeal-row small {
    color: var(--muted);
}

.post-card.is-removing {
    opacity: 0;
    transform: translateX(-12px);
}

.load-more.is-loading::after {
    content: "";
    width: 18px;
    height: 18px;
    margin-left: 8px;
    border: 2px solid rgba(39, 168, 255, .25);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.pull-refresh {
    position: fixed;
    top: 10px;
    left: 50%;
    z-index: 180;
    transform: translate(-50%, calc(-100% - 24px));
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #080b10;
    color: var(--muted-strong);
    box-shadow: var(--shadow);
    transition: transform .18s ease;
}

.pull-refresh.is-visible {
    transform: translate(-50%, 0);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 760px) {
    .post-media-grid.media-count-2,
    .post-media-grid.media-count-3,
    .post-media-grid.media-count-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .post-media-grid .post-image-wrap,
    .post-media-grid .post-image {
        min-height: 138px;
    }

    .bookmark-move-form {
        margin: -8px 14px 14px 62px;
    }

    .folder-create,
    .inline-form,
    .user-mini-action,
    .current-media-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .autocomplete-popover {
        left: 12px !important;
        right: 12px;
        width: auto !important;
        max-width: none;
    }
}

/* UI system polish */
:where(.btn, .menu-action, .action-btn, .nav-item, .mobile-nav-item, .tag-chip, .folder-tabs a, .settings-tabs button) {
    min-width: 0;
    -webkit-tap-highlight-color: transparent;
}

:where(.btn, .menu-action, .action-btn) {
    max-width: 100%;
}

:where(.btn span, .menu-action span, .action-btn strong, .nav-label, .folder-tabs a, .tag-chip, .profile-meta span, .profile-meta a, .suggest-text, .user-row span, .notification-item span) {
    min-width: 0;
    overflow-wrap: anywhere;
}

:where(input, textarea, select) {
    min-width: 0;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

:where(.stack-form, .settings-form, .post-modal, .admin-section, .bookmark-tools) :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]):hover {
    border-color: rgba(148, 163, 184, .34);
}

.empty-state {
    margin: 20px 22px;
    padding: 38px 24px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 0%, rgba(39, 168, 255, .08), transparent 18rem),
        rgba(8, 11, 16, .48);
}

.empty-state p {
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.55;
}

.empty-actions {
    margin-top: 14px;
}

.table-wrap {
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: var(--radius);
    background: rgba(8, 11, 16, .5);
}

table {
    background: transparent;
}

th {
    background: rgba(13, 17, 24, .82);
    letter-spacing: 0;
}

td {
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.admin-section {
    background: linear-gradient(180deg, rgba(13, 17, 24, .34), rgba(5, 6, 7, .08));
}

.admin-action-form {
    min-width: min(260px, 100%);
}

.profile-hero {
    overflow: hidden;
    background: rgba(5, 6, 7, .78);
}

.profile-info {
    padding: 0 clamp(18px, 3vw, 30px) 28px;
    display: grid;
    gap: 8px;
}

.profile-info .avatar-large {
    width: clamp(96px, 16vw, 136px);
    height: clamp(96px, 16vw, 136px);
    margin-top: clamp(-68px, -8vw, -52px);
    border: 4px solid var(--bg);
}

.profile-info h1 {
    max-width: min(100%, 660px);
    margin: 8px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: clamp(27px, 4vw, 34px);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.profile-username,
.profile-bio,
.profile-meta,
.profile-interest-row,
.profile-stats {
    max-width: min(100%, 660px);
}

.profile-bio {
    margin: 12px 0 2px;
    color: #eef3fb;
    line-height: 1.58;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.profile-meta {
    gap: 10px 14px;
    line-height: 1.4;
}

.profile-meta span,
.profile-meta a {
    max-width: 100%;
}

.profile-interest-row {
    margin-top: 4px;
}

.profile-stats {
    gap: 10px 18px;
    line-height: 1.35;
}

.profile-actions {
    top: 16px;
    right: clamp(16px, 3vw, 30px);
    max-width: min(100% - 32px, 520px);
}

.profile-actions .btn {
    min-height: 40px;
    padding-inline: 18px;
    background: rgba(8, 11, 16, .54);
    backdrop-filter: blur(12px);
}

.profile-actions .profile-follow-btn.btn-primary {
    border: 1px solid rgba(255, 255, 255, .86);
    background: #eff7ff;
    color: #03111d;
    box-shadow: 0 12px 32px rgba(239, 247, 255, .12);
}

.profile-actions .profile-follow-btn.btn-primary:hover {
    background: #fff;
    color: #02070d;
}

.profile-actions .profile-follow-btn.btn-secondary {
    border-color: rgba(122, 140, 166, .24);
    background: rgba(8, 11, 16, .54);
    color: var(--text);
}

.profile-tabs a {
    min-width: 0;
    padding-inline: 8px;
    text-align: center;
}

.settings-tabs {
    position: sticky;
    top: 68px;
    z-index: 9;
    padding: 10px 22px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    background: rgba(5, 6, 7, .84);
    backdrop-filter: blur(18px);
}

.settings-tabs button {
    min-height: 42px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .025);
    font-weight: 850;
}

.settings-tabs button:hover,
.settings-tabs button.is-active {
    color: var(--text);
    border-color: rgba(39, 168, 255, .58);
    background: rgba(39, 168, 255, .1);
}

.js-enabled .settings-panel[hidden] {
    display: none !important;
}

.settings-save {
    justify-self: start;
    margin-top: 4px;
}

.settings-card {
    max-width: 100%;
}

.settings-card .muted,
.settings-card p {
    line-height: 1.55;
}

.onboarding-card {
    width: min(100%, 1060px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: clamp(22px, 4vw, 38px);
    align-items: start;
}

.onboarding-main {
    min-width: 0;
}

.onboarding-preview {
    position: sticky;
    top: 28px;
    min-width: 0;
}

.preview-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.onboarding-preview-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 16px;
    background: rgba(5, 6, 7, .82);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
}

.onboarding-preview-cover {
    height: 116px;
    background:
        linear-gradient(135deg, rgba(39, 168, 255, .34), rgba(109, 92, 255, .2), rgba(32, 212, 155, .18)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 16px);
}

.onboarding-preview-body {
    padding: 0 18px 18px;
    display: grid;
    gap: 7px;
}

.onboarding-preview-avatar {
    width: 86px;
    height: 86px;
    margin-top: -43px;
}

.onboarding-preview-avatar .avatar {
    width: 86px;
    height: 86px;
    border: 4px solid var(--bg);
}

.onboarding-preview-body strong {
    font-size: 20px;
    overflow-wrap: anywhere;
}

.onboarding-preview-body small {
    color: var(--muted);
}

.onboarding-preview-body p {
    margin: 4px 0;
    color: var(--muted-strong);
    line-height: 1.45;
}

.onboarding-preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.onboarding-preview-tags span {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .025);
    font-weight: 800;
}

.onboarding-preview-stats {
    display: flex;
    gap: 14px;
    color: var(--muted);
}

.onboarding-preview-stats b {
    color: var(--text);
}

@media (max-width: 760px) {
    .settings-tabs {
        top: 62px;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        overflow-x: auto;
        padding: 10px 16px;
        scrollbar-width: none;
    }

    .settings-tabs::-webkit-scrollbar {
        display: none;
    }

    .settings-tabs button {
        padding-inline: 16px;
    }

    .empty-state {
        margin: 14px 16px;
        padding: 30px 18px;
    }

    .profile-cover {
        height: 170px;
    }

    .profile-info {
        padding-bottom: 24px;
    }

    .profile-actions {
        position: static;
        order: 2;
        justify-content: flex-start;
        max-width: 100%;
        margin-top: 4px;
    }

    .profile-actions .btn,
    .profile-actions form {
        flex: 1 1 auto;
    }

    .profile-actions .btn {
        width: 100%;
    }

    .profile-stats {
        gap: 8px 12px;
    }

    .onboarding-card {
        grid-template-columns: 1fr;
    }

    .onboarding-preview {
        position: static;
        order: -1;
    }

    .onboarding-preview-cover {
        height: 92px;
    }

    .main-composer.is-mobile-open,
    .post-modal,
    .post-menu[open] .post-menu-panel {
        border-radius: 22px 22px 0 0;
    }

    .main-composer.is-mobile-open::before,
    .post-modal::before,
    .post-menu[open] .post-menu-panel::before {
        content: "";
        width: 42px;
        height: 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .24);
        position: absolute;
        left: 50%;
        top: 10px;
        transform: translateX(-50%);
    }

    .main-composer.is-mobile-open {
        padding-top: 54px;
        max-height: min(88dvh, 740px);
    }

    .post-modal {
        padding: 34px 16px calc(18px + env(safe-area-inset-bottom));
        max-height: 88dvh;
        animation: composer-sheet-in .2s ease;
    }

    .post-modal h2 {
        padding-right: 40px;
    }

    .modal-close {
        top: 14px;
        right: 14px;
    }

    .post-menu[open]::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 110;
        background: rgba(0, 0, 0, .62);
        backdrop-filter: blur(7px);
    }

    .post-menu[open] .post-menu-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 121;
        width: 100%;
        max-height: 84dvh;
        overflow: auto;
        padding: 32px 16px calc(18px + env(safe-area-inset-bottom));
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        background: var(--panel);
        animation: composer-sheet-in .2s ease;
    }

    .post-menu-panel form,
    .post-menu-panel .menu-action,
    .post-menu-panel .btn {
        width: 100%;
    }
}

/* Speakly UI system v2. Keep this at the end of the stylesheet. */
:root {
    --surface: rgba(10, 14, 20, .9);
    --surface-soft: rgba(14, 19, 28, .72);
    --surface-hover: rgba(255, 255, 255, .045);
    --field-bg: rgba(5, 8, 13, .86);
    --field-border: rgba(122, 140, 166, .24);
    --field-border-strong: rgba(39, 168, 255, .66);
    --focus-ring: 0 0 0 3px rgba(39, 168, 255, .15);
    --card-shadow: 0 18px 54px rgba(0, 0, 0, .22);
}

:where(.settings-card, .admin-section, .bookmark-tools, .side-card, .auth-card, .post-modal, .table-wrap, .empty-state) {
    border-color: rgba(122, 140, 166, .2);
    background:
        linear-gradient(180deg, rgba(13, 17, 24, .88), rgba(7, 9, 13, .78)),
        rgba(5, 6, 7, .58);
    box-shadow: var(--card-shadow);
}

:where(.settings-card, .admin-section, .auth-card) {
    padding: 22px;
}

:where(.stack-form, .settings-form, .post-modal, .admin-section, .bookmark-tools, .auth-card, .poll-fields, .media-alt-grid, .current-media-row, .folder-create, .inline-form, .search-page-form)
    :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--field-border);
    border-radius: var(--radius);
    outline: 0;
    background: var(--field-bg);
    color: var(--text);
    padding: 11px 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

:where(.stack-form, .settings-form, .post-modal, .admin-section, .bookmark-tools, .auth-card, .poll-fields, .media-alt-grid, .current-media-row, .folder-create, .inline-form, .search-page-form)
    :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover {
    border-color: rgba(148, 163, 184, .36);
}

:where(.stack-form, .settings-form, .post-modal, .admin-section, .bookmark-tools, .auth-card, .poll-fields, .media-alt-grid, .current-media-row, .folder-create, .inline-form, .search-page-form)
    :is(input, textarea, select):not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus {
    border-color: var(--field-border-strong);
    box-shadow: var(--focus-ring);
}

select {
    color-scheme: dark;
}

.btn {
    min-width: 0;
    border: 1px solid transparent;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}

.btn-primary {
    border-color: rgba(255, 255, 255, .12);
    background: linear-gradient(135deg, #2daaff, #6d5cff);
}

.btn-secondary,
.btn-ghost {
    border-color: var(--field-border);
    background: rgba(255, 255, 255, .035);
    color: var(--text);
    box-shadow: none;
}

.btn-secondary:hover,
.btn-ghost:hover {
    border-color: rgba(39, 168, 255, .42);
    background: rgba(39, 168, 255, .08);
}

.btn-danger {
    border-color: rgba(255, 84, 112, .42);
}

.compose-card {
    position: relative;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(122, 140, 166, .18);
    background:
        radial-gradient(circle at 12% 0%, rgba(39, 168, 255, .08), transparent 34%),
        linear-gradient(180deg, rgba(12, 17, 24, .86), rgba(5, 6, 7, .58));
}

.main-composer {
    position: relative;
    z-index: 2;
}

.compose-body {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.compose-body textarea {
    min-height: 104px;
    padding: 4px 0 2px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 20px;
}

.compose-body textarea:focus {
    box-shadow: none;
}

.composer-preview-stack {
    display: grid;
    gap: 10px;
}

.compose-toolbar {
    min-height: 52px;
    margin-top: 2px;
    padding: 10px;
    border: 1px solid rgba(122, 140, 166, .16);
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255, 255, 255, .025);
}

.compose-toolset,
.compose-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.compose-submit {
    margin-left: auto;
}

.toolbar-control,
.style-btn,
.poll-builder summary {
    min-height: 38px;
    border: 1px solid rgba(122, 140, 166, .2);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    color: var(--muted-strong);
}

.toolbar-control,
.poll-builder summary {
    padding: 0 12px;
}

.toolbar-control:hover,
.style-btn:hover,
.style-btn.is-active,
.poll-builder summary:hover,
.poll-builder[open] summary {
    color: var(--text);
    border-color: rgba(39, 168, 255, .5);
    background: rgba(39, 168, 255, .1);
}

.style-picker {
    gap: 6px;
}

.style-picker-buttons {
    gap: 6px;
}

.style-btn {
    min-width: 38px;
    padding: 0 10px;
}

.poll-builder {
    position: relative;
    min-width: 0;
    border: 0;
    background: transparent;
}

.poll-builder[open] {
    padding: 0;
    border: 0;
    background: transparent;
}

.poll-fields {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 35;
    width: min(420px, calc(100vw - 44px));
    padding: 12px;
    border: 1px solid var(--field-border);
    border-radius: 16px;
    display: grid;
    gap: 8px;
    background: rgba(8, 11, 16, .98);
    box-shadow: var(--shadow);
}

.icon-file input,
.file-control input {
    display: none;
}

.char-counter {
    min-width: 54px;
    margin-left: 0;
    text-align: right;
    font-size: 13px;
    font-weight: 800;
}

.media-preview {
    margin-top: 0;
    padding: 8px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
    background: rgba(255, 255, 255, .025);
}

.media-preview[hidden],
.media-alt-grid[hidden] {
    display: none;
}

.media-preview.media-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-preview.media-count-3 .media-preview-item:first-child {
    grid-row: span 2;
}

.media-preview-item {
    position: relative;
    min-height: 180px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 12px;
    background: #020305;
}

.media-preview-item img,
.media-preview-item video {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}

.media-preview-meta {
    position: absolute;
    left: 8px;
    right: 44px;
    bottom: 8px;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #eaf3ff;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.media-video-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #eaf3ff;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 850;
}

.media-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(8px);
    font-size: 20px;
    line-height: 1;
}

.media-preview-remove:hover {
    background: rgba(255, 84, 112, .78);
}

.media-alt-grid {
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.link-preview-card {
    border-color: rgba(122, 140, 166, .18);
    border-radius: 16px;
    background: rgba(255, 255, 255, .026);
}

.composer-link-preview.is-loading .link-preview-card {
    border-style: dashed;
}

.link-preview-body {
    padding: 14px;
}

.link-preview-body strong {
    line-height: 1.32;
}

.compose-card.is-dragging,
.post-modal.is-dragging {
    outline: 0;
    border-color: rgba(39, 168, 255, .66);
    background:
        radial-gradient(circle at 50% 0%, rgba(39, 168, 255, .16), transparent 40%),
        rgba(8, 11, 16, .94);
    box-shadow: inset 0 0 0 2px rgba(39, 168, 255, .3), var(--card-shadow);
}

.compose-card.is-dragging::after,
.post-modal.is-dragging::after {
    content: "Отпустите файл, чтобы прикрепить";
    position: absolute;
    inset: 12px;
    z-index: 4;
    border: 1px dashed rgba(39, 168, 255, .7);
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #dff4ff;
    background: rgba(5, 8, 13, .66);
    backdrop-filter: blur(5px);
    font-weight: 900;
    pointer-events: none;
}

.compose-card > .upload-progress {
    grid-column: 2;
    margin-top: -4px;
}

.post-edit-modal-form > .upload-progress {
    margin-top: -4px;
}

.upload-progress {
    height: 6px;
    background: rgba(255, 255, 255, .08);
}

.upload-progress span {
    width: 8%;
}

.is-preparing-media [data-media-workspace],
.is-preparing-media .compose-tools {
    opacity: .72;
    pointer-events: none;
}

.is-preparing-media [data-media-workspace]::after,
.is-preparing-media .compose-tools::after {
    content: "Подготавливаем медиа...";
    margin-left: 8px;
    color: var(--muted);
    font-size: 13px;
}

.post-modal {
    border-color: rgba(122, 140, 166, .22);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(13, 17, 24, .98), rgba(7, 9, 13, .98)),
        var(--panel);
}

.empty-state {
    margin: 20px 22px;
    padding: 38px 24px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(39, 168, 255, .09), transparent 18rem),
        rgba(8, 11, 16, .48);
}

.empty-state p {
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.55;
}

.table-wrap {
    overflow: auto;
    border-radius: 16px;
}

table {
    background: transparent;
}

th {
    background: rgba(13, 17, 24, .82);
    letter-spacing: 0;
}

td {
    line-height: 1.45;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .mobile-nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    :where(.settings-card, .admin-section) {
        padding: 16px;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .compose-card,
    .post-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .compose-avatar .avatar {
        width: 42px;
        height: 42px;
    }

    .compose-body textarea {
        min-height: 112px;
        font-size: 19px;
    }

    .main-composer.is-mobile-open {
        max-height: min(88dvh, 740px);
        padding: 54px 16px calc(18px + env(safe-area-inset-bottom));
        border-radius: 24px 24px 0 0;
        animation: composer-sheet-in .18s ease-out;
        will-change: transform;
    }

    .composer-sheet-backdrop {
        z-index: 70;
        background: rgba(0, 0, 0, .66);
        backdrop-filter: blur(8px);
    }

    .compose-toolbar {
        align-items: stretch;
        border-radius: 18px;
    }

    .compose-toolset,
    .compose-submit {
        width: 100%;
    }

    .compose-submit {
        justify-content: space-between;
    }

    .compose-submit .btn {
        flex: 1 1 auto;
    }

    .style-picker,
    .style-picker-buttons {
        width: 100%;
    }

    .style-picker-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .style-picker-buttons::-webkit-scrollbar {
        display: none;
    }

    .style-btn {
        flex: 0 0 auto;
    }

    .poll-builder,
    .poll-builder summary,
    .toolbar-control {
        flex: 1 1 auto;
        justify-content: center;
    }

    .poll-fields {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        top: auto;
        width: auto;
        z-index: 150;
    }

    .media-preview,
    .media-preview.media-preview-grid,
    .media-alt-grid {
        grid-template-columns: 1fr;
    }

    .media-preview.media-count-3 .media-preview-item:first-child {
        grid-row: auto;
    }

    .media-preview-item {
        min-height: 154px;
    }

    .compose-card > .upload-progress {
        grid-column: 1 / -1;
        margin-top: 0;
    }

    .post-modal {
        border-radius: 24px 24px 0 0;
    }
}

/* Mobile UX and settings product layer */
.settings-page {
    background:
        linear-gradient(180deg, rgba(8, 11, 16, .58), rgba(5, 6, 7, .72)),
        rgba(5, 6, 7, .72);
}

.settings-overview {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.settings-status-card {
    min-width: 0;
    min-height: 132px;
    padding: 14px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 16px;
    display: grid;
    align-content: start;
    gap: 5px;
    background: rgba(255, 255, 255, .025);
}

.settings-status-card .icon {
    width: 21px;
    height: 21px;
    color: var(--muted);
}

.settings-status-card span,
.settings-status-card small {
    color: var(--muted);
}

.settings-status-card strong {
    overflow-wrap: anywhere;
    font-size: 17px;
}

.settings-status-card.is-good .icon,
.settings-status-card.is-good strong {
    color: #8ef2d2;
}

.settings-status-card.is-warning .icon,
.settings-status-card.is-warning strong {
    color: #ffd18a;
}

.settings-panel {
    padding: 18px 22px 26px;
}

.settings-panel + .settings-panel {
    padding-top: 0;
}

.settings-product-card {
    border-radius: 18px;
}

.settings-profile-layout {
    display: grid;
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.settings-profile-media,
.settings-profile-fields {
    min-width: 0;
    display: grid;
    gap: 12px;
}

.settings-cover-preview {
    min-height: 148px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 16px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(39, 168, 255, .24), rgba(109, 92, 255, .15), rgba(32, 212, 155, .1)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 16px);
    background-size: cover;
    background-position: center;
}

.avatar-edit {
    padding: 12px;
    border: 1px solid rgba(122, 140, 166, .14);
    border-radius: 16px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, .025);
}

.settings-upload-actions {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.settings-two-col,
.privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.settings-interest-cloud {
    padding: 0;
    border: 0;
    display: flex;
    flex-wrap: wrap;
    background: transparent;
}

.security-status-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.settings-security-grid .settings-subcard {
    align-content: start;
}

.settings-subcard.danger-zone,
.danger-zone {
    border-color: rgba(255, 84, 112, .32);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 84, 112, .1), transparent 42%),
        rgba(255, 84, 112, .045);
}

.profile-settings-shortcut .icon {
    width: 17px;
    height: 17px;
}

.mobile-nav-item span {
    display: none;
}

@media (max-width: 980px) {
    .settings-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body {
        padding-bottom: calc(86px + env(safe-area-inset-bottom));
    }

    .feed-header {
        position: sticky;
        top: 0;
        z-index: 25;
    }

    .mobile-nav {
        height: calc(68px + env(safe-area-inset-bottom));
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
        grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
        gap: 2px;
        background: rgba(5, 6, 7, .94);
        box-shadow: 0 -14px 40px rgba(0, 0, 0, .38);
    }

    .mobile-nav-item {
        min-width: 0;
        border-radius: 14px;
        display: grid;
        grid-template-rows: 27px 14px;
        place-items: center;
        gap: 1px;
        font-size: 20px;
    }

    .mobile-nav-item .icon {
        width: 23px;
        height: 23px;
    }

    .mobile-nav-item span {
        max-width: 100%;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: inherit;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
    }

    .mobile-nav-item.is-active {
        background: rgba(39, 168, 255, .1);
        color: var(--text);
    }

    .mobile-nav-item b {
        top: 4px;
        right: 13%;
    }

    .mobile-compose-fab {
        bottom: calc(78px + env(safe-area-inset-bottom));
        z-index: 65;
        width: 56px;
        height: 56px;
        box-shadow: 0 18px 48px rgba(39, 168, 255, .34);
    }

    .toast-stack {
        bottom: calc(140px + env(safe-area-inset-bottom));
    }

    .modal-shell.is-open {
        place-items: end center;
        padding: 0;
    }

    .modal-backdrop {
        background: rgba(0, 0, 0, .68);
        backdrop-filter: blur(8px);
    }

    .post-modal,
    .post-menu[open] .post-menu-panel,
    .main-composer.is-mobile-open {
        width: 100%;
        max-width: none;
        max-height: min(88dvh, 760px);
        overflow: auto;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -24px 80px rgba(0, 0, 0, .56);
    }

    .post-modal,
    .post-menu[open] .post-menu-panel {
        padding: 38px 16px calc(18px + env(safe-area-inset-bottom));
        animation: composer-sheet-in .18s ease-out;
    }

    .post-menu[open]::before {
        z-index: 110;
        background: rgba(0, 0, 0, .66);
        backdrop-filter: blur(8px);
    }

    .post-menu[open] .post-menu-panel {
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 121;
    }

    .post-menu-panel form,
    .post-menu-panel .menu-action,
    .post-menu-panel .btn {
        width: 100%;
    }

    .settings-overview {
        padding: 14px 16px;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .settings-status-card {
        min-height: 118px;
        padding: 12px;
        border-radius: 14px;
    }

    .settings-status-card strong {
        font-size: 15px;
    }

    .settings-status-card small {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .settings-tabs {
        top: 62px;
        padding: 9px 12px;
        grid-auto-columns: max-content;
        background: rgba(5, 6, 7, .92);
    }

    .settings-tabs button {
        min-height: 38px;
        padding-inline: 14px;
        font-size: 13px;
    }

    .settings-panel {
        padding: 14px 0 24px;
    }

    .settings-product-card {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        box-shadow: none;
    }

    .settings-card-head,
    .admin-section-head {
        display: grid;
        gap: 10px;
    }

    .security-status-group {
        justify-content: flex-start;
    }

    .settings-grid,
    .settings-two-col,
    .privacy-grid,
    .notification-toggles {
        grid-template-columns: 1fr;
    }

    .settings-subcard {
        padding: 14px;
        border-radius: 14px;
    }

    .settings-profile-media {
        padding: 0;
    }

    .settings-cover-preview {
        min-height: 128px;
        border-radius: 14px;
    }

    .avatar-edit {
        grid-template-columns: 1fr;
    }

    .settings-upload-actions {
        grid-template-columns: 1fr;
    }

    .settings-save {
        width: 100%;
    }

    .profile-hero {
        overflow: hidden;
    }

    .profile-cover {
        height: 150px;
    }

    .profile-info {
        padding: 0 16px 22px;
    }

    .profile-info .avatar-large {
        width: 98px;
        height: 98px;
        margin-top: -49px;
    }

    .profile-actions {
        position: static;
        max-width: 100%;
        margin: 10px 0 0;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .profile-actions form,
    .profile-actions .btn {
        width: 100%;
    }

    .profile-actions .btn {
        min-height: 40px;
    }

    .profile-info h1 {
        font-size: 26px;
    }

    .profile-meta,
    .profile-interest-row,
    .profile-stats {
        gap: 8px;
    }

    .profile-tabs {
        overflow-x: auto;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(96px, 1fr);
        scrollbar-width: none;
    }

    .profile-tabs::-webkit-scrollbar {
        display: none;
    }

    .bookmark-tools {
        padding: 14px 16px;
        gap: 10px;
    }

    .bookmark-tools .search-page-form,
    .folder-create {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }

    .folder-tabs {
        margin-inline: -2px;
        padding-bottom: 4px;
    }

    .bookmark-move-form {
        margin: -6px 12px 14px 58px;
    }
}

@media (max-width: 380px) {
    .mobile-nav-item span {
        font-size: 9px;
    }

    .mobile-nav {
        padding-left: 4px;
        padding-right: 4px;
    }

    .settings-overview {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        grid-template-columns: 1fr;
    }
}

/* Post cards, bookmarks, lists and follow pages polish */
.post-card {
    border-bottom-color: rgba(122, 140, 166, .16);
    transition: background .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.post-card:hover {
    background:
        linear-gradient(90deg, rgba(39, 168, 255, .035), transparent 34%),
        rgba(255, 255, 255, .018);
}

.post-card[data-post-url]:focus-visible {
    outline: 0;
    background: rgba(39, 168, 255, .055);
    box-shadow: inset 3px 0 0 var(--accent);
}

.post-avatar {
    position: relative;
    z-index: 2;
}

.post-topline {
    gap: 5px;
}

.post-edited {
    color: var(--muted);
    font-size: 13px;
}

.post-menu summary {
    width: 34px;
    height: 34px;
    transition: background .16s ease, color .16s ease;
}

.post-menu-panel {
    width: min(300px, calc(100vw - 32px));
    padding: 8px;
    border-color: rgba(122, 140, 166, .22);
    border-radius: 16px;
    gap: 6px;
    background:
        linear-gradient(180deg, rgba(13, 17, 24, .98), rgba(7, 9, 13, .98)),
        var(--panel);
}

.post-menu-section {
    padding: 6px;
    border-radius: 12px;
    display: grid;
    gap: 4px;
}

.post-menu-section + .post-menu-section {
    border-top: 1px solid rgba(122, 140, 166, .12);
    padding-top: 10px;
}

.post-menu-title {
    padding: 0 8px 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.menu-action,
.post-menu-panel .btn {
    width: 100%;
    min-height: 38px;
    border-radius: 10px;
    justify-content: flex-start;
}

.menu-report {
    display: grid;
    gap: 8px;
}

.menu-report > summary {
    list-style: none;
    cursor: pointer;
}

.menu-report > summary::-webkit-details-marker {
    display: none;
}

.menu-report[open] > summary {
    color: #ff9aa9;
    background: rgba(255, 84, 112, .08);
}

.menu-report form {
    padding: 8px;
    border: 1px solid rgba(122, 140, 166, .16);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
}

.post-actions {
    height: auto;
    min-height: 36px;
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
}

.post-actions form {
    min-width: 0;
}

.action-btn {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    gap: 5px;
}

.action-btn strong:empty {
    display: none;
}

.action-btn .icon {
    width: 19px;
    height: 19px;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.post-card :is(.post-media-grid, .link-preview-card, .quote-preview, .poll-card) {
    margin-top: 12px;
    border-color: rgba(122, 140, 166, .2);
    border-radius: 16px;
    background: rgba(255, 255, 255, .024);
}

.post-media-grid {
    gap: 3px;
    background: rgba(122, 140, 166, .2);
}

.post-media-grid .post-image-wrap:first-child {
    border-radius: 14px 0 0 14px;
}

.post-media-grid.media-count-1 .post-image-wrap,
.post-media-grid.media-count-1 .post-image {
    border-radius: 14px;
}

.link-preview-card,
.quote-preview {
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.link-preview-card:hover,
.quote-preview:hover {
    transform: translateY(-1px);
}

.quote-preview {
    padding: 12px;
}

.poll-card {
    padding: 12px;
}

.pinned-post-block {
    margin: 14px 18px 16px;
    overflow: hidden;
    border: 1px solid rgba(39, 168, 255, .24);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(39, 168, 255, .12), transparent 36%),
        rgba(39, 168, 255, .035);
}

.pinned-post-block .section-kicker {
    width: 100%;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(39, 168, 255, .16);
    color: #aee4ff;
    background: rgba(39, 168, 255, .055);
}

/* Full-screen media viewer */
.post-image-wrap {
    position: relative;
}

.media-open-link {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 3;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    background: rgba(0, 0, 0, .62);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, background .16s ease;
    font-size: 12px;
    font-weight: 850;
    backdrop-filter: blur(10px);
}

.media-open-link .icon {
    width: 15px;
    height: 15px;
}

.post-video-wrap:hover .media-open-link,
.media-open-link:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

.photo-body {
    overflow: hidden;
    background: #000;
}

.photo-viewer-page {
    min-height: 100vh;
    background: #000;
}

.photo-viewer {
    min-height: 100vh;
    height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 430px);
    color: var(--text);
    background: #000;
}

.photo-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 10%, rgba(39, 168, 255, .08), transparent 34%),
        #000;
}

.photo-media-frame {
    width: 100%;
    height: 100%;
    padding: 20px 74px 82px;
    display: grid;
    place-items: center;
}

.photo-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 18px 80px rgba(0, 0, 0, .45);
}

.photo-video {
    width: min(100%, 1100px);
    background: #000;
}

.photo-close,
.photo-nav {
    position: absolute;
    z-index: 8;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(12px);
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.photo-close {
    left: 22px;
    top: 22px;
}

.photo-nav {
    top: 50%;
    transform: translateY(-50%);
}

.photo-nav-prev {
    left: 22px;
}

.photo-nav-next {
    right: 22px;
}

.photo-close:hover,
.photo-nav:hover,
.photo-close:focus-visible,
.photo-nav:focus-visible {
    transform: scale(1.04);
    border-color: rgba(255, 255, 255, .26);
    background: rgba(21, 28, 38, .9);
}

.photo-nav:hover,
.photo-nav:focus-visible {
    transform: translateY(-50%) scale(1.04);
}

.photo-close .icon,
.photo-nav .icon {
    width: 24px;
    height: 24px;
}

.photo-stage-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 7;
    min-height: 66px;
    padding: 10px max(22px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .76));
}

.photo-counter {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, .78);
    background: rgba(255, 255, 255, .06);
    font-size: 13px;
    font-weight: 850;
}

.photo-stage-actions,
.photo-side-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.photo-stage-actions form,
.photo-side-actions form {
    margin: 0;
}

.photo-stage-actions .action-btn,
.photo-side-actions .action-btn {
    width: auto;
    min-width: 46px;
    color: rgba(232, 239, 250, .82);
    background: rgba(255, 255, 255, .055);
}

.photo-stage-actions .action-btn:hover,
.photo-side-actions .action-btn:hover {
    color: #fff;
    background: rgba(39, 168, 255, .14);
}

.photo-thumbs {
    position: absolute;
    left: 50%;
    bottom: 78px;
    z-index: 7;
    max-width: min(560px, calc(100% - 40px));
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, .58);
    transform: translateX(-50%);
    backdrop-filter: blur(14px);
}

.photo-thumb {
    width: 58px;
    height: 58px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb.is-active {
    border-color: var(--accent);
}

.photo-side {
    min-width: 0;
    height: 100vh;
    overflow: auto;
    border-left: 1px solid rgba(122, 140, 166, .22);
    background:
        radial-gradient(circle at 0% 0%, rgba(39, 168, 255, .1), transparent 30%),
        linear-gradient(180deg, rgba(9, 12, 18, .98), rgba(4, 5, 8, .98));
}

.photo-side-head {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(122, 140, 166, .18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(7, 9, 13, .88);
    backdrop-filter: blur(16px);
}

.photo-author {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.photo-author span,
.photo-reply span {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 2px;
}

.photo-author strong,
.photo-reply strong {
    min-width: 0;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-author small,
.photo-reply small {
    color: var(--muted);
}

.photo-post-body {
    padding: 18px 20px;
    display: grid;
    gap: 14px;
}

.photo-post-body .post-text {
    margin: 0;
}

.photo-alt-text {
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: var(--radius);
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .035);
    line-height: 1.45;
}

.photo-open-post {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(39, 168, 255, .24);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #bfeaff;
    background: rgba(39, 168, 255, .08);
    font-weight: 850;
}

.photo-open-post .icon {
    width: 17px;
    height: 17px;
}

.photo-side-actions {
    padding: 12px 20px;
    border-block: 1px solid rgba(122, 140, 166, .18);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.photo-side-actions .action-btn {
    width: 100%;
}

.photo-replies {
    padding: 16px 20px 28px;
    display: grid;
    gap: 10px;
}

.photo-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.photo-section-title strong {
    font-size: 18px;
}

.photo-section-title a {
    color: var(--accent);
    font-weight: 750;
}

.photo-reply {
    padding: 12px;
    border: 1px solid rgba(122, 140, 166, .17);
    border-radius: 16px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    color: var(--text);
    background: rgba(255, 255, 255, .025);
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.photo-reply:hover {
    border-color: rgba(39, 168, 255, .28);
    background: rgba(39, 168, 255, .06);
    transform: translateY(-1px);
}

.photo-reply em {
    color: var(--muted-strong);
    font-style: normal;
    line-height: 1.35;
}

.photo-no-replies,
.photo-empty {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.photo-no-replies {
    min-height: 120px;
    padding: 18px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 16px;
    place-items: start;
    gap: 4px;
    background: rgba(255, 255, 255, .025);
}

.photo-no-replies span {
    color: var(--muted);
}

@media (max-width: 920px) {
    .photo-body {
        overflow: auto;
    }

    .photo-viewer {
        height: auto;
        min-height: 100vh;
        display: block;
    }

    .photo-stage {
        height: min(72vh, 680px);
        min-height: 420px;
    }

    .photo-media-frame {
        padding: 58px 12px 78px;
    }

    .photo-close {
        left: 14px;
        top: 14px;
    }

    .photo-nav-prev {
        left: 12px;
    }

    .photo-nav-next {
        right: 12px;
    }

    .photo-stage-bar {
        justify-content: space-between;
        gap: 10px;
        padding-inline: 12px;
    }

    .photo-stage-actions {
        gap: 4px;
    }

    .photo-stage-actions .action-btn {
        min-width: 38px;
        padding-inline: 7px;
    }

    .photo-thumbs {
        bottom: 72px;
    }

    .photo-side {
        height: auto;
        min-height: 36vh;
        border-top: 1px solid rgba(122, 140, 166, .22);
        border-left: 0;
        border-radius: 22px 22px 0 0;
        margin-top: -20px;
        position: relative;
        z-index: 9;
    }

    .photo-side-head {
        border-radius: 22px 22px 0 0;
    }
}

@media (max-width: 520px) {
    .photo-stage {
        height: 66vh;
        min-height: 360px;
    }

    .photo-close,
    .photo-nav {
        width: 40px;
        height: 40px;
    }

    .photo-counter {
        display: none;
    }

    .photo-stage-bar {
        justify-content: center;
    }

    .photo-thumb {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .photo-side-head,
    .photo-post-body,
    .photo-side-actions,
    .photo-replies {
        padding-inline: 14px;
    }
}

.pinned-post-block .section-kicker .icon {
    width: 16px;
    height: 16px;
}

.pinned-post-block .post-card {
    border-bottom: 0;
    background: transparent;
}

.bookmarks-page .bookmark-tools {
    display: grid;
    gap: 14px;
}

.bookmark-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 14px;
    align-items: end;
}

.bookmark-hero h2 {
    margin: 6px 0 6px;
    font-size: 24px;
}

.bookmark-hero p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.bookmark-folder-actions {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.bookmark-folder-actions form {
    min-width: 0;
}

.bookmark-folder-actions .btn {
    white-space: nowrap;
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.section-eyebrow .icon {
    width: 16px;
    height: 16px;
}

.bookmark-collection-grid,
.list-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.bookmark-collection-card,
.list-card {
    min-width: 0;
    min-height: 112px;
    padding: 14px;
    border: 1px solid rgba(122, 140, 166, .17);
    border-radius: 16px;
    display: grid;
    align-content: start;
    gap: 5px;
    background: rgba(255, 255, 255, .025);
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.bookmark-collection-card:hover,
.bookmark-collection-card.is-active,
.list-card:hover,
.list-card.is-active {
    border-color: rgba(39, 168, 255, .48);
    background: rgba(39, 168, 255, .08);
    transform: translateY(-1px);
}

.bookmark-collection-card .icon,
.list-card .icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.bookmark-collection-card strong,
.list-card strong {
    overflow-wrap: anywhere;
}

.bookmark-collection-card span,
.list-card span,
.list-card small {
    color: var(--muted);
    line-height: 1.35;
}

.bookmark-search {
    margin: 0;
}

.bookmark-move-form {
    opacity: .82;
}

.bookmark-move-form:focus-within,
.bookmark-move-form:hover {
    opacity: 1;
}

.list-manager {
    padding: 18px 22px 28px;
}

.list-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.list-overview article {
    min-height: 92px;
    padding: 14px;
    border: 1px solid rgba(122, 140, 166, .17);
    border-radius: 16px;
    display: grid;
    align-content: start;
    gap: 3px;
    background: rgba(255, 255, 255, .025);
}

.list-overview .icon {
    color: var(--accent);
}

.list-overview strong {
    font-size: 24px;
}

.list-overview span {
    color: var(--muted);
}

.active-list-card .inline-form {
    margin-bottom: 12px;
}

.list-member-grid {
    gap: 10px;
}

.list-member-card {
    margin: 0;
    border-radius: 16px;
}

.follow-summary {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 14px;
    align-items: center;
    background: rgba(255, 255, 255, .018);
}

.follow-summary-user {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.follow-summary-user span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.follow-summary-user small {
    color: var(--muted);
}

.follow-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.follow-tabs a {
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid rgba(122, 140, 166, .17);
    border-radius: 14px;
    display: grid;
    gap: 1px;
    background: rgba(255, 255, 255, .025);
}

.follow-tabs a.is-active,
.follow-tabs a:hover {
    border-color: rgba(39, 168, 255, .48);
    background: rgba(39, 168, 255, .08);
}

.follow-tabs span {
    color: var(--muted);
    font-size: 13px;
}

.follow-list-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 78px;
}

.follow-list-row .rich-user-text em {
    margin-top: 2px;
}

@media (max-width: 760px) {
    .post-card {
        padding: 15px 16px;
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .post-topline {
        min-height: 24px;
    }

    .post-handle {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .post-actions {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 2px;
    }

    .action-btn {
        height: 36px;
        padding: 0 4px;
    }

    .action-btn .icon {
        width: 18px;
        height: 18px;
    }

    .post-card :is(.post-media-grid, .link-preview-card, .quote-preview, .poll-card) {
        border-radius: 14px;
    }

    .mobile-compose-fab {
        left: auto;
        right: 16px;
        bottom: calc(84px + env(safe-area-inset-bottom));
        transform: none;
    }

    .bookmarks-page .post-list > .empty-state,
    .follow-page > .empty-state {
        padding-right: 92px;
        text-align: left;
    }

    .pinned-post-block {
        margin: 12px 12px 14px;
        border-radius: 16px;
    }

    .pinned-post-block .section-kicker {
        padding: 10px 12px;
    }

    .bookmark-hero,
    .follow-summary {
        grid-template-columns: 1fr;
    }

    .bookmark-collection-grid,
    .list-card-grid {
        grid-auto-flow: column;
        grid-auto-columns: minmax(148px, 72%);
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .bookmark-collection-grid::-webkit-scrollbar,
    .list-card-grid::-webkit-scrollbar {
        display: none;
    }

    .bookmark-collection-card,
    .list-card {
        min-height: 104px;
    }

    .list-manager {
        padding: 14px 16px 24px;
    }

    .list-overview {
        grid-template-columns: 1fr;
    }

    .list-member-card,
    .follow-list-row {
        margin: 0;
        padding: 12px 16px;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .follow-summary {
        padding: 14px 16px;
    }

    .follow-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .follow-list-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .follow-list-row form {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 380px) {
    .post-actions {
        margin-left: -48px;
        padding-left: 48px;
    }

    .bookmark-hero h2 {
        font-size: 21px;
    }
}

/* Targeted UI fixes after visual pass */
.settings-page .settings-panel {
    scroll-margin-top: 148px;
}

.settings-page .settings-product-card {
    overflow: hidden;
}

.settings-page .settings-card-head {
    min-width: 0;
}

.settings-page .settings-card-head > div {
    min-width: 0;
}

.settings-page .settings-grid,
.settings-page .notification-toggles {
    align-items: stretch;
}

.settings-page .settings-subcard {
    min-width: 0;
}

.settings-page .notification-toggles {
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
    gap: 12px;
}

.settings-page .settings-card .check-row {
    min-width: 0;
    min-height: 58px;
    align-items: center;
    gap: 10px;
}

.settings-page .check-row span {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.settings-page textarea {
    max-width: 100%;
    resize: vertical;
}

.settings-page .settings-profile-fields textarea[name="bio"] {
    min-height: 112px;
    max-height: 160px;
    resize: none;
    overflow: auto;
}

.settings-avatar-preview {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.settings-avatar-preview.has-preview {
    box-shadow: 0 0 0 3px rgba(39, 168, 255, .18);
}

.settings-avatar-preview .avatar {
    width: 116px;
    height: 116px;
}

.settings-upload-actions .file-control {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
}

.rightbar .search-box {
    position: relative;
    top: auto;
    background: rgba(5, 6, 7, .96);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
}

.side-card-head {
    min-height: 28px;
    margin-bottom: 14px;
}

.side-card-head h2 {
    margin-bottom: 0;
}

.follow-page .feed-header.single {
    min-height: 70px;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.follow-page .feed-header.single > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.follow-page .feed-header.single h1 {
    line-height: 1.08;
}

@media (max-width: 760px) {
    .settings-page .settings-panel {
        scroll-margin-top: 126px;
    }

    .settings-page .settings-card .check-row {
        min-height: 52px;
    }

    .settings-avatar-preview,
    .settings-avatar-preview .avatar {
        width: 104px;
        height: 104px;
    }

    .follow-page .feed-header.single {
        min-height: 64px;
        padding: 10px 16px;
    }
}

/* Composer completion: media, link previews, polls and edit media */
[data-media-workspace] {
    display: grid;
    gap: 10px;
}

.media-drop-hint {
    display: none;
    min-height: 86px;
    border: 1px dashed rgba(39, 168, 255, .46);
    border-radius: 16px;
    place-items: center;
    gap: 10px;
    color: #bfe9ff;
    background: rgba(39, 168, 255, .08);
    text-align: center;
    font-weight: 850;
}

.media-drop-hint .icon {
    width: 22px;
    height: 22px;
}

.compose-card.is-dragging .media-drop-hint,
.post-modal.is-dragging .media-drop-hint {
    display: flex;
}

.draft-media-notice {
    padding: 10px 12px;
    border: 1px solid rgba(255, 209, 102, .32);
    border-radius: 14px;
    color: #ffe2a3;
    background: rgba(255, 209, 102, .08);
    font-size: 13px;
    line-height: 1.4;
}

.media-preview-tools {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    gap: 6px;
    z-index: 3;
}

.media-preview-replace,
.media-preview-remove {
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(8px);
    font-weight: 900;
}

.media-preview-replace {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
}

.media-preview-remove {
    position: static;
}

.media-preview-alt {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 42px;
    z-index: 3;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    padding: 0 12px;
    backdrop-filter: blur(8px);
    font-size: 13px;
}

.media-alt-grid {
    display: none;
}

.composer-link-preview.is-fallback .link-preview-card {
    border-style: dashed;
}

.poll-fields-head {
    display: grid;
    gap: 2px;
}

.poll-fields-head strong {
    font-size: 16px;
}

.poll-fields-head small {
    color: var(--muted);
    line-height: 1.35;
}

.poll-option-editor {
    display: grid;
    gap: 8px;
}

.poll-option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 8px;
    align-items: center;
}

.poll-option-row button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--field-border);
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, .035);
}

.poll-option-row button:hover {
    color: #ff9aac;
    border-color: rgba(255, 84, 112, .42);
    background: rgba(255, 84, 112, .08);
}

.poll-option-row button .icon {
    width: 17px;
    height: 17px;
}

.poll-add-option {
    justify-self: start;
}

.poll-live-preview {
    padding: 12px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 14px;
    display: grid;
    gap: 8px;
    background: rgba(255, 255, 255, .025);
}

.poll-live-preview[hidden] {
    display: none;
}

.poll-live-preview span {
    min-height: 34px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--muted-strong);
}

.poll-live-preview small {
    color: #ffd18a;
}

.current-media {
    display: grid;
    gap: 10px;
}

.current-media-head {
    display: grid;
    gap: 2px;
}

.current-media-head small {
    color: var(--muted);
    line-height: 1.35;
}

.current-media-row {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 14px;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, .025);
}

.current-media-row.is-replacing {
    border-color: rgba(39, 168, 255, .48);
    background: rgba(39, 168, 255, .07);
}

.current-media-row img,
.current-media-row video {
    width: 112px;
    height: 82px;
    border-radius: 12px;
    object-fit: cover;
    background: #020305;
}

.current-media-fields {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.current-media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.current-media-replace {
    cursor: pointer;
}

.current-media-replace input {
    display: none;
}

.current-media-remove {
    min-height: 34px;
    margin: 0;
    padding: 0 10px;
}

@media (max-width: 760px) {
    .media-preview-alt {
        position: static;
        width: calc(100% - 16px);
        margin: -46px 8px 8px;
        z-index: 4;
    }

    .media-preview-meta {
        right: 8px;
        bottom: 8px;
    }

    .current-media-row {
        grid-template-columns: 1fr;
    }

    .current-media-row img,
    .current-media-row video {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .poll-fields {
        max-height: min(72dvh, 620px);
        overflow: auto;
    }
}

/* Photo viewer final overrides after shared action styles */
.photo-side-head > .action-btn {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    padding: 0;
}

.photo-side-head .photo-author {
    flex: 1 1 auto;
    width: auto;
}

.photo-stage-actions .action-btn {
    width: auto;
    min-width: 46px;
}

.photo-side-actions .action-btn {
    width: 100%;
    min-width: 0;
}

.profile-avatar-link {
    position: relative;
    width: max-content;
    max-width: 100%;
    display: inline-grid;
    color: #fff;
    border-radius: 999px;
}

.profile-avatar-link > span {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, .68);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .16s ease, transform .16s ease, background .16s ease;
    backdrop-filter: blur(10px);
}

.profile-avatar-link > span .icon {
    width: 17px;
    height: 17px;
}

.profile-avatar-link:hover > span,
.profile-avatar-link:focus-visible > span {
    opacity: 1;
    transform: translateY(0);
}

.avatar-viewer {
    min-height: 100vh;
    height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    color: var(--text);
    background: #000;
}

.avatar-stage {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 22%, rgba(39, 168, 255, .12), transparent 34%),
        radial-gradient(circle at 72% 62%, rgba(109, 92, 255, .16), transparent 36%),
        #000;
}

.avatar-viewer-frame {
    width: min(74vmin, 620px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

.avatar-viewer-frame > img,
.avatar-viewer-fallback {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 30px 120px rgba(0, 0, 0, .55);
}

.avatar-viewer-fallback {
    font-size: clamp(96px, 18vw, 210px);
}

.avatar-viewer-fallback::after {
    inset: 18px;
}

.avatar-side .avatar-viewer-bio {
    margin: 0;
    color: #eef3fb;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 920px) {
    .avatar-viewer {
        height: auto;
        min-height: 100vh;
        display: block;
    }

    .avatar-stage {
        height: min(68vh, 660px);
        min-height: 390px;
    }

    .avatar-viewer-frame {
        width: min(72vmin, 460px);
    }
}

@media (max-width: 520px) {
    .profile-avatar-link > span {
        opacity: 1;
        transform: none;
        width: 30px;
        height: 30px;
    }

    .avatar-stage {
        height: 62vh;
        min-height: 330px;
    }
}

/* Mobile stability layer. This intentionally wins over older mobile rules above. */
.post-menu-sheet-backdrop {
    display: none;
}

body.post-menu-sheet-open {
    overflow: hidden;
}

body.overlay-locked {
    overflow: hidden;
}

.upload-error {
    margin: 10px 0;
    padding: 12px;
    border: 1px solid rgba(255, 84, 112, .34);
    border-radius: 14px;
    display: grid;
    gap: 8px;
    color: #ffdbe2;
    background:
        linear-gradient(135deg, rgba(255, 84, 112, .12), rgba(255, 84, 112, .045)),
        rgba(10, 14, 20, .9);
}

.upload-error strong {
    color: #fff;
}

.upload-error ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 4px;
    color: #ffb7c3;
    font-size: 13px;
    line-height: 1.35;
}

.media-alt-hint {
    color: var(--muted);
    line-height: 1.35;
}

.push-settings-card [data-push-status] {
    color: var(--muted);
}

.push-settings-card [data-push-status][data-state="good"] {
    color: var(--success);
}

.push-settings-card [data-push-status][data-state="error"] {
    color: var(--danger);
}

.btn-mini {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 12px;
}

.moderation-priority-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

@media (max-width: 760px) {
    .upload-error {
        margin: 10px 0 12px;
        border-radius: 16px;
        font-size: 14px;
    }

    .upload-error ul {
        font-size: 12px;
    }
}

@media (max-width: 760px) {
    .mobile-nav {
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 80;
        height: calc(68px + env(safe-area-inset-bottom));
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 2px;
        border-top: 1px solid rgba(122, 140, 166, .18);
        background: rgba(5, 6, 7, .94);
        backdrop-filter: blur(18px);
        box-shadow: 0 -14px 40px rgba(0, 0, 0, .38);
    }

    .mobile-nav-item {
        min-width: 0;
        min-height: 54px;
        border-radius: 14px;
        display: grid;
        grid-template-rows: 28px 14px;
        place-items: center;
        gap: 1px;
    }

    .mobile-nav-item .icon {
        width: 23px;
        height: 23px;
    }

    .mobile-nav-item span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 10px;
        line-height: 1;
    }

    .mobile-compose-fab {
        position: fixed !important;
        left: auto !important;
        right: 16px !important;
        bottom: calc(84px + env(safe-area-inset-bottom)) !important;
        z-index: 84;
        transform: none !important;
    }

    .toast-stack {
        bottom: calc(148px + env(safe-area-inset-bottom));
    }

    .composer-sheet-backdrop {
        z-index: 70;
    }

    body.post-menu-sheet-open .post-menu-sheet-backdrop {
        position: fixed;
        inset: 0;
        z-index: 110;
        display: block;
        border: 0;
        background: rgba(0, 0, 0, .66);
        backdrop-filter: blur(8px);
    }

    .post-menu[open]::before {
        display: none !important;
    }

    .post-menu[open] .post-menu-panel {
        position: fixed !important;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 121 !important;
        width: 100% !important;
        max-width: none !important;
        max-height: min(84dvh, 720px);
        padding: 38px 16px calc(18px + env(safe-area-inset-bottom));
        overflow: auto;
        overscroll-behavior: contain;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 24px 24px 0 0;
        background: linear-gradient(180deg, rgba(13, 17, 24, .98), rgba(7, 9, 13, .98)), var(--panel);
        box-shadow: 0 -24px 80px rgba(0, 0, 0, .56);
        animation: composer-sheet-in .18s ease-out;
    }

    .post-menu[open] .post-menu-panel::before,
    .post-modal::before,
    .main-composer.is-mobile-open::before {
        content: "";
        position: absolute;
        top: 10px;
        left: 50%;
        width: 42px;
        height: 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .24);
        transform: translateX(-50%);
    }

    .post-menu-panel form,
    .post-menu-panel .menu-action,
    .post-menu-panel .btn {
        width: 100%;
    }

    .modal-shell.is-open {
        place-items: end center;
        padding: 0;
    }

    .post-modal,
    .main-composer.is-mobile-open {
        width: 100%;
        max-width: none;
        max-height: min(88dvh, 760px);
        overflow: auto;
        overscroll-behavior: contain;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -24px 80px rgba(0, 0, 0, .56);
    }

    .main-composer.is-mobile-open {
        padding: 54px 16px calc(18px + env(safe-area-inset-bottom));
    }

    .pull-refresh {
        top: calc(10px + env(safe-area-inset-top));
        z-index: 190;
    }
}

/* Mobile UX pass: composer FAB, compact actions, settings and photo gestures. */
.post-menu-mobile-actions {
    display: none;
}

.photo-media {
    transform-origin: center;
    transition: transform .2s ease;
    will-change: transform;
}

.photo-viewer.is-photo-dragging .photo-media {
    transition: none;
}

.photo-viewer.is-photo-zoomed .photo-media {
    cursor: zoom-out;
}

@media (max-width: 760px) {
    body.app-body {
        --mobile-nav-height: calc(68px + env(safe-area-inset-bottom));
        --mobile-fab-size: 56px;
        --mobile-fab-gap: 16px;
        --mobile-fab-bottom: calc(var(--mobile-nav-height) + var(--mobile-fab-gap));
        padding-bottom: calc(var(--mobile-nav-height) + 18px) !important;
    }

    body.app-body .main-column {
        padding-bottom: calc(var(--mobile-nav-height) + 28px);
    }

    .mobile-compose-fab {
        width: var(--mobile-fab-size) !important;
        height: var(--mobile-fab-size) !important;
        right: 16px !important;
        bottom: var(--mobile-fab-bottom) !important;
    }

    body.composer-sheet-open .mobile-compose-fab,
    body.modal-open .mobile-compose-fab,
    body.post-menu-sheet-open .mobile-compose-fab,
    body.profile-sheet-open .mobile-compose-fab,
    body.share-sheet-open .mobile-compose-fab {
        opacity: 0;
        pointer-events: none;
        transform: translateY(8px) scale(.96) !important;
    }

    .toast-stack {
        right: 12px;
        bottom: calc(var(--mobile-fab-bottom) + var(--mobile-fab-size) + 18px) !important;
        max-width: calc(100vw - 24px);
    }

    .action-empty {
        margin-bottom: calc(var(--mobile-nav-height) + 16px);
    }

    .feed-update-anchor {
        top: calc(108px + env(safe-area-inset-top)) !important;
        z-index: 24;
    }

    .profile-sheet-shell,
    .share-sheet-shell {
        align-items: end;
        justify-items: stretch;
        padding: 0;
    }

    .profile-sheet-panel.profile-popover,
    .share-sheet {
        width: 100%;
        max-height: min(84vh, 720px);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 24px 24px 0 0;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        transform: translateY(18px);
        transition: transform .18s ease;
    }

    .profile-sheet-shell.is-open .profile-sheet-panel.profile-popover,
    .share-sheet-shell.is-open .share-sheet {
        transform: translateY(0);
    }

    .profile-sheet-panel.profile-popover {
        max-width: none;
    }

    .profile-sheet-panel .profile-popover-actions {
        width: min(100%, 250px);
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .profile-sheet-panel .profile-popover-open {
        min-height: 46px;
        justify-content: center;
        color: #061018;
        background: var(--text);
    }

    .profile-sheet-panel .profile-popover-actions form,
    .profile-sheet-panel .profile-popover-actions .btn {
        width: 100%;
    }

    .share-actions-grid {
        grid-template-columns: 1fr;
    }

    .sheet-handle {
        width: 42px;
        height: 4px;
        border-radius: 999px;
        display: block;
        justify-self: center;
        background: rgba(148, 163, 184, .46);
    }

    .share-qr-card {
        grid-template-columns: 104px 1fr;
    }

    .share-qr-card img {
        width: 104px;
        height: 104px;
    }

    .feed-update-pill {
        transform: translateY(6px);
        max-width: calc(100vw - 28px);
    }

    .feed-update-pill:hover,
    .feed-update-pill:focus-visible {
        transform: translateY(4px) scale(1.01);
    }

    .post-menu-mobile-actions {
        display: grid;
    }

    .post-actions {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 4px;
    }

    .post-action-quote,
    .post-action-share {
        display: none !important;
    }

    .post-actions .action-btn {
        min-height: 38px;
        border-radius: 999px;
    }

    .settings-page .feed-header {
        min-height: 56px;
        padding-bottom: 10px;
    }

    .settings-page .feed-header span {
        display: none;
    }

    .settings-page .settings-overview {
        grid-template-columns: none !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(218px, 78vw);
        gap: 10px;
        overflow-x: auto;
        padding: 12px 16px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .settings-page .settings-overview::-webkit-scrollbar,
    .settings-page .settings-tabs::-webkit-scrollbar {
        display: none;
    }

    .settings-page .settings-status-card {
        min-height: 104px;
        padding: 12px;
        scroll-snap-align: start;
    }

    .settings-page .settings-status-card small {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .settings-page .settings-tabs {
        top: 56px !important;
        z-index: 23;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 8px 12px 10px;
        background: rgba(5, 6, 7, .92);
        backdrop-filter: blur(18px);
    }

    .settings-page .settings-tabs button {
        flex: 0 0 auto;
        min-height: 40px;
        padding: 0 16px;
        border-radius: 999px;
    }

    .settings-page .settings-panel {
        padding: 12px 0 24px !important;
    }

    .settings-page .settings-product-card {
        margin: 0 12px;
        padding: 14px !important;
        border-radius: 18px !important;
    }

    .settings-page .settings-card-head {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 14px;
    }

    .settings-page .settings-card-head h2 {
        font-size: 19px;
    }

    .settings-page .settings-card-head p {
        font-size: 13px;
        line-height: 1.35;
    }

    .settings-page .settings-profile-layout,
    .settings-page .settings-grid,
    .settings-page .privacy-grid,
    .settings-page .settings-two-col {
        grid-template-columns: 1fr !important;
    }

    .settings-page .settings-subcard {
        padding: 12px;
        border-radius: 16px;
    }

    .settings-page .notification-toggles {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
    }

    .settings-page .settings-card .check-row {
        min-height: 50px;
        padding: 10px;
    }

    .settings-page .settings-save {
        width: 100%;
        min-height: 46px;
    }

    .photo-body {
        overscroll-behavior: contain;
    }

    .photo-stage {
        touch-action: pan-y;
    }

    .photo-media-frame {
        touch-action: none;
    }

    .photo-stage-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 45;
        min-height: 68px;
        padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .88) 30%, rgba(0, 0, 0, .96));
        backdrop-filter: blur(10px);
    }

    .photo-thumbs {
        bottom: calc(76px + env(safe-area-inset-bottom)) !important;
        max-width: calc(100vw - 24px);
        overflow-x: auto;
        scrollbar-width: none;
    }

    .photo-thumbs::-webkit-scrollbar {
        display: none;
    }

    .photo-side {
        padding-bottom: calc(84px + env(safe-area-inset-bottom));
    }

    .photo-nav {
        opacity: .92;
    }
}

/* Composer audience, drafts and richer media controls */
.audience-picker,
.privacy-choice-grid {
    min-width: 0;
    border: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.privacy-choice-grid {
    margin: 0;
    padding: 0;
    grid-template-columns: 1fr;
}

.privacy-choice-grid legend {
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 900;
}

.audience-picker label,
.privacy-choice-grid label {
    min-width: 0;
    min-height: 46px;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    background: rgba(255, 255, 255, .025);
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.audience-picker label:hover,
.privacy-choice-grid label:hover,
.audience-picker label:has(input:focus-visible),
.privacy-choice-grid label:has(input:focus-visible),
.audience-picker label.is-active,
.privacy-choice-grid label.is-active,
.audience-picker label:has(input:checked),
.privacy-choice-grid label:has(input:checked) {
    border-color: rgba(39, 168, 255, .7);
    color: var(--text);
    background: rgba(39, 168, 255, .1);
}

.audience-picker input,
.privacy-choice-grid input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.audience-picker .icon,
.privacy-choice-grid .icon {
    flex: 0 0 auto;
    color: var(--accent);
}

.audience-picker span,
.privacy-choice-grid span {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.audience-picker strong,
.privacy-choice-grid strong {
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.audience-picker small,
.privacy-choice-grid small {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.2;
}

.draft-status {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.post-audience-badge {
    min-height: 22px;
    padding: 0 7px;
    border: 1px solid rgba(122, 140, 166, .22);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    vertical-align: middle;
}

.post-audience-badge .icon {
    width: 13px;
    height: 13px;
}

.media-preview-order {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(8px);
    font-size: 16px;
    font-weight: 900;
}

.media-preview-order:disabled {
    opacity: .38;
    cursor: not-allowed;
}

.media-preview-item.is-drag-source {
    opacity: .58;
}

.media-preview-item.is-drop-target {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
}

/* Profile showcase */
.profile-showcase {
    padding: 0 18px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 12px;
}

.profile-showcase.is-single {
    grid-template-columns: 1fr;
}

.profile-showcase-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(39, 168, 255, .08), transparent 42%),
        var(--surface);
}

.profile-showcase-head {
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.profile-showcase-head div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.profile-showcase-head strong {
    font-size: 16px;
    font-weight: 950;
}

.profile-showcase-head small {
    color: var(--muted);
    line-height: 1.35;
}

.profile-showcase-head a {
    flex: 0 0 auto;
    color: var(--accent);
    font-weight: 850;
}

.profile-media-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.profile-media-strip a {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(122, 140, 166, .16);
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    background: #020305;
}

.profile-media-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .18s ease, opacity .18s ease;
}

.profile-media-strip a:hover img {
    transform: scale(1.04);
    opacity: .9;
}

.profile-media-strip span {
    position: absolute;
    left: 6px;
    bottom: 6px;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 850;
}

.profile-author-list {
    display: grid;
    gap: 8px;
}

.profile-showcase.is-single .profile-author-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-author-row {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(122, 140, 166, .16);
    border-radius: 14px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    color: var(--text);
    background: rgba(255, 255, 255, .025);
}

.profile-showcase.is-single .profile-author-row {
    min-height: 108px;
    padding: 14px;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    background:
        radial-gradient(circle at 0 0, rgba(39, 168, 255, .12), transparent 42%),
        rgba(255, 255, 255, .028);
}

.profile-showcase.is-single .profile-author-row .avatar {
    width: 54px;
    height: 54px;
}

.profile-showcase.is-single .profile-author-row::after {
    content: "Открыть";
    grid-column: 1 / -1;
    width: max-content;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(39, 168, 255, .28);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    background: rgba(39, 168, 255, .07);
    font-size: 12px;
    font-weight: 900;
}

.profile-author-row:hover {
    border-color: rgba(39, 168, 255, .36);
    background: rgba(39, 168, 255, .07);
}

.profile-author-row span {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 2px;
}

.profile-author-row strong,
.profile-author-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-author-row small {
    color: var(--muted);
}

.pinned-post-block {
    border-color: rgba(39, 168, 255, .42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 18px 52px rgba(39, 168, 255, .08);
}

.pinned-post-block .section-kicker {
    justify-content: flex-start;
    gap: 8px;
    letter-spacing: 0;
    font-size: 13px;
    font-weight: 950;
    text-transform: none;
}

.pinned-post-block .post-card {
    border-bottom: 0;
    background: rgba(39, 168, 255, .025);
}

@media (max-width: 980px) {
    .profile-showcase {
        grid-template-columns: 1fr;
    }

    .profile-showcase.is-single .profile-author-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .audience-picker {
        grid-template-columns: 1fr;
    }

    .audience-picker small {
        white-space: normal;
    }

    .profile-showcase {
        padding: 0 12px 12px;
    }

    .profile-showcase-card {
        padding: 12px;
        border-radius: 16px;
    }

    .profile-media-strip {
        display: flex;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .profile-media-strip::-webkit-scrollbar {
        display: none;
    }

    .profile-media-strip a {
        flex: 0 0 112px;
    }

    .profile-actions .profile-share-btn {
        width: 100%;
    }
}

@media (min-width: 761px) {
    .profile-actions {
        flex-wrap: nowrap;
        align-items: center;
        gap: 9px;
        max-width: min(calc(100% - 250px), 680px);
    }

    .profile-actions form {
        flex: 0 0 auto;
        display: flex;
    }

    .profile-actions .btn {
        width: auto;
        min-width: 0;
        min-height: 42px;
        padding: 0 16px;
        white-space: nowrap;
        font-size: 15px;
        line-height: 1;
    }

    .profile-actions .profile-follow-btn {
        min-width: 118px;
    }

    .profile-actions .profile-share-btn {
        width: 42px;
        min-width: 42px;
        padding: 0;
        border-radius: 999px;
        gap: 0;
    }

    .profile-actions .profile-share-btn .icon {
        width: 20px;
        height: 20px;
    }

    .profile-actions .profile-share-btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

/* Final UI polish: consistent borders, rhythm and product-like surfaces */
:root {
    --ui-line: rgba(122, 140, 166, .16);
    --ui-line-strong: rgba(122, 140, 166, .24);
    --ui-surface: rgba(8, 11, 16, .72);
    --ui-surface-soft: rgba(255, 255, 255, .026);
}

.main-column {
    border-color: var(--ui-line);
    background: rgba(3, 5, 8, .88);
}

.feed-header {
    min-height: 74px;
    padding: 16px 24px 12px;
    border-bottom-color: var(--ui-line);
    background: rgba(3, 5, 8, .88);
}

.feed-header.single {
    min-height: 74px;
    padding-bottom: 14px;
}

.feed-header h1 {
    letter-spacing: 0;
}

.feed-header span {
    line-height: 1.35;
}

.feed-header .home-feed-tabs {
    width: 100%;
    margin: 2px 0 0;
    padding: 4px;
    border-color: var(--ui-line);
    background: rgba(255, 255, 255, .018);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.feed-header .home-feed-tabs a {
    min-height: 36px;
    min-width: 0;
    padding: 0 12px;
    color: var(--muted-strong);
}

.feed-header .home-feed-tabs a.is-active {
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(39, 168, 255, .24), rgba(116, 91, 255, .18)),
        rgba(39, 168, 255, .08);
}

.profile-hero {
    border-bottom-color: var(--ui-line);
    background: rgba(3, 5, 8, .74);
}

.profile-cover {
    border-bottom: 1px solid rgba(122, 140, 166, .1);
}

.profile-info {
    padding: 0 28px 24px;
}

.profile-info .avatar-large {
    box-shadow: 0 0 0 4px rgba(3, 5, 8, 1), 0 18px 45px rgba(0, 0, 0, .36);
}

.profile-actions {
    right: 28px;
}

.profile-actions .btn {
    border-color: var(--ui-line-strong);
    background: rgba(8, 11, 16, .68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.profile-actions .btn:hover {
    border-color: rgba(39, 168, 255, .38);
    background: rgba(14, 19, 27, .9);
}

.profile-actions .profile-share-btn {
    aspect-ratio: 1;
}

.profile-stats {
    margin-top: 12px;
}

.profile-tabs {
    border-top-color: var(--ui-line);
    border-bottom-color: var(--ui-line);
    background: rgba(3, 5, 8, .72);
}

.profile-showcase {
    padding: 16px 22px;
    border-bottom: 1px solid var(--ui-line);
    background: linear-gradient(180deg, rgba(9, 12, 18, .22), rgba(3, 5, 8, .08));
}

.profile-showcase-card,
.settings-card,
.bookmark-tools,
.side-card,
.empty-state,
.follow-list-row,
.list-manager .settings-card {
    border-color: var(--ui-line);
}

.profile-showcase-card {
    padding: 16px;
    background:
        radial-gradient(circle at 100% 0%, rgba(39, 168, 255, .075), transparent 42%),
        rgba(8, 11, 16, .72);
}

.profile-showcase-head {
    align-items: center;
}

.profile-showcase-head strong {
    font-size: 17px;
    line-height: 1.15;
}

.profile-showcase-head a {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(39, 168, 255, .2);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: #8ed8ff;
    background: rgba(39, 168, 255, .055);
    font-size: 13px;
}

.profile-showcase.is-single .profile-author-list {
    gap: 10px;
}

.profile-author-row {
    border-color: rgba(122, 140, 166, .18);
    background: rgba(255, 255, 255, .018);
}

.profile-showcase.is-single .profile-author-row {
    min-height: 104px;
    background:
        linear-gradient(135deg, rgba(39, 168, 255, .07), transparent 42%),
        rgba(255, 255, 255, .02);
}

.profile-author-row strong {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-card {
    border-bottom-color: var(--ui-line);
}

.post-card:hover {
    background: rgba(255, 255, 255, .024);
}

.post-card :is(.post-media-grid, .link-preview-card, .quote-preview, .poll-card) {
    border-color: var(--ui-line);
}

.repost-context {
    margin-bottom: 6px;
}

.rightbar {
    padding-top: 18px;
}

.rightbar .search-box {
    margin-bottom: 14px;
    border-color: var(--ui-line-strong);
    background: rgba(3, 5, 8, .88);
    box-shadow: none;
}

.rightbar .side-card {
    padding: 18px;
    border-color: var(--ui-line);
    background:
        linear-gradient(180deg, rgba(12, 16, 23, .72), rgba(6, 8, 12, .72)),
        rgba(0, 0, 0, .35);
}

.side-card h2 {
    font-size: 21px;
}

.trend-item {
    padding: 12px;
    margin-inline: -8px;
}

.trend-item + .trend-item,
.suggest-item + .suggest-item {
    border-top-color: rgba(122, 140, 166, .12);
}

.settings-card,
.settings-product-card,
.bookmark-tools,
.list-manager .settings-card {
    background:
        linear-gradient(180deg, rgba(11, 15, 22, .72), rgba(6, 8, 12, .72)),
        rgba(255, 255, 255, .018);
}

.settings-card-head {
    gap: 14px;
}

.settings-card-head h2 {
    line-height: 1.15;
}

.settings-card-head p {
    max-width: 62ch;
}

.bookmark-tools {
    border-bottom-color: var(--ui-line);
}

.bookmark-tools .search-page-form,
.folder-create,
.bookmark-move-form label {
    border-color: var(--ui-line-strong);
}

.bookmark-move-form {
    margin-top: -8px;
}

.bookmark-move-form label {
    max-width: min(100%, 320px);
}

.follow-list-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    min-height: 82px;
    background: rgba(255, 255, 255, .008);
}

.follow-list-row:hover {
    background: rgba(39, 168, 255, .035);
}

.follow-page .feed-header.single {
    border-bottom-color: var(--ui-line);
}

@media (min-width: 761px) {
    .profile-actions {
        top: 18px;
        max-width: min(calc(100% - 300px), 700px);
    }

    .profile-actions .btn {
        min-height: 40px;
    }
}

@media (max-width: 980px) {
    .feed-header {
        padding-inline: 18px;
    }

    .profile-info {
        padding-inline: 20px;
    }

    .profile-showcase {
        padding-inline: 16px;
    }
}

@media (max-width: 760px) {
    .feed-header {
        min-height: 66px;
        padding: 12px 14px 10px;
    }

    .feed-header .home-feed-tabs {
        margin-top: 0;
        overflow-x: auto;
    }

    .feed-header .home-feed-tabs a {
        flex: 0 0 auto;
        min-width: 104px;
    }

    .profile-hero {
        border-bottom-color: var(--ui-line);
    }

    .profile-info {
        padding: 0 16px 20px;
    }

    .profile-actions {
        margin-top: 12px;
    }

    .profile-showcase {
        padding: 12px;
    }

    .profile-showcase-card {
        padding: 12px;
    }

    .profile-showcase.is-single .profile-author-row {
        min-height: 78px;
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .profile-showcase.is-single .profile-author-row .avatar {
        width: 46px;
        height: 46px;
    }

    .profile-showcase.is-single .profile-author-row::after {
        display: none;
    }

    .rightbar {
        padding-top: 0;
    }

    .follow-list-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }
}

/* Fixes after mobile/profile pass */
.profile-actions:empty {
    display: none;
}

.guest-compose {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 14px;
}

.guest-compose p {
    max-width: 58ch;
    overflow-wrap: normal;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .feed-header .home-feed-tabs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        overflow: visible;
    }

    .feed-header .home-feed-tabs a {
        flex: initial;
        min-width: 0;
        padding: 0 6px;
        font-size: 13px;
        white-space: nowrap;
    }

    .guest-compose {
        grid-template-columns: 1fr !important;
        padding: 16px;
        gap: 12px;
    }

    .guest-compose p {
        max-width: none;
        color: var(--muted-strong);
        font-size: 15px;
        line-height: 1.35;
        text-wrap: balance;
    }

    .guest-compose .btn {
        width: 100%;
        min-height: 46px;
    }

    .mobile-nav {
        height: calc(64px + env(safe-area-inset-bottom)) !important;
        padding: 4px 10px calc(4px + env(safe-area-inset-bottom)) !important;
        gap: 4px !important;
        border-top-color: rgba(122, 140, 166, .18);
        background: rgba(3, 5, 8, .94);
    }

    .mobile-nav.mobile-nav-count-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .mobile-nav.mobile-nav-count-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    .mobile-nav-item {
        min-height: 52px;
        border-radius: 16px;
        grid-template-rows: 26px 14px;
        gap: 1px;
    }

    .mobile-nav-item.is-active {
        background: rgba(39, 168, 255, .08);
        box-shadow: inset 0 0 0 1px rgba(39, 168, 255, .12);
    }

    .mobile-nav-item .icon {
        width: 22px;
        height: 22px;
    }

    .mobile-nav-item span {
        font-size: 10px;
        letter-spacing: 0;
    }

    .profile-actions .profile-share-btn {
        aspect-ratio: auto;
    }
}

/* Photo viewer: messenger-like close behavior and adaptive media sizing. */
.photo-viewer {
    min-height: 100dvh;
    height: 100dvh;
}

.photo-stage {
    isolation: isolate;
}

.photo-media-frame {
    --photo-stage-pad-x: clamp(18px, 5vw, 74px);
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 20px var(--photo-stage-pad-x) 86px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-media-frame.is-portrait {
    padding-inline: clamp(14px, 8vw, 104px);
}

.photo-media {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.photo-video {
    width: auto;
    height: auto;
    max-width: min(100%, 1120px);
    max-height: 100%;
    aspect-ratio: var(--photo-aspect, 16 / 9);
}

.photo-side {
    overscroll-behavior: contain;
}

.photo-close {
    color: #fff;
}

@media (max-width: 920px) {
    .photo-viewer {
        min-height: 100dvh;
    }

    .photo-stage {
        height: 100dvh;
        min-height: 520px;
    }

    .photo-media-frame {
        padding: 58px 12px calc(86px + env(safe-area-inset-bottom));
    }

    .photo-side {
        margin-top: 0;
        border-radius: 0;
    }

    .photo-side-head {
        border-radius: 0;
    }
}

@media (max-width: 520px) {
    .photo-stage {
        height: 100dvh;
        min-height: 100dvh;
    }

    .photo-media-frame.is-portrait {
        padding-inline: 8px;
    }

    .photo-stage-actions {
        width: 100%;
        justify-content: center;
    }

    .photo-stage-actions .action-btn {
        min-width: 42px;
    }
}

/* Composer, post card and pagination finishing pass */
.composer-post-preview {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.composer-post-preview[hidden] {
    display: none;
}

.composer-post-preview-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.composer-post-preview-card {
    padding: 12px;
    border: 1px solid rgba(122, 140, 166, .2);
    border-radius: 18px;
    display: grid;
    gap: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)),
        rgba(6, 10, 16, .88);
}

.composer-post-preview-card p {
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

.composer-preview-media-grid {
    display: grid;
    gap: 6px;
    overflow: hidden;
    border-radius: 16px;
}

.composer-preview-media-grid.media-count-2,
.composer-preview-media-grid.media-count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.composer-preview-media-grid.media-count-3 {
    grid-template-columns: 1.15fr .85fr;
}

.composer-preview-media-grid.media-count-3 .composer-preview-media:first-child {
    grid-row: span 2;
}

.composer-preview-media {
    position: relative;
    min-height: 120px;
    border: 1px solid rgba(122, 140, 166, .16);
    border-radius: 16px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--muted);
    background: rgba(255, 255, 255, .035);
}

.composer-preview-media img,
.composer-preview-media video {
    width: 100%;
    height: 100%;
    min-height: 120px;
    object-fit: cover;
}

.composer-preview-media small {
    position: absolute;
    top: 8px;
    left: 8px;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 900;
}

.composer-preview-poll,
.composer-preview-link {
    padding: 10px 12px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 14px;
    display: grid;
    gap: 7px;
    color: var(--text);
    background: rgba(255, 255, 255, .026);
}

.composer-preview-poll span {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(122, 140, 166, .16);
    border-radius: 999px;
    display: flex;
    align-items: center;
    color: var(--muted-strong);
}

.composer-preview-link {
    text-decoration: none;
}

.composer-preview-link small,
.composer-preview-link span {
    color: var(--muted);
}

.media-preview-item {
    cursor: grab;
}

.media-preview-item:active {
    cursor: grabbing;
}

.media-preview-position {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 4;
    min-width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, .58);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 950;
}

.media-preview-drag-hint {
    position: absolute;
    left: 42px;
    top: 8px;
    z-index: 4;
    max-width: calc(100% - 96px);
    padding: 6px 8px;
    border-radius: 999px;
    color: rgba(255, 255, 255, .9);
    background: rgba(0, 0, 0, .52);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: .78;
}

.media-preview-item:hover .media-preview-drag-hint,
.media-preview-item:focus-within .media-preview-drag-hint,
.media-preview-item.is-drag-source .media-preview-drag-hint,
.media-preview-item.is-drop-target .media-preview-drag-hint {
    opacity: 1;
}

.media-preview-item.is-invalid {
    border-color: rgba(255, 88, 88, .65);
    background:
        linear-gradient(180deg, rgba(255, 88, 88, .12), rgba(255, 88, 88, .035)),
        rgba(13, 17, 24, .92);
    cursor: default;
}

.media-invalid-placeholder {
    min-height: 160px;
    display: grid;
    place-items: center;
    color: #ffb5b5;
    font-weight: 900;
    text-align: center;
}

.media-file-error {
    z-index: 4;
    margin: 0 10px 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 88, 88, .34);
    border-radius: 12px;
    color: #ffd0d0;
    background: rgba(90, 14, 24, .68);
    font-size: 12px;
    font-weight: 800;
}

.draft-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: .78;
}

.draft-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(39, 168, 255, .55);
}

.post-card :is(.post-media-grid, .link-preview-card, .quote-preview, .poll-card) {
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)),
        rgba(8, 12, 18, .78);
    box-shadow: none;
}

.post-card :is(.link-preview-card, .quote-preview, .poll-card) {
    padding: 12px;
}

.post-card :is(.link-preview-card, .quote-preview):hover {
    border-color: rgba(39, 168, 255, .36);
    background:
        linear-gradient(180deg, rgba(39, 168, 255, .07), rgba(255, 255, 255, .016)),
        rgba(8, 12, 18, .82);
}

.post-media-grid {
    overflow: hidden;
}

.post-edited {
    min-height: 20px;
    padding: 0 7px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.action-btn strong {
    min-width: 1ch;
    display: inline-block;
    transform-origin: center;
}

.action-btn strong.is-count-updated {
    animation: speakly-count-pop .28s ease;
}

@keyframes speakly-count-pop {
    0% {
        transform: scale(.84);
        color: var(--muted);
    }
    52% {
        transform: scale(1.2);
        color: var(--accent);
    }
    100% {
        transform: scale(1);
    }
}

.post-menu-panel {
    width: min(340px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid rgba(122, 140, 166, .22);
    border-radius: 18px;
    gap: 8px;
    background:
        linear-gradient(180deg, rgba(13, 17, 24, .98), rgba(5, 7, 10, .98)),
        #07090d;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
}

.post-menu-section {
    padding: 8px;
    border: 1px solid rgba(122, 140, 166, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .018);
}

.post-menu-section + .post-menu-section {
    border-top: 1px solid rgba(122, 140, 166, .12);
}

.post-menu-panel .menu-action,
.post-menu-panel .btn {
    min-height: 42px;
    padding: 0 10px;
    border-radius: 12px;
}

.post-menu-panel .danger-action,
.post-menu-panel .btn-danger {
    color: #ffd0d0;
    background: rgba(255, 88, 88, .08);
}

.menu-report[open] {
    padding: 6px;
    border: 1px solid rgba(255, 193, 7, .18);
    border-radius: 12px;
    background: rgba(255, 193, 7, .035);
}

@media (max-width: 760px) {
    .composer-post-preview-card {
        border-radius: 16px;
    }

    .composer-preview-media {
        min-height: 104px;
    }

    .composer-preview-media img,
    .composer-preview-media video {
        min-height: 104px;
    }

    .media-preview-drag-hint {
        max-width: calc(100% - 82px);
        font-size: 10px;
    }

    .post-menu[open] .post-menu-panel {
        width: auto;
        max-height: min(72dvh, 620px);
        padding: 12px;
        border-radius: 22px 22px 0 0;
        overflow-y: auto;
    }
}

/* Photo viewer finishing pass */
.photo-media-frame.is-video {
    padding-inline: clamp(18px, 4vw, 72px);
}

.photo-media-frame.is-video .photo-video {
    width: min(100%, 1080px);
    height: auto;
    max-height: min(78vh, 720px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: #000;
    box-shadow: 0 20px 80px rgba(0, 0, 0, .45);
}

.photo-media {
    will-change: transform;
    transform-origin: center center;
    transition: transform .18s ease, opacity .18s ease;
}

.photo-viewer.is-photo-zoomed .photo-media,
.photo-viewer.is-photo-dragging .photo-media {
    transition: none;
}

.photo-stage-bar {
    pointer-events: none;
}

.photo-counter,
.photo-stage-actions {
    pointer-events: auto;
}

@media (max-width: 760px) {
    .photo-media-frame {
        padding-bottom: 74px;
    }

    .photo-media-frame.is-video {
        padding: 54px 10px 78px;
    }

    .photo-media-frame.is-video .photo-video {
        max-height: 62dvh;
        border-radius: 14px;
    }

    .photo-stage-bar {
        left: 12px;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        min-height: 46px;
        padding: 6px;
        border: 1px solid rgba(255, 255, 255, .1);
        border-radius: 999px;
        justify-content: space-between;
        background: rgba(4, 6, 9, .58);
        backdrop-filter: blur(18px);
    }

    .photo-counter {
        min-height: 32px;
        padding: 0 10px;
        border-color: transparent;
        background: transparent;
        font-size: 12px;
    }

    .photo-stage-actions {
        gap: 2px;
    }

    .photo-stage-actions .action-btn {
        min-width: 36px;
        width: 36px;
        height: 36px;
        padding: 0;
        border-color: transparent;
        background: transparent;
    }

    .photo-stage-actions .action-btn strong {
        display: none;
    }

    .photo-thumbs {
        bottom: calc(62px + env(safe-area-inset-bottom));
        max-width: calc(100% - 28px);
        padding: 4px;
        border-radius: 14px;
        opacity: .88;
    }

    .photo-thumb {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
}

/* Profile privacy and media grid polish */
.profile-privacy-panel {
    margin: 14px 18px;
    padding: 16px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    background:
        radial-gradient(circle at 0 0, rgba(39, 168, 255, .1), transparent 34%),
        rgba(255, 255, 255, .026);
}

.profile-privacy-panel h2,
.profile-privacy-panel p {
    margin: 0;
}

.profile-privacy-panel p {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.4;
}

.profile-privacy-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.profile-privacy-grid span {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(122, 140, 166, .14);
    border-radius: 14px;
    display: grid;
    gap: 2px;
    background: rgba(255, 255, 255, .024);
}

.profile-privacy-grid strong {
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.profile-privacy-grid small {
    color: var(--muted);
    font-size: 12px;
}

.profile-media-strip {
    grid-template-columns: 1.1fr .9fr .9fr;
    grid-auto-rows: minmax(112px, 1fr);
}

.profile-media-strip a:first-child {
    grid-row: span 2;
}

.profile-media-strip a {
    border-radius: 16px;
    isolation: isolate;
}

.profile-media-strip a::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
    height: 62%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72));
    opacity: .84;
}

.profile-media-caption {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 3;
    display: grid;
    gap: 1px;
    color: #fff;
}

.profile-media-caption strong,
.profile-media-caption small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-media-caption strong {
    font-size: 12px;
    font-weight: 900;
}

.profile-media-caption small {
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
}

.profile-media-type {
    z-index: 4;
}

@media (max-width: 760px) {
    .profile-privacy-panel {
        margin: 12px;
        grid-template-columns: 1fr;
    }

    .profile-privacy-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-media-strip {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 128px;
        overflow: visible;
    }

    .profile-media-strip a:first-child {
        grid-row: span 1;
    }
}

/* Bookmarks and lists finishing pass */
.bookmark-hero {
    align-items: stretch;
}

.bookmark-collection-grid {
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}

.bookmark-collection-card {
    min-height: 112px;
    align-content: space-between;
    background:
        radial-gradient(circle at 100% 0%, rgba(39, 168, 255, .08), transparent 44%),
        rgba(255, 255, 255, .024);
}

.bookmark-collection-card.is-active {
    box-shadow: inset 3px 0 0 var(--accent), 0 14px 34px rgba(39, 168, 255, .08);
}

.bookmark-search {
    position: sticky;
    top: 74px;
    z-index: 8;
    backdrop-filter: blur(14px);
}

.bookmark-move-form {
    border-style: solid;
    background:
        linear-gradient(90deg, rgba(39, 168, 255, .055), rgba(255, 255, 255, .018)),
        rgba(8, 11, 16, .76);
}

.bookmark-move-form label {
    gap: 10px;
}

.bookmark-move-form select {
    min-height: 42px;
}

.list-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.list-card {
    min-height: 128px;
    align-content: start;
    gap: 8px;
    background:
        radial-gradient(circle at 100% 0%, rgba(116, 91, 255, .1), transparent 44%),
        rgba(255, 255, 255, .024);
}

.list-card.is-active {
    box-shadow: inset 3px 0 0 var(--accent), 0 14px 34px rgba(39, 168, 255, .08);
}

.list-member-grid {
    display: grid;
    gap: 10px;
}

.list-member-card {
    grid-template-columns: 54px minmax(0, 1fr) auto auto;
    align-items: center;
    border-color: rgba(122, 140, 166, .18);
    background:
        linear-gradient(135deg, rgba(39, 168, 255, .045), transparent 44%),
        rgba(255, 255, 255, .02);
}

.list-member-card .rich-user-text {
    gap: 3px;
}

.list-member-card em {
    overflow: hidden;
    color: var(--muted-strong);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-style: normal;
}

.list-member-status {
    width: max-content;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(122, 140, 166, .16);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    background: rgba(255, 255, 255, .025);
    font-size: 11px;
    font-weight: 850;
}

.list-member-card form {
    margin: 0;
}

@media (max-width: 760px) {
    .bookmark-search {
        position: static;
    }

    .bookmark-collection-grid,
    .list-card-grid {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .bookmark-collection-card,
    .list-card {
        flex: 0 0 174px;
    }

    .list-member-card {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .list-member-card form {
        grid-column: 2;
        width: 100%;
    }

    .list-member-card .btn {
        width: 100%;
    }
}

/* Admin moderation console polish */
.admin-stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.admin-stats div {
    min-height: 96px;
    border-color: rgba(122, 140, 166, .18);
    background:
        radial-gradient(circle at 100% 0%, rgba(39, 168, 255, .08), transparent 42%),
        rgba(255, 255, 255, .024);
}

.admin-stats div.is-hot {
    border-color: rgba(255, 88, 88, .34);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 88, 88, .15), transparent 42%),
        rgba(255, 88, 88, .04);
}

.admin-console-strip {
    margin: 14px 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.admin-console-strip a {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    background: rgba(255, 255, 255, .024);
    font-weight: 850;
}

.admin-console-strip a:hover {
    border-color: rgba(39, 168, 255, .34);
    background: rgba(39, 168, 255, .07);
}

.moderation-card.is-high-priority {
    border-color: rgba(255, 88, 88, .34);
    box-shadow: inset 3px 0 0 rgba(255, 88, 88, .8);
}

.moderation-detail-drawer {
    margin-top: 10px;
    border: 1px solid rgba(122, 140, 166, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .02);
}

.moderation-detail-drawer summary {
    min-height: 36px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    color: var(--muted-strong);
    cursor: pointer;
    font-weight: 850;
}

.moderation-detail-drawer dl {
    margin: 0;
    padding: 0 12px 12px;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 7px 12px;
}

.moderation-detail-drawer dt {
    color: var(--muted);
}

.moderation-detail-drawer dd {
    margin: 0;
    color: var(--text);
    font-weight: 800;
}

@media (max-width: 760px) {
    .admin-console-strip {
        margin: 12px;
        grid-template-columns: 1fr 1fr;
    }

    .admin-console-strip a {
        min-height: 44px;
        padding-inline: 10px;
        font-size: 13px;
    }
}

/* Final pass: sidebar guests, post editor, and compact post menu */
.sidebar:not(:has(.mini-profile)) .sidebar-spacer {
    min-height: 120px;
}

.post-editor-modal {
    width: min(720px, calc(100vw - 28px));
    max-height: min(86vh, 820px);
    overflow-x: hidden;
}

.post-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-right: 40px;
}

.post-modal-head h2 {
    margin: 0;
}

.post-modal-head p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.4;
}

.post-editor-state {
    flex: 0 0 auto;
    margin-top: 3px;
    padding: 6px 10px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    background: rgba(255, 255, 255, .035);
}

.post-editor-state[data-tone="loading"] {
    color: var(--accent);
    border-color: rgba(39, 168, 255, .3);
    background: rgba(39, 168, 255, .08);
}

.post-editor-state[data-tone="error"] {
    color: #ffc6cf;
    border-color: rgba(255, 84, 112, .32);
    background: rgba(255, 84, 112, .08);
}

.post-edit-textarea-wrap {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(122, 140, 166, .18);
    border-radius: 18px;
    background: rgba(255, 255, 255, .025);
}

.post-edit-textarea-wrap > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.post-edit-textarea-wrap textarea {
    min-height: 132px;
    padding: 0;
    border: 0;
    border-radius: 0;
    resize: vertical;
    background: transparent;
    box-shadow: none;
    font-size: 18px;
    line-height: 1.45;
}

.post-edit-textarea-wrap textarea:focus {
    outline: 0;
    box-shadow: none;
}

.post-editor-toolbar {
    display: flex;
    min-width: 0;
}

.post-editor-toolbar .style-picker,
.post-editor-toolbar .style-picker-buttons {
    min-width: 0;
    width: 100%;
}

.post-editor-toolbar .style-picker-buttons {
    flex-wrap: wrap;
}

.post-editor-current-media {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .025);
}

.post-editor-current-media[hidden] {
    display: none;
}

.post-editor-current-media [data-current-media-list] {
    display: grid;
    gap: 10px;
}

.current-media-preview {
    min-width: 0;
}

.current-media-remove-all {
    margin-top: 10px;
}

.post-editor-actions {
    position: sticky;
    bottom: -1px;
    z-index: 2;
    margin-top: 2px;
    border-color: rgba(122, 140, 166, .2);
    background:
        linear-gradient(180deg, rgba(13, 17, 24, .92), rgba(7, 9, 13, .98)),
        var(--panel);
    backdrop-filter: blur(16px);
}

.post-menu-panel {
    width: min(320px, calc(100vw - 24px));
    padding: 8px;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(12, 16, 22, .98), rgba(5, 7, 10, .98)),
        #07090d;
}

.post-menu-section {
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.post-menu-section + .post-menu-section {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(122, 140, 166, .14);
}

.post-menu-title {
    display: block;
    padding: 4px 10px 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.post-menu-panel .menu-action,
.post-menu-panel .btn {
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
}

.post-menu-panel .menu-action:hover,
.post-menu-panel .menu-action:focus-visible {
    border-color: rgba(122, 140, 166, .16);
    background: rgba(255, 255, 255, .045);
}

.post-menu-panel .danger-action,
.post-menu-panel .btn-danger {
    border-color: rgba(255, 84, 112, .32);
    color: #ffd4dc;
    background: rgba(255, 84, 112, .08);
}

.menu-report[open] {
    padding: 6px;
    border: 1px solid rgba(255, 193, 7, .2);
    border-radius: 16px;
    background: rgba(255, 193, 7, .035);
}

.bookmark-folder-quick {
    display: grid;
    gap: 8px;
}

.bookmark-folder-quick label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 800;
}

.bookmark-folder-quick label > .icon {
    display: none;
}

@media (max-width: 760px) {
    .post-editor-modal {
        width: 100%;
        max-height: min(90dvh, 820px);
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    .post-modal-head {
        padding-right: 34px;
    }

    .post-modal-head p {
        font-size: 13px;
    }

    .post-edit-textarea-wrap {
        border-radius: 16px;
    }

    .post-edit-textarea-wrap textarea {
        min-height: 118px;
        font-size: 16px;
    }

    .post-editor-actions {
        bottom: calc(-14px - env(safe-area-inset-bottom));
        margin-right: -2px;
        margin-left: -2px;
        border-radius: 18px 18px 0 0;
    }
}
