/* ============================================================
   AI BOAT RACE — "プロのデータプロダクト" ダークテーマ
   ベース: #0f1222〜#1a1a2e / アクセント: シアン #22d3ee + アンバー #f59e0b
   モバイルファースト / 外部依存は Google Fonts のみ
   ============================================================ */
:root {
  --bg: #0f1222;
  --bg2: #14182b;
  --bg3: #1a1a2e;
  --card: rgba(255, 255, 255, 0.03);
  --card-solid: #181c30;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e9ecf5;
  --muted: #9aa3bd;
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.12);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.14);
  --pos: #34d399;
  --neg: #fb7185;
  --font-head: "Outfit", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", system-ui, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 480px at 80% -120px, rgba(34, 211, 238, 0.07), transparent 60%),
    radial-gradient(900px 420px at -10% 8%, rgba(99, 102, 241, 0.06), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg3) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.75;
  font-size: 15px;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(34, 211, 238, 0.3); }

/* 数値はOutfit + tabular-nums で桁を揃える */
.num, .stat-value, .record td, .record th, .chart text {
  font-family: var(--font-head);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 18, 34, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .logo-mark { width: 28px; height: 28px; flex: none; display: block; }
.brand .tagline { display: none; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
@media (min-width: 700px) { .brand .tagline { display: inline; margin-left: 8px; } }

.nav { display: flex; gap: 8px; }
.nav a {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.nav a:hover { border-color: var(--cyan); background: var(--cyan-dim); text-decoration: none; }

/* ---------- main ---------- */
main { padding: 22px 16px 48px; }

h1 { font-family: var(--font-head); font-size: 24px; line-height: 1.35; font-weight: 700; letter-spacing: 0.01em; }
h2 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  margin-top: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
h3 { font-size: 15.5px; color: var(--cyan); font-weight: 600; }

.lead { color: var(--muted); font-size: 14.5px; }
.note { color: var(--muted); font-size: 12px; }

.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  margin: 10px 0 8px;
  padding: 34px 22px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(640px 300px at 18% -40%, rgba(34, 211, 238, 0.16), transparent 65%),
    radial-gradient(520px 260px at 92% 130%, rgba(245, 158, 11, 0.08), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  overflow: hidden;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 5.4vw, 38px);
  font-weight: 800;
  line-height: 1.3;
  background: linear-gradient(95deg, #ffffff 30%, #9be8f7 75%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub { margin: 0; color: var(--muted); font-size: 14px; max-width: 40em; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}
.hero-stat {
  background: rgba(15, 18, 34, 0.55);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
}
.hero-stat .stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.hero-stat .stat-value {
  font-size: clamp(20px, 4.6vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  margin-top: 2px;
}
.hero-stat .stat-value small { font-size: 0.55em; font-weight: 600; color: var(--muted); margin-left: 2px; }
.hero-stat .stat-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.hero-stat.accent .stat-value { color: var(--cyan); }

/* ---------- ad slot ---------- */
.ad-slot {
  margin: 20px 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 6px;
}

/* ---------- stats grid (record / index下部) ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
}
@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.stat-label { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.stat-value { font-size: 19px; font-weight: 700; word-break: break-all; line-height: 1.4; }

/* ---------- 艇番カラーバッジ（公式色） ---------- */
.lane {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 5px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12.5px;
  line-height: 1;
  vertical-align: -4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.lane.l1 { background: #f4f6fb; color: #16181f; }
.lane.l2 { background: #17181d; color: #f4f6fb; border-color: rgba(255, 255, 255, 0.32); }
.lane.l3 { background: #e23d3d; color: #fff; }
.lane.l4 { background: #2f6fde; color: #fff; }
.lane.l5 { background: #f2d63b; color: #16181f; }
.lane.l6 { background: #2cab5c; color: #fff; }

.lane-suffix { color: var(--muted); font-size: 11.5px; margin-left: 4px; }

.combo { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.combo .dash { color: var(--muted); font-weight: 700; font-family: var(--font-head); }

/* ---------- 自信度バッジ ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  border: 1px solid;
  white-space: nowrap;
}
.badge-high { color: #fda4af; background: rgba(225, 29, 72, 0.16); border-color: rgba(225, 29, 72, 0.45); }
.badge-normal { color: #7dd3fc; background: rgba(14, 116, 144, 0.18); border-color: rgba(56, 189, 248, 0.4); }
.badge-difficult { color: #c4b5fd; background: rgba(124, 58, 237, 0.18); border-color: rgba(139, 92, 246, 0.45); }

/* ---------- レースカードグリッド (index) ---------- */
.race-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0 8px;
}
@media (min-width: 560px) { .race-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 800px) { .race-grid { grid-template-columns: repeat(3, 1fr); } }

.race-card {
  display: block;
  position: relative;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 13px;
  color: var(--text);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.race-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(34, 211, 238, 0.45);
}
.race-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.race-track { font-weight: 700; font-size: 15px; }
.race-no {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  color: var(--cyan);
}
.race-combos { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 22px; }
.race-combos .more { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.race-meta { margin-top: 8px; color: var(--muted); font-size: 12px; }
.race-meta .pts { color: var(--amber); font-weight: 700; }

/* ---------- archive ---------- */
.archive-list { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 8px; }
@media (min-width: 600px) { .archive-list { grid-template-columns: repeat(2, 1fr); } }
.archive-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  transition: border-color 0.15s;
}
.archive-list li:hover { border-color: var(--cyan); }
.archive-list a { color: var(--text); font-size: 13.5px; display: block; }

.btn {
  display: inline-block;
  background: linear-gradient(120deg, var(--cyan), #38bdf8);
  color: #06222b;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: opacity 0.15s, transform 0.15s;
}
.btn:hover { text-decoration: none; opacity: 0.88; transform: translateY(-1px); }

/* ---------- record 期間フィルタ ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 6px;
  padding: 12px 14px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter-dates {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-dates label { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.filter-sep { color: var(--muted); }
.filter-bar input[type="date"] {
  background: rgba(15, 18, 34, 0.7);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 13px;
  padding: 5px 8px;
  color-scheme: dark;
}
.filter-bar input[type="date"]:focus { outline: none; border-color: var(--cyan); }
.filter-track { display: flex; align-items: center; gap: 8px; }
.filter-track label { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.filter-bar select {
  background: rgba(15, 18, 34, 0.7);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 13px;
  padding: 5px 8px;
  color-scheme: dark;
  cursor: pointer;
}
.filter-bar select:focus { outline: none; border-color: var(--cyan); }
.track-only-note { font-weight: 600; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.presets button {
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.presets button:hover { border-color: var(--cyan); background: var(--cyan-dim); }
.presets button.active {
  border-color: var(--cyan);
  background: var(--cyan-dim);
  color: var(--cyan);
  font-weight: 700;
}
.stat .stat-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.conf-cell { text-align: left; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); margin: 16px 0; }
.table-scroll table { margin: 0; border: 0; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.02);
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
  text-align: right;
  white-space: nowrap;
}
th:first-child, td:first-child { text-align: left; }
thead th {
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  border-bottom: 1px solid var(--line-strong);
}
tbody tr:hover { background: rgba(34, 211, 238, 0.05); }
tfoot th {
  background: rgba(34, 211, 238, 0.07);
  border-top: 2px solid rgba(34, 211, 238, 0.5);
  border-bottom: 0;
  font-weight: 800;
}
td small { color: var(--muted); font-size: 11px; }

/* ---------- 収支チャート (inline SVG) ---------- */
.chart-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px 8px;
  margin: 18px 0;
}
.chart-card h3 { margin: 0 0 4px; font-size: 13.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.05em; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .final-label { fill: var(--amber); font-weight: 700; font-size: 13px; }

/* ---------- markdown article ---------- */
.md {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 18px;
  overflow-wrap: break-word;
}
.md h1 { font-size: 20px; margin-top: 0; }
.md h2 { font-size: 17px; }
.md img { max-width: 100%; border-radius: 8px; }
.md table { font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }
.md blockquote {
  margin: 14px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--amber);
  background: var(--amber-dim);
  border-radius: 0 10px 10px 0;
  color: var(--muted);
}
.md blockquote p { margin: 4px 0; }
.md pre {
  background: #0b0e1c;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.55;
}
.md code { font-family: Consolas, "Courier New", monospace; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.md strong { color: #fff; }

/* ---------- 今日の予想: まもなく締切 (today.js が描画) ---------- */
.closing-soon {
  margin: 14px 0 6px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius);
  background:
    radial-gradient(420px 180px at 12% -30%, rgba(245, 158, 11, 0.12), transparent 60%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}
.soon-title {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.05em;
}
.soon-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 560px) { .soon-grid { grid-template-columns: repeat(3, 1fr); } }
.soon-card {
  display: block;
  background: rgba(15, 18, 34, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px 10px;
  color: var(--text);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.soon-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(245, 158, 11, 0.55);
}
.soon-close {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.soon-close-label { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.soon-close-time {
  font-family: var(--font-head);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 800;
  color: var(--amber);
  line-height: 1.2;
}
.soon-race { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 4px; }
.soon-combos { margin-top: 8px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.soon-combos .more { color: var(--muted); font-size: 11px; font-weight: 600; }
.soon-done { margin: 2px 0 4px; color: var(--muted); font-size: 13.5px; }

/* ---------- 今日の予想: 場別クイックナビ ---------- */
.track-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
}
.track-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.track-chip:hover { border-color: var(--cyan); background: var(--cyan-dim); text-decoration: none; }
.track-chip-n {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
}

/* ---------- 今日の予想: 場別セクション ---------- */
.track-section { margin-top: 22px; scroll-margin-top: 64px; }
.track-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.track-head h3 { margin: 0; font-size: 16.5px; color: var(--text); font-weight: 700; }
.track-count { font-size: 12px; color: var(--muted); }

/* 1R〜12R チップグリッド */
.rchip-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin: 12px 0 4px;
}
@media (min-width: 560px) { .rchip-grid { grid-template-columns: repeat(12, 1fr); } }
.rchip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  font-family: var(--font-head);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
a.rchip:hover { text-decoration: none; border-color: var(--cyan); transform: translateY(-1px); }
.rchip-high { color: #fda4af; background: rgba(225, 29, 72, 0.16); border-color: rgba(225, 29, 72, 0.45); }
.rchip-normal { color: #7dd3fc; background: rgba(14, 116, 144, 0.18); border-color: rgba(56, 189, 248, 0.4); }
.rchip-difficult { color: #c4b5fd; background: rgba(124, 58, 237, 0.18); border-color: rgba(139, 92, 246, 0.45); }
.rchip-off { color: rgba(154, 163, 189, 0.45); background: rgba(255, 255, 255, 0.015); cursor: default; }
.rchip.is-closed { opacity: 0.55; }

/* レースカードの締切行・締切状態 (today.js が更新) */
.race-close {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.race-close .close-time {
  font-family: var(--font-head);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.close-status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.close-status.st-open { color: #67e8f9; background: var(--cyan-dim); border: 1px solid rgba(34, 211, 238, 0.4); }
.close-status.st-closed { color: var(--muted); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.race-card.is-closed { opacity: 0.55; }
.race-card.is-closed:hover { opacity: 0.85; }

/* ---------- 出走表（レースページ・racelist/beforeinfo enrich版） ---------- */
.entry-scroll { margin: 14px 0 4px; }
.entry-table {
  font-size: 12.5px;
  margin: 0;
}
.entry-table th, .entry-table td {
  text-align: center;
  padding: 7px 9px;
  vertical-align: middle;
}
.entry-table thead th {
  font-size: 10.5px;
  line-height: 1.35;
  padding: 6px 9px;
}
.entry-table thead th small { font-size: 9.5px; font-weight: 500; color: var(--muted); }
.entry-table .na { color: rgba(154, 163, 189, 0.45); }

/* 枠・選手の sticky 左列（横スクロール時も常に見える） */
.entry-table th.c-lane, .entry-table td.c-lane {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  padding-left: 6px;
  padding-right: 6px;
  background: #161a2e;
}
.entry-table th.c-racer, .entry-table td.c-racer {
  position: sticky;
  left: 40px;
  z-index: 3;
  min-width: 124px;
  max-width: 168px;
  text-align: left;
  background: #161a2e;
  box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.6);
}
.entry-table thead th.c-lane, .entry-table thead th.c-racer { z-index: 4; background: #1b2036; }
.entry-table tbody tr:hover td.c-lane,
.entry-table tbody tr:hover td.c-racer { background: #1a2138; }

/* 選手セル */
.racer-name { display: block; font-weight: 700; font-size: 13px; line-height: 1.3; white-space: nowrap; }
.racer-sub {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-head);
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}
.racer-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }

/* 級別バッジ: A1=金 / A2=銀 / B1=青 / B2=グレー */
.kbadge {
  display: inline-block;
  min-width: 30px;
  padding: 1px 7px;
  border-radius: 6px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  border: 1px solid;
  line-height: 1.5;
}
.k-a1 { color: #fbd38d; background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.55); }
.k-a2 { color: #e2e8f0; background: rgba(226, 232, 240, 0.12); border-color: rgba(226, 232, 240, 0.4); }
.k-b1 { color: #7dd3fc; background: rgba(14, 116, 144, 0.18); border-color: rgba(56, 189, 248, 0.4); }
.k-b2 { color: #9aa3bd; background: rgba(154, 163, 189, 0.1); border-color: rgba(154, 163, 189, 0.35); }
.k-other { color: var(--muted); background: var(--card); border-color: var(--line); }

/* ミニ横バー（CSSのみ） */
.entry-table td.c-bar { min-width: 76px; }
.bar-val { display: block; font-weight: 700; line-height: 1.3; }
.bar-val.hot { color: var(--amber); }
.minibar {
  display: block;
  height: 4px;
  margin-top: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.minibar-fill { display: block; height: 100%; border-radius: 99px; }
.fill-nat { background: linear-gradient(90deg, #0e7490, var(--cyan)); }
.fill-motor { background: linear-gradient(90deg, #b45309, var(--amber)); }
.fill-ai { background: linear-gradient(90deg, #22d3ee, #34d399); }

/* モーター/ボート番号・タグ類 */
.eq-no { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.etag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 4px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.etag-best { color: #06222b; background: var(--cyan); margin-left: 5px; vertical-align: 1px; }
.etag-prop { color: #86efac; background: rgba(52, 211, 153, 0.15); border: 1px solid rgba(52, 211, 153, 0.4); }
.etag-parts { color: #fda4af; background: rgba(225, 29, 72, 0.14); border: 1px solid rgba(225, 29, 72, 0.4); }

/* 展示タイム最速 / F・L */
.ex-best { color: var(--cyan); font-weight: 800; white-space: nowrap; }
.fl { font-family: var(--font-head); font-weight: 600; }
.fl-alert { color: var(--neg); font-weight: 800; }
.fl-sep { color: rgba(154, 163, 189, 0.4); margin: 0 2px; }

.entry-note { margin-top: 8px; }

/* AI 1着率列はサイトの差別化列: 薄いシアン地で強調 */
.entry-table th.c-ai { color: #67e8f9; }
.entry-table td.c-ai { background: rgba(34, 211, 238, 0.045); }

/* 出走表セルの3段階色分け（強 / 中 / 無色）。閾値は race_table.py の定数 */
.entry-table td.cell-strong {
  background: rgba(34, 211, 238, 0.13);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.22);
}
.entry-table td.cell-mid { background: rgba(34, 211, 238, 0.06); }
.entry-table tbody tr:hover td.cell-strong { background: rgba(34, 211, 238, 0.17); }
.entry-table tbody tr:hover td.cell-mid { background: rgba(34, 211, 238, 0.1); }

/* 色分け凡例（表の下・1行） */
.entry-legend { margin: 8px 0 0; }
.legend-box {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin: 0 4px 0 2px;
  vertical-align: -1px;
  border: 1px solid var(--line-strong);
}
.legend-box.cell-strong {
  background: rgba(34, 211, 238, 0.3);
  border-color: rgba(34, 211, 238, 0.5);
}
.legend-box.cell-mid { background: rgba(34, 211, 238, 0.12); }

/* ---------- AI分析レポート（レースページ・詳細根拠の置換） ---------- */
.ai-report { margin-top: 8px; }
.ai-report h2 { margin-bottom: 14px; }
.report-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
  margin: 14px 0;
}
.report-card h3 {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.report-card p { margin: 8px 0; font-size: 13.5px; }
.report-card .note { font-size: 11.5px; margin-top: 10px; }
.report-card .sub-label {
  margin: 12px 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.04em;
}
.report-card ul { margin: 4px 0 8px; padding-left: 20px; font-size: 13px; }
.report-card li { margin: 3px 0; }

/* コース別実測テーブル */
.course-stats td, .course-stats th { text-align: center; }
.course-stats td:first-child { text-align: left; font-weight: 700; white-space: nowrap; }
.course-stats .bar-val { font-size: 13px; }
.course-stats .kim-cell { font-size: 12px; color: var(--muted); }

/* 各艇の評価カード */
.boat-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 12px 0 6px; }
@media (min-width: 640px) { .boat-grid { grid-template-columns: repeat(2, 1fr); } }
.boat-card {
  background: rgba(15, 18, 34, 0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 9px;
}
.boat-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.boat-name { font-weight: 700; font-size: 13.5px; }
.boat-ai {
  margin-left: auto;
  font-family: var(--font-head);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 15px;
  color: #67e8f9;
  white-space: nowrap;
}
.boat-ai small { font-size: 9.5px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.boat-bar { margin: 7px 0 2px; }
.boat-points { margin: 6px 0 2px; padding-left: 18px; font-size: 12.5px; }
.boat-points li { margin: 2px 0; }
.boat-eval { margin-top: 6px; font-size: 11px; color: var(--muted); }

/* AIの判断プロセス */
.tag-strategy {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 999px;
  margin-right: 6px;
  color: #67e8f9;
  background: var(--cyan-dim);
  border: 1px solid rgba(34, 211, 238, 0.4);
  vertical-align: 1px;
  white-space: nowrap;
}
.tag-strategy.tag-diverge {
  color: #fbd38d;
  background: var(--amber-dim);
  border-color: rgba(245, 158, 11, 0.5);
}
.reason-list li, .layer-list li { color: var(--text); }
.layer-list code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11.5px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
  padding: 0 5px;
  border-radius: 4px;
}
.ev-demo {
  margin: 12px 0 4px;
  padding: 10px 12px 8px;
  background: rgba(15, 18, 34, 0.5);
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
}
.ev-demo p { margin: 0 0 4px; }
.ev-demo ul { margin: 4px 0 2px; }

/* 買い目の意図テーブル */
.picks-table td, .picks-table th { text-align: center; }
.picks-table td:first-child { text-align: left; }
.picks-table .pick-label { font-weight: 700; }
.ev-hot { color: var(--amber); }

/* 反証条件 */
.report-risk { border-color: rgba(251, 113, 133, 0.35); }
.report-risk h3 { color: #fda4af; border-bottom-color: rgba(251, 113, 133, 0.3); }
.report-risk .lead-s { color: var(--muted); font-size: 12.5px; margin: 6px 0 8px; }
.risk-list li { margin: 6px 0; }
.risk-list li::marker { color: #fb7185; }

/* エンジン生ログ（折りたたみ） */
.raw-log {
  margin: 14px 0 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(11, 14, 28, 0.6);
}
.raw-log summary {
  cursor: pointer;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}
.raw-log summary::-webkit-details-marker { display: none; }
.raw-log summary::before { content: "▸ "; color: var(--cyan); }
.raw-log[open] summary::before { content: "▾ "; }
.raw-log summary:hover { color: var(--text); }
.raw-log pre {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #0b0e1c;
  border-radius: 0 0 10px 10px;
  overflow-x: auto;
  font-size: 11.5px;
  line-height: 1.55;
}

/* ---------- footer ---------- */
.site-footer {
  background: rgba(10, 12, 24, 0.6);
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding: 26px 0 30px;
  font-size: 12px;
  color: var(--muted);
}
.site-footer .disclaimer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.site-footer .links { display: flex; gap: 14px; flex-wrap: wrap; }
.site-footer .links a { color: var(--cyan); }
.site-footer .copy { text-align: center; margin-top: 16px; color: rgba(154, 163, 189, 0.6); }

/* 日報ページ: この日の予想レース一覧 (2026-06-12) */
.day-races { margin: 16px 0; }
.day-races h2 { margin: 0 0 10px; font-size: 1.05rem; }
.day-races-track { margin: 6px 0; line-height: 2.1; }
.day-races-track strong { display: inline-block; min-width: 4.5em; color: #22d3ee; }
.race-link-chip {
  display: inline-block; padding: 2px 10px; margin: 0 3px 3px 0;
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  font-size: .85rem; text-decoration: none; color: #e7e9f4;
  background: rgba(255,255,255,.04);
}
.race-link-chip:hover { border-color: #22d3ee; color: #22d3ee; }

/* ---------- 場別ハブ (tracks.html / track/{tc}.html) ---------- */
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0;
}
@media (min-width: 560px) { .tracks-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 800px) { .tracks-grid { grid-template-columns: repeat(4, 1fr); } }
.track-card {
  display: block;
  position: relative;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px 11px;
  color: var(--text);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.track-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(34, 211, 238, 0.45);
}
.track-card-top { display: flex; align-items: baseline; gap: 8px; }
.track-card-name { font-weight: 700; font-size: 15.5px; }
.track-card-code {
  margin-left: auto;
  font-family: var(--font-head);
  font-size: 11px;
  color: rgba(154, 163, 189, 0.6);
}
.track-card-stat { display: flex; align-items: baseline; gap: 7px; margin-top: 7px; }
.track-card-win {
  font-family: var(--font-head);
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 19px;
  color: var(--cyan);
}
.badge-live {
  display: inline-block;
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 9px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  color: #fbd38d;
  background: var(--amber-dim);
  border: 1px solid rgba(245, 158, 11, 0.5);
  white-space: nowrap;
}

/* トップの場別チップ (2026-06-12) */
.venue-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.venue-chip {
  padding: 5px 13px; border-radius: 999px; font-size: .9rem; text-decoration: none;
  color: #e7e9f4; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.14);
}
.venue-chip:hover { border-color: #22d3ee; color: #22d3ee; }
.venue-chip.is-live { border-color: rgba(34,211,238,.6); color: #22d3ee; background: rgba(34,211,238,.08); }

/* ---------- 選手ページ / 選手索引 (2026-06-12) ---------- */
.racer-head { margin: 6px 0 4px; }
.racer-head h1 { margin-bottom: 4px; }
.racer-kana {
  display: inline-block;
  margin-left: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  vertical-align: 2px;
}
.racer-head-badges { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; }
.racer-regno {
  font-family: var(--font-head);
  font-feature-settings: "tnum" 1;
  font-size: 12.5px;
  color: var(--muted);
}
.racer-profile { margin-bottom: 6px; }

/* 出走表の選手名リンク（色は据え置き、下線で示す） */
.racer-link { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(154, 163, 189, 0.6); }
.racer-link:hover { color: var(--cyan); border-bottom-color: var(--cyan); text-decoration: none; }

/* 本日の出走チップ */
.racer-run .lane { margin-right: 6px; }
.racer-run-ai {
  display: inline-block;
  margin-left: 7px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.45);
}

/* 直近20走: 着順の色分け（1着=金 / 2-3着=シアン / F・失格等=赤） */
.racer-history td.fin { font-weight: 800; text-align: center; }
.racer-history td.fin-1 { color: var(--amber); }
.racer-history td.fin-23 { color: #67e8f9; }
.racer-history td.fin-x { color: #fb7185; }
.racer-courses td.c-bar { min-width: 110px; }

/* 選手索引 */
.racer-class-section h2 { display: flex; align-items: center; gap: 8px; }
.racer-class-n { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.racer-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 20px; }
.racer-chip {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  color: #e7e9f4;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
}
.racer-chip:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; }
.racer-chip-sub {
  margin-left: 6px;
  font-family: var(--font-head);
  font-feature-settings: "tnum" 1;
  font-size: 10.5px;
  color: var(--muted);
}
