/*
Theme Name: BuddyX Child
Description: Child theme for BuddyX - 日本細菌学会関西支部 コミュニティポータル
Template: buddyx
Version: 7.49
*/

/* ============================================================
   フォント
   ============================================================ */
body {
    font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
    background-color: #f5f6f8;
}

/* サイト全体をゴシック体に統一（見出し・タイトル等の明朝表示を上書き） */
body,
h1, h2, h3, h4, h5, h6,
.site-title, .site-description,
.entry-title, .page-title, .widget-title, .widgettitle,
#buddypress h1, #buddypress h2, #buddypress h3, #buddypress h4,
.bbp-forum-title, .bbp-topic-title, .bbp-reply-title,
input, button, select, textarea {
    font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif !important;
}

/* ============================================================
   ヘッダー
   ============================================================ */
.site-title { font-size: 22px; font-weight: 700; }
.site-title a { color: #fff !important; }
.site-description { color: #a8c4e8 !important; font-size: 11px !important; }
.custom-logo { height: 48px !important; width: auto !important; }
.site-header { overflow: visible !important; }

/* ============================================================
   アクティビティ・投稿エリア
   ============================================================ */
#buddypress #whats-new-form {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e4e8f0;
    box-shadow: 0 1px 4px rgba(60,80,180,0.06);
    padding: 20px;
    margin-bottom: 16px;
}
#buddypress #whats-new-textarea {
    border-radius: 8px;
    border: 1.5px solid #e4e8f0;
    background: #f9fafb;
    font-size: 14px;
    padding: 10px 14px;
}
#buddypress #whats-new-submit input[type=submit] {
    background: #1a3a6b !important;
    color: #fff !important;
    border-radius: 8px !important;
    border: none !important;
    padding: 8px 20px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

/* ============================================================
   アクティビティカード
   ============================================================ */
#buddypress .activity-list .activity-item {
    background: #fff !important;
    border-radius: 12px !important;
    border: 1px solid #e4e8f0 !important;
    box-shadow: 0 1px 4px rgba(60,80,180,0.06) !important;
    padding: 20px !important;
    margin-bottom: 14px !important;
    transition: box-shadow 0.2s;
}
#buddypress .activity-list .activity-item:hover {
    box-shadow: 0 4px 16px rgba(60,80,180,0.10) !important;
}
#buddypress .activity-avatar img { border-radius: 10px !important; }
#buddypress .activity-content .activity-header { font-size: 13.5px; line-height: 1.6; }
#buddypress .activity-content .activity-inner p { font-size: 14px; color: #555; line-height: 1.75; }
#buddypress .activity-meta a {
    border-radius: 7px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    padding: 5px 11px !important;
    color: #9ca3af !important;
}
#buddypress .activity-meta a:hover { background: #f9fafb !important; color: #374151 !important; }

/* ============================================================
   サイドバーウィジェット
   ============================================================ */
.widget {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e4e8f0;
    box-shadow: 0 1px 4px rgba(60,80,180,0.06);
    padding: 16px;
    margin-bottom: 14px;
}
.widget-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #374151 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 12px !important;
}

/* ============================================================
   ボタン共通
   ============================================================ */
#buddypress .generic-button a,
#buddypress input[type=submit],
#buddypress button[type=submit] {
    background: #1a3a6b !important;
    color: #fff !important;
    border-radius: 8px !important;
    border: none !important;
}

/* ============================================================
   フォーム共通クラス（ログイン・登録・リセット）
   ============================================================ */
body.jsb-login-page .entry-content,
body.jsb-register-page .entry-content,
body.jsb-reset-page .entry-content,
body.jsb-login-page .page-content,
body.jsb-register-page .page-content,
body.jsb-reset-page .page-content {
    padding-top: 40px !important;
}

