/* File: buddypress/css/buddypress.css */

/* =========================================================
 *  1. /group/ 用リセット（BuddyPress標準CSSの無効化）
 * ======================================================= */

/* グループディレクトリ（/group/）だけをターゲット */
body.groups #buddypress ul.item-list,
body.groups-directory #buddypress ul.item-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 0;
}

/* =========================================================
 *  Register
 * ======================================================= */

#buddypress #register-page .oe-register-username-field {
    position: relative;
}

#buddypress #register-page .oe-register-username-prefix {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    color: #6b7280;
    pointer-events: none;
}

#buddypress #register-page .oe-register-username-field input[type="text"]#signup_username {
    padding-left: 38px;
    background: #f8fafc;
    color: #111827;
}

#buddypress #register-page #signup_username_description {
    margin-top: 8px;
}

#buddypress #register-page .oe-register-field-error {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #b91c1c;
}

#buddypress #register-page .bp-feedback.error,
#buddypress #register-page .error {
    color: #b91c1c;
}

#buddypress #register-page .bp-feedback.error p,
#buddypress #register-page .bp-feedback.error span,
#buddypress #register-page .bp-feedback.error li,
#buddypress #register-page .bp-feedback.error a,
#buddypress #register-page .error p,
#buddypress #register-page .error span,
#buddypress #register-page .error li,
#buddypress #register-page .error a {
    color: inherit;
}

#buddypress #register-page .oe-register-field-error[hidden] {
    display: none !important;
}

#buddypress #register-page .oe-register-input-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}

#buddypress #register-page .oe-register-consent {
    margin: 20px 0 14px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

#buddypress #register-page .oe-register-consent.is-invalid {
    border-color: #dc2626;
    background: #fef2f2;
}

#buddypress #register-page .oe-register-consent__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    cursor: pointer;
}

#buddypress #register-page .oe-register-consent__label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 4px;
    flex: 0 0 16px;
    accent-color: #111827;
}

#buddypress #register-page .oe-register-consent__label a {
    color: #111827;
    font-weight: 700;
    text-decoration: underline;
}

#buddypress #register-page .oe-register-submit-help {
    margin: 10px 0 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
}

#buddypress #register-page .oe-register-submit-help a {
    color: #6b7280;
    text-decoration: underline;
}

#buddypress #register-page .oe-register-submit-help a:hover {
    color: #374151;
}

#buddypress #register-page #pass-strength-result {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

#buddypress #register-page #pass-strength-result[hidden] {
    display: none !important;
}

#buddypress #register-page #pass-strength-result.is-short,
#buddypress #register-page #pass-strength-result.is-bad {
    color: #b45309;
}

#buddypress #register-page #pass-strength-result.is-good {
    color: #1d4ed8;
}

#buddypress #register-page #pass-strength-result.is-strong {
    color: #15803d;
}

#buddypress #register-page .oe-register-complete-card {
    max-width: 640px;
    margin: 24px auto 0;
    padding: 28px 24px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 40%),
        linear-gradient(135deg, #fef7f2, #ffffff 55%, #fff4f6);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
    text-align: center;
}

#buddypress #register-page .oe-register-complete-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #fb7185, #f97316);
}

#buddypress #register-page .oe-register-complete-card.is-activation .oe-register-complete-card__icon,
#buddypress #register-page .oe-register-complete-card.is-request .oe-register-complete-card__icon {
    background: linear-gradient(135deg, #2563eb, #38bdf8);
}

#buddypress #register-page .oe-register-complete-card__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    color: #111827;
}

#buddypress #register-page .oe-register-complete-card__lead {
    margin: 12px auto 0;
    max-width: 34em;
    font-size: 15px;
    line-height: 1.8;
    color: #4b5563;
}

#buddypress #register-page .oe-register-complete-card__steps {
    list-style: none;
    margin: 20px auto 0;
    padding: 0;
    max-width: 34em;
    text-align: left;
}

#buddypress #register-page .oe-register-complete-card__steps li {
    position: relative;
    padding-left: 28px;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

#buddypress #register-page .oe-register-complete-card__steps li + li {
    margin-top: 10px;
}

#buddypress #register-page .oe-register-complete-card__steps li::before {
    content: "✓";
    position: absolute;
    top: 0;
    left: 0;
    font-weight: 700;
    color: #ec4899;
}

#buddypress #register-page .oe-register-complete-card__actions {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

