/* ================================================== */
/*  art70.css                                          */
/*  130期（ガールズ）デビュー後の初期成績予測 固有スタイル */
/*  共通部分は tohyama_202512.css を参照              */
/* ================================================== */

/* 注釈（下線マーカー：ガールズ＝ピンク系） */
.udl-pink {
  text-decoration: solid underline 2px #e58aad;
  text-underline-offset: 2px;
  font-weight: 500;
}
.udl-green {
  text-decoration: solid underline 2px #66cdaa;
  text-underline-offset: 2px;
  font-weight: 500;
}
.note-supsm {
  font-size: 70%;
  vertical-align: 20%;
  padding: 0 1px;
  color: #666;
}

/* 脚注風コメントブロック */
.cmt-block {
  display: block;
  font-size: 88%;
  line-height: 1.6;
  padding: 10px 14px;
  margin: 10px 20px 18px 25px;
  border-top: 1px dashed #a0a0a0;
  border-bottom: 1px dashed #a0a0a0;
  background-color: #fafafa;
  color: #555;
}
.cmt-block p {
  margin: 0;
  text-indent: -1.7em;
  padding-left: 1.7em;
}
.cmt-block p + p {
  margin-top: 4px;
}

/* 数式ボックス（総合点：黄） */
.formula-total {
  background: #fffceb;
  border-left: 4px solid #f5c518;
  border-radius: 4px;
  padding: 18px 22px 14px;
  margin: 24px 0 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  max-width: 100%;
}
/* 数式ボックス（予測式：ガールズ＝ピンク） */
.formula-pred {
  background: #fff5f8;
  border-left: 4px solid #d85088;
  border-radius: 4px;
  padding: 18px 22px 14px;
  margin: 24px 0 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  max-width: 100%;
}
/* 予測式2つを横並びにするラッパー（PCは2カラム、狭い画面は自動で縦積み） */
.formula-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 24px 0 28px;
}
.formula-row > .formula-pred {
  flex: 1 1 400px;
  min-width: 0;
  margin: 0;
}
.formula-total > .formula-title,
.formula-pred > .formula-title {
  font-weight: bold;
  font-size: 16px;
  color: #003366;
  margin-bottom: 6px;
  display: block;
}
.formula-body {
  max-width: 100%;
  margin: 4px 0 8px;
  overflow-x: visible;
}
/* PC 2カラム時は数式が各ボックスに収まるようフォントを自動調整 */
@media (min-width: 769px) {
  .formula-row .formula-pred .formula-body {
    font-size: clamp(11px, 1.15vw, 14.5px);
  }
  .formula-row .formula-pred .formula-body mjx-container[display="true"] {
    margin: 0.3em 0;
  }
}

/* 変数定義リスト */
.variables {
  font-size: 14px;
  margin: 6px 0 0 10px;
}
.variables dl {
  margin: 4px 0;
}
.variables dt {
  float: left;
  font-weight: bold;
  color: #003366;
}
.variables dt::after {
  content: "：";
}
.variables dd {
  margin: 0 0 4px 80px;
}
.variables .note {
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 12px;
}

/* 小さな追記 */
p.add-note {
  font-size: 86%;
  color: #555;
  margin: 6px 0 20px 10px;
  padding-left: 1em;
  text-indent: -1em;
  line-height: 1.5;
}