.jsb-form-wrap {
    max-width: 400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 20px 60px !important;
}
.jsb-form-title {
    margin-bottom: 8px;
    font-size: 16px;
    color: #374151;
    font-weight: 700;
}
.jsb-form-subtitle { font-size: 13px; color: #6b7280; margin-bottom: 20px; }
.jsb-form-group { margin-bottom: 12px; }
.jsb-form-label { font-size: 13px; font-weight: 600; color: #374151; display: block; margin-bottom: 4px; }
.jsb-form-hint { font-size: 11px; color: #9ca3af; display: block; margin-bottom: 6px; }
.jsb-form-input,
.jsb-form-textarea,
.jsb-form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e4e8f0;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}
.jsb-form-input:focus,
.jsb-form-textarea:focus,
.jsb-form-select:focus { border-color: #1a3a6b; outline: none; }
.jsb-form-textarea { resize: vertical; }
.jsb-form-select { background: #fff; }
.jsb-form-btn {
    width: 100%;
    background: #1a3a6b;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
}
.jsb-form-btn:hover { background: #2a4d8a; }
.jsb-form-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}
.jsb-form-links {
    text-align: center;
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 24px;
}
.jsb-form-links a { font-size: 13px; color: #1a3a6b; text-decoration: none; }
.jsb-form-links a:hover { text-decoration: underline; }
.jsb-form-error {
    color: #dc2626;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 10px;
    background: #fef2f2;
    border-radius: 8px;
}
.jsb-form-success {
    color: #16a34a;
    font-size: 14px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 8px;
}
.jsb-required { color: #dc2626; }
.jsb-back-link { text-align: center; margin-top: 16px; }
.jsb-back-link a { font-size: 13px; color: #1a3a6b; text-decoration: none; }

/* ============================================================
   パスワード表示トグル
   ============================================================ */
.pw-toggle-wrap { position: relative; }
.pw-toggle-wrap input { padding-right: 44px !important; }
.pw-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    display: flex;
    align-items: center;
}
.pw-toggle-btn:hover { color: #1a3a6b; }

/* ============================================================
   ヘッダードロップダウン
   ============================================================ */
.user-link-wrap { position: relative !important; }
.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    min-width: 200px;
    z-index: 99999;
    padding: 6px 0;
}
.user-dropdown.show { display: block !important; }
.user-dropdown a {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 16px !important;
    font-size: 13px;
    color: #374151 !important;
    text-decoration: none !important;
    line-height: 1.5;
}
.user-dropdown a:hover { background: #f5f6f8 !important; color: #1a3a6b !important; }
.user-dropdown .sep { height: 1px; background: #f3f4f6; margin: 4px 0; }

/* ============================================================
   グループ
   ============================================================ */
/* グループ作成ボタン */
.jsb-group-create-wrap { margin-bottom: 16px; }
.jsb-group-create-btn {
    display: inline-block;
    background: #1a3a6b;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
}
.jsb-group-create-btn:hover { background: #2a4d8a; }

/* グループナビゲーションタブ */
.jsb-group-nav { margin-bottom: 16px; border-bottom: 2px solid #e4e8f0; }
.jsb-group-nav ul { display: flex; list-style: none; padding: 0; margin: 0; gap: 4px; }
.jsb-group-nav ul li a {
    display: block;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
}
.jsb-group-nav ul li a:hover { color: #1a3a6b; background: #f5f6f8; }
.jsb-group-nav ul li.current a { color: #1a3a6b; font-weight: 700; border-bottom: 2px solid #1a3a6b; }

/* ============================================================
   bbPress フォーラム
   ============================================================ */
/* 不要な区切り線を非表示 */
#bbpress-forums hr { display: none !important; }

/* トピック投稿（最初の投稿） */
.bbp-replies-list > li:first-child {
    background: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 4px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}

/* 返信 */
.bbp-replies-list > li:not(:first-child) {
    background: #f9fafb !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 16px !important;
    margin-bottom: 8px !important;
}

/* ネスト返信 */
.bbp-replies-list > li:not(:first-child) li {
    background: #fff !important;
    border: 1px solid #f3f4f6 !important;
    border-radius: 10px !important;
    margin-left: 40px !important;
    padding: 14px !important;
    margin-bottom: 6px !important;
}

/* トピックラベル */
.jsb-topic-label {
    font-size: 11px;
    font-weight: 700;
    color: #1a3a6b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

/* 返信セパレーター */
.jsb-replies-header {
    font-size: 12px;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 0.06em;
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.jsb-replies-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e4e8f0;
}

/* 氏名＋「さん」を1つの塊としてインライン表示 */
.bbp-topic-author .jsb-author-name,
.bbp-reply-author .jsb-author-name {
    display: inline-block !important;
}
.bbp-topic-author .jsb-author-name .bbp-author-name,
.bbp-reply-author .jsb-author-name .bbp-author-name,
.bbp-topic-author .jsb-author-name a,
.bbp-reply-author .jsb-author-name a {
    display: inline !important;
}



/* bbPress：掲示板の投稿者カラム調整（画像拡大＋「さん」の折り返し防止） */
#bbpress-forums .bbp-body .bbp-topic-author,
#bbpress-forums .bbp-body .bbp-reply-author,
#bbpress-forums .bbp-replies .bbp-topic-author,
#bbpress-forums .bbp-replies .bbp-reply-author {
    width: 170px !important;
    min-width: 170px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
}

#bbpress-forums .bbp-topic-author img.avatar,
#bbpress-forums .bbp-reply-author img.avatar,
#bbpress-forums .bbp-topic-author .avatar,
#bbpress-forums .bbp-reply-author .avatar {
    width: 72px !important;
    height: 72px !important;
    max-width: none !important;
    border-radius: 999px !important;
    display: block !important;
    margin: 0 auto 10px !important;
}

#bbpress-forums .bbp-topic-author .jsb-author-name,
#bbpress-forums .bbp-reply-author .jsb-author-name {
    display: block !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin-top: 4px !important;
}

#bbpress-forums .bbp-topic-author .jsb-author-name .bbp-author-name,
#bbpress-forums .bbp-reply-author .jsb-author-name .bbp-author-name,
#bbpress-forums .bbp-topic-author .jsb-author-name a,
#bbpress-forums .bbp-reply-author .jsb-author-name a {
    display: inline !important;
    white-space: nowrap !important;
}

/* 役割バッジ */
.bbp-author-role {
    display: inline-block !important;
    font-size: 10px !important;
    padding: 1px 6px !important;
    border-radius: 20px !important;
    margin-left: 4px !important;
    background: #f3f4f6 !important;
    color: #9ca3af !important;
}
.bbp-author-role.jsb-role-creator {
    background: #1a3a6b !important;
    color: #fff !important;
}

/* トピック固定表示（2ページ目以降） */
.jsb-topic-pinned {
    background: #eef3fb;
    border: 1.5px solid #4a90d9;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.jsb-topic-pinned-label {
    font-size: 12px;
    font-weight: 700;
    color: #1a3a6b;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}
.jsb-topic-pinned-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}
.jsb-topic-pinned-content { font-size: 14px; color: #374151; line-height: 1.75; }

/* スレッド一覧：下部のページネーション件数を非表示（上部のみ残す） */
#bbpress-forums .bbp-topics ~ .bbp-pagination,
.bbp-topics ~ .bbp-pagination {
    display: none !important;
}

/* 新規スレッド投稿フォームの見出しを目立たせる */
#bbpress-forums fieldset.bbp-form legend {
    display: block !important;
    float: none !important;
    width: 100% !important;
    box-sizing: border-box;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1a3a6b !important;
    background: #eef3fb;
    border: none !important;
    border-left: 4px solid #4a90d9;
    border-radius: 8px;
    padding: 12px 16px !important;
    margin-bottom: 16px;
}

/* ============================================================
   レスポンシブ対応
   ============================================================ */
@media (max-width: 768px) {
    .site-title {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 160px;
    }
    .custom-logo { height: 34px !important; }
    .jsb-form-wrap { padding: 0 16px 40px !important; }
}


/* ============================================================
   会員ホーム v4.4：中央エリア
   ============================================================ */
.jsb-member-home-dashboard {
    margin: 0 0 18px;
}

.jsb-home-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}

.jsb-home-action {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 12px;
    padding: 14px 12px;
    text-decoration: none !important;
    box-shadow: 0 1px 4px rgba(60,80,180,0.06);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.jsb-home-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(60,80,180,0.11);
    border-color: #cbd7ea;
}
.jsb-home-action-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 15px;
    font-weight: 800;
    background: #eef3fb;
    color: #1a3a6b;
}
.jsb-home-action-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.jsb-home-action-text strong {
    font-size: 13px;
    line-height: 1.35;
    color: #1f2937;
}
.jsb-home-action-text small {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.4;
    color: #6b7280;
}
.jsb-home-action-questions .jsb-home-action-icon { background: #ecfdf5; color: #059669; }
.jsb-home-action-share .jsb-home-action-icon { background: #eff6ff; color: #2563eb; }
.jsb-home-action-jobs .jsb-home-action-icon { background: #f5f3ff; color: #7c3aed; }
.jsb-home-action-events .jsb-home-action-icon { background: #fff7ed; color: #ea580c; }

.jsb-home-section {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(60,80,180,0.06);
    padding: 16px;
    margin: 0 0 14px;
}
.jsb-home-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.jsb-home-section-head h2 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #111827;
    line-height: 1.4;
}
.jsb-home-section-head a,
.jsb-home-section-head span {
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none !important;
    white-space: nowrap;
}
.jsb-home-section-head span { color: #6b7280; font-weight: 500; }

.jsb-thread-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.jsb-thread-item {
    display: flex;
    align-items: stretch;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: background .15s ease, border-color .15s ease;
}
.jsb-thread-item:hover {
    background: #f9fbff;
    border-color: #d8e1ef;
}
.jsb-thread-main {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 8px 12px;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    color: inherit !important;
    text-decoration: none !important;
}
.jsb-thread-badge {
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef3fb;
    color: #1a3a6b;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.jsb-thread-title {
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jsb-thread-meta {
    min-width: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.jsb-thread-bookmark {
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af !important;
    text-decoration: none !important;
    font-size: 24px;
    font-weight: 300;
    border-left: 1px solid #edf0f5;
}
.jsb-thread-bookmark:hover { color: #1a3a6b !important; background: #eef3fb; }
.jsb-forum-questions .jsb-thread-badge { background: #ecfdf5; color: #059669; }
.jsb-forum-events .jsb-thread-badge { background: #fff7ed; color: #ea580c; }
.jsb-forum-jobs .jsb-thread-badge { background: #f5f3ff; color: #7c3aed; }

.jsb-notice-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    padding: 14px;
}
.jsb-notice-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #1f2937;
}
.jsb-notice-count strong {
    font-size: 24px;
    line-height: 1;
    color: #1a3a6b;
}
.jsb-notice-count span {
    font-size: 13px;
    color: #6b7280;
}
.jsb-notice-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.jsb-notice-links a {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e4e8f0;
    color: #1a3a6b !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
}
.jsb-notice-links a:hover { background: #eef3fb; }

.jsb-home-timeline-head {
    padding-top: 14px;
    padding-bottom: 14px;
    margin-bottom: 10px;
}
.jsb-home-timeline-head .jsb-home-section-head { margin-bottom: 0; }

/* タイムライン部分は活動ログっぽさを弱める */
#buddypress .activity-list-tabs {
    display: none !important;
}
#buddypress .activity-content .activity-header {
    font-weight: 600;
    color: #374151;
}
#buddypress .activity-list .activity-item[data-bp-activity-component="bbpress"],
#buddypress .activity-list .activity-item.bbpress {
    display: none !important;
}

@media (max-width: 1024px) {
    .jsb-home-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .jsb-home-actions { grid-template-columns: 1fr; }
    .jsb-thread-main { grid-template-columns: 1fr; }
    .jsb-thread-badge { grid-row: auto; }
    .jsb-thread-title { white-space: normal; }
    .jsb-notice-card { align-items: flex-start; flex-direction: column; }
    .jsb-notice-links { justify-content: flex-start; }
    .jsb-home-section-head { align-items: flex-start; flex-direction: column; gap: 4px; }
}


/* ============================================================
   会員ホーム v4.4：標準アクティビティの整理
   ============================================================ */
/* 標準のアクティビティ種別フィルターは、この会員ホームでは使わない */
body.jsb-member-home-page #buddypress #activity-filter-select,
body.jsb-member-home-page #buddypress select#activity-filter-by,
body.jsb-member-home-page #buddypress .activity-filter,
body.jsb-member-home-page #buddypress .activity-type-tabs,
body.jsb-member-home-page #buddypress .item-list-tabs.activity-type-tabs,
body.jsb-member-home-page #buddypress .bp-navs.activity-type-navs {
    display: none !important;
}

/* 中央下部の標準アクティビティ一覧は、会員が直接投稿したものだけ見せる */
body.jsb-member-home-page #buddypress .activity-list .activity-item:not(.activity_update) {
    display: none !important;
}

/* 直接投稿がない場合の余白を抑える */
body.jsb-member-home-page #buddypress .activity-list {
    margin-top: 0 !important;
}

body.jsb-member-home-page .jsb-home-timeline-head .jsb-home-section-head h2::before {
    content: "💬";
    margin-right: 6px;
}


/* ============================================================
   個人プロフィールページ v4.4
   ============================================================ */
body.jsb-member-profile-page .jsb-member-home-dashboard {
    display: none !important;
}

.jsb-member-profile-summary {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(60,80,180,0.06);
    padding: 18px;
    margin: 14px 0 18px;
}

.jsb-profile-summary-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.jsb-profile-name-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.jsb-profile-name-row h2 {
    margin: 0 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #111827;
    line-height: 1.35;
}

.jsb-profile-handle {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.jsb-profile-badges {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.jsb-profile-badges span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 9px;
}

.jsb-profile-badges small {
    color: #6b7280;
    font-size: 12px;
}

.jsb-profile-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #1a3a6b;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 12px;
    white-space: nowrap;
}
/* 操作ボタンを横並び＋BuddyPress標準ボタン（.generic-button包み）に対応 */
.jsb-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.jsb-profile-actions .generic-button {
    display: inline-flex;
    margin: 0 !important;
}
/* コンタクト一覧・メッセージ等の副ボタンは控えめな配色に */
.jsb-profile-actions a.jsb-profile-action-sub {
    background: #fff;
    color: #1a3a6b !important;
    border: 1px solid #c7d2e6;
}
/* 上部の標準メンバーヘッダーのボタンは、プロフィールカード側と重複するため非表示（カード側に一本化） */
body.jsb-member-profile-page #buddypress #item-buttons,
body.jsb-member-profile-page #buddypress .bp-profile-buttons,
body.jsb-member-profile-page #buddypress .member-header-actions,
body.jsb-member-profile-page #item-header #item-buttons {
    display: none !important;
}

.jsb-profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.jsb-profile-info-item {
    background: #f8fafc;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    padding: 11px 12px;
}

.jsb-profile-info-wide {
    grid-column: 1 / -1;
}

.jsb-profile-info-item span,
.jsb-profile-message span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
}

.jsb-profile-info-item strong {
    display: block;
    color: #1f2937;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

.jsb-profile-message {
    margin-top: 10px;
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    padding: 12px;
}

.jsb-profile-message p {
    margin: 0 !important;
    color: #374151;
    font-size: 13px;
    line-height: 1.8;
}

/* 個人ページでは標準の活動フィルターを主役にしない */
body.jsb-member-profile-page #buddypress #activity-filter-select,
body.jsb-member-profile-page #buddypress select#activity-filter-by,
body.jsb-member-profile-page #buddypress .activity-filter,
body.jsb-member-profile-page #buddypress .activity-type-tabs,
body.jsb-member-profile-page #buddypress .item-list-tabs.activity-type-tabs,
body.jsb-member-profile-page #buddypress .bp-navs.activity-type-navs {
    display: none !important;
}

@media (max-width: 768px) {
    .jsb-profile-summary-head {
        flex-direction: column;
    }
    .jsb-profile-info-grid {
        grid-template-columns: 1fr;
    }
    .jsb-profile-info-wide {
        grid-column: auto;
    }
}


/* ============================================================
   個人プロフィールページ v4.6：活動メニュー整理
   ============================================================ */

/* 個人プロフィールでは「活動の種類を選ぶ」BuddyPress標準メニューを非表示 */
body.jsb-member-profile-page #buddypress .bp-subnavs,
body.jsb-member-profile-page #buddypress .bp-navs.bp-subnavs,
body.jsb-member-profile-page #buddypress #subnav,
body.jsb-member-profile-page #buddypress .item-list-tabs#subnav,
body.jsb-member-profile-page #buddypress .activity-type-tabs,
body.jsb-member-profile-page #buddypress .item-list-tabs.activity-type-tabs,
body.jsb-member-profile-page #buddypress .bp-navs.activity-type-navs,
body.jsb-member-profile-page #buddypress #activity-filter-select,
body.jsb-member-profile-page #buddypress select#activity-filter-by,
body.jsb-member-profile-page #buddypress .activity-filter {
    display: none !important;
}

/* 個人ページでは投稿フォームは出さない。投稿は会員ホーム/タイムラインで行う */
body.jsb-member-profile-page #buddypress #whats-new-form,
body.jsb-member-profile-page #buddypress form#whats-new-form,
body.jsb-member-profile-page #buddypress .activity-update-form,
body.jsb-member-profile-page #buddypress #bp-nouveau-activity-form,
body.jsb-member-profile-page #buddypress .bp-nouveau-activity-form-placeholder {
    display: none !important;
}

/* RSSなどBuddyPress標準の補助リンクを非表示 */
body.jsb-member-profile-page #buddypress a.feed,
body.jsb-member-profile-page #buddypress .feed,
body.jsb-member-profile-page #buddypress .bp-feed,
body.jsb-member-profile-page #buddypress .rss,
body.jsb-member-profile-page #buddypress .activity-rss {
    display: none !important;
}

body.jsb-member-profile-page .jsb-profile-recent-title {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
    padding: 14px 18px 6px;
    margin: 18px 0 0;
}

body.jsb-member-profile-page .jsb-profile-recent-title h2 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #111827;
}

body.jsb-member-profile-page .jsb-profile-recent-title p {
    margin: 4px 0 0 !important;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.6;
}

/* 最近の投稿一覧をプロフィールの下部カードとして見せる */
body.jsb-member-profile-page #buddypress .activity-list {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 1px 4px rgba(60,80,180,0.06);
    padding: 0 18px 14px !important;
    margin-top: 0 !important;
}

body.jsb-member-profile-page #buddypress .activity-list .activity-item {
    box-shadow: none !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* v4.6: カスタムプロフィールカードを主表示にし、BuddyPress標準プロフィール表の重複感を抑える */
body.jsb-member-profile-page #buddypress .profile.public,
body.jsb-member-profile-page #buddypress .bp-profile-wrapper,
body.jsb-member-profile-page #buddypress .profile-fields,
body.jsb-member-profile-page #buddypress table.profile-fields {
    display: none !important;
}


/* ============================================================
   個人プロフィール下部：マイページ便利エリア v4.9
   ============================================================ */
.jsb-profile-dashboard {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(60,80,180,0.06);
    padding: 18px;
    margin: 18px 0 24px;
}

.jsb-profile-dashboard-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.jsb-profile-dashboard-head h2 {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 850 !important;
    color: #111827;
    line-height: 1.4;
}

.jsb-profile-dashboard-head p {
    margin: 5px 0 0 !important;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.6;
}

.jsb-profile-dashboard-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.jsb-profile-dashboard-actions a,
.jsb-profile-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #dbe7ff;
    background: #f3f7ff;
    color: #174ea6 !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 11px;
    white-space: nowrap;
}

.jsb-profile-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.jsb-profile-dashboard-card {
    border: 1px solid #edf0f5;
    border-radius: 12px;
    background: #fbfcff;
    padding: 14px;
    min-height: 168px;
}

.jsb-profile-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #edf0f5;
    padding-bottom: 9px;
    margin-bottom: 8px;
}