#buddypress #register-page .oe-register-complete-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 12px 18px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        opacity 0.18s ease,
        background 0.18s ease;
}

#buddypress #register-page .oe-register-complete-card__button:hover {
    transform: translateY(-1px);
    opacity: 0.92;
    color: #ffffff;
}

#buddypress #register-page .oe-register-complete-card__button--secondary {
    background: #ffffff;
    color: #111827;
    box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.12);
}

#buddypress #register-page .oe-register-complete-card__button--secondary:hover {
    color: #111827;
}

@media (max-width: 640px) {
    #buddypress #register-page .oe-register-complete-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    #buddypress #register-page .oe-register-complete-card__title {
        font-size: 22px;
    }

    #buddypress #register-page .oe-register-complete-card__actions {
        flex-direction: column;
    }

    #buddypress #register-page .oe-register-complete-card__button {
        width: 100%;
    }
}

/* 各 li のリストマーカー・罫線・余白をリセット */
body.groups #buddypress ul.item-list > li,
body.groups-directory #buddypress ul.item-list > li {
    list-style: none !important;
    margin: 0 0 24px 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* BuddyPress が入れている .item-avatar / .item / .meta などのレイアウトも無効化 */
body.groups #buddypress ul.item-list > li .item,
body.groups #buddypress ul.item-list > li .item-avatar,
body.groups #buddypress ul.item-list > li .action,
body.groups-directory #buddypress ul.item-list > li .item,
body.groups-directory #buddypress ul.item-list > li .item-avatar,
body.groups-directory #buddypress ul.item-list > li .action {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
}

/* デフォルトの下線ボーダー */
body.groups #buddypress ul.item-list > li,
body.groups-directory #buddypress ul.item-list > li {
    border-bottom: none;
}

/* =========================================================
 *  2. グループディレクトリ ヘッダー
 * ======================================================= */

.oe-group-directory-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.oe-group-directory-header {
    margin-bottom: 16px;
}

.oe-group-directory-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
}

.oe-group-directory-desc {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.oe-group-directory-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

/* =========================================================
 *  3. グループディレクトリ：カードグリッド（ベース）
 * ======================================================= */

.oe-group-directory-wrapper #groups-list.item-list {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
}

/* 既定は縦並び（セーフティ）。/group/ では下の 3カラム設定が勝つ */
.oe-group-directory-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* BuddyPress 既定を潰すための保険 */
.oe-group-directory-grid > li {
    list-style: none;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

/* =========================================================
 *  4. グループカード（一覧用）
 * ======================================================= */

.oe-group-card {
    margin: 0;
    padding: 0;
}

/* カード全体 */
.oe-group-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    padding: 20px 22px 16px;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease;
}

.oe-group-card__link:hover {
    transform: translateY(-2px);
    border-color: #c4ddff;
}

/* 上部：アバター＋ロール＋ステータス */
.oe-group-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.oe-group-card__avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.oe-group-card__avatar img {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    border: 3px solid #f3f4ff;
    object-fit: cover;
}

/* 「メンバー」「管理者」などのバッジ */
.oe-group-card__role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: #eef2ff;
    color: #4f46e5;
}

/* 右上ステータスピル（🌐 公開 / 🔒 非公開） */
.oe-group-card__status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #ecfdf3;
    color: #15803d;
    white-space: nowrap;
}

.oe-group-card__status-icon {
    font-size: 13px;
}

/* 主な活動地域用 */
.oe-group-card__area-separator {
    margin: 0 2px;
    font-size: 11px;
    color: #6b7280;
}

.oe-group-card__area-text {
    font-size: 11px;
    font-weight: 500;
    color: #4b5563;
}

/* 本文エリア */
.oe-group-card__body {
    margin-bottom: 10px;
    padding-top: 4px;
}

/* タイトル：1行まで＋ ... */
.oe-group-card__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    display: block;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 説明文：2行まで＋ ... / 常に2行分の高さを確保 */
.oe-group-card__excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #4b5563;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.6em * 2);
}

.oe-group-card__excerpt--muted {
    color: #9ca3af;
}

/* メタ情報行 */
.oe-group-card__meta-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #4b5563;
}

.oe-group-card__meta-row--events {
    margin-top: 8px;
}

.oe-group-card__meta-row--group {
    margin-bottom: 12px;
}

.oe-group-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.oe-group-card__meta-item--muted {
    color: #9ca3af;
}

.oe-group-card__meta-icon {
    font-size: 14px;
}

