.memberships-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.memberships-heading h1 { margin: 0; color: #263f2f; font-size: 28px; font-weight: 750; line-height: 1.4; }
.memberships-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
a.find-groups-button { display: inline-flex; min-height: 42px; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 8px; color: #fff; background: #26734c; font-size: 13px; font-weight: 700; line-height: 1.4; }
a.find-groups-button:hover { color: #fff; background: #1d603e; }
.find-groups-button > span { font-size: 18px; }
.membership-item { display: flex; align-items: center; border: 1px solid #e7eee9; border-radius: 12px; background: #fff; }
.membership-item[hidden],#membershipsEmpty[hidden] { display: none; }
.membership-item:hover { border-color: #b9d2bd; background: #f7faf6; }
.membership-item a.membership-card { min-width: 0; flex: 1; border: 0; border-radius: 11px; background: transparent; }
.membership-item a.membership-card:hover { background: transparent; }
.membership-member-count { display: block; margin-top: 10px; color: #6f8276; font-size: 13px; line-height: 1.6; }
.membership-admin-badge { display: inline-block; margin-top: 7px; padding: 3px 7px; border: 1px solid #dce8dd; border-radius: 5px; color: #26734c; background: #edf5e9; font-size: 11px; font-weight: 650; line-height: 1.4; }
.membership-leave { display: flex; min-height: 44px; flex: none; align-items: center; justify-content: center; gap: 6px; margin-right: 16px; padding: 8px 10px; border: 0; border-radius: 8px; color: #64786b; background: transparent; font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap; transition: color .15s ease, background-color .15s ease; }
.membership-leave svg { width: 20px; height: 20px; flex: none; }
.membership-leave:hover { color: #314939; background: #edf3ed; }
.membership-leave:focus-visible { outline: 2px solid #26734c; outline-offset: 3px; }
.memberships-status { margin-top: 18px; color: #26734c; font-size: 14px; line-height: 1.7; }
.memberships-status:empty { display: none; }
.membership-dialog { position: fixed; width: min(calc(100% - 32px), 420px); max-width: none; max-height: calc(100dvh - 40px); padding: 30px; border: 1px solid #e7eee9; border-radius: 20px; color: #263f2f; background: #fff; box-shadow: 0 24px 80px #0003; }
.membership-dialog::backdrop { background: #0009; }
.membership-dialog form { margin: 0; }
.membership-dialog h2 { margin: 0; padding-right: 20px; font-size: 22px; font-weight: 750; line-height: 1.5; letter-spacing: -.04em; }
.membership-dialog p { margin-top: 16px; color: #76857b; font-size: 14px; line-height: 1.8; }
.membership-dialog p strong { color: #314939; }
#leaveGroupDialog h2 { padding-right: 0; text-align: center; }
#leaveGroupDescription { text-align: center; }
.membership-dialog-close { position: absolute; top: 12px; right: 12px; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: #718077; background: #f3f6f3; font-size: 23px; }
.membership-dialog-actions { display: flex; gap: 10px; margin-top: 26px; }
.membership-dialog-actions button { min-height: 44px; flex: 1; border-radius: 8px; font-size: 14px; font-weight: 700; }
.membership-dialog-cancel { color: #52645a; background: #f1f5f1; }
.membership-dialog-confirm { color: #fff; background: #b54740; }
.membership-dialog-confirm:hover { background: #9e3932; }
.find-groups-main { max-width: 760px; }
.find-groups-intro { margin: -8px 0 24px; color: #76857b; font-size: 14px; line-height: 1.7; }
.find-groups-form { padding: 22px; border: 1px solid #e7eee9; border-radius: 12px; background: #f7faf6; }
.find-groups-form label { display: block; margin-bottom: 10px; color: #314939; font-size: 14px; font-weight: 700; }
.find-groups-search { display: flex; gap: 10px; }
.find-groups-search input { width: 100%; min-width: 0; min-height: 46px; flex: 1; padding: 10px 13px; border: 1px solid #dce8dd; border-radius: 8px; color: #314939; background: #fff; font-size: 14px; }
.find-groups-search input::placeholder { color: #929e95; }
.find-groups-search button { flex: none; padding: 10px 18px; border-radius: 8px; color: #fff; background: #26734c; font-size: 14px; font-weight: 700; }
.find-groups-form > p { margin-top: 10px; color: #849087; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.find-group-result { margin-top: 32px; }
.find-group-result > h2 { margin: 0 0 14px; color: #263f2f; font-size: 18px; font-weight: 700; }
.found-group-card { display: flex; align-items: center; gap: 24px; padding: 20px; border: 1px solid #e7eee9; border-radius: 12px; }
.found-group-card > img { width: 240px; height: 160px; flex: none; border-radius: 9px; object-fit: cover; }
.found-group-copy { min-width: 0; flex: 1; }
.found-group-public { color: #59906a; font-size: 12px; font-weight: 700; }
.found-group-copy h2,.found-group-copy h3 { margin: 7px 0 8px; color: #263f2f; font-size: 22px; font-weight: 700; line-height: 1.5; }
.found-group-copy p { color: #76857b; font-size: 14px; line-height: 1.7; }
.found-group-copy .found-group-open { display: inline-flex; align-items: center; gap: 12px; margin-top: 16px; padding: 11px 14px; border-radius: 8px; color: #fff; background: #26734c; font-size: 14px; font-weight: 700; line-height: 1.4; }
.found-group-copy .found-group-open:hover { color: #fff; background: #1d603e; }
.found-group-open:disabled,.group-join-confirm:disabled { opacity: .6; cursor: wait; }
.group-join-field { margin-top: 22px; }
.group-join-field label { display: block; margin-bottom: 8px; color: #314939; font-size: 13px; font-weight: 600; }
.group-join-field input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #dce8dd; border-radius: 8px; color: #314939; background: #f7faf6; font-size: 16px; }
.group-join-field input:focus { outline: 2px solid #26734c; outline-offset: 2px; }
.group-join-field input[aria-invalid="true"] { border-color: #b54740; }
.group-join-field p { margin-top: 8px; font-size: 12px; }
.group-join-confirm { color: #fff; background: #26734c; }
.group-join-confirm:hover { background: #1d603e; }
.membership-dialog .group-join-error,.found-group-copy .group-join-error { margin-top: 12px; color: #b54740; font-size: 13px; line-height: 1.6; }
.group-join-error:empty { display: none; }
.find-groups-empty { margin-top: 28px; padding: 26px; border: 1px solid #e7eee9; border-radius: 12px; text-align: center; }
.find-groups-empty strong { color: #52645a; font-size: 15px; }
.find-groups-empty p { margin-top: 9px; color: #849087; font-size: 14px; line-height: 1.7; }
@media (max-width: 600px) {
    .memberships-heading h1 { font-size: 23px; }
    .membership-leave { width: 60px; min-height: 48px; flex-direction: column; gap: 2px; margin-right: 10px; padding: 5px; font-size: 11px; }
    .membership-item a.membership-card { gap: 10px; padding-right: 8px; }
    .membership-arrow { display: none; }
    .membership-member-count { font-size: 12px; }
    .membership-dialog { padding: 26px 22px; }
    .membership-dialog h2 { font-size: 20px; }
    .find-groups-form { padding: 16px; }
    .find-groups-search { flex-wrap: wrap; }
    .find-groups-search input { flex-basis: 100%; }
    .find-groups-search button { width: 100%; min-height: 44px; }
    .found-group-card { flex-direction: column; align-items: stretch; gap: 18px; padding: 16px; }
    .found-group-card > img { width: 100%; height: auto; aspect-ratio: 3 / 2; }
}