.jsb-profile-card-head h3 {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 850 !important;
    color: #111827;
}

.jsb-profile-card-head a {
    color: #1d4ed8 !important;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
}

.jsb-profile-activity-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.jsb-profile-activity-item {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #edf0f5;
}

.jsb-profile-activity-item:last-child {
    border-bottom: 0;
}

.jsb-profile-activity-item a {
    display: block;
    padding: 10px 0;
    text-decoration: none !important;
    color: inherit !important;
}

.jsb-profile-item-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    padding: 5px 7px;
    margin-bottom: 5px;
}

.jsb-profile-activity-item strong {
    display: block;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.55;
}

.jsb-profile-activity-item small {
    display: block;
    margin-top: 3px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.5;
}

.jsb-profile-activity-empty {
    list-style: none !important;
    margin: 0 !important;
    padding: 18px 0 10px !important;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.7;
}

.jsb-profile-notice-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    align-items: center;
    padding: 12px 0 4px;
}

.jsb-profile-notice-box strong {
    grid-row: 1 / span 2;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 20px;
    font-weight: 900;
}

.jsb-profile-notice-box span {
    color: #111827;
    font-size: 13px;
    font-weight: 850;
}

.jsb-profile-notice-box p,
.jsb-profile-contact-text {
    margin: 0 !important;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.7;
}

.jsb-profile-dashboard-card-contact {
    display: flex;
    flex-direction: column;
}

.jsb-profile-dashboard-card-contact .jsb-profile-contact-btn {
    margin-top: auto;
    align-self: flex-start;
}

/* v4.7: BuddyPress標準の空ボックスが残らないように整理 */
body.jsb-member-profile-page #buddypress #item-body {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
}

body.jsb-member-profile-page #buddypress #item-body > .profile,
body.jsb-member-profile-page #buddypress #item-body > .bp-profile-wrapper,
body.jsb-member-profile-page #buddypress #item-body > .profile.public,
body.jsb-member-profile-page #buddypress #item-body > .bp-profile-content,
body.jsb-member-profile-page #buddypress #item-body > .standard-form,
body.jsb-member-profile-page #buddypress #item-body > .bp-widget {
    display: none !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-dashboard,
body.jsb-member-profile-page #buddypress .jsb-member-profile-summary {
    display: block !important;
}


/* v4.8: BuddyXのヘッダー/タブ内フックに入った場合でも右寄せ・回り込みを防ぐ */
body.jsb-member-profile-page #buddypress .jsb-profile-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    clear: both !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-dashboard *,
body.jsb-member-profile-page .jsb-profile-dashboard * {
    box-sizing: border-box;
}

body.jsb-member-profile-page #buddypress #item-header,
body.jsb-member-profile-page #buddypress #item-body {
    text-align: left !important;
}

@media (max-width: 768px) {
    .jsb-profile-dashboard-head {
        flex-direction: column;
    }
    .jsb-profile-dashboard-actions {
        justify-content: flex-start;
    }
    .jsb-profile-dashboard-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   v4.9: プロフィール編集フォーム／マイページ左揃え修正
   ============================================================ */
.jsb-profile-actions a,
.jsb-profile-actions button {
    cursor: pointer;
}

.jsb-profile-save-notice {
    margin: 12px 0 0;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
}

.jsb-profile-edit-form {
    display: none;
    margin-top: 14px;
    border: 1px solid #dbe7ff;
    background: #f8fbff;
    border-radius: 12px;
    padding: 16px;
    text-align: left !important;
}

.jsb-profile-edit-form.is-open {
    display: block;
}

.jsb-profile-edit-form h3 {
    margin: 0 !important;
    color: #111827;
    font-size: 16px !important;
    font-weight: 900 !important;
    line-height: 1.4;
    text-align: left !important;
}

.jsb-profile-edit-lead {
    margin: 5px 0 14px !important;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.6;
    text-align: left !important;
}

.jsb-profile-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.jsb-profile-edit-field {
    display: block;
    margin: 0 !important;
    text-align: left !important;
}

.jsb-profile-edit-wide {
    grid-column: 1 / -1;
}

.jsb-profile-edit-field span {
    display: block;
    margin-bottom: 5px;
    color: #374151;
    font-size: 12px;
    font-weight: 850;
    text-align: left !important;
}

.jsb-profile-edit-field em {
    margin-left: 4px;
    color: #dc2626;
    font-style: normal;
    font-size: 10px;
    font-weight: 900;
}

.jsb-profile-edit-field input,
.jsb-profile-edit-field select,
.jsb-profile-edit-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d8e1ee;
    border-radius: 9px;
    background: #fff;
    color: #111827;
    font-size: 13px;
    line-height: 1.6;
    padding: 9px 10px;
    text-align: left !important;
}

.jsb-profile-edit-field textarea {
    resize: vertical;
    min-height: 120px;
}

.jsb-profile-edit-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 14px;
}

.jsb-profile-save-btn,
.jsb-profile-cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid transparent;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.jsb-profile-save-btn {
    background: #163f75;
    color: #fff;
}

.jsb-profile-cancel-btn {
    background: #fff;
    border-color: #d8e1ee;
    color: #374151;
}

/* BuddyX側の中央寄せ・右寄せ継承をマイページカード内では完全に解除 */
body.jsb-member-profile-page .jsb-profile-dashboard,
body.jsb-member-profile-page .jsb-profile-dashboard-grid,
body.jsb-member-profile-page .jsb-profile-dashboard-card,
body.jsb-member-profile-page .jsb-profile-activity-list,
body.jsb-member-profile-page .jsb-profile-activity-item,
body.jsb-member-profile-page .jsb-profile-activity-item a,
body.jsb-member-profile-page .jsb-profile-activity-item strong,
body.jsb-member-profile-page .jsb-profile-activity-item small,
body.jsb-member-profile-page .jsb-profile-item-badge,
body.jsb-member-profile-page .jsb-profile-activity-empty,
body.jsb-member-profile-page .jsb-profile-notice-box,
body.jsb-member-profile-page .jsb-profile-notice-box p {
    text-align: left !important;
}

body.jsb-member-profile-page .jsb-profile-dashboard {
    display: block !important;
    float: none !important;
    clear: both !important;
}

