/* =========================================================
   男性ページ：文字を読みやすくする上書き（色だけ。形・背景・配置は変えない）
   - 薄い灰色の補足文字  → #4f4840（白地でコントラスト比 9.0）
   - 白・ベージュ地の金色文字 → #6e5120（白地で 7.3）
   - 黒地の金色文字はもともと読めるのでそのまま
   ページ内の <style> より後に効かせるため !important を使う
   ========================================================= */
:root {
  --mr-sub: #4f4840;
  --mr-gold: #6e5120;
}

/* ---------- 補足文字（薄い灰色 → 濃い茶灰色） ---------- */
.step-desc, .stock-value span, .stat-title, .section-header p, .menu-card-body p,
.chat-name small, .chat-date, .empty-card, .empty-card p, .profile-summary-text, .info-label,
.contacts-summary-label, .contacts-summary-value small, .no-photo-placeholder, .page-dots,
.msg-turn-divider, .msg-counter, .msg-waiting, .msg-del-btn,
.notifications-summary-label, .notification-message,
.step-body p,
.message-guide-text,
.error-card p, .secret-summary-desc, .secret-summary-label, .secret-summary-note, .result-pill,
.no-image-box,
.settings-summary-label, .check-description,
.reply-message-meta, .sent-message-meta,
.likes-summary-label, .search-field label, .history-no-photo, .history-meta-line,
.history-date, .history-chip, .pg-ellipsis,
.sv-section-title, .sv-female-meta, .sv-post-date, .sv-view-count,
.request-summary-label, .request-author-line, .request-description,
#city-loading,
.ref-link-label, .ref-stat-l, .ref-tab:not(.active), .ref-card-date, .ref-note, .ref-empty,
/* 女性一覧・詳細（ベージュ地の部分だけ） */
.lfp-field label, .lfp-age-sep, .lfp-reason-chip span, .lfp-result-bar, .lfp-legend-text,
.lfp-no-photo span, .lfp-no-photo-label, .lfp-member-no, .lfp-tag, .lfp-empty,
.vfp-member-no, .vfp-qtag, .vfp-label {
  color: var(--mr-sub) !important;
}

/* 足あと（青灰色の配色なので、同じ系統の濃い色に） */
.pv-subtitle, .pv-stat .s-lbl, .pv-period-btn:not(.active), .pv-meta, .pv-count, .pv-empty {
  color: #475569 !important;
}