.oe-group-card__meta-label {
    color: #6b7280;
}

.oe-group-card__meta-value {
    font-weight: 600;
}

/* 参加ボタン & 詳細ボタン */
.oe-group-card__actions {
    margin-top: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.oe-group-card__join {
    display: flex;
    width: 100%;
    max-width: 260px;
    justify-content: center;
}

.oe-group-card__join .generic-button,
.oe-group-card__join .group-button {
    margin: 0 !important;
    width: 100%;
}

.oe-group-card__join a,
.oe-group-card__join button,
.oe-group-card__join .group-button a,
.oe-group-card__join .group-button button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 7px 16px;
    border-radius: 999px;
    background: #ff9fae;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.oe-group-card__join-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 260px;
    box-sizing: border-box;
    padding: 7px 16px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin: 0 auto;
}

.oe-group-card__join a:hover,
.oe-group-card__join button:hover,
.oe-group-card__join .group-button a:hover,
.oe-group-card__join .group-button button:hover {
    background: #ff7e94;
    color: #ffffff;
}

.oe-group-card__join-link:hover {
    background: #d1d5db;
    color: #111827;
}

/* 下部の「詳細を見る」ボタン風 */
.oe-group-card__detail-btn {
    margin-top: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease;
    width: 100%;
    max-width: 260px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.oe-group-card__link:hover .oe-group-card__detail-btn {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.oe-group-card__detail-icon {
    font-size: 14px;
}

/* スマホ向け調整 */
@media (max-width: 767px) {
    .oe-group-card__link {
        padding: 18px 16px 14px;
        border-radius: 14px;
    }

    .oe-group-card__title {
        font-size: 16px;
    }

    .oe-group-card__meta-row {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* =========================================================
 *  5. グループ詳細：ヒーロー
 * ======================================================= */

.oe-group-single {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 10px;
}

.oe-group-hero {
    position: relative;
    margin-bottom: 24px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.oe-group-hero__cover {
    height: 144px;
    background: linear-gradient(135deg, #ffe9eb, #fff5e8);
}

.oe-group-hero__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 16px 20px 20px;
    align-items: center;
}

.oe-group-hero__avatar-wrap {
    margin-top: -56px;
    position: relative;
}

.oe-group-hero__avatar {
    position: relative;
}

.oe-group-hero__avatar img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
}

.oe-group-hero__identity-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

/* メンバーシップバッジ */
.oe-membership-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: #fff;
    border: 2px solid #fff;
}

.oe-membership-badge--admin {
    background: #fef3c7;
    color: #92400e;
}

.oe-membership-badge--mod {
    background: #dbeafe;
    color: #1e40af;
}

.oe-membership-badge--member {
    background: #d1fae5;
    color: #065f46;
}

.oe-badge-icon {
    font-size: 12px;
}

.oe-badge-text {
    line-height: 1;
}

.oe-group-hero__meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.oe-group-hero__meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.oe-group-hero__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.oe-group-hero__area {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #fff;
    color: #292929;
    border: 1px solid rgba(0,0,0,0.06);
}

.oe-group-hero__area--with-badge {
    max-width: 100%;
}

.oe-area-icon {
    font-size: 13px;
}

.oe-group-hero__sub {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 12px;
    font-size: 12px;
    color: #555;
}

.oe-group-hero__stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.oe-stat-icon {
    font-size: 14px;
}

.oe-group-hero__stat--muted {
    color: #888;
}

/* 「最終更新」を上段に表示 */
.oe-group-hero__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.oe-group-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ff9fae;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.oe-group-hero__cta--login {
    background: #374151;
}

.oe-group-hero__cta--manage {
    background: #ff7e94;
}

.oe-group-hero__cta:hover {
    background: #ff7e94;
}

.oe-group-hero__cta--login:hover {
    background: #1f2937;
}

.oe-group-hero__cta--manage:hover {
    background: #1d4ed8;
}

.oe-cta-icon {
    font-size: 14px;
}

/* メンバーステータス表示 */
.oe-member-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.oe-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.oe-status-badge--member {
    background: #d1fae5;
    color: #065f46;
}

.oe-status-icon {
    font-size: 14px;
}

@media (max-width: 768px) {
    .oe-group-hero__inner {
        grid-template-columns: 1fr;
        padding: 3px 10px 1px;
    }
    
    .oe-group-hero__avatar-wrap {
        margin-top: -48px;
    }
    
    .oe-group-hero__inner {
        align-items: flex-start;
    }
    
    .oe-group-hero__actions {
        justify-content: flex-end;
    }

    .oe-group-hero__identity-row {
        margin-top: -20px;
        justify-content: flex-end;
        margin-left: auto;
        width: 100%;
        flex-wrap: wrap;
    }

    .oe-group-hero__sub .oe-group-hero__stat--muted {
        order: -1;
        flex-basis: 100%;
        justify-content: flex-end;
    }
}

/* =========================================================
 *  6. グループ詳細：タブ
 * ======================================================= */

@media (min-width: 769px) {
    .oe-group-hero__inner {
        position: relative;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 16px;
        row-gap: 10px;
        align-items: start;
        padding-top: 12px;
    }

    .oe-group-hero__avatar-wrap {
        grid-column: 1;
        grid-row: 1;
    }

    .oe-group-hero__meta {
        display: contents;
    }

    .oe-group-hero__meta-top {
        grid-column: 1;
        grid-row: 2;
        justify-content: flex-start;
        align-self: start;
    }

    .oe-group-hero__sub {
        grid-column: 2;
        grid-row: 1;
        align-self: flex-end;
        justify-content: flex-end;
        padding-top: 30px;
    }

    .oe-group-hero__actions {
        grid-column: 2;
        grid-row: 2;
        justify-content: flex-end;
        align-self: start;
    }

    .oe-group-hero__avatar-wrap,
    .oe-group-hero__avatar {
        position: static;
    }

    .oe-group-hero__identity-row {
        position: absolute;
        top: 0;
        right: 20px;
        margin: 0;
        width: auto;
        justify-content: flex-end;
        z-index: 2;
        padding-top: 10px;
    }
}

.oe-group-tabs {
    margin-top: 12px;
}

.oe-group-tab-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    border-bottom: 1px solid #e2e2ea;
    overflow-x: auto;
    padding-bottom: 4px;
}

.oe-group-tab-nav__item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.oe-group-tab-nav__item.is-active {
    background: #ffebef;
    color: #c44c64;
    font-weight: 600;
}

.oe-group-tab-nav__item[data-oe-group-tab-target="admin"].is-active,
.oe-group-tab-nav__item[data-oe-group-tab-target="admin"]:hover,
.oe-group-tab-nav__item[data-oe-group-tab-target="admin"]:focus {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: #666;
    font-weight: inherit;
    outline: none;
    text-decoration: none;
}

.oe-group-tab-nav__item[data-oe-group-tab-target="admin"]:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.oe-tab-icon {
    font-size: 15px;
}

.oe-tab-text {
    white-space: nowrap;
}

@media (max-width: 767px) {
    .oe-group-tab-nav {
        gap: 4px;
        overflow-x: hidden;
        padding-bottom: 0;
    }

    .oe-group-tab-nav__item {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        gap: 0;
        padding: 7px 5px;
        font-size: 10px;
        border-radius: 10px;
    }

    .oe-group-tab-nav__item .oe-tab-icon {
        display: none;
    }

    .oe-group-tab-nav__item .oe-tab-text {
        display: block;
        min-width: 0;
        text-overflow: ellipsis;
        white-space: nowrap;
        line-height: 1.2;
    }
}

.oe-group-tab-panels {
    margin-top: 16px;
}

.oe-group-tab-panel {
    display: block;
}

.oe-group-tab-panel[hidden] {
    display: none !important;
}

/* =========================================================
 *  7. 共通セクション・情報リスト・メンバーカード等
 * ======================================================= */

.oe-group-section {
    background: #fff;
    border-radius: 16px;
    padding: 8px 8px 20px;
    border: 1px solid rgba(0,0,0,0.03);
}

.oe-group-section + .oe-group-section {
    margin-top: 16px;
}

.oe-group-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.oe-group-section__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.oe-group-section__subtitle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
}

.oe-group-section__block {
    margin-top: 12px;
}

.oe-group-section__block + .oe-group-section__block {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.oe-group-section__content {
    font-size: 13px;
    line-height: 1.7;
    color: #444;
}

.oe-group-section__content--description {
    font-size: 14px;
}

.oe-group-section__footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

/* アイコン */
.oe-icon {
    font-size: 16px;
}

.oe-role-icon {
    font-size: 15px;
}

.oe-info-icon {
    font-size: 14px;
}

/* 情報リスト */
.oe-group-info-list {
    margin: 0;
    padding: 0;
}

.oe-group-info-list__row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 6px 12px;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.oe-group-info-list__row:last-child {
    border-bottom: none;
}

.oe-group-info-list__row dt {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #555;
}

.oe-group-info-list__row dd {
    margin: 0;
    color: #444;
}

.oe-status-desc {
    font-size: 12px;
    color: #888;
}

/* メンバーカード */
.oe-group-member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

@media (max-width: 768px) {
    .oe-group-member-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.oe-group-member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: #fafafa;
    text-align: center;
}

.oe-group-member-card__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.oe-group-member-card__avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.oe-group-member-card__body {
    width: 100%;
}

.oe-group-member-card__name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.oe-group-member-card__role {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    display: inline-block;
}

.oe-role--admin {
    background: #fef3c7;
    color: #92400e;
}

.oe-role--mod {
    background: #dbeafe;
    color: #1e40af;
}

/* 管理リンク */
.oe-group-admin-links {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 13px;
}

.oe-group-admin-links li + li {
    margin-top: 4px;
}

/* イベントセクション */
.oe-group-events__list {
    margin-top: 8px;
}

.oe-group-events__create-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ff7e94;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.oe-group-events__create-link:hover {
    background: #ff7e94;
}

/* =========================================================
 *  8. 統計カード（概要タブ）
 * ======================================================= */

.oe-group-stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .oe-group-stats-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
}

.oe-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f7f7fa, #ffffff);
    border: 1px solid rgba(0,0,0,0.04);
}