body.jsb-member-profile-page .jsb-profile-activity-item a {
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

@media (max-width: 768px) {
    .jsb-profile-edit-grid {
        grid-template-columns: 1fr;
    }
    .jsb-profile-edit-wide {
        grid-column: auto;
    }
}


/* ============================================================
   v5.0: マイページカード内の中央寄せ/右寄せを完全解除
   BuddyX/BuddyPress標準の item-list/flex 指定が継承されるため、
   マイページ内だけリスト構造を明示的に左揃えに戻す。
   ============================================================ */
body.jsb-member-profile-page #buddypress .jsb-profile-dashboard,
body.jsb-member-profile-page #buddypress .jsb-profile-dashboard * {
    direction: ltr !important;
    text-align: left !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    clear: both !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-dashboard-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    justify-items: stretch !important;
    align-items: stretch !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-dashboard-card {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    text-align: left !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-card-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: left !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-card-head h3,
body.jsb-member-profile-page #buddypress .jsb-profile-card-head a {
    text-align: left !important;
    margin-left: 0 !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-activity-list {
    display: block !important;
    list-style: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-activity-list > .jsb-profile-activity-item {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
    text-align: left !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-activity-list > .jsb-profile-activity-item > a {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: start !important;
    align-items: start !important;
    justify-content: start !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    text-align: left !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-item-badge,
body.jsb-member-profile-page #buddypress .jsb-profile-activity-item strong,
body.jsb-member-profile-page #buddypress .jsb-profile-activity-item small {
    justify-self: start !important;
    align-self: start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    text-align: left !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-item-badge {
    display: inline-flex !important;
    width: auto !important;
    max-width: 100% !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-activity-item strong,
body.jsb-member-profile-page #buddypress .jsb-profile-activity-item small {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-notice-box {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    justify-items: start !important;
    text-align: left !important;
}

body.jsb-member-profile-page #buddypress .jsb-profile-notice-box strong,
body.jsb-member-profile-page #buddypress .jsb-profile-notice-box span,
body.jsb-member-profile-page #buddypress .jsb-profile-notice-box p {
    justify-self: start !important;
    text-align: left !important;
}

@media (max-width: 768px) {
    body.jsb-member-profile-page #buddypress .jsb-profile-dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ============================================================
   v5.1: プロフィール/マイページの文字サイズを一段階アップ
   小さく見えすぎるため、カード内の可読性を優先して調整。
   ============================================================ */
body.jsb-member-profile-page .jsb-member-profile-summary,
body.jsb-member-profile-page .jsb-profile-dashboard {
    font-size: 15px !important;
}

body.jsb-member-profile-page .jsb-profile-name-row h2 {
    font-size: 24px !important;
    line-height: 1.35 !important;
}

body.jsb-member-profile-page .jsb-profile-handle {
    font-size: 14px !important;
}

body.jsb-member-profile-page .jsb-profile-badges span,
body.jsb-member-profile-page .jsb-profile-info-item span,
body.jsb-member-profile-page .jsb-profile-message span {
    font-size: 12px !important;
}

body.jsb-member-profile-page .jsb-profile-badges small {
    font-size: 13px !important;
}

body.jsb-member-profile-page .jsb-profile-info-item strong {
    font-size: 15px !important;
    line-height: 1.65 !important;
}

body.jsb-member-profile-page .jsb-profile-message p {
    font-size: 15px !important;
    line-height: 1.9 !important;
}

body.jsb-member-profile-page .jsb-profile-actions a,
body.jsb-member-profile-page .jsb-profile-dashboard-actions a,
body.jsb-member-profile-page .jsb-profile-contact-btn {
    font-size: 13px !important;
    padding: 9px 13px !important;
}

body.jsb-member-profile-page .jsb-profile-dashboard-head h2 {
    font-size: 21px !important;
    line-height: 1.4 !important;
}

body.jsb-member-profile-page .jsb-profile-dashboard-head p {
    font-size: 14px !important;
    line-height: 1.7 !important;
}

body.jsb-member-profile-page .jsb-profile-card-head h3 {
    font-size: 17px !important;
    line-height: 1.45 !important;
}

body.jsb-member-profile-page .jsb-profile-card-head a {
    font-size: 13px !important;
}

body.jsb-member-profile-page .jsb-profile-item-badge {
    font-size: 12px !important;
    padding: 6px 9px !important;
    margin-bottom: 7px !important;
}

body.jsb-member-profile-page .jsb-profile-activity-item strong {
    font-size: 15px !important;
    line-height: 1.65 !important;
}

body.jsb-member-profile-page .jsb-profile-activity-item small {
    font-size: 13px !important;
    line-height: 1.65 !important;
}

body.jsb-member-profile-page .jsb-profile-activity-empty {
    font-size: 14px !important;
    line-height: 1.75 !important;
}

body.jsb-member-profile-page .jsb-profile-notice-box strong {
    width: 52px !important;
    height: 52px !important;
    font-size: 22px !important;
}

body.jsb-member-profile-page .jsb-profile-notice-box span {
    font-size: 15px !important;
}

body.jsb-member-profile-page .jsb-profile-notice-box p,
body.jsb-member-profile-page .jsb-profile-contact-text {
    font-size: 14px !important;
    line-height: 1.75 !important;
}

body.jsb-member-profile-page .jsb-profile-edit-form h3 {
    font-size: 20px !important;
}

body.jsb-member-profile-page .jsb-profile-edit-lead,
body.jsb-member-profile-page .jsb-profile-edit-field span,
body.jsb-member-profile-page .jsb-profile-edit-field input,
body.jsb-member-profile-page .jsb-profile-edit-field select,
body.jsb-member-profile-page .jsb-profile-edit-field textarea {
    font-size: 15px !important;
}

@media (max-width: 768px) {
    body.jsb-member-profile-page .jsb-profile-name-row h2 {
        font-size: 22px !important;
    }
    body.jsb-member-profile-page .jsb-profile-dashboard-head h2 {
        font-size: 19px !important;
    }
}


/* ============================================================
   v5.2: サイト全体の文字サイズ調整
   プロフィール周辺だけでなく、ヘッダー・ナビ・BuddyPress・bbPress・フォームまで
   全体的に小さく見える箇所を読みやすいサイズへ統一。
   ============================================================ */
html {
    font-size: 16px !important;
}

body {
    font-size: 16px !important;
    line-height: 1.8 !important;
    letter-spacing: 0.01em;
}

/* 共通本文 */
.site,
.site-content,
.content-area,
.entry-content,
.widget,
#primary,
#main,
#buddypress,
#bbpress-forums {
    font-size: 16px !important;
    line-height: 1.8 !important;
}

p,
.entry-content p,
#buddypress p,
#bbpress-forums p {
    font-size: 16px !important;
    line-height: 1.85 !important;
}

/* ヘッダー・グローバルナビ */
.site-title,
.site-title a {
    font-size: 24px !important;
    line-height: 1.35 !important;
}

.site-description {
    font-size: 13px !important;
    line-height: 1.4 !important;
}

.site-header,
.site-header a,
.main-navigation a,
.primary-menu a,
#masthead a,
.header-navbar a,
.user-link,
.bp-login-widget-user-link a {
    font-size: 15px !important;
    line-height: 1.6 !important;
}

/* BuddyPress 共通 */
#buddypress .bp-navs a,
#buddypress .item-list-tabs a,
#buddypress .subnav a,
#buddypress .activity-nav a,
#buddypress .member-header-actions a,
#buddypress .generic-button a,
#buddypress button,
#buddypress input,
#buddypress select,
#buddypress textarea {
    font-size: 15px !important;
    line-height: 1.65 !important;
}

#buddypress .activity-content .activity-header,
#buddypress .activity-content .activity-inner,
#buddypress .activity-content .activity-inner p,
#buddypress .activity-meta a,
#buddypress .acomment-content,
#buddypress .acomment-content p,
#buddypress .acomment-meta,
#buddypress .acomment-options a {
    font-size: 15px !important;
    line-height: 1.8 !important;
}

#buddypress .activity-content .activity-inner p {
    font-size: 16px !important;
}

/* bbPress 掲示板 */
#bbpress-forums,
#bbpress-forums div,
#bbpress-forums p,
#bbpress-forums li,
#bbpress-forums a,
#bbpress-forums span.bbp-author-name,
#bbpress-forums .bbp-topic-title,
#bbpress-forums .bbp-reply-content,
#bbpress-forums .bbp-reply-content p,
#bbpress-forums .bbp-topic-content,
#bbpress-forums .bbp-topic-content p,
#bbpress-forums .bbp-forum-content,
#bbpress-forums .bbp-forum-info,
#bbpress-forums .bbp-topic-meta,
#bbpress-forums .bbp-reply-post-date,
#bbpress-forums .bbp-pagination,
#bbpress-forums fieldset.bbp-form label,
#bbpress-forums fieldset.bbp-form input,
#bbpress-forums fieldset.bbp-form select,
#bbpress-forums fieldset.bbp-form textarea {
    font-size: 15px !important;
    line-height: 1.8 !important;
}

#bbpress-forums .bbp-topic-title a,
#bbpress-forums .bbp-forum-title,
#bbpress-forums .bbp-reply-title,
#bbpress-forums fieldset.bbp-form legend {
    font-size: 17px !important;
    line-height: 1.65 !important;
}

/* ログイン・登録・検索などのフォーム */
input,
select,
textarea,
button,
.button,
.wp-block-button__link,
.jsb-form-input,
.jsb-form-button,
.jsb-form-label,
.jsb-form-hint,
.jsb-form-links a,
.jsb-back-link a {
    font-size: 15px !important;
    line-height: 1.65 !important;
}

/* JSB独自カード・一覧 */
.jsb-member-home-dashboard,
.jsb-member-profile-summary,
.jsb-profile-dashboard,
.jsb-profile-card,
.jsb-profile-activity-item,
.jsb-home-action-card,
.jsb-home-thread-card,
.jsb-home-notification-card,
.jsb-home-timeline-card {
    font-size: 16px !important;
    line-height: 1.8 !important;
}

.jsb-member-home-dashboard h2,
.jsb-member-profile-summary h2,
.jsb-profile-dashboard h2,
.jsb-profile-card h3,
.jsb-home-section-title,
.jsb-home-card-title {
    line-height: 1.45 !important;
}

/* 小さすぎる補助テキストだけ少し控えめに */
small,
.meta,
.bbp-topic-meta,
.bbp-reply-post-date,
.activity-header,
.jsb-profile-activity-item small,
.jsb-profile-card-head a,
.jsb-profile-dashboard-head p {
    font-size: 14px !important;
    line-height: 1.75 !important;
}

@media (max-width: 768px) {
    html,
    body {
        font-size: 16px !important;
    }

    .site-header a,
    .main-navigation a,
    #buddypress,
    #bbpress-forums,
    .entry-content {
        font-size: 15px !important;
    }

    #bbpress-forums .bbp-topic-title a,
    #bbpress-forums .bbp-forum-title,
    #bbpress-forums .bbp-reply-title {
        font-size: 16px !important;
    }
}


/* ============================================================
   v5.3: PC表示時の中央コンテンツ幅調整
   ヘッダー/グローバルナビは触らず、本文側のコンテナだけを最大1440pxへ拡張。
   1440px以下の画面でも左右40pxの余白を確保し、タブレット/スマホは従来幅を維持。
   ============================================================ */
@media (min-width: 1200px) {
    body.buddypress #content.site-content > .container,
    body.buddypress .site-content > .container,
    body.bbpress #content.site-content > .container,
    body.bbpress .site-content > .container,
    body.single-forum #content.site-content > .container,
    body.single-forum .site-content > .container,
    body.single-topic #content.site-content > .container,
    body.single-topic .site-content > .container,
    body.forum-archive #content.site-content > .container,
    body.forum-archive .site-content > .container,
    body.topic #content.site-content > .container,
    body.topic .site-content > .container,
    body.reply #content.site-content > .container,
    body.reply .site-content > .container {
        width: 100% !important;
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 40px !important;
        padding-right: 40px !important;
        box-sizing: border-box !important;
    }

    /* BuddyXの本文ラッパーが1170pxを持っている場合の保険 */
    body.buddypress #primary,
    body.buddypress #main,
    body.buddypress .content-area,
    body.bbpress #primary,
    body.bbpress #main,
    body.bbpress .content-area {
        max-width: none !important;
    }
}


/* ============================================================
   v5.5: PC本文コンテナ幅を強制的に1440pxへ拡張
   - ヘッダー/グローバルナビは対象外
   - BuddyX/BuddyPress/bbPressの本文内 .container の 1170px 固定を解除
   - 画面左右は40px以上の余白を確保
   ============================================================ */
@media (min-width: 1200px) {
    body #content .container,
    body .site-content .container,
    body .content-wrapper .container,
    body .main-content .container,
    body .entry-content .container,
    body #primary .container,
    body #main .container,
    body.buddypress .container,
    body.bbpress .container,
    body.single-forum .container,
    body.single-topic .container,
    body.forum-archive .container,
    body.topic .container,
    body.reply .container,
    body.members .container,
    body.activity .container,
    body.bp-user .container,
    body.groups .container {
        width: calc(100% - 80px) !important;
        max-width: 1440px !important;
        min-width: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 40px !important;
        padding-right: 40px !important;
        box-sizing: border-box !important;
    }

    /* ヘッダー内のcontainerは元の幅・余白のままに戻す */
    body .site-header .container,
    body header .container,
    body #masthead .container,
    body .buddyx-header .container,
    body .navbar .container,
    body .site-branding .container {
        width: auto !important;
        max-width: 1170px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    /* BuddyXの2/3カラム内部が1170px想定で詰まる場合の保険 */
    body #content .content-area,
    body #content #primary,
    body #content #main,
    body .site-content .content-area,
    body .site-content #primary,
    body .site-content #main {
        max-width: none !important;
        width: 100% !important;
    }
}

