:root {
  --bg: #eef1f7;
  --bg2: #e3e7f0;
  --card: #ffffff;
  --ink: #11131c;
  --ink2: #3b4250;
  --muted: #888fa0;
  --line: #e8eaf1;
  --line-soft: #f1f2f7;
  --accent: #2f6bff;
  --accent-ink: #1d4ed8;
  --accent-soft: #eef3ff;
  --hit: #0a8a3a;
  --miss: #d22f3a;
  --nav: linear-gradient(120deg, #0d111c 0%, #1a2236 100%);
  --grad: linear-gradient(120deg, #2f6bff 0%, #6aa0ff 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 50, 0.06);
  --shadow: 0 6px 20px rgba(17, 24, 50, 0.07), 0 1px 3px rgba(17, 24, 50, 0.05);
  --shadow-lg: 0 18px 44px rgba(17, 24, 50, 0.13);
  --font-ui: "Inter", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
/* ページ全体の横はみ出しガード (clip は sticky を壊さない。非対応ブラウザは hidden) */
html { overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt" 1;
  overflow-x: hidden;
  overflow-x: clip;
}
/* 画像が枠を超えないように (Plotly の svg は歪むので除外、コンテナ側で抑制) */
img, canvas { max-width: 100%; }

.topnav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 12px 22px;
  background: rgba(13, 17, 28, 0.82);
  background-image: var(--nav);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 6px 24px rgba(8, 12, 24, 0.28);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: saturate(160%) blur(8px);
}
.topnav .brand {
  font-weight: 900; letter-spacing: 0.16em; font-size: 15px;
  background: linear-gradient(90deg, #ffffff 0%, #9fc0ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topnav nav { display: flex; gap: 3px; }
.topnav a {
  color: #aab2c4;
  text-decoration: none;
  padding: 7px 15px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}
.topnav a:hover { background: rgba(255,255,255,0.09); color: #fff; }
.topnav a.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(47,107,255,0.45); }

main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
footer {
  max-width: 1100px; margin: 0 auto; padding: 16px;
  color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line); margin-top: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
footer .disclaimer { font-size: 11px; line-height: 1.5; }

.page-head {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px; margin-bottom: 6px;
}
h1 { font-size: 23px; margin: 8px 0; letter-spacing: -0.025em; font-weight: 800; }
h2 {
  font-size: 15px; margin: 0 0 12px; color: var(--ink); font-weight: 700;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 9px;
}
h2::before {
  content: ""; width: 4px; height: 16px; border-radius: 3px;
  background: var(--grad); flex: 0 0 auto;
}
section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
.meta { color: var(--muted); margin: 4px 0 0; }
.note { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.empty { color: var(--muted); padding: 12px; }
.muted { color: var(--muted); }

.btn {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink2);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.date-nav { display: flex; gap: 8px; }
.tag {
  display: inline-block; font-size: 11px; padding: 2px 10px; font-weight: 700;
  border-radius: 20px; background: var(--accent-soft); color: var(--accent-ink);
  vertical-align: middle; margin-left: 6px; letter-spacing: 0.02em;
}

table { border-collapse: collapse; width: 100%; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); }
td { font-variant-numeric: tabular-nums; }
thead th {
  font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap;
  letter-spacing: 0.04em; text-transform: none;
  background: #fafbfe; border-bottom: 1px solid var(--line);
}
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: var(--accent-soft); }
tbody tr:last-child td { border-bottom: none; }
.kv-table th { width: 220px; color: var(--muted); font-weight: 500; }

.venue-card h2 { margin-bottom: 6px; }
.race-table a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* 艇番カラー (ボートレース標準) */
.boat {
  display: inline-block; width: 22px; height: 22px; line-height: 22px;
  text-align: center; border-radius: 4px; font-weight: 700; font-size: 12px;
  border: 1px solid rgba(0,0,0,0.25);
}
.boat-1 { background: #ffffff; color: #1f2430; }
.boat-2 { background: #1f2430; color: #ffffff; }
.boat-3 { background: #d32f2f; color: #ffffff; }
.boat-4 { background: #1565c0; color: #ffffff; }
.boat-5 { background: #f9d74c; color: #1f2430; }
.boat-6 { background: #2e7d32; color: #ffffff; }

/* 一覧の出走メンバー (枠順) */
.roster { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.roster-item { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.roster-item .boat { width: 18px; height: 18px; line-height: 18px; font-size: 11px; }
.roster-name { font-size: 13px; color: var(--ink); }
.roster-class { font-size: 10px; color: var(--muted); margin-left: 1px; }

.upcoming-card { border-left: 4px solid var(--accent); }
.row-next { background: #eef4ff; }
/* まもなく締切 折りたたみ */
.upcoming-fold > summary {
  cursor: pointer; list-style: none; font-size: 15px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; gap: 9px; letter-spacing: -0.01em;
}
.upcoming-fold > summary::-webkit-details-marker { display: none; }
.upcoming-fold > summary::before {
  content: ""; width: 4px; height: 16px; border-radius: 3px; background: var(--grad); flex: 0 0 auto;
}
.upcoming-fold > summary::after {
  content: "\25B8"; color: var(--muted); font-size: 12px; margin-left: auto; transition: transform 0.15s;
}
.upcoming-fold[open] > summary::after { transform: rotate(90deg); }
.upcoming-fold > .tscroll { margin-top: 12px; }

/* 一覧の AI買い目 (本命/穴) */
.buy-cell { display: flex; flex-direction: column; gap: 3px; }
.buy-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.buy-row .boat { width: 18px; height: 18px; line-height: 18px; font-size: 11px; }
.buy-lab { font-size: 10px; font-weight: 800; color: #fff; padding: 1px 6px; border-radius: 10px;
  min-width: 32px; text-align: center; box-sizing: border-box; flex: 0 0 auto; }
.buy-lab-honmei { background: var(--grad); }
.buy-lab-ana { background: linear-gradient(120deg, #e07b00, #f59e0b); }
.buy-thirds { display: inline-flex; align-items: center; gap: 6px; padding: 1px 5px;
  border: 1px dashed #e0a85a; border-radius: 6px; }
.third-pick { display: inline-flex; align-items: center; gap: 3px; }
.buy-odds { font-size: 11px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent-soft); padding: 0 5px; border-radius: 6px; white-space: nowrap; }

.summary-card { border-left: 4px solid var(--accent); }
.summary-row {
  display: flex; flex-wrap: wrap; gap: 12px;
}
.summary-item {
  flex: 1 1 120px;
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 15px;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7fc 100%);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.summary-label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.summary-val { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.summary-val.big { font-size: 26px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hit { color: var(--hit); font-weight: 700; }
.miss { color: var(--miss); }
.row-winner { background: #f0f7f1; }
.ev-pos { color: var(--hit); font-weight: 700; }
.steam-up { color: var(--hit); font-weight: 700; }
.steam-down { color: var(--miss); }

/* 3連単予想 上位点の折りたたみ */
.combo-fold > summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--accent);
  list-style: none; padding: 6px 0; display: inline-flex; align-items: center; gap: 6px;
}
.combo-fold > summary::-webkit-details-marker { display: none; }
.combo-fold > summary::before { content: "\25B8"; color: var(--muted); }
.combo-fold[open] > summary::before { content: "\25BE"; }

.combo { white-space: nowrap; }
.combo-sep { color: var(--muted); margin: 0 2px; font-weight: 700; }
/* 本命予想ヒーロー */
.tri-main {
  font-size: 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; margin: 2px 0 12px;
  background: linear-gradient(120deg, var(--accent-soft) 0%, #f3f7ff 100%);
  border: 1px solid #dbe6ff; border-radius: var(--radius-sm);
}
.tri-badge {
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  color: #fff; background: var(--grad); padding: 3px 11px; border-radius: 20px;
  box-shadow: 0 2px 6px rgba(11,95,255,0.3); align-self: center;
}
.combo-lg .boat { width: 32px; height: 32px; line-height: 32px; font-size: 16px; box-shadow: var(--shadow-sm); }
.tri-prob { font-size: 22px; font-weight: 800; color: var(--accent-ink); letter-spacing: -0.01em; }
/* 対抗 (本命=青に対して 対抗=ティール) */
.taikou-main {
  background: linear-gradient(120deg, #e3f6f3 0%, #f1faf8 100%);
  border-color: #b6e6dd;
}
.taikou-badge { background: linear-gradient(120deg, #0f9d8a 0%, #19b89f 100%); box-shadow: 0 2px 6px rgba(15,157,138,0.3); }
.taikou-prob { color: #0c7d6e; }
/* 穴予想 (本命=青に対して 穴=オレンジ) */
.ana-main {
  background: linear-gradient(120deg, #fff2e0 0%, #fff8f1 100%);
  border-color: #ffd9a8;
}
.ana-badge { background: linear-gradient(120deg, #e07b00 0%, #f59e0b 100%); box-shadow: 0 2px 6px rgba(224,123,0,0.3); }
.ana-prob { color: #c2610a; }
.ana-note { font-size: 11px; color: var(--muted); flex-basis: 100%; margin-top: 2px; }

/* 3連単 本命/対抗/穴 ピックカード */
.p3-lead { margin: 0 0 12px; }
.pick3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 2px 0 12px; }
.pick3-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.pick3-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.p3-honmei { background: linear-gradient(160deg, var(--accent-soft) 0%, #f7faff 60%); border-color: #dbe6ff; }
.p3-honmei::before { background: var(--grad); }
.p3-taikou { background: linear-gradient(160deg, #e8f8f5 0%, #f6fcfb 60%); border-color: #b6e6dd; }
.p3-taikou::before { background: linear-gradient(120deg, #0f9d8a, #19b89f); }
.p3-ana { background: linear-gradient(160deg, #fff3e3 0%, #fff9f3 60%); border-color: #ffd9a8; }
.p3-ana::before { background: linear-gradient(120deg, #e07b00, #f59e0b); }
.p3-top { display: flex; align-items: center; justify-content: space-between; }
.p3-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: #fff;
  padding: 3px 12px; border-radius: 20px; }
.p3-badge-honmei { background: var(--grad); box-shadow: 0 2px 6px rgba(11,95,255,0.3); }
.p3-badge-taikou { background: linear-gradient(120deg, #0f9d8a, #19b89f); box-shadow: 0 2px 6px rgba(15,157,138,0.3); }
.p3-badge-ana { background: linear-gradient(120deg, #e07b00, #f59e0b); box-shadow: 0 2px 6px rgba(224,123,0,0.3); }
.p3-prob { font-size: 13px; font-weight: 800; color: var(--ink2); }
.p3-combo { padding: 2px 0; }
.p3-combo .combo-lg .boat { width: 30px; height: 30px; line-height: 30px; font-size: 15px; }
.p3-pay { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.p3-pay-amt { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1;
  font-variant-numeric: tabular-nums; }
.p3-honmei .p3-pay-amt { color: var(--accent-ink); }
.p3-taikou .p3-pay-amt { color: #0c7d6e; }
.p3-ana .p3-pay-amt { color: #c2610a; }
.p3-yen { font-size: 13px; font-weight: 700; margin-left: 1px; }
.p3-odds { font-size: 11px; color: var(--muted); }
.p3-pay-na { font-size: 13px; }
.p3-story { font-size: 12px; color: var(--ink2); line-height: 1.5;
  border-top: 1px dashed var(--line); padding-top: 7px; }
/* 穴 3着流し */
.p3-third-lab { font-size: 12px; font-weight: 700; color: var(--muted);
  border: 1px dashed #e0a85a; border-radius: 6px; padding: 2px 8px; }
.p3-nagashi { display: flex; flex-wrap: wrap; gap: 6px; }
.p3-nag { display: inline-flex; align-items: center; gap: 5px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; padding: 3px 10px 3px 4px; }
.p3-nag .boat { width: 22px; height: 22px; line-height: 22px; font-size: 12px; }
.p3-nag-pay { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.p3-ana .p3-nag { border-color: #ffd9a8; }
.p3-ana .p3-nag-pay { color: #c2610a; }
.p3-ana .p3-third-lab { border-color: #e0a85a; }
.p3-taikou .p3-nag { border-color: #b6e6dd; }
.p3-taikou .p3-nag-pay { color: #0c7d6e; }
.p3-taikou .p3-third-lab { border-color: #7fcabb; }
@media (max-width: 720px) { .pick3 { grid-template-columns: 1fr; } }

.prob-bar {
  display: inline-block; width: 70px; height: 8px;
  background: #e9ebef; border-radius: 4px; margin-right: 6px;
  vertical-align: middle; overflow: hidden;
}
.prob-fill { display: block; height: 100%; background: var(--accent); }

.chart { width: 100%; height: 340px; overflow: hidden; }
.chart-sm { width: 100%; height: 240px; overflow: hidden; }
.js-plotly-plot, .plot-container { max-width: 100%; }
.two-col { display: flex; gap: 14px; flex-wrap: wrap; }
.two-col > section { flex: 1 1 320px; margin: 14px 0; }
.racer-search { display: flex; gap: 8px; margin: 8px 0; }
.racer-search input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; min-width: 200px; }
.racer-search.compact input { min-width: 140px; }
.entry-table a, .race-table a { color: var(--accent); text-decoration: none; }
/* 出走表タブ (列グループ切替) */
.entry-tabs { display: flex; gap: 6px; margin: 2px 0 10px; flex-wrap: wrap; }
.etab-btn {
  padding: 6px 16px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); color: var(--ink2); font-weight: 700; font-size: 13px;
  cursor: pointer; box-shadow: var(--shadow-sm); transition: all 0.15s;
}
.etab-btn:hover { border-color: var(--accent); color: var(--accent); }
.etab-btn.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(11,95,255,0.3); }
.entry-table.etab-pred .g-perf, .entry-table.etab-pred .g-motor { display: none; }
.entry-table.etab-perf .g-pred, .entry-table.etab-perf .g-motor { display: none; }
.entry-table.etab-motor .g-pred, .entry-table.etab-motor .g-perf { display: none; }

/* 予測ビュー (予測タブ専用カードレイアウト) */
.pred-view { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 4px; }
.pv-row { display: grid; grid-template-columns: 34px minmax(96px, 0.9fr) minmax(200px, 1.8fr);
  gap: 12px; align-items: center; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); box-shadow: var(--shadow-sm); }
.pv-top { border-color: var(--accent); background: #f5f9ff;
  box-shadow: 0 2px 10px rgba(11,95,255,0.14); }
.pv-row .boat { width: 30px; height: 30px; line-height: 30px; font-size: 15px; }
.pv-racer { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-racer a { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.pv-class { font-size: 11px; color: var(--muted); }
.pv-tag { background: var(--grad); color: #fff; font-weight: 800; font-size: 10px;
  padding: 1px 7px; border-radius: 10px; margin-left: 2px; }
.pv-bars { display: flex; flex-direction: column; gap: 4px; }
.pv-metric { display: grid; grid-template-columns: 38px 1fr 50px; gap: 8px; align-items: center; }
.pv-lab { font-size: 11px; font-weight: 700; color: var(--muted); }
.pv-bar { height: 10px; background: #e9ebef; border-radius: 5px; overflow: hidden; }
.pv-fill { display: block; height: 100%; border-radius: 5px; }
.pv-win { background: var(--accent); }
.pv-t2 { background: #2a86c4; }
.pv-t3 { background: #8fb3dc; }
.pv-val { font-size: 13px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .pv-row { grid-template-columns: 30px 1fr; }
  .pv-bars { grid-column: 1 / -1; }
}
.cell-top { background: #eef4ff; font-weight: 700; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.vbtn { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* 締切カウントダウン */
.countdown {
  display: inline-flex; align-items: baseline; gap: 10px;
  padding: 9px 16px; margin: 6px 0 2px;
  background: #18202e; color: #fff; border-radius: 12px;
  box-shadow: var(--shadow);
}
.countdown .cd-label { font-size: 12px; color: #aeb8c9; font-weight: 600; }
.countdown .cd-time {
  font-size: 22px; font-weight: 800; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.countdown.cd-soon { background: linear-gradient(120deg, #b3261e 0%, #d9453b 100%); animation: cdpulse 1.4s ease-in-out infinite; }
.countdown.cd-soon .cd-label { color: #ffd9d6; }
.countdown.cd-closed { background: #3a4150; }
@keyframes cdpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(217,69,59,0.45); } 50% { box-shadow: 0 0 0 7px rgba(217,69,59,0); } }

/* 横長テーブルをスクロール可能にするラッパ (スマホでレイアウトを壊さない) */
.tscroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  scrollbar-width: thin;
  position: relative;
}
.tscroll table { margin: 0; }

/* 先頭列の固定 (.tfreeze を付けた表で .fz/.fz2 セルが横スクロール中も残る) */
/* border-collapse:collapse だと 2列目以降の sticky が効かない (Safari/旧Blink)。
   separate + border-spacing:0 にして複数列固定を確実に動かす。 */
.tfreeze { border-collapse: separate; border-spacing: 0; }
.tfreeze th, .tfreeze td { border-bottom: 1px solid var(--line-soft); }
.tfreeze th.fz, .tfreeze td.fz { position: sticky; left: 0; z-index: 2; background: var(--card); }
.tfreeze th.fz2, .tfreeze td.fz2 { position: sticky; z-index: 2; background: var(--card); }
.tfreeze thead th.fz, .tfreeze thead th.fz2 { z-index: 4; background: #fafbfe; }
.tfreeze .fz-last { box-shadow: 6px 0 8px -6px rgba(17, 24, 50, 0.22); }
/* 固定セルは不透明背景必須 + 行状態色を再指定 (透過/白抜け防止) */
.tfreeze tbody tr:hover td.fz, .tfreeze tbody tr:hover td.fz2 { background: var(--accent-soft); }
.tfreeze tr.row-winner td.fz, .tfreeze tr.row-winner td.fz2 { background: #f0f7f1; }
.tfreeze tr.row-pick td.fz, .tfreeze tr.row-pick td.fz2 { background: #eef4ff; }
.tfreeze tr.row-next td.fz, .tfreeze tr.row-next td.fz2 { background: #eef4ff; }
/* レースカードの entry-table: 枠+選手を1セルにまとめて1列だけ固定 (確実) */
.entry-table.rec-mode-all td.fz { min-width: 104px; }
.fz-racer { display: flex; align-items: center; gap: 7px; }
.fz-racer .boat { flex: 0 0 auto; }
.fz-racer-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.25; }
.fz-racer-main a { font-weight: 700; white-space: nowrap; }

/* データ取得状況 (稼働状態ページ) */
.cov-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 1px 8px; border-radius: 10px; vertical-align: middle;
}
.cov-ok { background: #e3f4e8; color: var(--hit); }
.cov-warn { background: #fff3d6; color: #9a6b00; }
.cov-late { background: #fde7e5; color: var(--miss); }
.cov-none { background: #eceef2; color: var(--muted); }

.cov-progress-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px;
}
.cov-pct { font-size: 24px; font-weight: 700; color: var(--accent); }
.cov-year { padding: 8px 0; border-top: 1px solid var(--line); }
.cov-year:first-child { border-top: none; }
.cov-yname { font-size: 16px; font-weight: 700; }
.cov-bar {
  width: 100%; height: 14px; background: #e9ebef;
  border-radius: 7px; overflow: hidden;
}
.cov-bar-fill {
  display: block; height: 100%; background: var(--accent);
  border-radius: 7px; transition: width 0.4s ease;
}
.cov-bar-fill.cov-bar-done { background: var(--hit); }

.cov-months {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 6px; margin: 12px 0 4px;
}
.cov-month { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cov-cell {
  width: 100%; height: 34px; border-radius: 4px;
  border: 1px solid var(--line);
  /* --fill (0〜100%) の高さだけ緑で塗る縦ゲージ */
  background: linear-gradient(to top, var(--hit) var(--fill, 0%), #eef0f4 var(--fill, 0%));
}
.cov-mlabel { font-size: 10px; color: var(--muted); }

/* 称号図鑑 */
.zukan-rank { display: flex; flex-direction: column; gap: 8px; }
.zukan-racer {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fbfbfd;
}
.zukan-no {
  flex: 0 0 26px; text-align: center; font-weight: 700; color: var(--muted);
}
.zukan-name { font-weight: 700; color: var(--accent); text-decoration: none; min-width: 84px; }
.zukan-crown {
  font-size: 12px; font-weight: 700; color: #9a6b00;
  background: #fff3d6; border-radius: 10px; padding: 1px 8px;
}
.zukan-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.zukan-badge {
  font-size: 11px; padding: 1px 8px; border-radius: 10px;
  background: #eef2ff; color: #3949ab; white-space: nowrap;
}
.zukan-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.zukan-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.zukan-title {
  font-weight: 700; color: #18202e; margin-bottom: 6px;
  border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 2px;
}
.zukan-holders { margin: 0; padding-left: 20px; }
.zukan-holders li { margin: 2px 0; }
.zukan-holders a { color: var(--ink); text-decoration: none; }
.zukan-holders a:hover { color: var(--accent); }
.zukan-val { color: var(--muted); font-size: 12px; margin-left: 4px; }

/* 選手プロフィールのスカウティングカード */
.scout-card { border-left: 4px solid var(--accent); background: #f8f9fb; }
.scout-titles { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.zukan-badge-crown {
  background: #fff3d6; color: #9a6b00; text-decoration: none; font-weight: 700;
}
.zukan-badge-crown:hover { background: #ffe9b0; }
.scout-line { font-size: 15px; font-weight: 600; color: var(--ink); margin: 4px 0 8px; }
.scout-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.scout-tag {
  font-size: 12px; padding: 2px 9px; border-radius: 10px;
  background: #eef4ff; color: #3949ab; border: 1px solid #dbe4ff;
}

/* 出走表 強化: 本命行/近走/この枠/展示最速 */
.row-pick { background: #eef4ff; }
.pick-mark { color: #d9a400; font-weight: 700; }
.recent-cell { white-space: nowrap; }
.fin {
  display: inline-block; width: 17px; height: 17px; line-height: 17px;
  text-align: center; border-radius: 3px; font-size: 11px; font-weight: 700;
  margin-right: 1px; background: #eceef2; color: var(--muted);
}
.fin-1 { background: #ffe9b0; color: #8a6000; }
.fin-2 { background: #e1e6ef; color: #44506a; }
.fin-3 { background: #f4ddc8; color: #8a5a2a; }
.fin-f { background: #fde7e5; color: var(--miss); }
/* 近走ミニセル: 上=進入コース(色は元枠), 下=着順 */
.th-sub { font-size: 9px; color: var(--muted); font-weight: normal; }
.rb {
  display: inline-flex; flex-direction: column; width: 26px;
  margin-right: 2px; vertical-align: top;
}
.rb-venue {
  font-size: 8.5px; line-height: 11px; text-align: center; color: var(--muted);
  white-space: nowrap; overflow: hidden;
}
/* 今節 (このレースの場の連続開催) は緑で強調 */
.rb-setsu { background: #e6f7ec; border-radius: 3px; }
.rb-setsu .rb-venue { color: var(--hit); font-weight: 800; }
.rb-top {
  display: block; width: auto; height: auto;
  font-size: 11px; line-height: 15px; text-align: center; font-weight: 700;
  border: 1px solid rgba(0,0,0,0.2); border-radius: 3px 3px 0 0;
}
.rb-bot {
  font-size: 11px; line-height: 14px; text-align: center; font-weight: 700;
  border-radius: 0 0 3px 3px;
}
.rb-1 { background: #ffe9b0; color: #8a6000; }
.rb-2 { background: #e1e6ef; color: #44506a; }
.rb-3 { background: #f4ddc8; color: #8a5a2a; }
.rb-x { background: #eceef2; color: var(--muted); }
.rb-f { background: #fde7e5; color: var(--miss); }
.val-hot { color: var(--hit); font-weight: 700; }
.val-fast { color: var(--accent); font-weight: 700; }
.fast-mark {
  font-size: 10px; background: #e3f4e8; color: var(--hit);
  padding: 0 4px; border-radius: 6px;
}
/* チルト / 部品交換 */
.tilt-val { font-variant-numeric: tabular-nums; }
.tilt-up { color: #c2610a; font-weight: 700; }
.parts-cell { max-width: 160px; white-space: normal; }
.parts-txt { font-size: 11px; color: var(--ink2); }
.parts-prop { font-size: 10px; font-weight: 700; background: #fff2e0; color: #c2610a;
  padding: 0 5px; border-radius: 6px; margin-left: 3px; white-space: nowrap; }

/* 選手の戦術・勝ち方 */
.tac-list { display: flex; flex-direction: column; gap: 8px; }
.tac-row {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; background: #fbfcfe;
}
.tac-row.tac-pick { border-color: #c8d8ff; background: var(--accent-soft); }
.tac-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tac-name { font-weight: 700; color: var(--accent); text-decoration: none; }
.tac-wins { font-size: 11px; color: var(--muted); margin-left: auto; }
.tac-stat { font-size: 12px; color: var(--ink2); margin-left: auto; white-space: nowrap; }
.tac-stat b { color: var(--ink); }
.tac-type {
  font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 20px;
  color: #fff; letter-spacing: 0.02em;
}
/* 決まり手カラー: 逃げ=金 / 差し=青 / まくり=赤 / まくり差し=紫 / 抜き=灰 */
.tac-nige   { background: #e0a100; }
.tac-sashi  { background: #1565c0; }
.tac-makuri { background: #d32f2f; }
.tac-mz     { background: #7b3fb3; }
.tac-nuki   { background: #8a8f98; }
.tac-mixwrap { margin-top: 7px; }
/* バー全体=トラック(100%)。塗り(tac-winbar)の幅=コース勝率。内訳=決まり手 */
.tac-bar {
  width: 100%; height: 13px; border-radius: 7px;
  overflow: hidden; background: #eceef2; border: 1px solid var(--line);
}
.tac-winbar { display: flex; height: 100%; min-width: 2px; }
.tac-seg { display: block; height: 100%; }
.tac-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; font-size: 11px; color: var(--ink2); }
.tac-lg { display: inline-flex; align-items: center; gap: 4px; }
.tac-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
.tac-c1 {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--ink2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.tac-c1-lab {
  font-size: 11px; font-weight: 700; color: #fff; background: var(--ink);
  padding: 1px 8px; border-radius: 10px;
}
.tac-lose { font-weight: 800; padding: 1px 8px; border-radius: 10px; color: #fff; }
.tac-lose.tac-sashi { background: #1565c0; }
.tac-lose.tac-makuri { background: #d32f2f; }
.tac-lose:not(.tac-sashi):not(.tac-makuri) { background: var(--muted); }

/* モーター気配 */
.mot-no { font-weight: 800; color: var(--ink); letter-spacing: 0.02em; }
.mot-type {
  font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 20px; color: #fff;
}
.mot-nobi   { background: #0f9d8a; }  /* 伸び型=ティール */
.mot-deashi { background: #e07b00; }  /* 出足型=オレンジ */
.mot-all    { background: linear-gradient(120deg, #0f9d8a 0%, #0b5fff 100%); }  /* 総合 */
.mot-ex { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: #eceef2; color: var(--ink2); }
.mot-ex-fast { background: #e3f4e8; color: var(--hit); }
.mot-ex-slow { background: #fde7e5; color: var(--miss); }
.mot-bars {
  margin-top: 7px; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center;
}
.mot-blab { font-size: 11px; color: var(--muted); white-space: nowrap; }
.mot-bar {
  display: block; height: 9px; border-radius: 5px; background: #eceef2;
  border: 1px solid var(--line); overflow: hidden;
}
.mot-fill { display: block; height: 100%; }
.mot-fill-deashi { background: #e07b00; }
.mot-fill-nobi { background: #0f9d8a; }
/* モーターランク(選手補正) */
.mot-grade { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 20px; color: #fff; }
.mot-g-ace  { background: linear-gradient(120deg, #b8860b 0%, #e0a100 100%); box-shadow: 0 1px 4px rgba(224,161,0,0.4); }
.mot-g-good { background: #2e9e5b; }
.mot-g-bad  { background: #9aa0ab; }
.mot-g-hard2 { background: linear-gradient(120deg, #b3261e 0%, #d9453b 100%); box-shadow: 0 1px 4px rgba(179,38,30,0.35); }
.mot-g-hard1 { background: #c2766b; }
.mot-g-out-ace  { background: linear-gradient(120deg, #1565c0 0%, #2196f3 100%); box-shadow: 0 1px 4px rgba(33,150,243,0.4); }
.mot-g-out-good { background: #2a86c4; }
.mot-g-out-bad  { background: #9aa0ab; }

/* 初心者向け 強さ目印 (勝率の隣) */
.str { display: inline-block; margin-left: 5px; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px; color: #fff; vertical-align: middle; white-space: nowrap; }
.str-top { background: linear-gradient(120deg, #b8860b 0%, #e0a100 100%); }
.str-up  { background: #1f6fc4; }
.str-mid { background: #9aa0ab; }
.str-low { background: #c2766b; }

/* 気象条件ストリップ */
.weather-strip { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center;
  margin: 0 0 12px; padding: 8px 12px; background: #eef5fb; border-radius: 8px; }
.wx { font-size: 13px; font-weight: 700; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 14px; padding: 2px 10px; }
.wx-lab { font-size: 10px; font-weight: 700; color: var(--muted); margin-right: 5px; }
.wx-note { font-size: 11px; }

/* 結果・確定払戻 */
.result-card { border-left: 4px solid #2e7d32; }
.kimarite { font-size: 13px; font-weight: 700; color: #2e7d32; margin-left: 8px; }
.result-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.3fr);
  gap: 18px; align-items: start; }
.result-grid h3 { font-size: 14px; margin: 0 0 8px; }
.finish-list { list-style: none; margin: 0; padding: 0; }
.finish-item { display: flex; align-items: center; gap: 8px; padding: 4px 0;
  border-bottom: 1px solid var(--line); }
.finish-pos { font-weight: 800; font-size: 13px; min-width: 38px; }
.finish-pos.fin-1 { color: #b8860b; }
.finish-pos.fin-2 { color: #5a7184; }
.finish-pos.fin-3 { color: #b5651d; }
.finish-racer { font-weight: 700; }
.finish-meta { font-size: 11px; }
.payout-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.payout-table th, .payout-table td { padding: 4px 8px; border-bottom: 1px solid var(--line);
  text-align: left; }
.payout-table th { font-size: 11px; color: var(--muted); }
.pay-bet { font-weight: 700; vertical-align: middle; background: #f6f9ff; white-space: nowrap; }
.pay-combo { font-variant-numeric: tabular-nums; }
.pay-amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pay-pop { text-align: right; color: var(--muted); }
@media (max-width: 640px) { .result-grid { grid-template-columns: 1fr; } }

/* 穴 見送り */
.p3-skip { opacity: 0.85; }
.p3-skip-msg { font-size: 12px; color: var(--muted); line-height: 1.5; padding-top: 6px; }
/* オッズ未取得 (判定不能) は妙味なし見送りと区別: グレー基調 + 点線枠 */
.p3-skip-odds { background: #f4f6f9; border-color: var(--line); border-style: dashed; }
.p3-skip-odds::before { background: var(--muted) !important; }
.p3-skip-odds .p3-badge-ana { background: var(--muted); box-shadow: none; }

/* 的中レース一覧 */
.hit-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.hit-filter { margin: 0; }
.hit-search-input { padding: 5px 11px; border: 1px solid var(--line); border-radius: 16px;
  font-size: 13px; min-width: 200px; }
.hit-search-input:focus { outline: none; border-color: var(--accent); }
.hit-scroll { max-height: 480px; overflow-y: auto; overflow-x: auto; position: relative;
  -webkit-overflow-scrolling: touch; }
.hit-table thead th { position: sticky; top: 0; z-index: 1; }
.hit-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.hit-table th.sortable:hover { color: var(--accent); }
.hit-table th.sortable::after { content: '\2195'; color: var(--muted); margin-left: 3px; font-size: 10px; }
.hit-table th.sort-asc::after { content: '\25B2'; color: var(--accent); }
.hit-table th.sort-desc::after { content: '\25BC'; color: var(--accent); }
.hit-table .nowrap { white-space: nowrap; }
.hit-part { display: inline-block; font-size: 10px; font-weight: 800; color: #fff;
  padding: 1px 8px; border-radius: 10px; }
.hit-part-honmei { background: var(--grad); }
.hit-part-ana { background: linear-gradient(120deg, #e07b00, #f59e0b); }

/* グラフ見出し + メトリクス切替 */
.chart-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.chart-head h2 { margin-bottom: 0; }
.metric-toggle { margin: 0; }

/* 近走 全国/当地 切替 */
.rf-toggle { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; flex-wrap: wrap; }
.rf-toggle-lab { font-size: 13px; font-weight: 700; color: var(--ink); }
.rf-btn { font-size: 12px; padding: 3px 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); border-radius: 14px; cursor: pointer; }
.rf-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.rf-toggle-note { font-size: 11px; }
.entry-table.rf-mode-all .rf-local { display: none; }
.entry-table.rf-mode-local .rf-all { display: none; }
/* 近走の 全体/この枠 タブ切替 (横幅圧縮) */
.entry-table.rec-mode-all .rc-frame { display: none; }
.entry-table.rec-mode-frame .rc-all { display: none; }

/* 初心者向け 用語ガイド (畳み) */
.guide-fold { margin: 6px 0 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #f6f9ff; }
.guide-fold > summary { cursor: pointer; padding: 8px 12px; font-weight: 700;
  color: var(--accent-ink); list-style: none; }
.guide-fold > summary::before { content: '＋ '; color: var(--accent); }
.guide-fold[open] > summary::before { content: '－ '; }
.guide-body { padding: 4px 14px 12px; }
.guide-lead { font-size: 13px; line-height: 1.7; margin: 4px 0 10px; }
.guide-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px;
  font-size: 13px; margin: 0; }
.guide-dl dt { font-weight: 700; color: var(--ink); white-space: nowrap; }
.guide-dl dd { margin: 0; color: var(--muted); }
.mot-lift-lab-bad { background: var(--miss); }
.mot-lift {
  margin-top: 7px; font-size: 13px; color: var(--ink2);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.mot-lift-lab { font-size: 11px; font-weight: 700; color: #fff; background: var(--ink); padding: 1px 8px; border-radius: 10px; }
.mot-lift-val { font-weight: 800; font-size: 15px; color: var(--ink2); }
.mot-lift-pos { color: var(--hit); }
.mot-lift-neg { color: var(--miss); }
.mot-period { margin-top: 6px; font-size: 11px; color: var(--muted); }
/* モーター使用履歴 */
.mot-hist { margin-top: 8px; }
.mot-hist > summary {
  cursor: pointer; font-size: 12px; font-weight: 700; color: var(--accent);
  list-style: none; padding: 4px 0;
}
.mot-hist > summary::-webkit-details-marker { display: none; }
.mot-hist > summary::before { content: "\25B8"; color: var(--muted); margin-right: 6px; }
.mot-hist[open] > summary::before { content: "\25BE"; }
.mot-hist-table { font-size: 12px; }
.mot-hist-table th, .mot-hist-table td { padding: 4px 8px; }
.mot-hist-table thead th { background: #f4f6fa; }

/* レースカード注目アノテーション */
.warn-card { border-left: 4px solid #d9a400; background: #fffbf0; }
.warn-list { margin: 4px 0 6px; padding-left: 20px; }
.warn-list li { margin: 3px 0; font-weight: 600; color: #5a4500; }
.entry-badges { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.entry-badge {
  font-size: 10px; padding: 0 6px; border-radius: 8px; line-height: 16px;
  background: #eef2ff; color: #3949ab; white-space: nowrap;
}

/* 注目/鉄板レース */
.pick-card { border-left: 4px solid var(--accent); }
/* 折りたたみ版 (details) */
.pick-fold {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 0 18px; margin: 14px 0; overflow: hidden;
}
.pick-fold > summary {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 14px 0; font-size: 15px; font-weight: 700; color: var(--ink2);
  list-style: none;
}
.pick-fold > summary::-webkit-details-marker { display: none; }
.pick-fold > summary::before {
  content: ""; width: 4px; height: 15px; border-radius: 3px; background: var(--grad); flex: 0 0 auto;
}
.solid-card.pick-fold > summary::before { background: var(--hit); }
.pick-fold > summary::after {
  content: "\25B8"; color: var(--muted); margin-left: auto; transition: transform 0.15s; flex: 0 0 auto;
}
.pick-fold[open] > summary::after { transform: rotate(90deg); }
.pick-fold > .pick-grid { margin-bottom: 4px; }
.pick-fold > .note { margin-bottom: 14px; }
.fold-count {
  font-size: 12px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent-soft); padding: 1px 9px; border-radius: 20px;
}
.solid-card.pick-fold .fold-count { color: var(--hit); background: #e3f4e8; }
.pick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px;
}
.pick-item {
  display: block; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px;
  background: var(--card); box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.pick-item:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.pick-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.pick-venue { font-weight: 700; color: var(--accent); }
.pick-dl { font-size: 11px; color: var(--muted); }
.pick-reason { font-size: 12px; font-weight: 600; color: #5a4500; margin-top: 4px; }
.pick-stars { font-size: 11px; color: var(--muted); margin-top: 4px; }
.pick-tag { font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 8px; line-height: 16px; }
.pick-tag-波乱 { background: #fde7e5; color: var(--miss); }
.pick-tag-豪華 { background: #fff3d6; color: #9a6b00; }
.pick-tag-直前 { background: #e3f4e8; color: var(--hit); }

/* 鉄板レース */
.solid-card { border-left: 4px solid var(--hit); }
.solid-item:hover { border-color: var(--hit); }
.solid-hit { background: #e3f4e8; color: var(--hit); }
.solid-miss { background: #eceef2; color: var(--muted); }
.solid-body { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.solid-body .boat { width: 26px; height: 26px; line-height: 26px; font-size: 14px; }
.solid-racer { font-weight: 700; color: var(--ink); flex: 1 1 auto; }
.solid-prob { font-size: 26px; font-weight: 800; color: var(--hit); letter-spacing: -0.02em; line-height: 1; }
.solid-unit { font-size: 14px; font-weight: 700; margin-left: 1px; }

/* 勝負レース (本命PL確信度) */
.shoubu-card { border-left: 4px solid #2f6bff; }
.shoubu-card.pick-fold > summary::before { background: #2f6bff; }
.shoubu-card.pick-fold .fold-count { color: #2f6bff; background: #e7eeff; }
.shoubu-item:hover { border-color: #2f6bff; }
.shoubu-body { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.shoubu-combo { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; }
.shoubu-combo .boat { width: 26px; height: 26px; line-height: 26px; font-size: 14px; }
.shoubu-arrow { color: var(--muted); font-size: 15px; font-weight: 700; }
.shoubu-pl { font-size: 26px; font-weight: 800; color: #2f6bff; letter-spacing: -0.02em; line-height: 1; }
.pick-hit { background: #e3f4e8; color: var(--hit); }

/* 日別レース一覧: 折りたたみ + 的中フィルタ */
.day-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 4px;
}
.day-controls .toggle { font-weight: 600; cursor: pointer; user-select: none; }
.day-controls .toggle input { vertical-align: middle; margin-right: 4px; }
.day-controls .btn { padding: 4px 10px; font-size: 13px; }
/* テレボート風 場カードのグリッド */
.venue-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px; margin: 12px 0; align-items: stretch;
}
.venue-details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); margin: 0; padding: 0 14px;
  box-shadow: var(--shadow); overflow: hidden; position: relative;
  display: flex; flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
/* 閉じたカードは中身を縦中央に寄せて高さを揃える */
.venue-details:not([open]) > summary { flex: 1 1 auto; justify-content: center; }
.venue-grid > .venue-details { min-height: 88px; }
/* 開いたカードは内容に合わせて伸ばす (固定高さ解除) */
.venue-grid > details.venue-details[open] { min-height: 0; }
/* グリッド時はコンパクト化: 「次の締切」ラベル・確定進捗バー・レース数を省く */
.venue-grid:not(.is-list) .vnext-lab { display: none; }
.venue-grid:not(.is-list) .vcard-foot { display: none; }
.venue-grid:not(.is-list) > .venue-details:not([open]) > summary { padding: 9px 0; gap: 5px; }

/* 場カードをリンク化 (展開せず /day/d/venue へ遷移)。summary 相当のレイアウトを直付け */
.venue-link {
  text-decoration: none; color: inherit; cursor: pointer;
  justify-content: center; gap: 8px; padding: 12px 14px; font-size: 15px;
}
.venue-grid > .venue-link:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.venue-grid:not(.is-list) > .venue-link { padding: 9px 14px; gap: 5px; }
.venue-grid.is-list > .venue-link {
  flex-flow: row wrap; align-items: center; justify-content: flex-start;
  gap: 4px 12px; padding: 11px 14px;
}

/* スマホ: 3列の洗練されたコンパクトグリッド (グリッド表示時のみ) */
@media (max-width: 600px) {
  main { padding: 14px 10px 36px; }
  .venue-grid:not(.is-list) { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .venue-grid:not(.is-list) > .venue-details { min-height: 86px; padding: 0; border-radius: 13px; }
  .venue-grid:not(.is-list) > .venue-details:not([open]) > summary,
  .venue-grid:not(.is-list) > .venue-link {
    padding: 10px 6px; gap: 6px; align-items: center; text-align: center;
  }
  /* 場名: チップは小さく上、場名を主役に */
  .venue-grid:not(.is-list) .vcard-head { flex-direction: column; align-items: center; gap: 3px; padding-right: 0; }
  .venue-grid:not(.is-list) .vsum-name { font-size: 14px; font-weight: 800; line-height: 1.1; }
  .venue-grid:not(.is-list) .vchip { min-width: 0; height: 16px; line-height: 16px; padding: 0 6px; font-size: 10px; border-radius: 6px; }
  .venue-grid:not(.is-list) .grade { font-size: 9px; padding: 1px 5px; }
  .venue-grid:not(.is-list) .vsum-title { display: none; }
  /* 締切: 「4R 14:08」を1行、「あと10分」を下段にして中央そろえ */
  .venue-grid:not(.is-list) .vsum-next { justify-content: center; align-items: baseline; gap: 4px; flex-wrap: wrap; line-height: 1.25; }
  .venue-grid:not(.is-list) .vnext-r { font-size: 11px; color: var(--muted); font-weight: 700; }
  .venue-grid:not(.is-list) .vnext-t { font-size: 13.5px; font-weight: 800; }
  .venue-grid:not(.is-list) .vnext-left { flex-basis: 100%; text-align: center; font-size: 10px; margin-top: 0; }
  .venue-grid:not(.is-list) .vnext-done { font-size: 10.5px; }
  .venue-grid:not(.is-list) > .venue-details > summary::after { display: none; }
  /* 非開催・中止カードも中央寄せ・同サイズに */
  .venue-grid:not(.is-list) > .venue-inactive,
  .venue-grid:not(.is-list) > .venue-cancelled {
    padding: 10px 6px; align-items: center; text-align: center; justify-content: center; gap: 5px;
  }
  .venue-grid:not(.is-list) > .venue-inactive .vcard-head,
  .venue-grid:not(.is-list) > .venue-cancelled .vcard-head { flex-direction: column; align-items: center; gap: 3px; }
  .venue-grid:not(.is-list) > .venue-cancelled .vsum-title { display: none; }
  .vinactive-lab, .vcancel-lab { font-size: 9.5px; align-self: center; }
  /* 上部ヒーローも少し圧縮 */
  .day-hero { padding: 13px 15px; }
  .dh-d { font-size: 21px; }
}
.venue-grid > details.venue-details:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.venue-details[open] { box-shadow: var(--shadow-lg); grid-column: 1 / -1; transform: none; }
.venue-details > summary {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  cursor: pointer; padding: 12px 0; font-size: 15px; list-style: none;
}
.venue-details > summary::-webkit-details-marker { display: none; }
.venue-details > summary::after {
  content: "\25B8"; color: var(--muted); transition: transform 0.15s;
  position: absolute; top: 14px; right: 12px; font-size: 12px;
}
.venue-details[open] > summary::after { transform: rotate(90deg); }
/* 非開催 (グレーアウト) カード */
.venue-inactive {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 14px; box-shadow: none; border-style: dashed;
  background: repeating-linear-gradient(135deg, #f3f4f8 0 10px, #eef0f5 10px 20px);
  opacity: 0.7;
}
.venue-inactive:hover { transform: none; border-color: var(--line); box-shadow: none; }
.venue-inactive .vchip { background: #c7ccd8; box-shadow: none; }
.venue-inactive .vsum-name { color: var(--muted); font-weight: 700; }
.vinactive-lab { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }

/* 中止カード (赤は締切間近と紛らわしいのでグレーアウト) */
.venue-cancelled {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 12px 14px; box-shadow: none; border-style: dashed;
  border-color: #d6dae3;
  background: repeating-linear-gradient(135deg, #eef0f4 0 10px, #e6e9ef 10px 20px);
  opacity: 0.78;
}
.venue-cancelled:hover { transform: none; box-shadow: none; border-color: #d6dae3; }
.venue-cancelled .vchip { background: #aeb4c0; color: #fff; box-shadow: none; }
.venue-cancelled .vsum-name { color: var(--muted); }
.vcancel-lab { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 800;
  color: #fff; background: #7c828f; letter-spacing: 0.06em;
  padding: 2px 10px; border-radius: 10px; }

.vcard-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-right: 16px; }
.vcard-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 開いた場カード内の レース別グリッドカード */
.race-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px; padding-bottom: 12px; align-items: stretch; }
.race-item { border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s; }
.race-item:not([open]) { min-height: 74px; }
.race-item:not([open]):hover { border-color: var(--accent); transform: translateY(-1px);
  box-shadow: var(--shadow); }
.race-item[open] { grid-column: 1 / -1; min-height: 0; border-color: #bcd4ff; box-shadow: var(--shadow); }
.ri-sum { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer;
  padding: 9px 8px; list-style: none; text-align: center; }
.race-item:not([open]) > .ri-sum { flex: 1 1 auto; justify-content: center; }
.ri-sum::-webkit-details-marker { display: none; }
.race-item[open] .ri-sum { flex-direction: row; justify-content: flex-start; gap: 10px;
  text-align: left; padding: 10px 14px;
  background: linear-gradient(120deg, var(--accent-soft) 0%, #f2f7ff 100%); }
.ri-r { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.ri-dl { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px; color: var(--accent-ink); }
.ri-next { font-size: 10px; font-weight: 800; color: #fff; background: var(--grad);
  padding: 1px 8px; border-radius: 10px; box-shadow: 0 2px 6px rgba(47,107,255,0.35); white-space: nowrap; }
.race-item[open] .ri-next { margin-left: auto; }
.ri-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--line-soft); }
.ri-line { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.ri-lab { font-size: 10px; font-weight: 800; color: var(--muted); letter-spacing: 0.04em;
  background: #eef0f5; padding: 2px 7px; border-radius: 8px; flex: 0 0 auto; margin-top: 1px; }
.ri-card-link { align-self: flex-start; font-size: 12px; padding: 5px 12px; }
/* 確定結果ライン */
.ri-result { align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: linear-gradient(120deg, #eef7f0 0%, #f4faf5 100%); border: 1px solid #cfe9d6; }
.ri-lab-res { background: var(--hit); color: #fff; }
.ri-result .combo .boat { width: 22px; height: 22px; line-height: 22px; font-size: 12px; }
.ri-kimarite { font-size: 12px; font-weight: 700; color: #2e7d32; }
.ri-pay { font-size: 12px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.ri-aihit { font-size: 10px; font-weight: 800; padding: 1px 8px; border-radius: 10px; }
.ri-aihit.hit { background: #e3f4e8; color: var(--hit); }
.ri-aihit.miss { background: #eceef2; color: var(--muted); }
.ri-aihit-ana { background: linear-gradient(120deg, #e07b00, #f59e0b); color: #fff;
  box-shadow: 0 2px 6px rgba(224,123,0,0.35); }
.vsum-next { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.vnext-lab { font-size: 10px; font-weight: 700; color: #fff; background: var(--accent);
  padding: 1px 6px; border-radius: 10px; }
.vnext-r { font-weight: 800; color: var(--ink); }
.vnext-t { font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.vnext-done { font-size: 11px; font-weight: 700; color: var(--muted); }
.vnext-left { font-size: 11px; font-weight: 800; color: var(--hit); margin-left: 2px; }
.vnext-left.urgent { color: var(--miss); }

/* 締切が近い TOP3 の場を色で強調 (赤=最短, 橙=2番目, 青=3番目) */
.venue-grid > .venue-soon { border-width: 1.5px; }
.venue-grid > .venue-soon:not([open])::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
}
.venue-soon.soon-1 { border-color: #e0453b; box-shadow: 0 6px 22px rgba(224,69,59,0.22); }
.venue-soon.soon-1:not([open])::before { background: linear-gradient(180deg, #e0453b, #f0726a); }
.venue-soon.soon-1 .vnext-t { color: #c0392b; }
.venue-soon.soon-2 { border-color: #e07b00; box-shadow: 0 6px 22px rgba(224,123,0,0.20); }
.venue-soon.soon-2:not([open])::before { background: linear-gradient(180deg, #e07b00, #f59e0b); }
.venue-soon.soon-2 .vnext-t { color: #c2610a; }
.venue-soon.soon-3 { border-color: #2f6bff; box-shadow: 0 6px 22px rgba(47,107,255,0.18); }
.venue-soon.soon-3:not([open])::before { background: linear-gradient(180deg, #2f6bff, #6aa0ff); }
.venue-soon.soon-3 .vnext-t { color: var(--accent-ink); }
/* 選択(hover/open)してもランク色の枠を維持する (汎用hoverの青に上書きされない) */
.venue-grid > .venue-soon.soon-1:hover, .venue-grid > .venue-soon.soon-1[open] { border-color: #e0453b; }
.venue-grid > .venue-soon.soon-2:hover, .venue-grid > .venue-soon.soon-2[open] { border-color: #e07b00; }
.venue-grid > .venue-soon.soon-3:hover, .venue-grid > .venue-soon.soon-3[open] { border-color: #2f6bff; }

/* レイアウト切替: リスト(縦1列) */
.venue-grid.is-list { grid-template-columns: 1fr; gap: 6px; }
.venue-grid.is-list > .venue-details { min-height: 0; }
.venue-grid.is-list > .venue-details:not([open]) > summary {
  flex: none; flex-flow: row wrap; align-items: center; justify-content: flex-start;
  gap: 4px 12px; padding: 11px 28px 11px 6px; text-align: left;
}
.venue-grid.is-list > .venue-details:not([open]) .vcard-head { padding-right: 0; flex-wrap: nowrap; }
.venue-grid.is-list > .venue-details:not([open]) .vsum-name { font-size: 15px; }
.venue-grid.is-list > .venue-details:not([open]) .vsum-title { margin: 0; }
.venue-grid.is-list > .venue-details:not([open]) .vsum-next { margin-left: auto; }
.venue-grid.is-list > .venue-details:not([open]) .vcard-foot { flex-basis: 100%; margin-top: 1px; }
/* 場カードの本命/穴買い目: リスト表示時のみ表示 (グリッドはコンパクト維持で非表示) */
.vcard-buy { display: none; }
.venue-grid.is-list > .venue-link .vcard-buy {
  display: flex; flex-direction: column; flex-basis: 100%; align-items: flex-start;
  gap: 3px; margin-top: 5px; padding-top: 6px; border-top: 1px solid var(--line);
}
.vcard-buy .vbuy-r { font-size: 11px; font-weight: 700; color: var(--muted); }
.vcard-buy .buy-row { font-size: 12px; }
/* リストの非開催・中止カードも横並びに */
.venue-grid.is-list > .venue-inactive,
.venue-grid.is-list > .venue-cancelled {
  flex-flow: row wrap; align-items: center; justify-content: flex-start;
  text-align: left; padding: 11px 12px;
}
.venue-grid.is-list > .venue-inactive .vinactive-lab,
.venue-grid.is-list > .venue-cancelled .vcancel-lab { margin-left: auto; }

/* レイアウト/ソート 操作バー */
.layout-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 2px; }
.layout-bar .lb-group { display: flex; gap: 4px; }
.lb-sort { margin-left: auto; }
.lb-sort[hidden] { display: none; }
.venue-details > summary .vsum-name { font-weight: 700; }
.vsum-hit { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 10px; }
.vsum-hit.hit { background: #e3f4e8; }
.vsum-hit.miss { background: #eceef2; color: var(--muted); }
.vsum-count { font-size: 12px; margin-left: auto; }
.venue-details > .tscroll { padding-bottom: 12px; }

/* 日別ヒーローヘッダ */
.day-hero {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 20px; margin: 6px 0 18px; padding: 18px 22px;
  background: linear-gradient(120deg, #141b29 0%, #1f2c44 55%, #25406e 100%);
  border-radius: var(--radius); color: #fff;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.day-hero::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(75,139,255,0.38) 0%, rgba(75,139,255,0) 70%);
  pointer-events: none;
}
.day-hero-main { display: flex; flex-direction: column; gap: 9px; z-index: 1; min-width: 0; }
.day-hero-date { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dh-d { font-size: 27px; font-weight: 800; letter-spacing: 0.01em; line-height: 1;
  font-variant-numeric: tabular-nums; }
.dh-wd { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.15); line-height: 1; }
.dh-wd-土 { background: #1565c0; }
.dh-wd-日 { background: #c62828; }
.dh-live { font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 11px; border-radius: 20px; background: var(--grad); line-height: 1.4;
  box-shadow: 0 2px 9px rgba(11,95,255,0.55); }
.day-hero-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.dh-stat { font-size: 13px; color: #aeb8c9; font-weight: 600; }
.dh-stat b { font-size: 21px; color: #fff; font-weight: 800; margin-right: 3px;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.day-hero .date-nav { z-index: 1; }
.day-hero .btn {
  background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); color: #e4eaf4;
  box-shadow: none;
}
.day-hero .btn:hover { background: rgba(255,255,255,0.18); border-color: #fff; color: #fff; transform: translateY(-1px); }

/* 会場サマリ: コードチップ + 確定プログレス */
.vchip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 23px; padding: 0 8px; border-radius: 7px;
  font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #2b3650 0%, #1c2436 100%); color: #fff;
  letter-spacing: 0.03em; flex: 0 0 auto;
}
.vsum-prog { display: inline-flex; align-items: center; gap: 8px; }
.vcard-foot .vsum-count { margin-left: auto; }
.vsum-bar { width: 70px; height: 6px; border-radius: 4px; background: #e1e5ee;
  overflow: hidden; flex: 0 0 auto; }
.vsum-bar-fill { display: block; height: 100%; background: var(--hit); border-radius: 4px;
  transition: width 0.4s ease; }
.vsum-prog-lab { font-size: 11px; color: var(--muted); font-weight: 700;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.vsum-prog-lab.all-done { color: var(--hit); }
.venue-details > summary .vsum-count { margin-left: 0; }

/* グレードバッジ (SG/PG1/G1/G2/G3) */
.grade {
  display: inline-flex; align-items: center; line-height: 1.3; flex: 0 0 auto;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 6px; color: #fff;
}
.grade-SG  { background: linear-gradient(120deg, #b8860b 0%, #e0a100 100%);
  box-shadow: 0 1px 5px rgba(224,161,0,0.45); }
.grade-PG1 { background: linear-gradient(120deg, #7b3fb3 0%, #9c5fd6 100%); }
.grade-G1  { background: #c62828; }
.grade-G2  { background: #e07b00; }
.grade-G3  { background: #1565c0; }
.vsum-title {
  font-size: 11px; font-weight: 600; max-width: 230px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* レース行: R ピル + 締切/確定 */
.rno {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; padding: 3px 9px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-ink) !important;
  font-weight: 800; font-variant-numeric: tabular-nums; text-decoration: none;
  transition: background 0.13s, color 0.13s;
}
.rno:hover { background: var(--accent); color: #fff !important; }
.rcell-dl { white-space: nowrap; }
.dl-time { font-variant-numeric: tabular-nums; }
.rdone { font-size: 10px; font-weight: 800; margin-left: 7px; padding: 1px 7px;
  border-radius: 8px; background: #e3f4e8; color: var(--hit); vertical-align: middle; }
/* 予想本命艇のメンバーを強調 */
.roster-pick { background: #fff7e0; border-radius: 10px; padding: 1px 8px 1px 2px;
  box-shadow: inset 0 0 0 1px #f0d68a; }
.roster-pick .roster-name { font-weight: 700; }

/* 的中レースのみ表示 */
#venues.only-hits .race-row[data-hit="0"] { display: none; }
#venues.only-hits .venue-details.no-hit { display: none; }

/* 下部タブバー: 静的スタイル (既定は非表示)。@768 ブロックより前に置き、
   メディアクエリ内の display:grid が後勝ちで効くようにする */
.botnav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(13, 17, 28, 0.96); background-image: var(--nav);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -6px 22px rgba(8, 12, 24, 0.30);
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: saturate(160%) blur(8px);
}

/* ===== モバイル/小タブレット (≤768px): 下部タブバー + シェル圧縮 ===== */
@media (max-width: 768px) {
  body { font-size: 13px; }
  main { padding: 12px 10px calc(70px + env(safe-area-inset-bottom)); }
  footer { margin-bottom: calc(58px + env(safe-area-inset-bottom)); }
  /* 上部ナビはブランドのみ残し、リンクは下部タブバーへ移譲 */
  .topnav { gap: 0; padding: 9px 14px; padding-top: calc(9px + env(safe-area-inset-top)); }
  .topnav .brand { font-size: 13px; letter-spacing: 0.06em; }
  .topnav nav { display: none; }
  /* 下部タブバー表示 */
  .botnav { display: grid; }
  h1 { font-size: 17px; }
  h2 { font-size: 14px; }
  section { padding: 12px 12px; border-radius: 12px; margin: 12px 0; }
  .two-col { gap: 0; }
  .two-col > section { flex-basis: 100%; }
  .kv-table th { width: 42%; }
  .summary-row { gap: 8px; }
  .summary-item { flex: 1 1 calc(50% - 8px); padding: 8px 10px; }
  .summary-val { font-size: 16px; }
  .summary-val.big { font-size: 20px; }
  .chart { height: 300px; }
  .chart-sm { height: 230px; }
  .racer-search input { min-width: 0; flex: 1 1 auto; }
  .racer-search.compact input { min-width: 0; }
  .page-head { gap: 8px; }
  .day-hero { padding: 14px 16px; gap: 12px; }
  .dh-d { font-size: 22px; }
  .dh-stat b { font-size: 18px; }
  .day-hero .date-nav { width: 100%; }
  .vsum-bar { width: 54px; }
  .vsum-title { max-width: 130px; }
  .date-nav { flex-wrap: wrap; }
  .date-nav .btn { flex: 1 1 auto; text-align: center; }
  .countdown { width: 100%; justify-content: center; }
  .countdown .cd-time { font-size: 20px; }
  .tri-main { gap: 10px; padding: 12px; }
  .tri-prob { font-size: 20px; }
  .pick-grid { grid-template-columns: 1fr; }
  /* データ取得の12ヶ月ゲージ (旧 760 ブロックから統合) */
  .cov-months { grid-template-columns: repeat(6, 1fr); }
  .cov-cell { height: 28px; }
  /* タップ領域を確保 */
  .btn, .etab-btn, .rf-btn, .hf-btn, .hit-search-input,
  .racer-search input, .lb-group .rf-btn { min-height: 40px; }
  .etab-btn { padding: 9px 18px; }
  /* 列の多い表はモバイルでセルを圧縮 */
  .entry-table th, .entry-table td,
  .snap-table th, .snap-table td { padding: 6px 7px; font-size: 12px; }
  .entry-table .boat { width: 20px; height: 20px; line-height: 20px; font-size: 11px; }
  /* 的中レース一覧の検索ボックスを伸長 */
  .hit-search-input { flex: 1 1 auto; min-width: 0; }
  .hit-controls { gap: 8px; }
}

.botnav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 7px 2px 6px; min-height: 54px;
  color: #aab2c4; text-decoration: none; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.02em; -webkit-tap-highlight-color: transparent;
}
.botnav-item svg { width: 22px; height: 22px; }
.botnav-item.active { color: #fff; }
.botnav-item.active svg { color: #6aa0ff; }
.botnav-item:active { background: rgba(255, 255, 255, 0.10); }

/* スマホ (≤640px): グラフ高さ圧縮 + データ取得ゲージを4列 */
@media (max-width: 640px) {
  .chart { height: 260px; }
  .chart-sm { height: 210px; }
  .cov-months { grid-template-columns: repeat(4, 1fr); }
}

/* 広告/アフィリエイト枠 (「広告」ラベル必須・レスポンシブ・控えめ) */
.ad-slot {
  position: relative;
  margin: 16px 0;
  padding: 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  text-align: center;
  overflow: hidden;
}
.ad-label {
  position: absolute; top: 4px; left: 8px;
  font-size: 9px; font-weight: 700; color: var(--muted);
  letter-spacing: 0.06em;
}
.ad-body {
  min-height: 60px;
  display: flex; align-items: center; justify-content: center;
}
.ad-body img, .ad-body iframe, .ad-body ins { max-width: min(100%, 300px); height: auto; }
.ad-placeholder { color: var(--muted); font-size: 12px; }

/* 展示進入(スタート展示の並び。前づけ/ピット離れで枠と変わる) */
.shinnyu-strip {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 10px 0; padding: 8px 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.shinnyu-changed { border-color: var(--accent); background: var(--accent-soft); }
.shinnyu-lab {
  font-size: 11px; font-weight: 700; color: var(--ink2);
  background: var(--accent-soft); padding: 2px 8px; border-radius: 8px;
}
.shinnyu-order { display: inline-flex; align-items: center; gap: 4px; }
.shinnyu-order .boat { width: 24px; height: 24px; line-height: 24px; font-size: 13px; }
.shinnyu-sep { color: var(--muted); font-weight: 700; }
.shinnyu-chg {
  font-size: 11px; font-weight: 700; color: var(--miss);
  background: #fde7e5; padding: 2px 8px; border-radius: 8px;
}
.shinnyu-wari { font-size: 11px; }
.shinnyu-note { font-size: 10px; margin-left: auto; }

/* 利用規約・プライバシーポリシー等の文書ページ */
.policy { max-width: 760px; line-height: 1.8; color: var(--ink); }
.policy h2 { font-size: 16px; margin: 22px 0 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--line); }
.policy p { margin: 8px 0; }
.policy ul { margin: 8px 0 8px 1.2em; }
.policy li { margin: 4px 0; }
.policy .meta { color: var(--muted); font-size: 12px; }
.footer-links { font-size: 12px; }
.footer-links a { color: inherit; }

/* お問い合わせフォーム */
.contact-form { max-width: 560px; margin: 14px 0; }
.cf-row { display: block; margin-bottom: 12px; }
.cf-lab { display: block; font-size: 12px; font-weight: 700; color: var(--ink2); margin-bottom: 4px; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 14px; min-height: 40px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); color: var(--ink); font-family: inherit;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.cf-submit { margin-top: 6px; }
.hp { position: absolute; left: -9999px; }
.contact-sent {
  background: #e3f4e8; color: var(--hit); border: 1px solid var(--hit);
  padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 700;
}
