/* ===== 共通設定 ===== */
.donation-section {
  max-width: 850px;
  margin: 4rem auto;
  padding: 1rem;
  color: var(--color-text);
}

.donation-section h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

/* ── ツートーンバンド ───────────────── */
.twotone-band {
  display: flex;
  width: 100vw;
  margin: 0 calc(-50vw + 50%);
  box-sizing: border-box;
}
.twotone-left {
  flex: 1 1 50%;
  background-color: #579cb3;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-sizing: border-box;
}
.twotone-left img { max-width: 90%; height: auto; }

.twotone-right {
  flex: 1 1 50%;
  background-color: #d5e6ec;
  padding: 2rem;
  color: #4a3b2a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
.twotone-right h3 span,
.twotone-right p {
  white-space: nowrap;
  word-break: keep-all;
  overflow-x: unset;
}

/* ページ横スクロール防止 */
html, body { margin: 0; padding: 0; overflow-x: hidden; }

/* ――― 1 行固定化 ――― */
.donation-text h3 span,
.donation-text p {
  white-space: nowrap;
  word-break: keep-all;
  overflow-x: auto;
}

.donation-title-left   { display: block; text-align: left;   }
.donation-title-center { display: block; text-align: center; }

/* ── 口座テーブル ───────────────── */
.document-table       { margin-top: 2rem; overflow-x: hidden; }
.document-table table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.document-table th,
.document-table td    { border-bottom: 1px solid #ccc; padding: 0.5em; text-align: center; word-break: break-word; }
.document-table a     { color: var(--color-link); text-decoration: underline; }

/* ── 枠線付きカード ───────────────── */
.stats-frame {
  border: 2px solid var(--color-border);
  background-color: var(--stats-bg);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.06);
}
.stats-frame .list-body          { list-style: disc; list-style-position: inside; margin: 0; padding: 0 1.6em; }
.stats-frame .list-body > li     { margin-bottom: 2rem; line-height: 1.6; font-size: 1rem; }
.stats-frame small               { font-size: 0.7em; }

/* カード用色変数 */
:root {
  --color-bg-soft: #f9f9f9;
  --color-border:  #ccc;
  --stats-bg:      #ffffff;
}
[data-theme="dark"] {
  --color-bg-soft: #1a1a1a;
  --color-border:  #777;
  --stats-bg:      #242424;
}

/* ── ★ 応援のしかた（理事長カード） ───────────────── */
.donation-chairman-block {
  background-color: var(--color-salmon);   /* 変数で淡色背景 */
  padding: 2rem 1rem;
  border-radius: 8px;
  box-sizing: border-box;
  margin: 2.5rem 0;
}

/* ① ラッパー自身をマスクにする */
.donation-chairman {
  width: 200px;          /* 写真サイズ：お好みで調整 */
  aspect-ratio: 1 / 1;   /* 正方形を確保 → 真円マスクが効く */
  border-radius: 50%;    /* 円形 */
  overflow: hidden;      /* はみ出た部分をカット */
  flex-shrink: 0;        /* レスポンシブで潰れないよう固定 */
}

/* ② 写真と本文を包むラッパー ★上寄せに変更 */
.donation-chairman-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;   /* ★ center → flex-start で上端にそろえる */
  flex-wrap: wrap;
}

.donation-chairman img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* 余白なく中央トリミング */
  display: block;        /* 余計な下マージンを排除 */
  align-self: flex-start;/* 画像だけ個別に上寄せ（保険） */
}

.donation-chairman-text {
  flex: 1 1 300px;
  line-height: 1.8;
  font-size: 1rem;
  color: var(--color-text);
}

.donation-chairman-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 200px;
}

.chairman-sign {
  margin-top: 1rem;
  text-align: center;
  width: 100%;
  max-width: 200px;
  overflow-x: hidden;  /* ← 追加：はみ出し対策 */
}

.chairman-sign img {
  width: 100%;
  height: auto;
  display: block;
}

.chairman-sign figcaption {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: var(--color-text);
}

.message-heading {
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.4;
  text-align: center;
  margin: 0 auto 1rem;   /* ★上マージンを 0 に修正 */
  color: var(--color-text);
  max-width: 850px;
}

/* ダークテーマでもカード内は黒文字固定 */
[data-theme="dark"] .donation-chairman-block,
[data-theme="dark"] .donation-chairman-block * {
  color: #000;
}

/* ── ブレークポイント ───────────────── */
@media screen and (max-width: 768px) {
  .twotone-band { flex-direction: column; }
  .twotone-left,
  .twotone-right { flex: 1 1 100%; }
  .stats-frame   { text-align: left; }

  .message-text p { text-indent: 1em; }

  .donation-chairman-block {
    width: 100%;
    flex: 0 0 100%;
    background-color: var(--color-salmon) !important; /* 競合回避 */
  }
}

@media screen and (max-width: 480px) {
  .twotone-right p       { font-size: 0.92rem; }
  .twotone-right h3 span { font-size: 1.05rem; }

  .support-image-grid { flex-direction: column; align-items: center; }
  .support-item       { width: 100%; max-width: 280px; margin-bottom: 2rem; }

  .donation-block { flex-direction: column; text-align: center; }
  .donation-text  { text-align: left; margin-bottom: 0; }
  .document-table { margin-top: 1.2rem; }

  /* レスポンシブテーブル簡易化 */
  .responsive-table thead { display: none; }
  .responsive-table tr    { display: block; margin-bottom: 0.8em; border-bottom: 1px solid #ccc; padding-bottom: 0.5em; }
  .responsive-table td    { display: flex; justify-content: space-between; text-align: left; padding: 0.3em 0; font-size: 0.9rem; border: none; border-bottom: 1px dashed #ccc; }
  .responsive-table td::before { content: attr(data-label); font-weight: bold; flex: 1; min-width: 7em; }
  .responsive-table td a       { flex: 1; text-align: right; color: var(--color-link); }

  /* 理事長カード：縦並び中央寄せ */
  .donation-chairman-wrapper {
    flex-direction: row;       /* ← column → row に変更 */
    align-items: flex-start;   /* 上寄せ */
    text-align: left;          /* テキストも左揃え */
    gap: 1rem;                 /* 適宜調整 */
  }  .donation-chairman-text    { text-align: left; }
  .chairman-sign { max-width: 150px; }
}