@media (min-width: 1200px) and (max-width: 1519px) {
    body #content .container,
    body .site-content .container,
    body.buddypress .container,
    body.bbpress .container,
    body.members .container,
    body.activity .container,
    body.bp-user .container {
        width: calc(100% - 80px) !important;
        max-width: calc(100% - 80px) !important;
    }
}


/* ============================================================
   会員ホーム v6.0：投稿欄の直下にタイムライン、下部にホーム用カード
   ============================================================ */
/* BuddyPress標準の切替・検索・RSSは会員ホームでは見せない */
body.jsb-member-home-page #activity-type-tabs,
body.jsb-member-home-page .activity-type-tabs,
body.jsb-member-home-page .bp-navs.activity-type-navs,
body.jsb-member-home-page .item-list-tabs.activity-type-tabs,
body.jsb-member-home-page .activity-list-tabs,
body.jsb-member-home-page .bp-subnavs,
body.jsb-member-home-page #activity-filter-select,
body.jsb-member-home-page select#activity-filter-by,
body.jsb-member-home-page .activity-filter,
body.jsb-member-home-page .activity-search,
body.jsb-member-home-page #activity-search-form,
body.jsb-member-home-page .feed,
body.jsb-member-home-page a.feed,
body.jsb-member-home-page .bp-feed-icon,
body.jsb-member-home-page .activity-feed {
    display: none !important;
}

/* 左サイドの「アクティビティ / すべての会員 / 自分のグループ / メンション」カードを非表示 */
body.jsb-member-home-page aside .widget:has(a[href*="/activity/"]),
body.jsb-member-home-page .widget:has(a[href*="/activity/groups"]),
body.jsb-member-home-page .widget:has(a[href*="/activity/mentions"]),
body.jsb-member-home-page .bp-card:has(a[href*="/activity/groups"]),
body.jsb-member-home-page .bp-card:has(a[href*="/activity/mentions"]) {
    display: none !important;
}

/* タイムライン本文は直接投稿だけを見せる。掲示板返信・プロフィール更新・グループ参加などは通知/掲示板側へ分離。 */
body.jsb-member-home-page #buddypress .activity-list .activity-item:not(.activity_update) {
    display: none !important;
}

/* 投稿カードを明示的に2カラム（アバター左・本文右）に。
   ※親テーマは float で組んでいるため本文が長いとアバター下に回り込む。flexで右列に固定する。 */
body.jsb-member-home-page #buddypress .activity-list .activity-item.activity_update {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 14px;
}
body.jsb-member-home-page #buddypress .activity-list .activity-item.activity_update > .activity-avatar {
    flex: 0 0 auto !important;
    float: none !important;
    margin: 0 !important;
}
body.jsb-member-home-page #buddypress .activity-list .activity-item.activity_update > .activity-content {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
}
/* コメント/お気に入りボタン・返信欄は本文の下に全幅で配置 */
body.jsb-member-home-page #buddypress .activity-list .activity-item.activity_update > .activity-meta,
body.jsb-member-home-page #buddypress .activity-list .activity-item.activity_update > .activity-comments {
    flex: 1 1 100% !important;
    width: 100% !important;
    margin-top: 12px;
}

/* アクション文（○○さんが◯◯前に投稿しました）を1行に。time-since が独自行になるのを防ぐ */
#buddypress .activity-header a,
#buddypress .activity-header time,
#buddypress .activity-header .time-since,
#buddypress .activity-header .activity-time-since,
#buddypress .acomment-meta a,
#buddypress .acomment-meta time,
#buddypress .acomment-meta .time-since,
#buddypress .acomment-meta .activity-time-since {
    display: inline !important;
}


/* ============================================================
   会員ホーム v6.0：タイムライン投稿欄とタイムライン一覧を隣接
   ============================================================ */
body.jsb-member-home-page .jsb-timeline-main-head {
    margin-top: 14px !important;
    margin-bottom: 16px !important;
}

body.jsb-member-home-page .jsb-timeline-main-head .jsb-home-section-head {
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

body.jsb-member-home-page .jsb-timeline-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
}

body.jsb-member-home-page .jsb-timeline-search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #d9e1ee;
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: none !important;
}

body.jsb-member-home-page .jsb-timeline-search input[type="search"]:focus {
    border-color: #1a3a6b;
    outline: none;
}

body.jsb-member-home-page .jsb-timeline-search button,
body.jsb-member-home-page .jsb-timeline-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid #1a3a6b;
    background: #1a3a6b;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
}

body.jsb-member-home-page .jsb-timeline-search-clear {
    border-color: #d9e1ee;
    background: #fff;
    color: #1a3a6b !important;
}

body.jsb-member-home-page #buddypress .activity-list,
body.jsb-member-home-page #buddypress ul.activity-list,
body.jsb-member-home-page #buddypress #activity-stream {
    margin-top: 0 !important;
}

body.jsb-member-home-page #buddypress .activity-list .activity-item.activity_update,
body.jsb-member-home-page #buddypress #activity-stream .activity-item.activity_update {
    margin-bottom: 18px !important;
}

body.jsb-member-home-page .jsb-member-home-dashboard {
    margin-top: 22px !important;
}

@media (max-width: 768px) {
    body.jsb-member-home-page .jsb-timeline-search {
        flex-direction: column;
        align-items: stretch;
    }
    body.jsb-member-home-page .jsb-timeline-search button,
    body.jsb-member-home-page .jsb-timeline-search-clear {
        width: 100%;
    }
}

/* ============================================================
   右サイドバー v6.3：オンライン表示をコンタクト表示へ整理
   ============================================================ */
body.jsb-member-home-page .jsb-member-home-social-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

body.jsb-member-home-page .jsb-sidebar-card {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(60,80,180,0.06);
    overflow: hidden;
}

body.jsb-member-home-page .jsb-sidebar-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f5;
}

body.jsb-member-home-page .jsb-sidebar-card-head h2 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.35;
    color: #111827;
}

body.jsb-member-home-page .jsb-sidebar-card-head a {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb !important;
    text-decoration: none !important;
}

body.jsb-member-home-page .jsb-sidebar-members {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
}

body.jsb-member-home-page .jsb-sidebar-member {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    color: #1f2937 !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

body.jsb-member-home-page .jsb-sidebar-member img,
body.jsb-member-home-page .jsb-sidebar-member .avatar {
    width: 34px !important;
    height: 34px !important;
    border-radius: 999px !important;
    object-fit: cover;
    flex: 0 0 auto;
}

body.jsb-member-home-page .jsb-sidebar-contact-members .jsb-sidebar-member img,
body.jsb-member-home-page .jsb-sidebar-contact-members .jsb-sidebar-member .avatar {
    width: 38px !important;
    height: 38px !important;
}

body.jsb-member-home-page .jsb-sidebar-member span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.jsb-member-home-page .jsb-sidebar-empty {
    margin: 0;
    padding: 14px 16px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
}

/* 自分用メニュー（右サイドバー）追加カード */body.jsb-member-home-page .jsb-sidebar-myprofile {
    text-align: center;
    padding: 16px 16px 14px;
}
body.jsb-member-home-page .jsb-sidebar-myprofile-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
}
body.jsb-member-home-page .jsb-sidebar-myprofile-head img,
body.jsb-member-home-page .jsb-sidebar-myprofile-head .avatar {
    width: 56px !important;
    height: 56px !important;
    border-radius: 999px !important;
    object-fit: cover;
}
body.jsb-member-home-page .jsb-sidebar-myprofile-name {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}
body.jsb-member-home-page .jsb-sidebar-myprofile-link {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 14px;
    border-radius: 8px;
    background: #1a3a6b;
    color: #fff !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
}
/* 件数つきの行（通知・メッセージ・承認待ち） */
body.jsb-member-home-page .jsb-sidebar-mini .jsb-sidebar-mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    text-decoration: none !important;
    color: #1f2937 !important;
    font-size: 14px;
    font-weight: 700;
}
body.jsb-member-home-page .jsb-sidebar-mini-count {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #eef1f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.jsb-member-home-page .jsb-sidebar-mini-count.is-unread {
    background: #d33; /* 未読は赤バッジ */
    color: #fff;
}
/* リンクリスト（参加グループ・掲示板活動） */
body.jsb-member-home-page .jsb-sidebar-linklist {
    list-style: none;
    margin: 0;
    padding: 8px 16px 14px;
}
body.jsb-member-home-page .jsb-sidebar-linklist li {
    margin: 0;
    border-bottom: 1px solid #f1f3f7;
}
body.jsb-member-home-page .jsb-sidebar-linklist li:last-child {
    border-bottom: none;
}
body.jsb-member-home-page .jsb-sidebar-linklist a {
    display: block;
    padding: 9px 2px;
    color: #1f2937 !important;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 700;
}

/* 左サイドバー：掲示板ナビ */
.jsb-board-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jsb-board-nav li {
    margin: 0;
    border-bottom: 1px solid #eef0f5;
}
.jsb-board-nav li:last-child {
    border-bottom: none;
}
.jsb-board-nav a {
    display: block;
    padding: 9px 4px;
    color: #1f2937 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
}
.jsb-board-nav a:hover {
    color: #1a3a6b !important;
}
.jsb-board-nav .jsb-board-nav-top a {
    color: #2563eb !important;
    font-size: 13px;
}

/* 左サイドバー：新着スレッド */
.jsb-board-latest {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid #eef0f5;
}
.jsb-board-latest-head {
    font-size: 12px;
    font-weight: 800;
    color: #6b7280;
    letter-spacing: 0.04em;
    padding: 0 2px 6px;
}
.jsb-board-latest-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jsb-board-latest-list li {
    margin: 0;
    border-bottom: 1px solid #f3f4f8;
}
.jsb-board-latest-list li:last-child {
    border-bottom: none;
}
.jsb-board-latest-list a {
    display: block;
    padding: 8px 4px;
    color: #1f2937 !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.jsb-board-latest-list a:hover {
    color: #1a3a6b !important;
}

/* 左サイドバー：グループ発見の「すべて見る」リンク */
.jsb-left-groups-all {
    display: inline-block;
    margin-top: 8px;
    padding: 0 4px;
    color: #2563eb !important;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
}
/* B案：標準の「グループ」ディレクトリ・ウィジェットは左に集約したため、元の場所（右）では非表示 */
body.jsb-member-home-page .widget_bp_groups_widget {
    display: none !important;
}

/* ============================================================
   リッチUI：左右サイドバーの装飾（アイコン・カード・バッジ）
   ============================================================ */
