body.public-mode.posts-page .content-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.posts-shell,
.post-detail-shell,
.post-form-shell {
    display: grid;
    gap: 24px;
}

.posts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 0 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.posts-head h1 {
    margin: 0;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.posts-head p {
    max-width: 720px;
    margin: 6px 0 0;
    color: #aeb9c9;
}

.posts-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.community-layout {
    display: grid;
    grid-template-columns: minmax(190px, 230px) minmax(0, 640px) minmax(220px, 280px);
    justify-content: center;
    gap: 18px;
    align-items: start;
}

.community-feed {
    display: grid;
    min-width: 0;
    gap: 16px;
}

.community-sidebar {
    display: grid;
    gap: 16px;
}

.community-panel,
.community-composer {
    background: #262736;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.community-panel {
    padding: 14px;
}

.community-panel h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.community-list {
    display: grid;
    gap: 6px;
}

.community-person,
.community-group,
.community-news,
.community-composer,
.community-composer-prompt {
    color: #f5f7fb;
}

.community-person,
.community-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border-radius: 8px;
}

.community-person:hover,
.community-group:hover,
.community-news:hover,
.community-composer:hover {
    background: rgba(255, 255, 255, 0.05);
}

.community-avatar,
.community-group img {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #c64d8d, #4f7ee8);
    color: white;
    font-weight: 800;
}

.community-avatar img,
.community-group img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-item-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.community-item-copy strong,
.community-news strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-item-copy small,
.community-news small,
.community-muted {
    color: #9eabba;
    font-size: 0.82rem;
}

.community-news {
    display: grid;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 8px;
}

.community-news small {
    line-height: 1.35;
}

.community-composer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}

.community-composer-prompt {
    min-width: 0;
    padding: 12px 14px;
    border: 0;
    border-radius: 999px;
    background: #1a1b29;
    color: #aeb9c9;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.community-composer-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.community-composer-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #c8d1df;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.community-composer-actions button:hover,
.community-composer-prompt:hover {
    background: rgba(255, 255, 255, 0.07);
}

.community-composer-actions button:nth-child(1) span:first-child {
    color: #45bd76;
}

.community-composer-actions button:nth-child(2) span:first-child {
    color: #4f9fff;
}

.community-composer-actions button:nth-child(3) span:first-child {
    color: #ffb84d;
}

.post-create-modal[hidden] {
    display: none;
}

.post-create-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.post-create-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
}

.post-create-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    display: grid;
    gap: 14px;
    padding: 0 16px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: #242531;
    color: #f5f7fb;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.post-create-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    margin: 0 -16px;
    padding: 0 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #242531;
}

.post-create-header h2 {
    margin: 0;
    font-size: 1.15rem;
}

.post-create-close {
    position: absolute;
    right: 14px;
    top: 10px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #c8d1df;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.post-create-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-create-author strong,
.post-create-author small {
    display: block;
}

.post-create-author small {
    color: #aeb9c9;
    font-size: 0.82rem;
}

.post-create-title {
    display: grid;
    gap: 6px;
}

.post-create-title span {
    color: #aeb9c9;
    font-size: 0.84rem;
    font-weight: 800;
}

.post-create-title input,
.post-create-dialog textarea {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: #181925;
    color: #f5f7fb;
    font: inherit;
}

.post-create-title input {
    padding: 12px 14px;
}

.post-create-dialog textarea {
    min-height: 130px;
    padding: 14px 0;
    background: transparent;
    font-size: 1.2rem;
    resize: vertical;
}

.post-create-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.post-create-preview {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #12131f;
}

.post-create-preview img {
    display: block;
    width: 100%;
    max-height: 52vh;
    object-fit: contain;
}

.post-create-preview button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.58);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
}

.post-create-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.post-create-tools span {
    flex: 1;
    min-width: 0;
    font-weight: 800;
}

.post-create-tools button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #c8d1df;
    font-size: 1.1rem;
    cursor: pointer;
}

.post-create-tools button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.post-create-submit {
    width: 100%;
}

body.post-modal-open {
    overflow: hidden;
}

.post-card,
.post-form-card,
.post-detail-main,
.post-comments-panel {
    background: #262736;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.post-card {
    display: grid;
    gap: 0;
    overflow: hidden;
}

.post-card-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 0;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 0;
    color: #f5f7fb;
}

.post-card-menu {
    position: relative;
    flex: 0 0 auto;
}

.post-card-menu summary {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    list-style: none;
    border-radius: 50%;
    color: #aeb9c9;
    cursor: pointer;
    font-weight: 900;
}

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

.post-card-menu summary:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #f5f7fb;
}

.post-card-menu-popover {
    position: absolute;
    right: 0;
    top: 42px;
    z-index: 6;
    min-width: 170px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #181925;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.post-card-menu-popover button {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #ff6b7f;
    font: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.post-card-menu-popover button:hover {
    background: rgba(255, 72, 100, 0.12);
}

.post-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #c64d8d, #4f7ee8);
    color: white;
    font-weight: 800;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-avatar-sm {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
}

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

.post-author small,
.post-stats {
    color: #9eabba;
}

.post-card-body {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
}

.post-card-body h2 {
    margin: 0;
    font-size: 1.15rem;
}

.post-card-body p {
    margin: 0;
    color: #c8d1df;
    line-height: 1.45;
}

.post-cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 6px;
}

.post-stats {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.92rem;
}

.post-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.post-actions form {
    margin: 0;
}

