/* ---------------------------------------------- */
/* art67.css (基本スタイル) + art68.css (統合版) */
/* ---------------------------------------------- */
body {
  font-family: "Noto Sans JP", "Lucida Grande", Arial, sans-serif;
  font-size: 16px; /* 基本フォントサイズ */
  text-align: left;
  margin: 0 auto;
  padding: 0;
  line-height: 1.8;
  color: #333;
  background-color: #f9f9f9;
}

#bdy {
  max-width: 1200px;
  margin: 80px auto 40px auto;
  padding: 50px;
  background-color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  position: relative;
}

/* モバイル用レスポンシブ調整 */
@media (max-width: 768px) {
  #bdy {
    margin: 60px 10px 20px 10px;
    padding: 20px;
  }
  .grp-double {
    width: 100% !important;
  }
}

/* =========================================================
   1. ヘッダーデザイン
   ========================================================= */
/* タイトル + シリーズ名 + 日付 のコンテナ */
.article-header {
  border-bottom: 2px solid #003366; /* 全体の下に線を引く */
  padding-bottom: 10px;
  margin-bottom: 30px;
}

/* メインタイトル: 大きく太字 */
h1.main-title {
  font-family: "Noto Serif JP", serif;
  font-size: 32px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 5px; /* 次の行との最小限のスペース */
  color: #003366;
  border-bottom: none; /* H1の直下には線を引かない */
}

/* シリーズタイトルと日付の行 */
.subtitle-row {
  display: flex;
  justify-content: space-between; /* シリーズは左、日付は右 */
  align-items: flex-end;
}

/* シリーズタイトル: メインタイトルより小さく */
h2.series-title {
  font-size: 18px; /* H1 (32px) より明確に小さく */
  font-weight: bold;
  color: #555;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

/* 日付 */
.date_suf2 {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* =========================================================
   2. 見出しデザイン (H3, H4)
   ========================================================= */

/* H3: 太字、大きく、下にスペース (元のH2相当) */
h3 {
  font-size: 28px;
  font-weight: bold;
  color: #003366;
  width: fit-content;
  padding-right: 1.5em;
  margin-top: 60px;
  margin-bottom: 30px;
  border-bottom: solid 2px #ccc;
  position: relative;
}
h3::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 30%;
  height: 2px;
  background-color: #003366;
}

/* H4: 標準サイズ (約)、太字、上下にスペース (元のH3相当) */
h4 {
  font-size: 18px;
  font-weight: bold;
  color: #444;
  width: fit-content;
  padding-right: 1.5em;
  margin-top: 40px;
  margin-bottom: 20px;
  border-bottom: dotted 1px gray;
}

/* 段落の間隔 */
p {
  margin: 0 0 16px 0; /* 標準的な段落の間隔 */
  text-align: justify;
}

/* =========================================================
   3. 共通コンポーネント
   ========================================================= */

/* フォーミュラボックス */
.formula-box {
  text-align: center;
  padding: 16px 0;
}

/* 箇条書きリスト */
.class-list {
  list-style-type: disc;
  list-style-position: inside;
  margin-left: 20px;
  margin-top: 16px;
  margin-bottom: 16px;
}

/* ページフッター */
.page-footer {
  text-align: center;
  padding: 24px 0;
  color: #6b7280;
  font-size: 14px;
  border-top: 1px solid #e5e7eb;
  margin-top: 40px;
  background-color: white;
}

/* セクション */
section.chapter {
  margin-top: 50px;
}

/* グラフコンテナ */
.graph-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin: 30px 0;
}

.grp-double {
  width: 520px;
  max-width: 100%;
  height: auto;
  border: 1px solid #eee;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  background-color: white;
}

.wrap-grp {
  position: relative;
  text-align: center;
}

.wrap-grp p {
  position: static;
  font-size: 15px;
  font-weight: bold;
  color: #666;
  margin-bottom: 8px;
  text-align: left;
  padding-left: 10px;
}

/* 装飾ユーティリティ */
.nrm {
  font-weight: normal;
}
.keyword1 {
  font-weight: bold;
  color: #003366; /* index.htmlのテーマカラーに合わせ調整 */
}
.bold {
  font-weight: bold;
}
.zudlg1 {
  text-decoration: underline 2px solid #28a745;
  text-underline-offset: 0.2em;
}
.zudlr1 {
  text-decoration: underline 2px solid #dc3545;
  text-underline-offset: 0.2em;
}

/* ---------------------------------------------- */
/* art68.css から統合・調整したスタイル             */
/* ---------------------------------------------- */