/* 共通：カードに陰影と角丸、ホバーで浮く */
body.jsb-member-home-page .jsb-sidebar-card,
.jsb-board-nav,
.jsb-board-section {
    transition: box-shadow .18s ease, transform .18s ease;
}
body.jsb-member-home-page .jsb-sidebar-card {
    border: 1px solid #e7ebf2;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 16px rgba(16,24,40,.05);
    overflow: hidden;
}

/* --- 左：掲示板カテゴリナビ --- */
.jsb-board-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 6px;
    border-radius: 10px;
    transition: background .15s ease, color .15s ease;
}
.jsb-board-nav li a:hover {
    background: #eef3fb;
}
.jsb-board-nav-ic {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background-color: #eef3fb;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 17px 17px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a3a6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8z'/%3E%3C/svg%3E");
}
.jsb-board-nav-ic-all {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a3a6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E");
}
.jsb-board-nav-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}
.jsb-board-nav-chev {
    flex: 0 0 auto;
    color: #c2cad8;
    font-size: 18px;
    line-height: 1;
}
.jsb-board-nav li a:hover .jsb-board-nav-chev { color: #4a90d9; }

/* --- 左：セクション見出し（新着・グループ） --- */
.jsb-board-section {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #eef0f5;
}
.jsb-board-section-head {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #6b7280;
    padding: 0 2px 8px;
}
.jsb-board-section-ic {
    width: 16px; height: 16px;
    background-repeat: no-repeat; background-position: center; background-size: contain;
}
.jsb-ic-new {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f59e0b'%3E%3Cpath d='M13 2 3 14h7l-1 8 10-12h-7l1-8z'/%3E%3C/svg%3E");
}
.jsb-ic-group {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a3a6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

/* --- 左：新着スレッドのリッチカード --- */
.jsb-thread-mini-list { list-style: none; margin: 0; padding: 0; }
.jsb-thread-mini { margin: 0 0 8px; }
.jsb-thread-mini:last-child { margin-bottom: 0; }
.jsb-thread-mini a {
    display: block;
    padding: 10px 11px;
    border: 1px solid #eef0f5;
    border-radius: 10px;
    text-decoration: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.jsb-thread-mini a:hover {
    border-color: #cfe0f5;
    box-shadow: 0 4px 12px rgba(16,24,40,.06);
    transform: translateY(-1px);
}
.jsb-thread-mini-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 800;
    color: #1a3a6b;
    background: #eef3fb;
    border-radius: 999px;
    padding: 2px 9px;
    margin-bottom: 6px;
}
.jsb-thread-mini-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1f2937 !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}
.jsb-thread-mini-meta {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #9aa3b2;
}

/* --- 左：グループ（アバター付き） --- */
.jsb-group-mini-list { list-style: none; margin: 0; padding: 0; }
.jsb-group-mini { margin: 0; }
.jsb-group-mini a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    border-radius: 10px;
    text-decoration: none !important;
    transition: background .15s ease;
}
.jsb-group-mini a:hover { background: #eef3fb; }
.jsb-group-mini-av img,
.jsb-group-mini-av .avatar {
    width: 34px !important; height: 34px !important;
    border-radius: 9px !important; object-fit: cover; display: block;
}
.jsb-group-mini-name {
    font-size: 13px; font-weight: 700; color: #1f2937;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jsb-board-section-all {
    display: inline-block;
    margin-top: 10px;
    color: #2563eb !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
}

/* --- 右：自分用メニューのアイコン --- */
body.jsb-member-home-page .jsb-sidebar-mini-row { gap: 12px; }
.jsb-sidebar-mini-ic {
    flex: 0 0 auto;
    width: 30px; height: 30px;
    border-radius: 9px;
    background-color: #eef3fb;
    background-repeat: no-repeat; background-position: center; background-size: 17px 17px;
}
.jsb-sidebar-mini-label { flex: 1 1 auto; }
.jsb-ic-bell {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a3a6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
}
.jsb-ic-mail {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a3a6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 6-10 7L2 6'/%3E%3C/svg%3E");
}
.jsb-ic-userplus {
    background-color: #fdecec;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cline x1='19' y1='8' x2='19' y2='14'/%3E%3Cline x1='16' y1='11' x2='22' y2='11'/%3E%3C/svg%3E");
}

/* --- 右：プロフィールカードのヘッダーをリッチに --- */
body.jsb-member-home-page .jsb-sidebar-myprofile {
    padding: 0 16px 16px;
    position: relative;
}
body.jsb-member-home-page .jsb-sidebar-myprofile::before {
    content: "";
    display: block;
    height: 56px;
    margin: 0 -16px 0;
    background: linear-gradient(120deg, #1a3a6b 0%, #2f5aa0 60%, #4a90d9 100%);
}
body.jsb-member-home-page .jsb-sidebar-myprofile-head {
    margin-top: -32px;
}
body.jsb-member-home-page .jsb-sidebar-myprofile-head img,
body.jsb-member-home-page .jsb-sidebar-myprofile-head .avatar {
    border: 3px solid #fff !important;
    box-shadow: 0 3px 8px rgba(16,24,40,.18);
}

/* ============================================================
   レイアウト微調整：3カラムの上端揃え／検索余白／コメントはみ出し／左の追従解除
   ============================================================ */
/* ① 左が下がる原因（.widget-area .widget の margin-top:1rem）を打ち消し、上端を揃える */
body.jsb-member-home-page .widget-area .widget,
body.jsb-member-home-page #secondary .widget,
body.jsb-member-home-page #tertiary .widget {
    margin-top: 0 !important;
}

/* ② アクティビティのコメント本文が右にはみ出すのを防ぐ（右マージン50pxを確実に効かせる） */
body #buddypress .activity-comments,
body #buddypress .activity-comments ul,
body #buddypress .activity-comments li {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
body.buddypress .buddypress-wrap .activity-comments .acomment-content,
body #buddypress .activity-comments .acomment-content {
    margin-right: 0 !important;
    max-width: none !important;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
}
body #buddypress .acomment-content p,
body #buddypress .activity-inner,
body #buddypress .activity-inner p {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ③ 左サイドバーがスクロールで貼り付く（追従）のを解除して通常スクロールに */
body.jsb-member-home-page #secondary,
body.jsb-member-home-page .widget-area,
body.jsb-member-home-page .sidebar,
body.jsb-member-home-page .theiaStickySidebar,
body.jsb-member-home-page .is-sticky,
body.jsb-member-home-page .sticky-sidebar {
    position: static !important;
    top: auto !important;
    transform: none !important;
}

/* タイムライン検索ボックスと最初の投稿の間の隙間を詰める */
body.jsb-member-home-page #buddypress .dir-search,
body.jsb-member-home-page #buddypress form.bp-dir-search-form,
body.jsb-member-home-page #buddypress .activity-search,
body.jsb-member-home-page #buddypress #activity-stream-search,
body.jsb-member-home-page #buddypress .bp-activity-search {
    margin-bottom: 6px !important;
}
body.jsb-member-home-page #buddypress #activity-stream,
body.jsb-member-home-page #buddypress ul.activity-list {
    margin-top: 6px !important;
    padding-top: 0 !important;
}


body.jsb-member-home-page .jsb-sidebar-group-block {
    padding: 14px 16px;
}

body.jsb-member-home-page .jsb-sidebar-group-block + .jsb-sidebar-group-block {
    border-top: 1px solid #edf0f5;
}

body.jsb-member-home-page .jsb-sidebar-group-name {
    display: inline-block;
    margin-bottom: 10px;
    color: #1a3a6b !important;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
    text-decoration: none !important;
}

body.jsb-member-home-page .jsb-sidebar-group-block .jsb-sidebar-members {
    padding: 0;
}

body.jsb-member-home-page [data-jsb-hidden-online="1"] {
    display: none !important;
}

@media (max-width: 1024px) {
    body.jsb-member-home-page .jsb-member-home-social-sidebar {
        margin-top: 16px;
    }
}


/* ============================================================
   v6.3: スクロール時の右サイドバー被り修正 + コンタクト表示
   ============================================================ */
@media (min-width: 1025px) {
    body.jsb-member-home-page .jsb-social-sidebar-target {
        position: sticky !important;
        top: var(--jsb-sidebar-top, 96px) !important;
        align-self: flex-start !important;
        z-index: 5 !important;
    }

    body.jsb-member-home-page .jsb-social-sidebar-target .jsb-member-home-social-sidebar {
        margin-top: 0 !important;
    }
}

body.jsb-member-home-page .jsb-sidebar-contacts .jsb-sidebar-card-head h2::before {
    content: none !important;
}


/* ============================================================
   グループ画面 v6.4：文言整理
   ============================================================ */
body.groups .jsb-group-nav a,
body.group .jsb-group-nav a {
    font-weight: 600;
}

body.groups #buddypress .activity-type,
body.groups #buddypress .activity-component,
body.groups #buddypress .activity-label,
body.groups #buddypress .bp-activity-type,
body.group #buddypress .activity-type,
body.group #buddypress .activity-component,
body.group #buddypress .activity-label,
body.group #buddypress .bp-activity-type {
    display: none !important;
}

body.groups #buddypress .activity-content .activity-header,
body.group #buddypress .activity-content .activity-header {
    font-size: 15px !important;
    color: #5f6b7a !important;
}


/* ============================================================
   グループ画面 v6.5：投稿カード上部の種別ヘッダーを非表示
   ============================================================ */
body.groups #buddypress .activity-card-head,
body.group #buddypress .activity-card-head,
body.groups #buddypress .activity-card-head .card-head-content-type,
body.group #buddypress .activity-card-head .card-head-content-type {
    display: none !important;
}


/* ============================================================
   グループ画面 v6.9：標準フィルターを削除し、投稿検索＋参加ログ表示に整理
   ============================================================ */
body.groups #activity-filter-select,
body.group #activity-filter-select,
body.groups select#activity-filter-by,
body.group select#activity-filter-by,
body.groups .activity-filter,
body.group .activity-filter,
body.groups .activity-search,
body.group .activity-search,
body.groups #activity-search-form,
body.group #activity-search-form,
body.groups .feed,
body.group .feed,
body.groups a.feed,
body.group a.feed,
body.groups .bp-feed-icon,
body.group .bp-feed-icon,
body.groups .activity-feed,
body.group .activity-feed,
body.jsb-group-posts-page #activity-filter-select,
body.jsb-group-posts-page select#activity-filter-by,
body.jsb-group-posts-page .activity-filter,
body.jsb-group-posts-page .activity-search,
body.jsb-group-posts-page #activity-search-form,
body.jsb-group-posts-page .feed,
body.jsb-group-posts-page a.feed,
body.jsb-group-posts-page .bp-feed-icon,
body.jsb-group-posts-page .activity-feed {
    display: none !important;
}

body.groups .jsb-group-post-search-card,
body.group .jsb-group-post-search-card,
body.jsb-group-posts-page .jsb-group-post-search-card {
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(60,80,180,0.06);
    padding: 18px 20px;
    margin: 14px 0 22px;
}

body.groups .jsb-group-post-search-head,
body.group .jsb-group-post-search-head,
body.jsb-group-posts-page .jsb-group-post-search-head {
    margin-bottom: 12px;
}