.oe-stat-card__icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.oe-stat-card__content {
    flex: 1;
}

.oe-stat-card__value {
    font-size: 24px;
    font-weight: 700;
    color: #2F2B29;
    line-height: 1;
    margin-bottom: 4px;
}

.oe-stat-card__label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

/* =========================================================
 *  9. タグ・その他
 * ======================================================= */

.oe-group-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.oe-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
}

.oe-rules-content {
    padding: 12px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
}

.oe-help-text {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px;
    background: #eff6ff;
    border-radius: 8px;
    font-size: 13px;
    color: #1e40af;
}

.oe-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin: 12px 0;
}

.oe-notice--warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 3px solid #f59e0b;
}

/* =========================================================
 *  10. イベントタブ用スタイル
 * ======================================================= */

.oe-events-tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.oe-events-tab-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.oe-events-tab-btn.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.oe-events-tab-btn:hover:not(.is-active) {
    background: #f9fafb;
    border-color: #d1d5db;
}

.oe-events-tab-panels {
    margin-top: 16px;
}

.oe-events-tab-panel {
    display: block;
}

.oe-events-tab-panel[hidden] {
    display: none !important;
}

/* =========================================================
 *  11. メンバーディレクトリスタイル（グループ内用）
 * ======================================================= */

.oe-member-directory--group {
    margin-top: 12px;
}

