.community-page {
    background:
        radial-gradient(circle at 12% 0%, rgba(203, 226, 196, 0.38), transparent 30rem),
        #f7f6f1;
    color: var(--color-ink, #152017);
    min-height: 70vh;
}

.community-eyebrow {
    color: var(--color-green, #14632f);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
}

.community-profile-hero,
.community-groups-hero {
    padding: 3rem 0 1.5rem;
}

.community-profile-hero__inner,
.community-groups-hero__inner {
    align-items: center;
    display: grid;
    gap: 1.25rem;
}

.community-profile-hero__inner {
    grid-template-columns: auto minmax(0, 1fr) 280px;
}

.community-groups-hero__inner {
    max-width: 860px;
}

.community-profile-hero h1,
.community-groups-hero h1,
.community-group-hero h1 {
    font-size: clamp(2.1rem, 5vw, 4rem);
    letter-spacing: 0;
    line-height: 0.98;
    margin: 0;
}

.community-profile-hero p,
.community-groups-hero p,
.community-group-hero p {
    color: #4d594f;
    font-size: 1.02rem;
    line-height: 1.55;
    margin: 0.75rem 0 0;
    max-width: 720px;
}

.community-avatar {
    align-items: center;
    background: #dfeadb;
    border: 1px solid rgba(20, 99, 47, 0.12);
    border-radius: 50%;
    color: var(--color-green, #14632f);
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
    overflow: hidden;
}

.community-avatar--large {
    height: 112px;
    width: 112px;
}

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

.community-avatar span {
    font-size: 2.4rem;
}

.community-profile-meta,
.community-group-hero__actions,
.community-preview-card__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.community-profile-meta {
    margin-top: 1rem;
}

.community-profile-meta span,
.community-group-hero__actions span {
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 99, 47, 0.1);
    border-radius: 999px;
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
}

.community-level-card,
.community-panel,
.community-preview-card,
.community-empty {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(23, 39, 28, 0.08);
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(22, 45, 27, 0.08);
}

.community-level-card {
    padding: 1rem;
}

.community-level-card span,
.community-level-card small {
    color: #647066;
    display: block;
    font-size: 0.83rem;
}

.community-level-card strong {
    display: block;
    font-size: 1.7rem;
    margin: 0.15rem 0 0.65rem;
}

.community-progress {
    background: #e6ebe2;
    border-radius: 999px;
    height: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.community-progress span {
    background: linear-gradient(90deg, #14632f, #4c9a53);
    border-radius: inherit;
    height: 100%;
}

.community-profile-layout,
.community-groups-layout,
.community-group-layout {
    display: grid;
    gap: 1rem;
    padding-bottom: 3rem;
}

.community-profile-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.community-groups-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
}

.community-group-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    padding-top: 1.25rem;
}

.community-profile-main,
.community-profile-side,
.community-groups-main,
.community-group-main,
.community-group-side {
    display: grid;
    gap: 1rem;
}

.community-panel,
.community-preview-card {
    padding: 1.1rem;
}

.community-section-header {
    align-items: center;
    border-bottom: 1px solid rgba(23, 39, 28, 0.08);
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
}

.community-section-header > span {
    align-items: center;
    background: #e8f1e5;
    border-radius: 12px;
    color: var(--color-green, #14632f);
    display: inline-flex;
    flex: 0 0 auto;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.community-section-header h2 {
    font-size: 1.05rem;
    margin: 0;
}

.community-section-header p {
    color: #667269;
    font-size: 0.88rem;
    line-height: 1.35;
    margin: 0.15rem 0 0;
}

.community-stat-grid {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
}

.community-stat-grid div {
    background: #f6f8f3;
    border-radius: 14px;
    padding: 0.8rem;
}

.community-stat-grid dt {
    color: #667269;
    font-size: 0.78rem;
}

.community-stat-grid dd {
    font-size: 1.55rem;
    font-weight: 850;
    margin: 0.1rem 0 0;
}

.community-timeline,
.community-review-list,
.community-badge-list,
.community-event-list,
.community-post-list,
.community-mini-list,
.community-detail-list {
    display: grid;
    gap: 0.7rem;
}

.community-timeline article,
.community-review-list article,
.community-badge-list article,
.community-event-list article,
.community-post-list article,
.community-mini-list article {
    border-bottom: 1px solid rgba(23, 39, 28, 0.07);
    padding-bottom: 0.75rem;
}

.community-timeline article {
    align-items: start;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.community-timeline article > span,
.community-badge-list article > svg {
    color: var(--color-green, #14632f);
}

.community-timeline strong,
.community-review-list h3,
.community-post-list h3 {
    font-size: 0.98rem;
    margin: 0;
}

.community-timeline a,
.community-review-list a,
.community-empty a,
.community-group-card a,
.community-inline-link,
.community-back-link {
    color: var(--color-green, #14632f);
    font-weight: 800;
    text-decoration: none;
}

.community-timeline p,
.community-review-list p,
.community-post-list p,
.community-muted {
    color: #5f6b62;
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 0.2rem 0 0;
}

.community-timeline time {
    color: #7b867c;
    font-size: 0.8rem;
}

.community-review-list article > span {
    color: var(--color-green, #14632f);
    font-weight: 850;
}

.community-badge-list article {
    align-items: center;
    display: flex;
    gap: 0.7rem;
}

.community-badge-list span {
    color: #667269;
    display: block;
    font-size: 0.82rem;
}

.community-empty {
    box-shadow: none;
    padding: 1.25rem;
    text-align: left;
}

.community-empty--wide {
    padding: 2rem;
}

.community-empty--compact {
    padding: 1rem;
}

.community-empty svg {
    color: var(--color-green, #14632f);
}

.community-empty h1,
.community-empty h2,
.community-empty h3 {
    margin: 0.55rem 0 0.25rem;
}

.community-empty p {
    color: #657166;
    line-height: 1.45;
    margin: 0 0 0.8rem;
}

.community-category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.community-category-row span,
.community-group-card span,
.community-preview-card__summary span,
.community-checkin-strip span {
    background: #e8f1e5;
    border-radius: 999px;
    color: #1b5d2f;
    font-size: 0.78rem;
    font-weight: 750;
    padding: 0.35rem 0.55rem;
}

.community-group-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.community-group-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(23, 39, 28, 0.08);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(22, 45, 27, 0.07);
    display: grid;
    gap: 0.8rem;
    padding: 0.75rem;
    transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.community-group-card:hover {
    border-color: rgba(20, 99, 47, 0.16);
    box-shadow: 0 18px 44px rgba(22, 45, 27, 0.11);
    transform: translateY(-2px);
}

.community-group-card__image {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    display: block;
    overflow: hidden;
}

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

.community-group-card__body {
    display: grid;
    gap: 0.45rem;
}

.community-group-card__meta {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.community-group-card h2 {
    font-size: 1.04rem;
    line-height: 1.18;
    margin: 0;
}

.community-group-card p {
    color: #5f6b62;
    font-size: 0.9rem;
    line-height: 1.42;
    margin: 0;
}

.community-group-card small {
    color: #69756c;
    font-size: 0.78rem;
}

.community-inline-link {
    align-items: center;
    display: inline-flex;
    font-size: 0.86rem;
    gap: 0.25rem;
    margin-top: 0.15rem;
    width: fit-content;
}

.community-group-hero {
    background:
        linear-gradient(90deg, rgba(7, 22, 12, 0.82), rgba(7, 22, 12, 0.22)),
        var(--community-cover);
    background-position: center;
    background-size: cover;
    color: #fff;
    min-height: 360px;
    padding: 2.5rem 0;
}

.community-group-hero__inner {
    display: grid;
    gap: 0.8rem;
    max-width: 860px;
}

.community-group-hero span:not(.button span) {
    font-weight: 800;
}

.community-group-hero p,
.community-group-hero__actions span {
    color: rgba(255, 255, 255, 0.86);
}

.community-back-link {
    align-items: center;
    color: #fff;
    display: inline-flex;
    gap: 0.35rem;
    width: fit-content;
}

.community-detail-list {
    margin: 0;
}

.community-detail-list div {
    border-bottom: 1px solid rgba(23, 39, 28, 0.07);
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
}

.community-detail-list dt {
    color: #667269;
}

.community-detail-list dd {
    font-weight: 800;
    margin: 0;
}

.community-event-list article {
    align-items: start;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: 62px minmax(0, 1fr);
}

.community-event-list time {
    background: #f0f5ec;
    border-radius: 14px;
    color: var(--color-green, #14632f);
    display: grid;
    justify-items: center;
    line-height: 1;
    padding: 0.58rem 0.35rem;
    text-align: center;
}

.community-event-list time strong {
    font-size: 0.9rem;
}

.community-event-list time span {
    color: #637069;
    font-size: 0.68rem;
    font-weight: 750;
    margin-top: 0.25rem;
}

.community-event-list h3 {
    font-size: 0.98rem;
    margin: 0;
}

.community-event-list small {
    align-items: center;
    color: #667269;
    display: inline-flex;
    font-size: 0.78rem;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.community-post-list__meta {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
}

.community-post-list__meta time {
    color: #7b867c;
    font-size: 0.78rem;
}

.community-preview-card {
    margin-top: 0.85rem;
    padding: 0.95rem;
}

.community-preview-card__summary {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.65rem;
}

.community-preview-card__summary div {
    background: #f6f8f3;
    border-radius: 12px;
    padding: 0.62rem 0.7rem;
    min-width: 0;
}

.community-preview-card__summary strong {
    display: block;
    font-size: 1.15rem;
}

.community-preview-card__summary span {
    background: transparent;
    color: #657166;
    display: block;
    font-weight: 650;
    padding: 0.1rem 0 0;
}

.community-checkin-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.65rem 0;
}

.community-mini-list article {
    display: grid;
    gap: 0.2rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.community-mini-list article p {
    grid-column: 1 / -1;
}

.community-preview-card .community-section-header {
    margin-bottom: 0.7rem;
    padding-bottom: 0.65rem;
}

.community-preview-card .community-section-header > span {
    height: 34px;
    width: 34px;
}

.community-preview-card .community-section-header p,
.community-preview-card .community-muted,
.community-preview-card .community-mini-list p {
    font-size: 0.84rem;
}

.community-preview-card__actions {
    gap: 0.45rem;
    margin-top: 0.72rem;
}

.community-preview-card__actions .button {
    min-height: 38px;
    padding: 0.55rem 0.78rem;
}

.community-login-nudge {
    background: #f6f8f3;
    border: 1px solid rgba(23, 39, 28, 0.08);
    border-radius: 16px;
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
}

.community-login-nudge strong {
    font-size: 1rem;
}

.community-login-nudge p {
    color: #5f6b62;
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0 0 0.35rem;
}

.community-form {
    display: grid;
    gap: 0.8rem;
}

.community-form label {
    display: grid;
    gap: 0.35rem;
}

.community-form label span {
    color: #536057;
    font-size: 0.82rem;
    font-weight: 800;
}

.community-form input,
.community-form select,
.community-form textarea {
    background: #fff;
    border: 1px solid rgba(23, 39, 28, 0.13);
    border-radius: 12px;
    color: #17271c;
    font: inherit;
    padding: 0.7rem 0.8rem;
    width: 100%;
}

.community-form textarea {
    resize: vertical;
}

.community-form__grid,
.community-rating-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.community-rating-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.community-form__status {
    color: var(--color-green, #14632f);
    font-size: 0.88rem;
    font-weight: 750;
}

.community-form__status.is-error {
    color: #9f2d20;
}

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

.community-modal {
    align-items: center;
    background: rgba(8, 20, 13, 0.42);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 1rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.community-modal__panel {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 26px 80px rgba(5, 20, 11, 0.26);
    max-height: min(86vh, 760px);
    max-width: 520px;
    overflow: auto;
    padding: 1.2rem;
    position: relative;
    width: min(100%, 520px);
}

.community-modal__panel--wide {
    max-width: 720px;
    width: min(100%, 720px);
}

.community-modal__close {
    align-items: center;
    background: #f2f5ef;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 36px;
}

.community-modal header {
    margin-bottom: 1rem;
    padding-right: 2.5rem;
}

.community-modal header span {
    align-items: center;
    background: #e8f1e5;
    border-radius: 12px;
    color: var(--color-green, #14632f);
    display: inline-flex;
    height: 40px;
    justify-content: center;
    margin-bottom: 0.65rem;
    width: 40px;
}

.community-modal h2 {
    margin: 0;
}

.community-modal p {
    color: #667269;
    margin: 0.25rem 0 0;
}

@media (max-width: 980px) {
    .community-profile-hero__inner,
    .community-profile-layout,
    .community-groups-layout,
    .community-group-layout {
        grid-template-columns: 1fr;
    }

    .community-profile-hero__inner {
        align-items: start;
    }

    .community-level-card {
        max-width: 360px;
    }

    .community-group-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .community-profile-hero,
    .community-groups-hero {
        padding-top: 1.5rem;
    }

    .community-profile-hero__inner {
        gap: 0.9rem;
    }

    .community-avatar--large {
        height: 86px;
        width: 86px;
    }

    .community-panel,
    .community-preview-card,
    .community-modal__panel {
        border-radius: 16px;
        padding: 0.9rem;
    }

    .community-form__grid,
    .community-rating-grid,
    .community-preview-card__summary {
        grid-template-columns: 1fr;
    }

    .community-timeline article {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .community-timeline time {
        grid-column: 2;
    }

    .community-group-hero {
        min-height: 300px;
    }
}