/* ========== テーブル：128期まとめ ========== */
table.summary-table {
  border-collapse: collapse;
  font-size: 14px;
  margin: 20px auto 10px;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
table.summary-table caption {
  font-weight: bold;
  text-align: left;
  margin-bottom: 10px;
  color: #333;
}
table.summary-table th,
table.summary-table td {
  border: 1px solid #ddd;
  text-align: center;
  padding: 8px 10px;
  white-space: nowrap;
}
table.summary-table thead th {
  background-color: #003366;
  color: white;
  font-weight: 500;
}
table.summary-table tbody th {
  background-color: #eef2f6;
  color: #333;
  font-weight: 500;
  text-align: left;
}
/* 対象年度（128期）を薄ピンクでハイライト */
table.summary-table tbody td.pick {
  background-color: #ffeaf0;
  font-weight: 600;
}
/* 上位選手欄は左寄せ・複数行表示 */
table.summary-table tbody td.multi {
  text-align: left;
  line-height: 1.6;
  font-size: 13px;
  white-space: normal;
  min-width: 8em;
}

/* ========== 予測値テーブル（表3-1） ========== */
.pred-table-wrap {
  margin: 24px 0 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}
table.pred-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 1000px;
  width: 100%;
}
table.pred-table caption {
  padding: 10px 12px;
  font-weight: bold;
  text-align: left;
  background: #f9eef3;
  border-bottom: 1px solid #e5cdd9;
}
table.pred-table caption .nrm {
  font-weight: normal;
  font-size: 85%;
  color: #555;
}
table.pred-table caption .legend-gcap {
  display: inline-block;
  background-color: #ffeccc;
  padding: 1px 8px;
  border-radius: 2px;
  font-weight: 500;
  color: #8a4b00;
}
table.pred-table thead th {
  background-color: #003366;
  color: white;
  font-weight: 500;
  padding: 6px 5px;
  border: 1px solid #22497c;
  text-align: center;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
table.pred-table tbody td {
  border: 1px solid #ddd;
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
}
table.pred-table tbody tr:nth-child(even) td:not(.total):not(.pred):not(.gcap) {
  background-color: #fafbfc;
}
/* 選手名セル */
table.pred-table tbody td.name {
  text-align: left;
  font-weight: 500;
  min-width: 7.5em;
}
/* ゴールデンキャップ */
table.pred-table tbody td.gcap {
  background-color: #ffeccc !important;
  font-weight: 600;
}
/* 総合点セル（薄黄色） */
table.pred-table tbody td.total {
  background-color: #fffccf;
  font-weight: 600;
}
/* 予測値セル（ガールズ＝薄ピンク） */
table.pred-table tbody td.pred {
  background-color: #ffeaf0;
  font-weight: 600;
}
/* トップ3のランクセルを強調（ゴールドグラデ：全記事共通） */
table.pred-table tbody tr.top3 td.rank {
  background: linear-gradient(180deg, #fff4c4 0%, #ffd976 100%);
  font-weight: bold;
  color: #8a5a00;
}

/* 凡例 */
.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  margin: 8px 0 14px 2px;
  color: #555;
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  display: inline-block;
  width: 18px;
  height: 14px;
  border: 1px solid #bbb;
  border-radius: 2px;
}
.sw-gcap { background: #ffeccc; }
.sw-total { background: #fffccf; }
.sw-pred { background: #ffeaf0; }  /* ガールズ＝ピンク */
.sw-top3 {
  background: linear-gradient(180deg, #fff4c4 0%, #ffd976 100%);
}

/* 選手紹介段落の装飾（ガールズ＝ピンク下線） */
.player-hl {
  text-decoration: solid underline 2px #e58aad;
  text-underline-offset: 3px;
  font-weight: 600;
  color: #003366;
}

/* 図を横並び */
.fig-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 20px 0 10px;
}
.fig-pair figure {
  margin: 0;
  max-width: 560px;
  flex: 1 1 300px;
  min-width: 0;
}
.fig-pair figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #eee;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  background: white;
}
.fig-pair figcaption {
  text-align: left;
  padding: 6px 4px 0;
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

/* art70 モバイル調整 */
@media (max-width: 768px) {
  .formula-total,
  .formula-pred {
    padding: 14px 12px 10px;
  }
  /* モバイルは縦積みに */
  .formula-row {
    flex-direction: column;
    gap: 16px;
  }
  .formula-row > .formula-pred {
    flex: 1 1 auto;
    width: 100%;
  }
  .variables dt {
    float: none;
  }
  .variables dd {
    margin-left: 10px;
  }
  .cmt-block {
    margin: 8px 6px 16px 10px;
  }
  table.pred-table {
    font-size: 12px;
  }
  table.summary-table {
    font-size: 12px;
  }
  table.summary-table th,
  table.summary-table td {
    padding: 6px 6px;
  }
}

/* 予測式・総合点：狭い画面ではフォントを縮小し、それでも収まらない分はボックス内で横スクロール */
@media (max-width: 768px) {
  .formula-pred .formula-body,
  .formula-total .formula-body {
    font-size: clamp(10px, 2.4vw, 15px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .formula-pred .formula-body mjx-container[display="true"],
  .formula-total .formula-body mjx-container[display="true"] {
    margin: 0.3em 0;
  }
}

@media (max-width: 500px) {
  .formula-pred .formula-body,
  .formula-total .formula-body {
    font-size: clamp(9px, 3vw, 13px);
  }
}
