/* ===== ОБЩИЕ СТИЛИ ПОСТОВ ===== */
.post {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    overflow-wrap: anywhere;
    contain: layout;
    content-visibility: auto;
    contain-intrinsic-size: auto 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 16px 18px 14px;
    margin-bottom: 14px;
    box-shadow: none;
}
/* size-containment paints media at the 280px guess, then upscales — soap + like-bar jump */
.post:has(.post-photos),
.post:has(.post-file-photos),
.post:has(.post-media),
.post:has(.post-video),
.post:has(.post-voice),
.post:has(.post-music),
.post:has(.post-poll),
.post:has(.post-audio) {
    content-visibility: visible;
    contain-intrinsic-size: none;
}
.post .post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    row-gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
}
.post .post-avatar,
#profile-stream .post-avatar,
.profile-page .post-avatar {
    box-sizing: border-box;
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    contain: size;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input, #1c2438);
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.post .post-avatar img,
#profile-stream .post-avatar img,
.profile-page .post-avatar img {
    display: block;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: cover;
    pointer-events: none;
    transform: none !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
}
.post a.post-avatar:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
.post .post-author {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-weight: 600;
    color: var(--accent-primary);
}
.post .post-author a {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    padding: 8px 6px;
    margin: -8px 0;
    border-radius: 8px;
    color: var(--accent-primary);
    text-decoration: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.post .post-author a:hover {
    text-decoration: underline;
}
/* inset — .post overflow-x:clip would cut outward Tab ring */
.post .post-author a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
.post .source-tag,
.post .pinned-tag {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    background: var(--bg-input);
    border: 1px solid var(--border-card);
    border-radius: 999px;
    padding: 2px 8px;
}
.post .pinned-tag {
    color: var(--accent-primary);
    border-color: rgba(124, 92, 252, 0.35);
    background: rgba(124, 92, 252, 0.12);
}
.post-official .source-tag {
    color: var(--accent-primary);
    border-color: rgba(124, 92, 252, 0.35);
    background: rgba(124, 92, 252, 0.12);
}
.official-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 6px;
    color: var(--accent-primary);
    line-height: 0;
}
.official-badge svg {
    display: block;
    width: 1em;
    height: 1em;
}
.post .post-date {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-muted);
    font-size: 13px;
    margin-left: auto;
}
.post .post-date:empty,
.post .post-content .post-text:empty,
.post .post-photos:empty,
.post-poll:empty,
.post-poll .poll-question:empty,
.post-media:empty,
.post-media-caption:empty,
.repost-origin:empty,
.repost-origin-text:empty,
.repost-flag:empty,
.edited-mark:empty,
.community-tag:empty,
.official-badge:empty,
.source-tag:empty,
.pinned-tag:empty,
.more-overlay:empty,
.post-music:empty,
.post-music-artist:empty,
.post-files:empty,
.post-file:empty,
.post-file-name:empty,
.post-file-size:empty,
.post-music-error:empty,
.post .view-count:empty,
.post .comments-list:empty,
.post .comment-text:empty,
.post .comment-date:empty,
.post[hidden],
.post-music[hidden] {
    display: none;
}
.post .post-content {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
}
.post .post-content .post-text {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.post .post-content a {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
/* inset — .post overflow-x:clip / .post-card-ui .post-content overflow cut outward Tab ring */
.post .post-content a:focus-visible,
.post.post-card-ui .post-content a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
    border-radius: 4px;
}
.post .post-photos {
    display: grid;
    gap: 3px;
    margin-top: 12px;
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: var(--bg-input);
    align-items: stretch;
    justify-items: stretch;
    /* never repeat(4, 1fr) — a single photo would shrink to ¼ width */
    grid-template-columns: 1fr;
}
.post .post-photos[data-count="1"] {
    /* reserved 16/9 keeps the like row still while the bitmap paints */
    width: min(100%, 520px);
    height: auto;
    max-height: min(70dvh, 720px);
    aspect-ratio: 16 / 9;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    justify-items: stretch;
    align-items: stretch;
    background: var(--bg-card);
}
@media (max-width: 768px) {
    .post .post-photos[data-count="1"] {
        width: 100%;
        max-width: none;
    }
}
.post .post-photos[data-count="1"] .photo-item {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    background: var(--bg-card);
}
.post .post-photos[data-count="1"] .photo-item img {
    /* auto box: 100%×100% upscales a small/portrait shot across the wide slot */
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    background: var(--bg-card);
    transform: none;
    filter: none;
    image-rendering: auto;
    image-rendering: high-quality;
}
.post .post-photos[data-count="2"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    aspect-ratio: 2 / 1;
}
.post .post-photos[data-count="3"] {
    grid-template-columns: 1.15fr 0.85fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 1 / 1;
}
.post .post-photos[data-count="3"] .photo-item:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
}
.post .post-photos[data-count="4"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 1 / 1;
}
.post .post-photos .photo-item {
    position: relative;
    min-width: 0;
    min-height: 44px;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    cursor: pointer;
    overflow: hidden;
    background: var(--bg-input);
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.post .post-photos .photo-item:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
    z-index: 1;
}
.post .post-photos .photo-item img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    display: block;
    background: var(--bg-input);
    /* hover scale() + GPU layer made feed photos soapy */
    transform: none;
    filter: none;
    image-rendering: auto;
    image-rendering: high-quality;
    -ms-interpolation-mode: bicubic;
    transition: none;
}
.post .post-photos .photo-item img:not([src]),
.post .post-photos .photo-item img[src=""],
.post .post-photos .photo-item img[src="about:blank"] {
    visibility: hidden;
}
.post .post-photos .photo-item:hover img,
.post .post-photos .photo-item:focus-visible img,
.post .post-photos .photo-item img:hover {
    transform: none;
    filter: none;
}
.post .post-photos .more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
    text-align: center;
    pointer-events: none;
}
/* file-attached photos (post_files.php) — inline cover+16/9 soaped the cell in WebView */
.post .post-file-photos {
    display: grid;
    gap: 3px;
    margin-top: 12px;
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: var(--bg-card);
    align-items: stretch;
    justify-items: stretch;
}
.post .post-file-photos[data-count="1"] {
    width: min(100%, 520px);
    height: auto;
    max-height: min(70vh, 720px);
    max-height: min(70dvh, 720px);
    aspect-ratio: 16 / 9;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr);
}
.post .post-file-photos[data-count="1"] .post-file-photo {
    display: grid !important;
    place-items: center;
    width: 100%;
    height: 100%;
    aspect-ratio: auto !important;
    background: var(--bg-card);
}
.post .post-file-photos[data-count="1"] .post-file-photo img {
    /* beat inline inset/100%/cover that soaps a single file-photo in WebView */
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center;
    transform: none;
    filter: none;
    image-rendering: auto;
    image-rendering: high-quality;
}
.post .post-file-photos[data-count="2"] {
    grid-template-columns: 1fr 1fr !important;
    aspect-ratio: 2 / 1;
}
.post .post-file-photos[data-count="3"] {
    grid-template-columns: 1.15fr 0.85fr !important;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 1 / 1;
}
.post .post-file-photos[data-count="3"] .post-file-photo:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
    aspect-ratio: auto !important;
}
.post .post-file-photos[data-count="4"] {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 1 / 1;
}
.post .post-file-photos .post-file-photo {
    position: relative;
    min-width: 0;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background: var(--bg-card);
}
/* inset ring — grid overflow:hidden must not clip keyboard focus */
.post .post-file-photos .post-file-photo:focus {
    outline: none;
}
.post .post-file-photos .post-file-photo:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
    z-index: 1;
}
.post .post-file-photos .post-file-photo img {
    transform: none;
    filter: none;
    image-rendering: auto;
    image-rendering: high-quality;
}
.post .post-file-photos .post-file-photo img:not([src]),
.post .post-file-photos .post-file-photo img[src=""],
.post .post-file-photos .post-file-photo img[src="about:blank"] {
    visibility: hidden;
}
@media (max-width: 768px) {
    .post .post-file-photos[data-count="1"] {
        width: 100%;
        max-width: none;
    }
}
.post .post-actions,
.post.post-card-ui .post-actions {
    display: flex;
    gap: 4px 8px;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 10px;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}