/* 用語説明のボックス */
div.rnknt1 {
  max-width: 1000px;
  margin-left: 10px;
  margin-bottom: 22px;
  padding: 20px;
  font-size: 15px;
  border: 1px solid #e0e0e0;
  background-color: #fcfcfc;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

div.rnknt1 dl {
  margin: 0;
  padding: 0;
}
div.rnknt1 dl dt {
  margin: 0;
  margin-bottom: 6px;
  padding: 0;
  font-weight: bold;
  color: #003366;
  border-left: 4px solid #003366;
  padding-left: 10px;
}
div.rnknt1 dl dd {
  margin-top: 0;
  margin-left: 14px;
  margin-bottom: 16px;
  padding: 0;
  line-height: 1.6;
}

div.rnknt1 ul {
  list-style-type: disc;
  margin: 0.3em 1em 0.3em 0;
  padding-left: 1.5em;
}
div.rnknt1 ul li {
  margin: 0.5em 0;
  line-height: 1.6;
}
div.rnknt1 span.pstd {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  /* font-weight: bold;  削除：太字を一括解除 */
}
/* 説明文内で太字にしたい要素のみ明示的に指定 */
div.rnknt1 span.lis3,
div.rnknt1 span.lit3 {
  font-weight: bold;
}

/* ---------------------------------------------- */
/* モダンなランキングテーブル (table.rnktbl5)     */
/* ---------------------------------------------- */
table.rnktbl5 {
  border-collapse: separate;
  border-spacing: 0;
  margin: 30px auto 50px auto;
  font-size: 14px;
  width: 100%;
  max-width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden; /* 角丸を効かせるため */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.03);
  background-color: #fff;
}

table.rnktbl5 caption {
  font-weight: bold;
  margin: 0 0 12px 5px;
  text-align: left;
  font-size: 18px;
  color: #003366;
  padding-left: 5px;
  border-left: 5px solid #003366;
  line-height: 1.2;
}

/* ヘッダーのスタイル */
table.rnktbl5 th {
  background-color: #003366;
  color: #ffffff;
  font-weight: bold;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  padding: 12px 8px;
  vertical-align: middle;
  text-align: center !important; /* 中央揃えを強制 */
}

table.rnktbl5 th:last-child {
  border-right: none;
}

/* ヘッダー2行目（詳細ヘッダ） */
table.rnktbl5 tr:nth-child(2) th {
  background-color: #004080; /* 少し明るい紺色 */
  font-size: 90%;
  padding: 8px 6px;
}

/* セルのスタイル */
table.rnktbl5 td {
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  white-space: nowrap;
  padding: 7px 8px; /* パディング調整: 10px -> 7px */
  text-align: center;
  vertical-align: middle;
  color: #374151;
  transition: background-color 0.2s;
}

table.rnktbl5 td:last-child {
  border-right: none;
}

table.rnktbl5 tr:last-child td {
  border-bottom: none;
}

/* 行のホバーエフェクトとストライプを削除 */
/* table.rnktbl5 tr:nth-child(even) td { background-color: #f9fafb; } */
/* table.rnktbl5 tr:hover td { background-color: #eff6ff !important; } */

/* 特定の列の調整 */
table.rnktbl5 td:nth-child(2) {
  /* 選手名 */
  text-align: center; /* 中央揃えに変更 */
  font-weight: 600;
  min-width: 7em;
  color: #111;
}

table.rnktbl5 td:nth-child(9) {
  /* 競走得点 */
  text-align: right;
  font-family: "Roboto Mono", monospace;
  font-weight: bold;
  color: #003366;
  padding-right: 12px;
}

table.rnktbl5 td:nth-child(10) {
  /* 1着 2着 */
  text-align: center;
  padding-right: 4px;
  vertical-align: middle;
  white-space: nowrap;
}

/* 1着数・2着数をハイフン区切りで表示 */
table.rnktbl5 td:nth-child(10) span {
  display: inline;
  line-height: 1.4;
  text-align: center;
}

/* 1つ目のspan（1着数）の後にハイフンを追加 */
table.rnktbl5 td:nth-child(10) span:first-child::after {
  content: " - ";
  margin: 0 4px;
  color: #999;
}

/* セル内の微調整用クラス */
table.rnktbl5 td.npadd {
  padding-left: 2px;
  padding-right: 2px;
}

/* 縦長文字の調整 */
table.rnktbl5 span.t-narrow {
  display: inline-block;
  transform: scale(0.9, 1);
  letter-spacing: -1px;
}

/* ヘッダー内テキスト調整 */
table.rnktbl5 span.all,
table.rnktbl5 span.alr {
  display: block;
  text-align: center; /* ヘッダー内は全て中央揃え */
  width: 100%;
}
table.rnktbl5 .sml {
  font-size: 85%;
  font-weight: normal;
  opacity: 0.9;
}