body.groups .jsb-group-post-search-head h2,
body.group .jsb-group-post-search-head h2,
body.jsb-group-posts-page .jsb-group-post-search-head h2 {
    margin: 0 0 4px !important;
    color: #111827;
    font-size: 18px !important;
    font-weight: 800 !important;
    line-height: 1.4;
}

body.groups .jsb-group-post-search-head p,
body.group .jsb-group-post-search-head p,
body.jsb-group-posts-page .jsb-group-post-search-head p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

body.groups .jsb-group-post-search-form,
body.group .jsb-group-post-search-form,
body.jsb-group-posts-page .jsb-group-post-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
}

body.groups .jsb-group-post-search-form input[type="search"],
body.group .jsb-group-post-search-form input[type="search"],
body.jsb-group-posts-page .jsb-group-post-search-form input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #d9e1ee;
    border-radius: 10px;
    background: #fff;
    color: #1f2937;
    font-size: 15px;
    box-shadow: none !important;
}

body.groups .jsb-group-post-search-form input[type="search"]:focus,
body.group .jsb-group-post-search-form input[type="search"]:focus,
body.jsb-group-posts-page .jsb-group-post-search-form input[type="search"]:focus {
    border-color: #1a3a6b;
    outline: none;
}

body.groups .jsb-group-post-search-form button,
body.group .jsb-group-post-search-form button,
body.groups .jsb-group-post-search-clear,
body.group .jsb-group-post-search-clear,
body.jsb-group-posts-page .jsb-group-post-search-form button,
body.jsb-group-posts-page .jsb-group-post-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid #1a3a6b;
    background: #1a3a6b;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
}

body.groups .jsb-group-post-search-clear,
body.group .jsb-group-post-search-clear,
body.jsb-group-posts-page .jsb-group-post-search-clear {
    border-color: #d9e1ee;
    background: #fff;
    color: #1a3a6b !important;
}

@media (max-width: 768px) {
    body.groups .jsb-group-post-search-form,
    body.group .jsb-group-post-search-form,
    body.jsb-group-posts-page .jsb-group-post-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    body.groups .jsb-group-post-search-form button,
    body.group .jsb-group-post-search-form button,
    body.groups .jsb-group-post-search-clear,
    body.group .jsb-group-post-search-clear,
    body.jsb-group-posts-page .jsb-group-post-search-form button,
    body.jsb-group-posts-page .jsb-group-post-search-clear {
        width: 100%;
    }
}


/* v6.9 グループ投稿検索の空表示 */
.jsb-group-post-search-empty {
  border: 1px solid #dbe4f0;
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 16px 0;
  color: #334155;
  font-size: 15px;
}


/* ============================================================
   v7.14: 掲示板本文の左端を統一
   - 親返信・ネスト返信で本文位置がズレる問題を修正
   - ネスト返信の過剰な左インデントを解除
   - 投稿者欄と本文欄をグリッドで固定
============================================================ */
@media (min-width: 1024px) {
    /* 返信カード全体の余計な段差をなくす */
    #bbpress-forums .bbp-replies-list > li,
    #bbpress-forums .bbp-replies-list > li:not(:first-child),
    #bbpress-forums .bbp-replies-list > li:not(:first-child) li {
        margin-left: 0 !important;
        padding-left: 0 !important;
        box-sizing: border-box !important;
    }

    /* 投稿本体を「投稿者欄 / 本文欄」の2カラムに固定 */
    #bbpress-forums .bbp-body div[id^="post-"].topic,
    #bbpress-forums .bbp-body div[id^="post-"].reply,
    #bbpress-forums .bbp-body div[id^="post-"].bbp-reply,
    #bbpress-forums .bbp-body div[id^="post-"].bbp-topic,
    #bbpress-forums ul.bbp-replies div.bbp-reply,
    #bbpress-forums ul.bbp-lead-topic div.bbp-topic {
        display: grid !important;
        grid-template-columns: 190px minmax(0, 1fr) !important;
        column-gap: 28px !important;
        align-items: start !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 左の投稿者欄 */
    #bbpress-forums .bbp-topic-author,
    #bbpress-forums .bbp-reply-author {
        width: 190px !important;
        min-width: 190px !important;
        max-width: 190px !important;
        padding: 22px 8px 18px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        text-align: center !important;
        grid-column: 1 !important;
    }

    /* 右の本文欄：すべて同じ左端にする */
    #bbpress-forums .bbp-topic-content,
    #bbpress-forums .bbp-reply-content {
        grid-column: 2 !important;
        width: auto !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        padding: 22px 24px 22px 0 !important;
        box-sizing: border-box !important;
    }

    /* 本文の最初の行が余計に下がらないようにする */
    #bbpress-forums .bbp-topic-content > *:first-child,
    #bbpress-forums .bbp-reply-content > *:first-child,
    #bbpress-forums .bbp-topic-content p:first-child,
    #bbpress-forums .bbp-reply-content p:first-child {
        margin-top: 0 !important;
    }

    /* ネスト返信も同じカラム位置で表示 */
    #bbpress-forums .bbp-replies-list li li .bbp-reply-author,
    #bbpress-forums .bbp-replies-list li li .bbp-reply-content {
        margin-left: 0 !important;
    }

    /* アイコンサイズと名前の折り返し防止 */
    #bbpress-forums .bbp-topic-author img.avatar,
    #bbpress-forums .bbp-reply-author img.avatar,
    #bbpress-forums .bbp-topic-author .avatar,
    #bbpress-forums .bbp-reply-author .avatar {
        width: 72px !important;
        height: 72px !important;
        max-width: none !important;
        border-radius: 999px !important;
        display: block !important;
        margin: 0 auto 10px !important;
    }

    #bbpress-forums .bbp-topic-author .jsb-author-name,
    #bbpress-forums .bbp-reply-author .jsb-author-name {
        display: block !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    #bbpress-forums .bbp-topic-author .jsb-author-name a,
    #bbpress-forums .bbp-reply-author .jsb-author-name a,
    #bbpress-forums .bbp-topic-author .jsb-author-name .bbp-author-name,
    #bbpress-forums .bbp-reply-author .jsb-author-name .bbp-author-name {
        display: inline !important;
        white-space: nowrap !important;
    }

    #bbpress-forums .bbp-author-role {
        display: inline-block !important;
        margin-top: 6px !important;
        margin-left: 0 !important;
    }
}

/* スマホでは無理に2カラムにせず、自然な縦並びに戻す */
@media (max-width: 1023px) {
    #bbpress-forums .bbp-topic-author,
    #bbpress-forums .bbp-reply-author,
    #bbpress-forums .bbp-topic-content,
    #bbpress-forums .bbp-reply-content {
        width: auto !important;
        max-width: none !important;
        margin-left: 0 !important;
    }
}


/* ============================================================
   v7.15: bbPress本文の回り込みを完全に解除
   - v7.14のgrid方式を打ち消し、bbPress標準に近い固定margin方式へ戻す
   - 本文が投稿者欄の下へ回り込む問題を修正
============================================================ */
@media (min-width: 1024px) {
    /* v7.14のgrid/flex指定を解除 */
    #bbpress-forums .bbp-body div[id^="post-"],
    #bbpress-forums .bbp-body div[id^="post-"].topic,
    #bbpress-forums .bbp-body div[id^="post-"].reply,
    #bbpress-forums .bbp-body div[id^="post-"].bbp-reply,
    #bbpress-forums .bbp-body div[id^="post-"].bbp-topic,
    #bbpress-forums ul.bbp-replies div.bbp-reply,
    #bbpress-forums ul.bbp-lead-topic div.bbp-topic {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #bbpress-forums .bbp-body div[id^="post-"]::after {
        content: "";
        display: block;
        clear: both;
    }

    /* 左の投稿者欄を固定幅にする */
    #bbpress-forums div.bbp-topic-author,
    #bbpress-forums div.bbp-reply-author {
        float: left !important;
        clear: left !important;
        width: 190px !important;
        min-width: 190px !important;
        max-width: 190px !important;
        margin: 0 !important;
        padding: 22px 12px 18px !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    /* 本文は必ず左プロフィール欄の右から始める */
    #bbpress-forums div.bbp-topic-content,
    #bbpress-forums div.bbp-reply-content {
        float: none !important;
        clear: none !important;
        display: block !important;
        width: auto !important;
        margin-left: 220px !important;
        padding: 22px 24px 22px 0 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    /* 本文内の要素が左プロフィール欄の下に回り込まないようにする */
    #bbpress-forums div.bbp-topic-content p,
    #bbpress-forums div.bbp-reply-content p,
    #bbpress-forums div.bbp-topic-content ul,
    #bbpress-forums div.bbp-reply-content ul,
    #bbpress-forums div.bbp-topic-content ol,
    #bbpress-forums div.bbp-reply-content ol,
    #bbpress-forums div.bbp-topic-content div,
    #bbpress-forums div.bbp-reply-content div {
        clear: none !important;
        margin-left: 0 !important;
    }

    #bbpress-forums div.bbp-topic-content > *:first-child,
    #bbpress-forums div.bbp-reply-content > *:first-child {
        margin-top: 0 !important;
    }

    /* リストだけは本文内で自然な字下げを残す */
    #bbpress-forums div.bbp-topic-content ul,
    #bbpress-forums div.bbp-reply-content ul,
    #bbpress-forums div.bbp-topic-content ol,
    #bbpress-forums div.bbp-reply-content ol {
        padding-left: 1.4em !important;
    }

    /* プロフィール画像を大きめに */
    #bbpress-forums div.bbp-topic-author img.avatar,
    #bbpress-forums div.bbp-reply-author img.avatar,
    #bbpress-forums div.bbp-topic-author .avatar,
    #bbpress-forums div.bbp-reply-author .avatar {
        width: 72px !important;
        height: 72px !important;
        max-width: none !important;
        border-radius: 999px !important;
        display: block !important;
        margin: 0 auto 10px !important;
    }

    /* 氏名＋さんを折り返さない */
    #bbpress-forums div.bbp-topic-author .jsb-author-name,
    #bbpress-forums div.bbp-reply-author .jsb-author-name {
        display: block !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    #bbpress-forums div.bbp-topic-author .jsb-author-name a,
    #bbpress-forums div.bbp-reply-author .jsb-author-name a,
    #bbpress-forums div.bbp-topic-author .jsb-author-name .bbp-author-name,
    #bbpress-forums div.bbp-reply-author .jsb-author-name .bbp-author-name {
        display: inline !important;
        white-space: nowrap !important;
    }

    #bbpress-forums div.bbp-topic-author .bbp-author-role,
    #bbpress-forums div.bbp-reply-author .bbp-author-role {
        display: inline-block !important;
        margin-top: 6px !important;
        margin-left: 0 !important;
    }
}