.oe-member-directory--group .oe-member-list {
    border-top: 1px solid rgba(47, 43, 41, 0.10);
}

.oe-member-directory--group .oe-member-row {
    padding: 12px 2px;
    border-bottom: 1px solid rgba(47, 43, 41, 0.10);
}

.oe-member-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 9999px;
    overflow: hidden;
}

.oe-member-avatar__img,
.oe-member-avatar img {
    width: 44px !important;
    height: 44px !important;
    display: block;
    object-fit: cover;
}

.oe-member-main {
    flex: 1;
    min-width: 0;
}

.oe-member-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oe-member-name a {
    color: inherit;
    text-decoration: none;
}

.oe-member-name a:hover {
    color: #2563eb;
}

.oe-member-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.oe-member-role-badge--admin {
    background: #fef3c7;
    color: #92400e;
}

.oe-member-role-badge--mod {
    background: #dbeafe;
    color: #1e40af;
}

.oe-member-actions {
    flex: 0 0 auto;
}

.oe-member-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
    border-radius: 9999px;
    border: 1px solid rgba(47, 43, 41, 0.18);
    font-size: 12px;
    font-weight: 700;
    background: #fff;
    color: #2F2B29;
    text-decoration: none;
}

.oe-member-action:hover {
    background: #f9fafb;
    border-color: #2563eb;
    color: #2563eb;
}

.oe-member-empty {
    margin: 14px 0 0;
    font-size: 13px;
    opacity: 0.85;
}

.oe-member-pagination {
    margin-top: 14px;
}