/* 背景色クラス（モダンな色合いに調整） */
/* 競り込み・飛び付きヘッダーの強調色 */
table.rnktbl5 .lhs {
  background-color: #4a6fa5 !important;
}
table.rnktbl5 .lht {
  background-color: #5a8e7a !important;
}

/* 選手名背景 */
.bkj1 {
  background-color: #fff9c4 !important;
} /* 薄黄色 */
.bkj2 {
  background-color: #dcedc8 !important;
} /* 薄緑 */
.bkj3 {
  background-color: #ffcdd2 !important;
} /* 薄ピンク */

/* ランクイン強調 - 藤色・若葉色をやや濃く */
.lis3 {
  background-color: #d1d9ff !important;
  color: #1a237e;
  font-weight: bold;
} /* 競込みベスト3 */
.lis4 {
  background-color: #eef0fa !important;
} /* 競込み4位以下 */
.lit3 {
  background-color: #c8e6c9 !important;
  color: #004d40;
  font-weight: bold;
} /* 飛付きベスト3 */
.lit4 {
  background-color: #e8f5e9 !important;
} /* 飛付き4位以下 */

/* 脚質などの強調 - 朱色系を少し薄く */
.nige2 {
  background-color: #ffe0d1 !important;
  padding: 2px 5px;
  border-radius: 4px;
} /* バック20% */
.nige4 {
  background-color: #ffccbc !important;
  padding: 2px 5px;
  border-radius: 4px;
  color: #bf360c;
  font-weight: bold;
} /* バック40% */

/* テーブルスクロールラッパー */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 30px;
  padding-bottom: 5px; /* スクロールバーのための余白 */
}
.table-scroll table.rnktbl5 {
  min-width: 900px;
}

/* ---------------------------------------------- */
/* ヘッダーとメニューのスクリプトサポート (JS用) */
/* ---------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header .container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gamboo_logo {
  height: 40px;
  width: auto;
  margin-right: 10px;
}

.hamburger {
  width: 30px;
  height: 24px;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #333;
  transition: all 0.3s ease;
}

.hamburger.active .hamburger-bar:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.hamburger.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger-bar:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

.menu_off {
  position: fixed;
  top: 60px;
  right: -100%;
  width: 100%;
  max-width: 300px;
  height: calc(100vh - 60px);
  background-color: rgba(0, 51, 102, 0.95);
  transition: right 0.3s ease;
  z-index: 999;
  padding: 20px;
  box-sizing: border-box;
}

.menu_on {
  position: fixed;
  top: 60px;
  right: 0;
  width: 100%;
  max-width: 300px;
  height: calc(100vh - 60px);
  background-color: rgba(0, 51, 102, 0.95);
  transition: right 0.3s ease;
  z-index: 999;
  padding: 20px;
  box-sizing: border-box;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
}

.menu_on p,
.menu_off p {
  margin: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

.menu_on a,
.menu_off a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  display: block;
}
.menu_on a:hover {
  color: #ffcc00;
}

/* ---------------------------------------------- */
/* アニメーションとUXクラス                     */
/* ---------------------------------------------- */
.main_section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.main_section.visible {
  opacity: 1;
  transform: translateY(0);
}

.lab-logo-text {
  font-family: "Noto Serif JP", serif;
  font-size: 20px;
  font-weight: bold;
  color: #003366;
  text-decoration: none;
  display: flex;
  align-items: center;
}

#toc-container {
  background-color: #f4f8fb;
  border: 1px solid #dbe4ed;
  border-radius: 8px;
  padding: 20px 30px;
  margin: 30px 0 50px 0;
}

#toc-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#toc-container > ul > li {
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 18px;
  color: #003366;
}

#toc-container ul ul {
  margin-top: 5px;
  padding-left: 20px;
}

#toc-container ul ul li {
  font-weight: normal;
  font-size: 16px;
  margin-bottom: 5px;
}

#toc-container a {
  text-decoration: none;
  color: #003366;
  transition: color 0.2s;
}

#toc-container a:hover {
  color: #cc0000;
  text-decoration: underline;
}

#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #003366;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background-color: #004080;
  transform: translateY(-3px);
}

.markerY {
  background: linear-gradient(transparent 60%, rgba(255, 228, 0, 0.5) 60%);
  background-size: 0% 100%;
  background-repeat: no-repeat;
  text-decoration: none;
  transition: background-size 0.8s ease-out;
}

.markerY.active {
  background-size: 100% 100%;
}