.post .post-actions::-webkit-scrollbar {
    display: none;
    height: 0;
}
.post .post-actions .delete-link {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 13px;
}
.post .post-actions .delete-link:hover {
    text-decoration: underline;
}
.post .post-actions .like-btn,
.post .post-actions .comment-toggle,
.post .post-actions .repost-btn,
.post .post-actions .edit-link,
.post .post-actions .pin-btn,
.post .post-actions .delete-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 10px;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease, background 0.2s ease;
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
    transform: none;
}
.post .post-actions .like-btn,
.post .post-actions .comment-toggle {
    display: inline-grid;
    /* locked em track — minmax(auto) grows 9→10 and shoves the neighbour */
    grid-template-columns: 18px minmax(2.75em, 2.75em);
    justify-content: center;
    align-items: center;
    column-gap: 6px;
    justify-items: stretch;
    overflow: hidden;
    contain: layout;
}
.post .post-actions .like-btn .like-icon {
    display: flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
}
.post .post-actions .like-btn:disabled,
.post .post-actions .comment-toggle:disabled,
.post .post-actions .repost-btn:disabled,
.post .post-actions .edit-link:disabled,
.post .post-actions .pin-btn:disabled,
.post .post-actions .delete-link:disabled,
.post .post-actions .like-btn[aria-disabled="true"],
.post .post-actions .comment-toggle[aria-disabled="true"],
.post .post-actions .repost-btn[aria-disabled="true"],
.post .post-actions .edit-link[aria-disabled="true"],
.post .post-actions .pin-btn[aria-disabled="true"],
.post .post-actions .delete-link[aria-disabled="true"] {
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
}
.post .post-actions .like-btn:focus-visible,
.post .post-actions .comment-toggle:focus-visible,
.post .post-actions .repost-btn:focus-visible,
.post .post-actions .edit-link:focus-visible,
.post .post-actions .pin-btn:focus-visible,
.post .post-actions .delete-link:focus-visible {
    /* inset ring — overflow-x:auto / overflow-y:hidden would clip offset:2px */
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
    color: var(--accent-primary);
}
.post .post-actions .like-btn:hover,
.post .post-actions .comment-toggle:hover,
.post .post-actions .repost-btn:hover,
.post .post-actions .edit-link:hover,
.post .post-actions .pin-btn:hover {
    color: var(--accent-primary);
    background: var(--btn-theme-hover);
}
.post .post-actions .like-btn.liked {
    color: #ff4d6d;
}
.post .post-actions .like-btn svg,
.post .post-actions .comment-toggle svg,
.post .post-actions .like-btn .nav-svg,
.post .post-actions .comment-toggle .nav-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    overflow: hidden;
    transform: none;
}
.post .post-actions .like-btn.liked svg {
    fill: currentColor;
    stroke: currentColor;
    overflow: hidden;
    paint-order: stroke fill;
}
.post .post-actions .delete-link:hover {
    color: #ff6b6b;
    background: rgba(255, 80, 80, 0.08);
    text-decoration: none;
}
.post .nav-svg {
    display: block;
    flex-shrink: 0;
}
.community-tag {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 12px;
    color: var(--accent-primary);
    background: var(--btn-theme-hover);
    padding: 8px 12px;
    border-radius: 12px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
/* inset — .post overflow-x:clip would cut outward Tab ring */
.community-tag:focus-visible,
.post .community-tag:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
/* ===== ОПРОСЫ В ПОСТАХ (общие) ===== */
.post-poll {
    margin: 12px 0;
    padding: 16px 18px;
    background: var(--bg-input);
    border-radius: 12px;
    border: 1px solid var(--border-card);
}
.post-poll .poll-question {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.post-poll .poll-option {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    box-sizing: border-box;
    min-width: 44px;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    margin-bottom: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.3s ease;
}
/* inset — beat .post-card-ui inline offset:2px; .post overflow-x:clip */
.post-poll .poll-option:focus-visible,
.post .post-poll .poll-option:focus-visible,
.post.post-card-ui .poll-option:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
.post-poll .poll-option:hover {
    border-color: var(--accent-primary);
}
.post-poll .poll-option:disabled,
.post-poll .poll-option[aria-disabled="true"] {
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
}
.post-poll .poll-option .option-text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 14px;
    color: var(--text-primary);
}
.post-poll .poll-option .option-bar {
    flex: 1;
    min-width: 0;
    height: 6px;
    /* track must contrast option bg (same --bg-card would hide the bar) */
    background: rgba(148, 163, 184, 0.32);
    border-radius: 4px;
    overflow: hidden;
}
.post-poll .poll-option .option-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.6s ease;
}
.post-poll .poll-option .option-votes {
    flex-shrink: 0;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    white-space: nowrap;
}
.post-poll .poll-option.voted {
    border-color: var(--accent-primary);
    background: var(--btn-theme-hover);
}
.post-poll .poll-total {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 8px;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-card);
}
.post-poll .poll-change-vote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    margin-left: 10px;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 10px;
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.post-poll .poll-change-vote:hover:not(:disabled) {
    background: var(--btn-theme-hover);
}
/* inset — beat .post-card-ui inline offset:2px; .post overflow-x:clip */
.post-poll .poll-change-vote:focus-visible,
.post .post-poll .poll-change-vote:focus-visible,
.post.post-card-ui .poll-change-vote:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
.post-poll .poll-change-vote:disabled,
.post-poll .poll-change-vote[aria-disabled="true"] {
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
}
.follow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.follow-btn:hover:not(:disabled) {
    filter: brightness(1.08);
}
.follow-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
.follow-btn svg {
    display: block;
    flex-shrink: 0;
}
.follow-btn:disabled {
    opacity: 0.65;
    cursor: wait;
    pointer-events: none;
}
.follow-btn.following {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-card);
}