.post-actions button,
.post-actions a {
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #c8d1df;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.post-actions button:hover,
.post-actions a:hover {
    background: rgba(255, 255, 255, 0.07);
}

.post-actions .is-liked {
    color: #4f9fff;
}

.post-inline-comment {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 14px;
}

.post-inline-comment input {
    width: 100%;
    min-height: 38px;
    padding: 10px 14px;
    border: 0;
    border-radius: 999px;
    background: #181925;
    color: #f5f7fb;
    font: inherit;
}

.post-inline-comment button {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: #e94f37;
    color: white;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.post-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.post-detail-main {
    padding: 20px;
}

.post-detail-main h1 {
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.post-body {
    color: #d9e2ef;
    line-height: 1.62;
}

.post-media {
    margin: 18px 0 0;
}

.post-media img {
    display: block;
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 6px;
    background: #10111c;
}

.post-media figcaption {
    margin-top: 8px;
    color: #aeb9c9;
}

.post-comments-panel {
    padding: 0;
    overflow: hidden;
}

.post-comments-panel .cm-comments-thread {
    border: 0;
    background: transparent;
}

.post-form-card {
    display: grid;
    gap: 18px;
    padding: 20px;
}

.post-form-card label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.post-form-card input,
.post-form-card textarea,
.post-form-card select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: #161724;
    color: #f5f7fb;
    font: inherit;
}

.post-form-card textarea {
    resize: vertical;
}

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

body.public-mode.color-mode-light .posts-head,
body.public-mode.color-mode-light .post-detail-head {
    border-color: rgba(24, 32, 50, 0.12);
}

body.public-mode.color-mode-light .posts-head p,
body.public-mode.color-mode-light .post-author small,
body.public-mode.color-mode-light .post-stats,
body.public-mode.color-mode-light .post-card-body p,
body.public-mode.color-mode-light .post-media figcaption {
    color: #627087;
}

body.public-mode.color-mode-light .post-card,
body.public-mode.color-mode-light .post-form-card,
body.public-mode.color-mode-light .post-detail-main,
body.public-mode.color-mode-light .post-comments-panel,
body.public-mode.color-mode-light .community-panel,
body.public-mode.color-mode-light .community-composer {
    background: #ffffff;
    border-color: rgba(24, 32, 50, 0.12);
}

body.public-mode.color-mode-light .community-person,
body.public-mode.color-mode-light .community-group,
body.public-mode.color-mode-light .community-news,
body.public-mode.color-mode-light .community-composer,
body.public-mode.color-mode-light .community-composer-prompt {
    color: #182032;
}

body.public-mode.color-mode-light .community-person:hover,
body.public-mode.color-mode-light .community-group:hover,
body.public-mode.color-mode-light .community-news:hover,
body.public-mode.color-mode-light .community-composer:hover {
    background: rgba(24, 32, 50, 0.05);
}

body.public-mode.color-mode-light .community-composer-prompt {
    background: #f4f6fb;
    color: #627087;
}

body.public-mode.color-mode-light .community-composer-actions {
    border-color: rgba(24, 32, 50, 0.1);
}

body.public-mode.color-mode-light .community-composer-actions button {
    color: #4a5870;
}

body.public-mode.color-mode-light .post-create-dialog,
body.public-mode.color-mode-light .post-create-header {
    background: #ffffff;
    color: #182032;
}

body.public-mode.color-mode-light .post-create-dialog {
    border-color: rgba(24, 32, 50, 0.14);
}

body.public-mode.color-mode-light .post-create-title input,
body.public-mode.color-mode-light .post-create-dialog textarea {
    background: #f4f6fb;
    color: #182032;
}

body.public-mode.color-mode-light .post-create-dialog textarea {
    background: transparent;
}

body.public-mode.color-mode-light .post-create-tools {
    border-color: rgba(24, 32, 50, 0.14);
}

body.public-mode.color-mode-light .post-card-menu summary {
    color: #627087;
}

body.public-mode.color-mode-light .post-card-menu summary:hover,
body.public-mode.color-mode-light .post-actions button:hover,
body.public-mode.color-mode-light .post-actions a:hover {
    background: rgba(24, 32, 50, 0.06);
}

body.public-mode.color-mode-light .post-card-menu-popover {
    background: #ffffff;
    border-color: rgba(24, 32, 50, 0.12);
}

body.public-mode.color-mode-light .post-actions button,
body.public-mode.color-mode-light .post-actions a {
    color: #4a5870;
}

body.public-mode.color-mode-light .post-actions .is-liked {
    color: #1976f3;
}

body.public-mode.color-mode-light .post-inline-comment input {
    background: #f4f6fb;
    color: #182032;
}

body.public-mode.color-mode-light .community-item-copy small,
body.public-mode.color-mode-light .community-news small,
body.public-mode.color-mode-light .community-muted {
    color: #627087;
}

body.public-mode.color-mode-light .post-body {
    color: #253047;
}

body.public-mode.color-mode-light .post-form-card input,
body.public-mode.color-mode-light .post-form-card textarea,
body.public-mode.color-mode-light .post-form-card select {
    background: #f4f6fb;
    border-color: rgba(24, 32, 50, 0.14);
    color: #182032;
}

@media (max-width: 1080px) {
    .community-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .community-feed {
        order: 1;
    }

    .community-sidebar-left {
        order: 2;
    }

    .community-sidebar-right {
        order: 3;
    }

    .community-sidebar {
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    }
}

@media (max-width: 860px) {
    .posts-head,
    .post-detail-head {
        align-items: stretch;
        flex-direction: column;
    }

    .posts-list,
    .post-detail-grid,
    .post-form-media {
        grid-template-columns: 1fr;
    }
}
