.community-page {
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
}

.community-page > article.card {
    overflow-x: auto;
}

.community-list {
    display: grid;
    gap: 0.75rem;
}

.share-chart-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.share-chart-wrap {
    max-width: 420px;
    margin: 0 auto;
}

.community-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
}

.community-head p {
    margin: 0.35rem 0 0;
    color: var(--text-sub);
    font-size: 0.9rem;
}

.community-board {
    overflow: hidden;
    padding: 0;
}

.board-header,
.board-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) 110px 138px 72px;
    align-items: center;
    column-gap: 0.8rem;
    padding: 0.78rem 1rem;
}

.board-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text-sub);
    font-size: 0.8rem;
    font-weight: 800;
}

.board-row {
    border-bottom: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
    transition: background-color 0.16s ease;
}

.board-row:hover {
    background: var(--primary-soft);
}

.board-row:last-child {
    border-bottom: 0;
}

.board-title {
    min-width: 0;
}

.board-title strong {
    display: block;
    overflow: hidden;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-title p {
    margin: 0.26rem 0 0;
    overflow: hidden;
    color: var(--text-sub);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-cell {
    color: var(--text-sub);
    font-size: 0.84rem;
}

.type-badge {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
}

.community-empty {
    padding: 1.4rem 1rem;
    color: var(--text-sub);
    text-align: center;
}

.board-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
}

.page-link {
    min-width: 52px;
    padding: 0.34rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.page-status {
    color: var(--text-sub);
    font-size: 0.86rem;
}

.detail-top-actions {
    margin-bottom: 0;
}

.post-detail {
    margin-top: 0;
}

.post-head {
    margin-bottom: 0.9rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.post-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.9rem;
    color: var(--text-sub);
    font-size: 0.84rem;
}

.post-content,
.comment-content {
    margin: 0;
    color: var(--text-main);
    font-family: inherit;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
}

.post-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.post-actions form {
    margin: 0;
}

.detail-grid {
    display: block;
}

.comment-box h2 {
    margin: 0 0 0.7rem;
    font-size: 1rem;
}

.comment-box textarea,
.write-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-main);
    padding: 0.65rem;
    font-size: 0.92rem;
    line-height: 1.55;
    resize: vertical;
}

.comment-box textarea:focus,
.write-form textarea:focus,
.write-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.comment-submit {
    margin-top: 0.55rem;
    display: flex;
    justify-content: flex-end;
}

.comment-list {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.6rem;
}

.comment-item {
    position: relative;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-muted);
}

.comment-item .post-meta {
    margin-bottom: 0.4rem;
    padding-right: 3rem;
}

.comment-delete-top {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    margin: 0;
}

.btn-comment-delete {
    min-height: 28px;
    padding: 0.25rem 0.45rem;
    font-size: 0.74rem;
    line-height: 1;
}

.write-form {
    display: grid;
    gap: 0.55rem;
}

.write-form label {
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 800;
}

.write-form select {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-main);
    padding: 0.5rem 0.65rem;
}

.form-help {
    margin: -0.15rem 0 0.1rem;
    color: var(--text-sub);
    font-size: 0.8rem;
}

.write-actions {
    margin-top: 0.45rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.error-text {
    margin: 0 0 0.6rem;
    color: var(--negative);
    font-size: 0.9rem;
    font-weight: 700;
}

.success-text {
    margin: 0 0 0.6rem;
    color: var(--positive);
    font-size: 0.9rem;
    font-weight: 700;
}

.share-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.share-table th,
.share-table td {
    padding: 0.52rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.86rem;
    text-align: left;
    white-space: nowrap;
}

.share-table th {
    background: var(--surface-muted);
    color: var(--text-sub);
    font-weight: 800;
}

.share-table tr:last-child td {
    border-bottom: 0;
}

.report-item {
    display: grid;
    gap: 0.35rem;
}

.report-item p {
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.report-modal {
    display: none;
    z-index: 1200;
}

.report-modal .modal-content {
    width: min(100%, 460px);
    padding: 1rem;
}

.report-modal textarea {
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    resize: vertical;
}

.report-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .community-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .board-header {
        display: none;
    }

    .board-row {
        grid-template-columns: 1fr;
        gap: 0.4rem;
        padding: 0.85rem 1rem;
    }

    .board-cell {
        font-size: 0.82rem;
    }

    .write-actions {
        justify-content: stretch;
    }

    .write-actions .btn {
        flex: 1;
    }
}
