.community-page {
    min-height: calc(100vh - 4rem);
    background: #111318;
    color: #f5f7fa;
    display: block;
    overflow-y: auto;
}

.community-shell {
    width: min(680px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.community-heading {
    border-left: 4px solid #fcd116;
    padding-left: 18px;
    margin-bottom: 26px;
}

.community-kicker {
    color: #fcd116;
    font-size: 11px;
    letter-spacing: .16em;
    margin: 0 0 8px;
}

.community-heading h1 {
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.05;
    margin: 0 0 8px;
}

.community-heading p:last-child {
    color: #aab1bc;
    margin: 0;
}

.post-composer,
.post-card,
.community-login,
.community-empty {
    background: #1b1e25;
    border: 1px solid #303641;
    border-radius: 8px;
}

.post-composer {
    padding: 18px;
    margin-bottom: 18px;
}

.composer-topline,
.composer-actions,
.post-header {
    display: flex;
    align-items: center;
}

.composer-topline {
    justify-content: space-between;
    color: #fcd116;
    margin-bottom: 10px;
}

.composer-topline span {
    color: #7f8997;
    font-size: 12px;
}

.post-composer textarea,
.post-composer input[type="url"] {
    width: 100%;
    box-sizing: border-box;
    background: #12151a;
    color: #f5f7fa;
    border: 1px solid #39414e;
    border-radius: 5px;
    padding: 12px;
    font: inherit;
    margin-bottom: 10px;
}

.post-composer textarea {
    resize: vertical;
    min-height: 78px;
}

.post-composer textarea:focus,
.post-composer input:focus {
    outline: 2px solid #fcd116;
    outline-offset: 1px;
}

.composer-actions {
    justify-content: space-between;
    gap: 12px;
}

.upload-control {
    color: #bfc6d1;
    cursor: pointer;
    font-size: 13px;
}

.upload-control input {
    display: none;
}

.community-submit {
    background: #fcd116;
    border: 0;
    border-radius: 4px;
    color: #17191e;
    cursor: pointer;
    font-weight: 700;
    padding: 10px 18px;
}

.community-submit:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.file-preview {
    margin-bottom: 12px;
}

.file-preview img,
.file-preview video,
.post-media,
.post-embed {
    display: block;
    width: 100%;
    max-height: 460px;
    object-fit: contain;
    background: #0d0f12;
    border-radius: 5px;
}

.post-embed {
    aspect-ratio: 16 / 9;
    border: 0;
}

.community-success,
.community-error {
    font-size: 13px;
    margin: 12px 0 0;
}

.community-success { color: #7de2a5; }
.community-error { color: #ff8e8e; }

.community-login,
.community-empty {
    color: #aab1bc;
    padding: 18px;
    margin-bottom: 18px;
}

.post-card {
    padding: 18px;
    margin-bottom: 14px;
}

.post-header {
    gap: 10px;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 42px;
}

.post-avatar-fallback {
    display: grid;
    place-items: center;
    background: #304d75;
    color: #fff;
    font-weight: 700;
}

.post-author {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.post-author span {
    color: #7f8997;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-delete {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: #77808e;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.post-delete:hover { color: #ff8e8e; }

.post-text {
    white-space: pre-wrap;
    line-height: 1.5;
    margin: 16px 0 12px;
}

.post-link {
    color: #76b7ff;
    display: block;
    overflow-wrap: anywhere;
    margin: 12px 0;
}

@media (max-width: 700px) {
    .community-shell { width: min(100% - 20px, 680px); padding-top: 26px; }
    .community-heading h1 { font-size: 30px; }
    .composer-actions { align-items: flex-start; flex-direction: column; }
    .community-submit { width: 100%; }
}
