/* ===============================
   scholarship.css（太字・高可読版 + レスポンシブ対応 最終版）
   PC：そのまま表 / スマホ：奨学金=カード, 基準表=横スクロール,
        世帯人数(Thresholds)=カード（HTML無改変・thead非表示）
   =============================== */

/* ── Fallback tokens ── */
:root{
  --brand:#2D8CFF;
  --brand-ink:#1a6edc;
  --ink:#222;
  --ink-2:#3a3a3a;
  --paper:#fff;
  --card:#fff;
  --shadow:0 4px 12px rgba(0,0,0,.05);
  --shadow-lg:0 8px 24px rgba(0,0,0,.12);
  --accent-green:#2e8c2a;
  /* thresholds (mobile) */
  --card-bg:#fff;
  --card-bd:#e6e9ef;
  --card-shadow:0 4px 14px rgba(0,0,0,.06);
  --ink-strong:#2e5b8c;
  --ink-sub:#5b6b7b;
  --ink-head:#124a94;
  --head-bg:#f2f7ff;
  --divider:#eef1f6;
}

/* ── ベース/可読性強化 ── */
.container, main.container{
  max-width:1100px;
  margin:0 auto;
  padding:0 1rem 3rem;
  font-family:"Hiragino Kaku Gothic ProN","Yu Gothic","Meiryo",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  letter-spacing:.01em;
  color:var(--ink);
}

/* HERO 見出し */
.hero .hero-text h1{
  font-size:clamp(1.6rem, 2.2vw, 2rem);
  letter-spacing:.04em;
  font-weight:800;
}

/* ── 奨学金テーブル（PC表示）── */
.scholarship-table{
  width:100%;
  border-collapse:collapse;
  background:var(--card);
  border-radius:14px;
  box-shadow:0 6px 24px rgba(45,140,255,.06);
  overflow:hidden;
  font-size:1rem;
  line-height:1.75;
}
.scholarship-table th,
.scholarship-table td{
  padding:.8rem 1rem;
  border-bottom:1px solid #e7e7e7;
  vertical-align:top;
  text-align:left;
}
.scholarship-table th{
  width:12rem;
  color:var(--accent-green);
  font-weight:800;
  letter-spacing:.06em;
  white-space:nowrap;
}
.scholarship-table td{
  color:var(--ink);
  font-weight:600;
}
.scholarship-table tr:last-child th,
.scholarship-table tr:last-child td{ border-bottom:none; }
.scholarship-table a{
  color:var(--brand);
  text-decoration:underline;
  word-break:break-all;
  font-weight:700;
}