/* 下のメニュー（白地のもの） */
.bottom-nav-item { color: var(--mr-sub) !important; }
.bottom-nav-item.active, .bottom-nav-item:hover { color: var(--mr-gold) !important; }
/* 女性詳細ページの下メニューは黒地なので明るい色に */
.vfp-page .bottom-nav-item { color: #d9d1c5 !important; }
.vfp-page .bottom-nav-item.active, .vfp-page .bottom-nav-item:active { color: #b0925f !important; }

/* ---------- 白・ベージュ地の金色文字 → 濃い金茶 ---------- */
.step-title, .how-to-note, .stock-label, .chat-link-text, .profile-avatar, .profile-tag,
.photo-label, .secondary-action-btn,
.contact-body h3 a:hover, .contact-chip, .page-nav,
.msg-tpl-btn,
.notification-date,
.manual-toc h2, .manual-toc a, .manual-badge,
.interest-medium, .message-guide-title, .sent-message-label,
.secret-summary-badge,
.success-message-modern,
.likes-summary-value, body:has(.likes-summary-label) .section-header h2, .history-name-block h3,
.history-status-badge.unread, .history-message-label, .pg:not(.active):not(.current),
.sv-title,
.request-author-line a, .request-date-chip,
/* 女性一覧・詳細（ベージュ・白地の部分） */
.lfp-result-bar strong, .lfp-initial-badge, .lfp-public-badge, .lfp-pag a:hover,
.lfp-search-toggle-icon, .lfp-legend summary::after, .lfp-no-photo,
.vfp-card-title, .vfp-value-highlight {
  color: var(--mr-gold) !important;
}
.how-to-arrow, .sv-meta-dot { color: #a08a62 !important; }

/* ---------- 黒地の上の薄い文字を少し明るく ---------- */
.lfp-hero-desc, .lfp-hero-stat-sub { color: rgba(245,241,234,.9) !important; }
.pag-ellipsis { color: rgba(245,241,234,.8) !important; }

/* ---------- ページ内に直接書かれた薄い色（style="..."） ---------- */
[style*="color:#8a8074"], [style*="color: #8a8074"] { color: var(--mr-sub) !important; }
a[style*="color: #b0925f"]:not([style*="background"]) { color: var(--mr-gold) !important; }

/* ---------- 入力欄の中の薄い案内文字 ---------- */
input::placeholder, textarea::placeholder { color: #857a6c !important; opacity: 1; }

/* ---------- 金色の帯の上の白文字：薄い影で輪郭をはっきりさせる（色・形はそのまま） ---------- */
.hero-content, .hero-content *, .manual-hero, .manual-hero *, .manual-section-head, .manual-section-head *,
.primary-action-btn, .save-btn, .msg-send-btn, .step-num, .mini-badge {
  text-shadow: 0 1px 2px rgba(40, 28, 10, .45);
}
.hero-content p, .manual-hero p { color: #fff !important; }

/* プロフィール充実度の「◯/15 項目入力済み」 */
[style*="color:#6b7280"] { color: #4b5563 !important; }

/* 女性詳細：名前カード（ベージュ地）の中の「休止中のため、オファーできません」「送信済み」
   元は黒地用のアイボリー文字で見えないため、濃い茶色に（下の黒地の同じ表示はそのまま） */
.vfp-head-card .vfp-offer-paused, .vfp-head-card .vfp-offer-sent {
  color: #3d2f1c !important;
  background: #ebe3d4 !important;
  border-color: #c9b48a !important;
  font-weight: 700 !important;
}

/* 女性詳細：「この会員は現在 休止中 です」の帯が写真・名前カードと引っ付かないよう、上下に間隔をあける */
.vfp-paused-banner {
  max-width: 652px;
  margin: 14px auto 14px !important;
  margin-left: max(14px, calc(50% - 326px)) !important;
  margin-right: max(14px, calc(50% - 326px)) !important;
  border: 1px solid var(--frn-gold-line, #c9b48a) !important;
  border-radius: var(--frn-radius, 4px);
}

/* 女性詳細：名前カードが写真（1枚のとき）に引っ付かないよう、独立したカードにして上に間隔をあける */
.vfp-head-card {
  margin-top: 14px !important;
  border-top: 1px solid var(--frn-gold-line, rgba(176,146,95,.4)) !important;
  border-radius: var(--frn-radius, 3px) !important;
}
/* 写真が2枚以上（下にサムネイル列があり、もともと余白がある）ときは間隔を少しだけに */
.vfp-gallery:has(.vfp-thumbs) + .vfp-body .vfp-head-card { margin-top: 4px !important; }

/* 女性詳細：下のメニューの文字が iPhone の画面下の横線（ホームバー）に重ならないよう持ち上げる */
.vfp-page .bottom-nav {
  height: auto !important;
  min-height: 60px;
  padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
}
.vfp-page .bottom-label { font-weight: 700 !important; white-space: nowrap; letter-spacing: -.02em; }
body.vfp-page { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }

/* 女性詳細：黒地の上の「お相手には通知されません…」と「この女性を非表示にする」は明るい色に */
.vfp-page .vfp-interest-note { color: #d9d1c5 !important; }
.vfp-page .vfp-hide-btn { color: #d9d1c5 !important; border-color: rgba(217,209,197,.45) !important; }
.vfp-page .vfp-hide-btn:hover { color: #f87171 !important; border-color: #f87171 !important; }

/* 女性詳細：女性からのメッセージ・担当者の印象・備考
   改行を <br> にしたうえで、さらに改行をそのまま表示する指定（pre-wrap）があり、改行が二重になって
   段落の間が大きく空いていたため、<br> の改行だけを使う（データはそのまま） */
.vfp-page .vfp-msg-text { white-space: normal !important; }


/* ---------- 男性ページ上部バー（male_page_bar.php の malePageBar()） ----------
   「← 戻る｜タイトル」の帯と、その下の説明文1行。金色の大きな見出し箱の代わり */
.mp-topbar {
  position: sticky; top: 0; z-index: 900;
  background: #fff;
  border-bottom: 2px solid #b0925f;
  box-shadow: 0 2px 10px rgba(176, 146, 95, .12);
}
.mp-topbar-in {
  max-width: 768px; margin: 0 auto;
  height: 52px; padding: 0 8px;
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px; align-items: center;
}
.mp-back, .mp-brand {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 44px; padding: 0 8px; border-radius: 999px;
  color: #7a5f33 !important; font-size: 14px; font-weight: 700;
  text-decoration: none; white-space: nowrap; text-shadow: none;
}
.mp-back:hover { background: #f5ecdc; }
.mp-brand { font-size: 15px; font-weight: 800; color: #9c7f4e !important; }
.mp-bar-title {
  margin: 0; text-align: center;
  font-size: 16px; font-weight: 900; line-height: 1.3; color: #2c2823;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mp-desc {
  max-width: 768px; margin: 0 auto; box-sizing: border-box;
  padding: 12px 16px 0;
  font-size: 13px; line-height: 1.6; color: #5c5246 !important; text-shadow: none;
}
@media (max-width: 480px) {
  .mp-topbar-in { grid-template-columns: 88px minmax(0, 1fr) 88px; height: 50px; }
  .mp-back { padding: 0 4px; font-size: 13px; }
}

/* ========== あいさつカード（女性ページの .fu-head と同じ見た目を金色で） ========== */
.mp-head {
  padding: 16px 16px 4px;
  max-width: 768px;
  margin: 0 auto;
}
.mp-head-in {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e6dcc8;
  border-left: 5px solid #b0925f;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(176, 146, 95, .10);
}
.mp-head-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f5ecdc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
}
.mp-head-text { flex: 1; min-width: 0; }
.mp-head-kicker {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  color: #9c7f4e;
  letter-spacing: .02em;
}
.mp-head-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  color: #2c2823;
  word-break: break-word;
}
.mp-head-desc {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #5c5246;
}
.mp-head-desc a { color: #9c7f4e; font-weight: 700; }
@media (max-width: 480px) {
  .mp-head { padding: 12px 12px 2px; }
  .mp-head-in { padding: 14px; gap: 12px; }
  .mp-head-icon { width: 42px; height: 42px; font-size: 21px; border-radius: 12px; }
  .mp-head-title { font-size: 18px; }
  .mp-head-desc { font-size: 12px; }
}

/* ========== 件数表示（横一列）：各ページの上部の件数・状態の表示を小さな1枚の枠にまとめる ========== */
body .request-summary-section, body .likes-summary-section, body .contacts-summary-section,
body .notifications-summary-section, body .settings-summary-section {
  margin: 14px 0 18px;
}
body .request-summary-card, body .likes-summary-card, body .contacts-summary-card,
body .notifications-summary-card, body .settings-summary-card,
body .cp-summary-grid, body .pv-stats {
  display: flex; flex-wrap: nowrap; gap: 0;
  background: #fff; border: 1px solid #e6dcc8; border-radius: 14px;
  padding: 0; box-shadow: none; margin-bottom: 18px;
}
body .request-summary-item, body .likes-summary-item, body .contacts-summary-item,
body .notifications-summary-item, body .settings-summary-item,
body .cp-summary-item, body .pv-stat {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: 0; border-radius: 0; box-shadow: none;
  padding: 10px 6px; text-align: center;
}
body .request-summary-item + .request-summary-item, body .likes-summary-item + .likes-summary-item,
body .contacts-summary-item + .contacts-summary-item, body .notifications-summary-item + .notifications-summary-item,
body .settings-summary-item + .settings-summary-item, body .cp-summary-item + .cp-summary-item,
body .pv-stat + .pv-stat {
  border-left: 1px solid #efe6d6;
}
body .request-summary-label, body .likes-summary-label, body .contacts-summary-label,
body .notifications-summary-label, body .settings-summary-label,
body .cp-summary-label, body .pv-stat .s-lbl {
  display: block; margin: 0; font-size: 11px; font-weight: 700; line-height: 1.5; color: #6b5f50;
}
body .request-summary-value, body .likes-summary-value, body .contacts-summary-value,
body .notifications-summary-value, body .settings-summary-value,
body .cp-summary-value, body .pv-stat .s-num {
  display: block; margin: 0; font-size: 16px; font-weight: 900; line-height: 1.35; color: #2c2823;
  overflow-wrap: anywhere;
}
body .contacts-summary-value small { font-size: 12px; }
body .likes-summary-value.latest-value { font-size: 12px; font-weight: 700; }
/* 閲覧履歴は「数字→ラベル」の順なので、ラベルを上に */
body .pv-stat { flex-direction: column-reverse; }
/* パスワード変更：見出し・補足は上部の説明と重なるので省略 */
body .cp-summary-card { background: none; border: 0; box-shadow: none; padding: 0; margin: 14px 0 18px; }
body .cp-summary-head, body .cp-summary-note { display: none; }
body .cp-summary-grid { margin-bottom: 0; }