/* ===== СВЕТЛАЯ ТЕМА ===== */
[data-theme="light"] .post {
    background: #ffffff;
    border: 1px solid #dbe2ea;
    color: #0f172a;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .post .post-content {
    color: #0f172a;
}
[data-theme="light"] .post .post-date {
    color: #334155;
}
[data-theme="light"] .post .post-actions,
[data-theme="light"] .post .post-actions .like-btn,
[data-theme="light"] .post .post-actions .comment-toggle,
[data-theme="light"] .post .post-actions .repost-btn,
[data-theme="light"] .post .post-actions .edit-link,
[data-theme="light"] .post .post-actions .pin-btn,
[data-theme="light"] .post .post-actions .delete-link {
    color: #475569;
}
[data-theme="light"] .post .post-actions .like-btn:hover,
[data-theme="light"] .post .post-actions .comment-toggle:hover,
[data-theme="light"] .post .post-actions .repost-btn:hover,
[data-theme="light"] .post .post-actions .edit-link:hover,
[data-theme="light"] .post .post-actions .pin-btn:hover {
    color: var(--accent-primary);
    background: rgba(124, 92, 252, 0.10);
}
[data-theme="light"] .community-tag {
    background: rgba(124, 92, 252, 0.10);
}
[data-theme="light"] .post-poll {
    background: #f8fafc;
    border-color: #dbe2ea;
}
[data-theme="light"] .post-poll .poll-question {
    color: #0f172a;
}
[data-theme="light"] .post-poll .poll-option {
    background: #ffffff;
    border-color: #dbe2ea;
}
[data-theme="light"] .post-poll .poll-option .option-text {
    color: #0f172a;
}
[data-theme="light"] .post-poll .poll-option .option-bar {
    background: #e2e8f0;
}
[data-theme="light"] .post-poll .poll-option .option-votes,
[data-theme="light"] .post-poll .poll-total {
    color: #475569;
}
[data-theme="light"] .post-poll .poll-option.voted {
    background: rgba(124, 92, 252, 0.08);
    border-color: var(--accent-primary);
}
[data-theme="light"] .follow-btn.following {
    background: #ffffff;
    border-color: #c5ced8;
    color: #1e293b;
}
[data-theme="light"] .post-views,
[data-theme="light"] .post-media-caption {
    color: #334155;
}
[data-theme="light"] .post-music {
    background: #f8fafc;
    border-color: #dbe2ea;
}
[data-theme="light"] .post-music-title {
    color: #0f172a;
}
[data-theme="light"] .post-music-artist {
    color: #475569;
}
.edited-mark {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.75;
}
.repost-flag {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 6px;
}
.repost-origin {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
    overflow-wrap: anywhere;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    background: var(--bg-input);
}
.repost-origin-head {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.repost-origin-text {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 14px;
    color: var(--text-primary);
    white-space: pre-wrap;
}
.repost-dialog {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    overflow: auto;
    overscroll-behavior: contain;
    background: rgba(6, 8, 16, 0.78);
    backdrop-filter: blur(10px);
}
.repost-dialog[hidden] { display: none !important; }
.repost-dialog-card {
    box-sizing: border-box;
    width: min(400px, 100%);
    min-width: 0;
    max-width: 100%;
    max-height: min(90vh, 640px);
    max-height: min(90dvh, 640px);
    overflow: auto;
    overflow-wrap: anywhere;
    overscroll-behavior: contain;
    background: #121722;
    border: 1px solid rgba(168, 85, 247, 0.28);
    border-radius: 18px;
    padding: 16px 16px 18px;
    color: var(--text-primary);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.repost-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 8px;
}
.repost-head h2 { margin: 0; }
.repost-x {
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: 400 28px/1 inherit;
    cursor: pointer;
}
.repost-x:focus {
    outline: none;
}
.repost-x:focus-visible {
    outline: 2px solid var(--accent-primary, #7c5cfc);
    outline-offset: -2px;
}
.repost-x:hover { background: rgba(168, 85, 247, 0.12); }
.repost-lab {
    display: block;
    margin: 10px 0 4px;
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}
.repost-split {
    height: 1px;
    margin: 16px 0 8px;
    background: rgba(168, 85, 247, 0.2);
}
.repost-dialog-card > .primary {
    width: 100%;
    margin-top: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.repost-dialog-card > .primary:focus {
    outline: none;
}
.repost-dialog-card > .primary:focus-visible {
    outline: 2px solid var(--accent-primary, #7c5cfc);
    outline-offset: -2px;
}
[data-theme="light"] .repost-dialog-card {
    background: #ffffff;
}
.repost-dialog-card h2 {
    margin: 0 0 12px;
    font-size: 18px;
    overflow-wrap: anywhere;
}
.repost-dialog-card textarea,
.repost-dialog-card select {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-card);
    background: var(--bg-input);
    color: var(--text-primary);
    font: inherit;
}
.repost-dialog-card textarea {
    resize: vertical;
    max-height: min(40vh, 240px);
}
.repost-dialog-card textarea:focus-visible,
.repost-dialog-card select:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
.repost-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.repost-dialog-actions button {
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border-card);
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.repost-dialog-actions button:hover:not(:disabled) {
    border-color: var(--accent-primary);
}
.repost-dialog-actions button:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
.repost-dialog-actions button:disabled,
.repost-dialog-actions button[aria-disabled="true"] {
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
}
.repost-away-label {
    margin: 14px 0 6px;
    font-size: 13px;
    color: var(--text-muted, #94a3b8);
}
.repost-away {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.repost-away a,
.repost-away button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0 12px;
    border: 1px solid var(--border-card, #2a3144);
    border-radius: 10px;
    background: transparent;
    color: inherit;
    text-decoration: none;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.repost-away a:focus-visible,
.repost-away button:focus-visible {
    outline: 2px solid var(--accent-primary, #7c5cfc);
    outline-offset: -2px;
}
.feed-boost-share {
    display: none !important;
}
.repost-dialog-actions button.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    border: 0;
}
.post-media-block {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    margin: 10px 0;
}
.post-media-caption {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}
.post-media {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 10px 0;
    overflow: hidden;
}
.post-media-video {
    border-radius: 14px;
    background: #0a0e1a;
}
.post-media-audio {
    border-radius: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-card);
}
.post-media .post-video,
.post-media .post-audio {
    display: block;
    width: 100%;
    margin: 0;
    border-radius: 0;
}
.post-video {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    max-height: none;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: #0a0e1a;
    object-fit: contain;
    object-position: center;
    touch-action: manipulation;
}
.post-audio {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    height: 44px;
    border-radius: 12px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
/* inset — .post-media / .post-media-video overflow:hidden clips outward ring */
.post-video:focus-visible,
.post-audio:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
/* play ring inset — .post-media-video overflow:hidden clips outward offset */
.post-video-play:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
.post-music {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    margin: 10px 0;
    padding: 6px 8px;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    background: var(--bg-input);
    touch-action: manipulation;
}
/* fixed cover slot — large art must not blow the player row; title still ellipsizes */
.post-music-cover {
    display: block;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    pointer-events: none;
}
.post-music-cover:not([src]),
.post-music-cover[src=""] {
    display: none;
}
.post-music-play {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--accent-primary);
    color: #fff;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.post-music-play:focus {
    outline: none;
}
.post-music-play:hover:not(:disabled) {
    filter: brightness(1.08);
}
/* inset — beat .post-card-ui inline offset:2px; .post overflow-x:clip */
.post .post-music-play:focus-visible,
.post.post-card-ui .post-music-play:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
.post-music-play:disabled,
.post-music-play[aria-disabled="true"] {
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
}
.post-music-meta {
    min-width: 0;
    flex: 1;
}
.post-music-meta:focus {
    outline: none;
}
/* inset — beat .post-card-ui inline offset:2px; .post overflow-x:clip */
.post .post-music-meta:focus-visible,
.post.post-card-ui .post-music-meta:focus-visible {
    outline: 2px solid var(--accent-primary, #7c5cfc);
    outline-offset: -2px;
}
.post-music-title,
.post-music-artist {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.post-music-title {
    font-weight: 600;
    color: var(--text-primary);
}
.post-music-artist {
    font-size: 12px;
    color: var(--text-muted);
}
.post-music-audio {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    padding: 0;
}
.post-views {
    display: inline-flex;
    align-items: center;
    flex: 1 0 auto;
    flex-shrink: 0;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    gap: 5px;
    margin-left: auto;
    overflow: hidden;
    overflow-wrap: normal;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums lining-nums;
}
.post-views svg {
    opacity: 0.85;
    flex-shrink: 0;
}
.post .post-actions .like-icon,
.post .post-actions .comment-toggle svg,
.post .post-actions .comment-toggle .nav-svg {
    grid-column: 1;
}
.post .post-actions .like-count,
.post .post-actions .comment-toggle > span {
    display: block;
    box-sizing: border-box;
    grid-column: 2;
    min-width: 2.75em;
    width: 2.75em;
    max-width: 2.75em;
    overflow: hidden;
    overflow-wrap: normal;
    word-break: keep-all;
    white-space: nowrap;
    font-variant-numeric: tabular-nums lining-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    font-weight: 600;
    line-height: 1;
    text-align: left;
    vertical-align: middle;
}
.post .post-views .view-count {
    display: inline-block;
    min-width: 3ch;
    overflow: hidden;
    white-space: nowrap;
    font-variant-numeric: tabular-nums lining-nums;
    font-weight: 600;
}
.post .post-actions .like-count:empty,
.post .post-actions .comment-toggle > span:empty {
    display: block;
    min-width: 2.75em;
    width: 2.75em;
    max-width: 2.75em;
}
.post .post-date time {
    min-width: 0;
    overflow-wrap: anywhere;
}
.post-files {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    margin-top: 10px;
}
.post .post-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    max-width: 100%;
    padding: 8px 14px;
    overflow: hidden;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.25;
    background: var(--bg-input);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.post .post-file:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}
.post .post-file:focus {
    outline: none;
}
/* inset — chip overflow:hidden clips outward ring; name still ellipsizes */
.post .post-file:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
.post .post-file[aria-disabled="true"],
.post .post-file:disabled {
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
}
.post .post-file-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    white-space: nowrap;
    font-weight: 600;
}
.post .post-file-size {
    flex-shrink: 0;
    overflow-wrap: anywhere;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}
.post-music-error {
    flex: 1 0 100%;
    min-width: 0;
    margin: 6px 0 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: #f87171;
    font-size: 13px;
}
.post .comments-section,
.post .comments-wrapper,
.post .comments-list,
.post .comment-item,
.post .comment-text,
.post .comment-author,
.post .comment-date {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.post .repost-dialog-card textarea {
    overflow-wrap: anywhere;
    word-break: break-word;
}
/* RGBA cutout in post comments — no photo-tile card / radius / fill */
.post .comment-sticker,
.post .comment-text:has(.comment-sticker),
.post .comment-item:has(.comment-sticker) {
    background: none;
    background-color: transparent;
    background-image: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    clip-path: none;
    -webkit-clip-path: none;
    mask: none;
    -webkit-mask: none;
}
.post .comment-sticker {
    display: block;
    box-sizing: border-box;
    width: 96px;
    height: 96px;
    min-width: 44px;
    min-height: 44px;
    max-width: min(96px, 100%);
    max-height: 96px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    object-position: center;
    padding: 0;
    isolation: isolate;
    mix-blend-mode: normal;
    forced-color-adjust: none;
    -webkit-forced-color-adjust: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}
.post .comment-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}
.post .comments-toggle-btn,
.post .comment-form input[type="text"],
.post .comment-form button,
.post .comment-author a {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    max-width: 100%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.post .comment-form input[type="text"] {
    flex: 1 1 160px;
}
.post .comment-form button,
.post .comments-toggle-btn {
    justify-content: center;
    cursor: pointer;
}
/* inset — beat .post-card-ui inline offset:2px; .post overflow-x:clip */
.post .comments-toggle-btn:focus-visible,
.post .comment-form input[type="text"]:focus-visible,
.post .comment-form button:focus-visible,
.post .comment-author a:focus-visible,
.post.post-card-ui .comments-toggle-btn:focus-visible,
.post.post-card-ui .comment-form input[type="text"]:focus-visible,
.post.post-card-ui .comment-form button:focus-visible,
.post.post-card-ui .comment-author a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
.post .comment-form button:disabled,
.post .comment-form button[aria-disabled="true"],
.post .comments-toggle-btn:disabled,
.post .comments-toggle-btn[aria-disabled="true"] {
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
}
.post-music-error {
    display: flex;
    align-items: center;
    min-height: 44px;
}
.post-music-play[aria-pressed="true"] {
    filter: brightness(1.08);
}
[data-theme="light"] .post .post-file-size {
    color: #475569;
}
[data-theme="light"] .post-music-error {
    color: #b91c1c;
}
[data-theme="light"] .post .comment-sticker,
[data-theme="light"] .post .comment-text:has(.comment-sticker),
[data-theme="light"] .post .comment-item:has(.comment-sticker) {
    background: none;
    background-color: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    filter: none;
}
.post .post-actions .pin-btn.is-pinned {
    color: var(--accent-primary);
}

.post-pinned {
    border-color: rgba(124, 92, 252, 0.42);
    box-shadow: 0 0 0 1px rgba(124, 92, 252, 0.16);
}
[data-theme="light"] .post-pinned {
    border-color: rgba(124, 92, 252, 0.38);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(124, 92, 252, 0.14);
}

/* ===== ОФИЦИАЛЬНЫЕ ПОСТЫ (новость сообщества) ===== */
.post-official {
    border: 1px solid var(--border-card);
    border-left: 3px solid var(--accent-primary);
    background:
        linear-gradient(90deg, rgba(124, 92, 252, 0.12), transparent 36%),
        var(--bg-card);
}
.post-official .post-content {
    color: var(--text-primary);
}
.post-official .post-photos {
    margin-top: 12px;
}
.post-official .post-photos .photo-item {
    /* keep collage cell fill — height:auto stretched official photos out of the grid */
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
}
.post-official .post-photos img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    transform: none;
    filter: none;
    image-rendering: auto;
    image-rendering: high-quality;
}
.post-official .post-photos[data-count="1"] {
    aspect-ratio: 16 / 9;
    background: var(--bg-card);
}
.post-official .post-photos[data-count="1"] .photo-item {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    background: var(--bg-card);
}
.post-official .post-photos[data-count="1"] img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}
[data-theme="dark"] .post-official {
    border-color: rgba(124, 92, 252, 0.32);
    border-left-color: var(--accent-secondary);
    background:
        linear-gradient(90deg, rgba(124, 92, 252, 0.16), transparent 38%),
        var(--bg-card);
}
[data-theme="dark"] .post-official .post-photos {
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="light"] .post-official {
    border-color: #d4d9e8;
    border-left-color: var(--accent-primary);
    background:
        linear-gradient(90deg, rgba(124, 92, 252, 0.08), #ffffff 42%);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .post-official .post-content {
    color: #0f172a;
}
[data-theme="light"] .post-official .post-photos {
    background: #eef2f7;
}
/* letterbox must match the white card — #0a0e1a was a black hole on light */
[data-theme="light"] .post .post-photos[data-count="1"],
[data-theme="light"] .post .post-photos[data-count="1"] .photo-item,
[data-theme="light"] .post .post-photos[data-count="1"] .photo-item img,
[data-theme="light"] .post-official .post-photos[data-count="1"],
[data-theme="light"] .post-official .post-photos[data-count="1"] .photo-item,
[data-theme="light"] .post-official .post-photos[data-count="1"] img,
html[data-theme="light"] .post .post-photos[data-count="1"],
html[data-theme="light"] .post .post-photos[data-count="1"] .photo-item,
html[data-theme="light"] .post .post-photos[data-count="1"] .photo-item img {
    background: #ffffff;
    background-color: #ffffff;
}
/* beat inline background:#000 / background-color:#000 on file-photo cells */
[data-theme="light"] .post .post-file-photos,
[data-theme="light"] .post .post-file-photos .post-file-photo,
[data-theme="light"] .post .post-file-photos[data-count="1"] .post-file-photo,
[data-theme="light"] .post .post-file-photos[data-count="1"] .post-file-photo img,
html[data-theme="light"] .post .post-file-photos,
html[data-theme="light"] .post .post-file-photos .post-file-photo,
html[data-theme="light"] .post .post-file-photos[data-count="1"] .post-file-photo,
html[data-theme="light"] .post .post-file-photos[data-count="1"] .post-file-photo img {
    background: #ffffff !important;
    background-color: #ffffff !important;
}
[data-theme="light"] .post .post-file-photos .post-file-photo img,
html[data-theme="light"] .post .post-file-photos .post-file-photo img {
    object-fit: contain !important;
    object-position: center;
    transform: none;
}
/* light video letterbox: beat inline #000/#0a0e1a; keep contain (no cover-zoom) */
[data-theme="light"] .post-media.post-media-video,
[data-theme="light"] .post-media-video,
[data-theme="light"] .post-video,
[data-theme="light"] .post-media-video .post-video,
[data-theme="light"] .post-media-video .post-video-poster,
[data-theme="light"] .post-media .post-video,
html[data-theme="light"] .post-media.post-media-video,
html[data-theme="light"] .post-media-video,
html[data-theme="light"] .post-video,
html[data-theme="light"] .post-media-video .post-video,
html[data-theme="light"] .post-media-video .post-video-poster,
html[data-theme="light"] .post-media .post-video {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* ===== ВИДЕО / АУДИО ВЛОЖЕНИЯ ===== */
/* 16/9 cell reserves height (no like jump); contain beats inline cover crop */
.post-media.post-media-video,
.post-media-video {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: #0a0e1a;
}
.post-media-video .post-video,
.post-media-video .post-video-poster,
.post-media .post-video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0;
    border-radius: 0;
    object-fit: contain !important;
    object-position: center;
    background: #0a0e1a;
    transform: none;
    filter: none;
}
.post-media-video .post-video-poster {
    z-index: 1;
    pointer-events: none;
}
.post-media-video .post-video {
    z-index: 0;
}
.post-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.post-video-play:focus {
    outline: none;
}
.post-video-play:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}
.post-video {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    max-height: none;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: #0a0e1a;
    display: block;
    margin: 10px 0;
    object-fit: contain;
    object-position: center;
    touch-action: manipulation;
}
.post-audio {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    height: 44px;
    margin: 10px 0;
    border-radius: 12px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.post-video:not([src]):not(:has(source[src])),
.post-audio:not([src]):not(:has(source[src])),
.post-video[src=""],
.post-audio[src=""],
.post-video:has(source[src=""]),
.post-audio:has(source[src=""]),
.post-media-block:not(:has(source[src])):not(:has([src])),
.post-media:not(:has(source[src])):not(:has([src])),
.post-music:not(:has([src])),
.post-music:has(audio[src=""]),
.post .post-file:not([href]),
.post .post-file[href=""],
.post .post-file[href="#"],
.post .post-file[href="about:blank"],
.post .post-files:not(:has(.post-file)),
.post .post-photos:not(:has(.photo-item)),
.post .post-photos .photo-item img[srcset=""],
.post .comment-sticker:not([src]),
.post .comment-sticker[src=""],
.post .comment-sticker[src="#"],
.post .comment-sticker[src="about:blank"],
.post .comment-sticker[src="undefined"],
.post .comment-sticker[src="null"],
.post .comment-sticker:-moz-broken,
.post .comments-section[hidden],
.post .comment-form[hidden],
.post .comments-toggle-btn[hidden],
.post .comments-list:empty + .comments-fade {
    display: none;
}
@media (prefers-reduced-motion: reduce) {
    .post .post-photos .photo-item img,
    .post .post-actions .like-btn,
    .post .post-actions .comment-toggle,
    .post .post-actions .repost-btn,
    .post .post-actions .edit-link,
    .post .post-actions .pin-btn,
    .post .post-actions .delete-link,
    .post-poll .poll-option,
    .post-poll .poll-option .option-bar .bar-fill,
    .follow-btn,
    .post-music-play,
    .post .post-file,
    .post .comment-sticker,
    .post .comments-toggle-btn,
    .post .comment-form button {
        transition: none;
        animation: none;
        filter: none;
    }
    .post .post-photos .photo-item:hover img,
    .post .post-photos .photo-item:focus-visible img {
        transform: none;
    }
    .follow-btn:hover:not(:disabled),
    .post-music-play:hover:not(:disabled),
    .post-music-play[aria-pressed="true"] {
        filter: none;
    }
}
@media (prefers-contrast: more) {
    .post,
    .post-poll,
    .post-poll .poll-option,
    .repost-origin,
    .repost-dialog-card,
    .post-music,
    .post-pinned,
    .post .post-file {
        border-color: currentColor;
    }
    .post .post-author a:focus-visible,
    .community-tag:focus-visible,
    .follow-btn:focus-visible,
    .post .post-actions .like-btn:focus-visible,
    .post .post-actions .comment-toggle:focus-visible,
    .post .post-actions .repost-btn:focus-visible,
    .post .post-actions .edit-link:focus-visible,
    .post .post-actions .pin-btn:focus-visible,
    .post .post-actions .delete-link:focus-visible,
    .post-poll .poll-option:focus-visible,
    .post-poll .poll-change-vote:focus-visible,
    .repost-dialog-card textarea:focus-visible,
    .repost-dialog-card select:focus-visible,
    .repost-dialog-actions button:focus-visible,
    .repost-dialog-card > .primary:focus-visible,
    .repost-x:focus-visible,
    .post-music-play:focus-visible,
    .post-music-meta:focus-visible,
    .post .post-content a:focus-visible,
    .post-video:focus-visible,
    .post-audio:focus-visible,
    .post-video-play:focus-visible,
    .post .post-file-photos .post-file-photo:focus-visible,
    .post .post-file:focus-visible,
    .post .comments-toggle-btn:focus-visible,
    .post .comment-form input[type="text"]:focus-visible,
    .post .comment-form button:focus-visible,
    .post .comment-author a:focus-visible {
        outline-width: 3px;
    }
}
@media (forced-colors: active) {
    .post,
    .post-poll,
    .post-poll .poll-option,
    .follow-btn,
    .repost-origin,
    .repost-dialog-card,
    .repost-dialog-actions button,
    .post-music,
    .post-music-play,
    .post-pinned,
    .post .post-file,
    .post .comment-form input[type="text"],
    .post .comment-form button {
        border: 1px solid CanvasText;
    }
    .post .comment-sticker {
        forced-color-adjust: none;
    }
}
@media print {
    .repost-dialog,
    .post .post-actions,
    .follow-btn,
    .post-music-play,
    .comments-section,
    .post .comment-form {
        display: none !important;
    }
    .post {
        content-visibility: visible;
        break-inside: avoid;
        box-shadow: none;
    }
    .post .comment-sticker {
        background: none;
        border: 0;
        box-shadow: none;
        filter: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}