/* ── 内部の補助表（基準表：PC表示）── */
.criteria-table{
  width:100%;
  border-collapse:collapse;
  margin:.5rem 0 0;
  font-size:1rem;
  line-height:1.65;
  background:#fff;
}
.criteria-table th,
.criteria-table td{
  padding:.65rem .9rem;
  border:1px solid #e7e7e7;
  text-align:center;
}
.criteria-table thead th{ background:#f6f9ff; font-weight:800; }
.criteria-table tbody th{ font-weight:700; }
.criteria-table td{ font-weight:600; }

/* セクション見出し */
.section-title,h2.section-title{
  font-size:clamp(1.55rem,1.9vw,1.9rem);
  font-weight:650;
  letter-spacing:.04em;
  margin:2rem auto 1rem;
}

/* ── 世帯人数テーブル（PC表示：通常の表）── */
.thresholds-table{
  width:100%;
  border-collapse:collapse;
  table-layout:auto;
  font-size:1rem;
  line-height:1.7;
  background:#fff;
}
.thresholds-table th,
.thresholds-table td{
  border:1px solid #e6e9ef;
  padding:.75rem 1rem;
  text-align:center;
  vertical-align:middle;
}
.thresholds-table thead th{
  background:#f0f6ff;
  color:#124a94;
  font-weight:800;
}

/* ── 「その他」：自動番号を消す（文章内で1. 2. 3. を書く前提）── */
/* どちらのクラスでも効くよう二重で用意 */
.other-card ol, .other-card ul,
.sch-other  ol, .sch-other  ul{
  list-style:none;
  padding-left:0;
  margin-left:0;
}
.other-card li, .sch-other li{
  padding-left:0;
  text-indent:0;
  margin:.25em 0;
}

/* ========= スマホ最適化 (〜767px) ========= */
@media (max-width: 767px){

  /* 横スクロール防止 + フローティングナビ非表示 */
  html,body{overflow-x:hidden}
  .floating-nav{display:none !important}
  main.container{ padding:1.25rem 1rem 2rem; }

  /* ── 奨学金テーブル：カード化 ── */
  .scholarship-table{
    display:block; background:#fff; border-radius:14px;
    box-shadow:0 6px 18px rgba(0,0,0,.06); padding:8px;
  }
  .scholarship-table table{ display:block; width:100%; }
  .scholarship-table tr{
    display:block; margin:10px 6px; padding:10px;
    border:1px solid #eceff3; border-radius:12px;
    box-shadow:0 2px 10px rgba(0,0,0,.04); background:#fff;
  }
  .scholarship-table th{
    display:block; border:none; padding:.25rem 0 .35rem;
    color:#2e5b8c; font-weight:800; line-height:1.4;
  }
  .scholarship-table td{
    display:block; border:none; padding:0; font-weight:600;
  }
  .scholarship-table ul{ margin:.35rem 0 0 1.1em; }

  /* ── 基準表：横スクロール（thead固定） ── */
  .criteria-table{
    display:block; overflow-x:auto; -webkit-overflow-scrolling:touch;
    border-radius:12px; box-shadow:0 6px 18px rgba(0,0,0,.06); background:#fff;
  }
  .criteria-table table{ min-width:560px; }
  .criteria-table thead th{ position:sticky; top:0; background:#f6f9ff; }
  .criteria-table th,.criteria-table td{
    white-space:nowrap; padding:.7rem .9rem; border-bottom:1px solid #e7e7e7; font-size:.95rem;
  }

  /* ── 世帯人数テーブル：カードUI（HTML無改変・theadを隠し、td::beforeでラベル表示） ── */
  .thresholds-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    font-size: .95rem;
  }
  .thresholds-table thead { display: none; }

  .thresholds-table tbody,
  .thresholds-table tr,
  .thresholds-table td {
    display: block;
    width: 100%;
  }
  .thresholds-table tbody tr {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    padding: 12px 16px;
    margin: 12px 0;
  }
  .thresholds-table tbody td {
    border: 0;
    padding: 10px 0;
    text-align: left;
    line-height: 1.7;
    word-break: break-word;
    overflow-wrap: anywhere;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  /* 1列目＝世帯人数を“バッジ”表示 */
  .thresholds-table tbody td:nth-child(1) {
    display: inline-block;
    padding: .45rem .75rem;
    margin-bottom: .25rem;
    background: var(--head-bg);
    color: var(--ink-head);
    font-weight: 800;
    border-radius: 999px;
  }

  /* 2列目＝給与所得者（支払金額） */
  .thresholds-table tbody td:nth-child(2) {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border-top: 1px solid var(--divider);
  }
  .thresholds-table tbody td:nth-child(2)::before {
    content: "給与所得者（支払金額）";
    color: var(--ink-sub);
    font-weight: 700;
    margin-right: .5rem;
  }

  /* 3列目＝給与所得者以外（所得金額） */
  .thresholds-table tbody td:nth-child(3) {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border-top: 1px solid var(--divider);
  }
  .thresholds-table tbody td:nth-child(3)::before {
    content: "給与所得者以外（所得金額）";
    color: var(--ink-sub);
    font-weight: 700;
    margin-right: .5rem;
  }

  /* （任意）4列目以降を隠す保険 */
  /* .thresholds-table tbody td:nth-child(n+4){ display:none; } */
}

/* ========= スマホ小画面 (〜480px) ========= */
@media (max-width: 480px){
  .scholarship-table,.criteria-table{ font-size:.92rem; }
  .hero .hero-text h1{ font-size:1.25rem; }
}
/* ========= その他：箇条書きのマーカーを消す ========= */
.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list-plain li {
  margin: .25em 0;
}

/* ========= スマホ最適化：criteria-table をカード化 (～767px) ========= */
@media (max-width: 767px) {
  /* thead 非表示（カード側でラベル出す） */
  .criteria-table thead {
    display: none;
  }

  /* ブロック化して1行=1カードに */
  .criteria-table,
  .criteria-table tbody,
  .criteria-table tr,
  .criteria-table td {
    display: block;
    width: 100%;
  }

  .criteria-table tbody tr {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    padding: 12px 16px;
    margin: 12px 0;
  }

  .criteria-table tbody td {
    border: 0;
    padding: 10px 0;
    text-align: left;
    line-height: 1.7;
    word-break: break-word;
    overflow-wrap: anywhere;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  /* 1列目＝世帯人数バッジ */
  .criteria-table tbody td:nth-child(1) {
    display: inline-block;
    padding: .45rem .75rem;
    margin-bottom: .25rem;
    background: #f2f7ff;
    color: #124a94;
    font-weight: 800;
    border-radius: 999px;
  }

  /* 2列目＝給与所得者（支払金額） */
  .criteria-table tbody td:nth-child(2) {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border-top: 1px solid #eef1f6;
  }
  .criteria-table tbody td:nth-child(2)::before {
    content: "給与所得者（支払金額）";
    color: #5b6b7b;
    font-weight: 700;
    margin-right: .5rem;
  }

  /* 3列目＝給与所得者以外（所得金額） */
  .criteria-table tbody td:nth-child(3) {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    border-top: 1px solid #eef1f6;
  }
  .criteria-table tbody td:nth-child(3)::before {
    content: "給与所得者以外（所得金額）";
    color: #5b6b7b;
    font-weight: 700;
    margin-right: .5rem;
  }

  /* （任意）4列目以降が存在する場合は隠す */
  /* .criteria-table tbody td:nth-child(n+4) { display: none; } */
}