.oe-member-pagination .page-numbers,
.oe-member-pagination a,
.oe-member-pagination span {
    display: inline-block;
    margin-right: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(47, 43, 41, 0.14);
    font-size: 12px;
    text-decoration: none;
    color: #2F2B29;
}

.oe-member-pagination .page-numbers.current {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.oe-member-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

/* =========================================================
 *  12. 最新アクティビティ
 * ======================================================= */

.oe-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.oe-activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.oe-activity-item:last-child {
    border-bottom: none;
}

.oe-activity-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.oe-activity-content {
    flex: 1;
}

.oe-activity-header {
    font-size: 13px;
    margin-bottom: 4px;
}

.oe-activity-time {
    font-size: 11px;
    color: #888;
}

.oe-see-more {
    margin-top: 12px;
    text-align: center;
}

.oe-see-more a {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.oe-see-more a:hover {
    text-decoration: underline;
}

/* ============================================
 *  13. グループディレクトリ：3カラム グリッドレイアウト
 * ============================================ */

body.groups .oe-group-directory-wrapper #groups-list.item-list,
body.groups-directory .oe-group-directory-wrapper #groups-list.item-list {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

body.groups .oe-group-directory-grid > li,
body.groups-directory .oe-group-directory-grid > li {
    list-style: none;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

body.groups .oe-group-card__link,
body.groups-directory .oe-group-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (max-width: 1024px) {
    body.groups .oe-group-directory-wrapper #groups-list.item-list,
    body.groups-directory .oe-group-directory-wrapper #groups-list.item-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    body.groups .oe-group-directory-wrapper #groups-list.item-list,
    body.groups-directory .oe-group-directory-wrapper #groups-list.item-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .oe-group-section--overview .oe-stat-card {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 10px 6px;
        text-align: center;
    }

    .oe-group-section--overview .oe-stat-card__icon {
        width: 26px;
        height: 26px;
        font-size: 18px;
        border-radius: 8px;
    }

    .oe-group-section--overview .oe-stat-card__icon > img.oe-icon {
        width: 20px;
        height: 20px;
        max-width: 20px;
        max-height: 20px;
    }

    .oe-group-section--overview .oe-stat-card__content {
        flex: 0 1 auto;
        width: 100%;
        text-align: center;
    }

    .oe-group-section--overview .oe-stat-card__value {
        font-size: 17px;
        margin-bottom: 3px;
    }

    .oe-group-section--overview .oe-stat-card__label {
        font-size: 10px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* =========================================================
 *  Register Completion Overrides
 * ======================================================= */

#buddypress #register-page .oe-register-complete-card {
    max-width: none;
    margin: 24px 0 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    text-align: left;
}

#buddypress #register-page .oe-register-complete-card__title {
    margin: 0;
    font-size: 28px;
    line-height: 1.3;
    color: #111827;
}

#buddypress #register-page .oe-register-complete-card__lead {
    margin: 10px 0 0;
    max-width: none;
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}

#buddypress #register-page .oe-register-complete-card__note {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: #6b7280;
}

#buddypress #register-page .oe-register-complete-card__steps {
    list-style: disc;
    margin: 18px 0 0 20px;
    padding: 0;
    max-width: none;
    text-align: left;
}

#buddypress #register-page .oe-register-complete-card__steps li {
    position: static;
    padding-left: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
}

#buddypress #register-page .oe-register-complete-card__steps li + li {
    margin-top: 8px;
}

#buddypress #register-page .oe-register-complete-card__steps li::before {
    content: none;
}

#buddypress #register-page .oe-register-complete-card__icon {
    display: none !important;
}

#buddypress #register-page .oe-register-complete-card__actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

#buddypress #register-page .oe-register-complete-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    transition: none;
}

#buddypress #register-page .oe-register-complete-card__button:hover {
    transform: none;
    opacity: 1;
    color: #111827;
}

#buddypress #register-page .oe-register-complete-card__button--secondary {
    background: transparent;
    color: #4b5563;
    box-shadow: none;
}

#buddypress #register-page .oe-register-complete-card__button--secondary:hover {
    color: #4b5563;
}

@media (max-width: 640px) {
    #buddypress #register-page .oe-register-complete-card {
        margin-top: 20px;
    }

    #buddypress #register-page .oe-register-complete-card__title {
        font-size: 22px;
    }

    #buddypress #register-page .oe-register-complete-card__actions {
        flex-direction: column;
        align-items: flex-start;
    }

    #buddypress #register-page .oe-register-complete-card__button {
        width: auto;
    }
}