/* スマホ・タブレットでは通常の縦並び */
@media (max-width: 1023px) {
    #bbpress-forums div.bbp-topic-author,
    #bbpress-forums div.bbp-reply-author,
    #bbpress-forums div.bbp-topic-content,
    #bbpress-forums div.bbp-reply-content {
        float: none !important;
        clear: none !important;
        width: auto !important;
        max-width: none !important;
        margin-left: 0 !important;
    }
}


/* ============================================================
   v7.16: 子返信でも本文が左に回り込まない最終補正
   - .bbp-reply-content / .bbp-topic-content を BFC 化
   - ネスト返信でも本文開始位置を固定
============================================================ */
@media (min-width: 1024px) {
    #bbpress-forums div.bbp-topic,
    #bbpress-forums div.bbp-reply,
    #bbpress-forums div[id^="post-"] {
        display: flow-root !important;
    }

    #bbpress-forums div.bbp-topic-content,
    #bbpress-forums div.bbp-reply-content {
        display: flow-root !important;
        overflow: hidden !important;
        margin-left: 220px !important;
        min-height: 110px !important;
    }

    #bbpress-forums div.bbp-topic-content::after,
    #bbpress-forums div.bbp-reply-content::after {
        content: "";
        display: block;
        clear: both;
    }

    #bbpress-forums ul.bbp-replies li.bbp-body div.bbp-reply-content,
    #bbpress-forums ul.bbp-replies li.bbp-body div.bbp-topic-content,
    #bbpress-forums .bbp-replies .bbp-reply-content,
    #bbpress-forums .bbp-replies .bbp-topic-content {
        display: flow-root !important;
        overflow: hidden !important;
        margin-left: 220px !important;
    }

    #bbpress-forums div.bbp-topic-content p,
    #bbpress-forums div.bbp-reply-content p,
    #bbpress-forums div.bbp-topic-content ul,
    #bbpress-forums div.bbp-reply-content ul,
    #bbpress-forums div.bbp-topic-content ol,
    #bbpress-forums div.bbp-reply-content ol,
    #bbpress-forums div.bbp-topic-content blockquote,
    #bbpress-forums div.bbp-reply-content blockquote {
        margin-left: 0 !important;
        clear: none !important;
    }
}


/* ============================================================
   v7.18: タイムラインカードを安全な縦型表示に修正
   - v7.17の3カラム/グリッド化は使わない
   - 上：タイムライン見出し
   - 中：プロフィール写真 + 投稿者情報
   - 下：本文
============================================================ */
#buddypress .activity-list .activity-item,
#buddypress ul.activity-list li.activity-item,
#buddypress #activity-stream .activity-item {
    display: block !important;
    padding: 22px 24px !important;
    overflow: hidden !important;
}

/* 見出し */
#buddypress .activity-list .activity-item .activity-card-head,
#buddypress #activity-stream .activity-item .activity-card-head {
    display: block !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    padding: 0 0 12px !important;
    border-bottom: 1px solid #e5e7eb !important;
    clear: both !important;
}

#buddypress .activity-list .activity-item .activity-card-head .card-head-content-type,
#buddypress #activity-stream .activity-item .activity-card-head .card-head-content-type {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    font-weight: 800 !important;
    color: #111827 !important;
}

/* プロフィール写真 */
#buddypress .activity-list .activity-item .activity-avatar,
#buddypress #activity-stream .activity-item .activity-avatar {
    float: left !important;
    width: 56px !important;
    margin: 2px 14px 0 0 !important;
    padding: 0 !important;
    clear: left !important;
}

#buddypress .activity-list .activity-item .activity-avatar img,
#buddypress #activity-stream .activity-item .activity-avatar img {
    width: 48px !important;
    height: 48px !important;
    max-width: none !important;
    border-radius: 10px !important;
    display: block !important;
}

/* 投稿者情報・本文 */
#buddypress .activity-list .activity-item .activity-content,
#buddypress #activity-stream .activity-item .activity-content {
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 0 0 70px !important;
    padding: 0 !important;
    float: none !important;
    overflow: visible !important;
}

/* 投稿者情報を必ず本文より上に */
#buddypress .activity-list .activity-item .activity-content .activity-header,
#buddypress #activity-stream .activity-item .activity-content .activity-header {
    order: 1 !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
    color: #4b5563 !important;
    white-space: normal !important;
}

#buddypress .activity-list .activity-item .activity-content .activity-header a,
#buddypress #activity-stream .activity-item .activity-content .activity-header a {
    font-weight: 700 !important;
    color: #1d63b7 !important;
}

/* 本文 */
#buddypress .activity-list .activity-item .activity-content .activity-inner,
#buddypress #activity-stream .activity-item .activity-content .activity-inner {
    order: 2 !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: none !important;
}

#buddypress .activity-list .activity-item .activity-content .activity-inner p,
#buddypress #activity-stream .activity-item .activity-content .activity-inner p {
    margin: 0 0 1em !important;
    font-size: 16px !important;
    line-height: 1.9 !important;
    color: #1f2937 !important;
}

/* ボタン */
#buddypress .activity-list .activity-item .activity-meta,
#buddypress #activity-stream .activity-item .activity-meta {
    order: 3 !important;
    margin: 16px 0 0 !important;
    padding: 12px 0 0 !important;
    border-top: 1px solid #eef2f7 !important;
    clear: none !important;
}

/* コメント欄は本文ラインに合わせる */
#buddypress .activity-list .activity-item .activity-comments,
#buddypress #activity-stream .activity-item .activity-comments {
    clear: both !important;
    margin-left: 70px !important;
}

/* 念のため、壊れた縦書き状態を防ぐ */
#buddypress .activity-list .activity-item .activity-header,
#buddypress #activity-stream .activity-item .activity-header {
    writing-mode: horizontal-tb !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* スマホ */
@media (max-width: 768px) {
    #buddypress .activity-list .activity-item,
    #buddypress ul.activity-list li.activity-item,
    #buddypress #activity-stream .activity-item {
        padding: 18px 16px !important;
    }

    #buddypress .activity-list .activity-item .activity-avatar,
    #buddypress #activity-stream .activity-item .activity-avatar {
        width: 44px !important;
        margin-right: 10px !important;
    }

    #buddypress .activity-list .activity-item .activity-avatar img,
    #buddypress #activity-stream .activity-item .activity-avatar img {
        width: 40px !important;
        height: 40px !important;
    }

    #buddypress .activity-list .activity-item .activity-content,
    #buddypress #activity-stream .activity-item .activity-content {
        margin-left: 14px !important;
    }

    #buddypress .activity-list .activity-item .activity-comments,
    #buddypress #activity-stream .activity-item .activity-comments {
        margin-left: 14px !important;
    }
}


/* ============================================================
   v7.19: 全体タイムラインは直接投稿だけ表示
   コンタクト成立・グループ参加・掲示板ログ等のシステム活動は非表示
============================================================ */
#buddypress .activity-list .activity-item.friends,
#buddypress .activity-list .activity-item.friendship_created,
#buddypress .activity-list .activity-item.friendship_accepted,
#buddypress .activity-list .activity-item.friendship_requested,
#buddypress .activity-list .activity-item.joined_group,
#buddypress .activity-list .activity-item.created_group,
#buddypress .activity-list .activity-item.group_details_updated,
#buddypress .activity-list .activity-item.bbp_topic_create,
#buddypress .activity-list .activity-item.bbp_reply_create,
#buddypress .activity-list .activity-item.updated_profile,
#buddypress #activity-stream .activity-item.friends,
#buddypress #activity-stream .activity-item.friendship_created,
#buddypress #activity-stream .activity-item.friendship_accepted,
#buddypress #activity-stream .activity-item.friendship_requested,
#buddypress #activity-stream .activity-item.joined_group,
#buddypress #activity-stream .activity-item.created_group,
#buddypress #activity-stream .activity-item.group_details_updated,
#buddypress #activity-stream .activity-item.bbp_topic_create,
#buddypress #activity-stream .activity-item.bbp_reply_create,
#buddypress #activity-stream .activity-item.updated_profile {
    display: none !important;
}

/* ============================================================
   v7.30: ライト／ダークモード切替を非表示
   サイトの配色をライトモードへ統一するため、ヘッダーとメニュー内の
   BuddyXカラーモード切替UIを表示しない。
============================================================ */
.bx-color-mode-toggle {
    display: none !important;
}

/* ============================================================
   v7.31: ヘッダー検索を撤去・スマホヘッダーを1段に整理
   各コンテンツに専用検索があるため、重複するサイト全体検索は非表示。
============================================================ */
.site-header .main-navigation .search {
    display: none !important;
}

@media (max-width: 768px) {
    .site-header {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .site-header .site-branding {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .site-header .site-logo-wrapper {
        flex: 0 0 auto !important;
    }

    .site-header .site-branding-inner {
        min-width: 0 !important;
    }

    .site-header .site-title,
    .site-header .site-title a {
        max-width: none !important;
        margin: 0 !important;
        overflow: visible !important;
        white-space: nowrap !important;
        text-overflow: clip !important;
        font-size: 16px !important;
        line-height: 1.3 !important;
    }

    .site-header .site-description {
        margin: 2px 0 0 !important;
        white-space: nowrap !important;
        font-size: 10px !important;
        line-height: 1.3 !important;
    }

    .site-header .main-navigation {
        flex: 0 0 auto !important;
        width: auto !important;
        margin-left: auto !important;
    }
}

/* ============================================================
   v7.44: タイムラインは通常投稿とその返信だけを表示
   投稿本文・返信本文のみ14pxに統一
============================================================ */
#buddypress #activity-stream .activity-item:not(.activity_update) {
    display: none !important;
}

body #buddypress #activity-stream .activity-item.activity_update .activity-content .activity-inner p,
body #buddypress #activity-stream .activity-item.activity_update .activity-content .activity-header,
body #buddypress #activity-stream .activity-item.activity_update .activity-content .activity-header a,
body #buddypress #activity-stream .activity-item.activity_update .activity-comments .acomment-meta,
body #buddypress #activity-stream .activity-item.activity_update .activity-comments .acomment-meta a,
body #buddypress #activity-stream .activity-item.activity_update .activity-comments .acomment-content,
body #buddypress #activity-stream .activity-item.activity_update .activity-comments .acomment-content p {
    font-size: 14px !important;
}

body #buddypress #activity-stream .activity-item.activity_update .activity-header,
body #buddypress #activity-stream .activity-item.activity_update .activity-header p,
body #buddypress #activity-stream .activity-item.activity_update .activity-header a,
body #buddypress #activity-stream .activity-item.activity_update .activity-header time,
body #buddypress #activity-stream .activity-item.activity_update .activity-header .time-since,
body #buddypress #activity-stream .activity-item.activity_update .acomment-meta,
body #buddypress #activity-stream .activity-item.activity_update .acomment-meta a,
body #buddypress #activity-stream .activity-item.activity_update .acomment-meta time,
body #buddypress #activity-stream .activity-item.activity_update .acomment-meta .time-since {
    font-size: 14px !important;
}
