
:root {
  --primary: #1e3a5f;
  --primary-dark: #16284a;
  --primary-light: #4a7bb8;
  --accent: #d9354c;
  /* Y2 (2026-05-28): 並び替え/ドラッグ系 UI 専用のアクセント色。
     サイトの primary accent (赤 #d9354c) はレーサーカラーの赤と衝突
     しやすく、また「予想／重要」の意味づけが既にある。並び替えは
     "実験/操作" 系のニュアンスなのでオレンジ (#f59e0b) で統一する。 */
  --lineup-accent: #f59e0b;
  --lineup-accent-soft: rgba(245, 158, 11, 0.12);
  --bg: #f4f6fa;
  --bg-soft: #fafbfd;
  --surface: #ffffff;
  --border: #e5e9f0;
  --text: #1f2937;
  --text-2: #545b64;
  --text-3: #545b64;
  /* 2026-07-03 タイポトークン(中1): 6段スケール。新規CSSはこのトークンを参照する。
     --fs-micro はバッジ・補助ラベル専用（本文・注記には使わない）。 */
  --fs-micro: 11px;
  --fs-note: 12px;
  --fs-label: 13px;
  --fs-body: 13.5px;
  --fs-cardtitle: 15px;
  --fs-h2: 17px;
  --fs-h1: 20px;
  --shadow-sm: 0 2px 8px rgba(15,23,42,.04), 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,.07), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 8px 24px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.05);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --transition: 200ms cubic-bezier(.4,0,.2,1);
}
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin:0; padding:0 0 76px;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", sans-serif;
  /* The gradient is on <html> with `fixed` so mobile Safari does NOT
     allocate phantom scroll area below the document. body itself is
     transparent so the html background shows through. Putting fixed
     on body causes a half-screen of white-space at bottom on iOS. */
  background: transparent;
  color: var(--text); font-size:17px; line-height:1.65;
  -webkit-font-smoothing: antialiased;
  /* M1 (2026-05-26): 日本語コンテンツのデフォルト改行ポリシー。
     - word-break: keep-all は単語 (= 連続した英数字 / カタカナ列) を
       バラさない。日本語の単漢字単位の縦割れを防ぐ。
     - overflow-wrap は、それでも入りきらないとき "本命候補：◯◯" のような
       長い句読点なし日本語を任意位置で折り返す (はみ出し回避)。
     2026-07-17: break-word は日本語長文の min-content を「文全体の幅」に保つため、
     幅制約の緩いカード(guide-card 等)を画面幅超へ広げ、横オーバーフローを起こした
     (ガイド一覧 ratio 1.21 を iframe375 で実測)。anywhere に戻す — min-content を
     1文字まで許容して要素が縮むので、横はみ出しが構造的に起きない。
     anywhere が招く flex 行の 1文字改行/縦積み崩壊は、個別に
     (makuri-title / it-head の flex-wrap + mkt-txt の overflow-wrap:normal) で対処済み。 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* 2026-09-16 レビュー指摘: 長文(記事・法務ページ・注記・フッター)は日本語標準の折り返しに戻す。
   上の keep-all + anywhere は短いラベル向けで、長文では句読点でしか折れず「344万1,072艇」の
   数字までコンマで割れ、行末がガタガタになっていた。normal は CJK の文字間で折り返し、
   line-break:strict で句読点が行頭に来ない。overflow-wrap:anywhere は継承のまま(はみ出し保険)。 */
.guide-article, .legal-article, .footer, .tw-note, .tw-hint, .bm-note, .rec-intro, .rec-info-note,
.rec-history-banner, .rec-empty, .ai-summary, .race-help, .dev-exclude-card {
  word-break: normal; line-break: strict;
}
/* M1: 画像・SVG はデフォルトでビューポート幅を超えない。
   width/height 属性が CSS の max-width:100% を打ち消さないよう
   height:auto も併記する。 */
img, svg, video, canvas { max-width: 100%; height: auto; }
html {
  background: linear-gradient(180deg, #f6f8fc 0%, #eef2f8 100%);
  background-attachment: fixed;
  min-height: 100%;
  /* M4 (2026-05-26): 万一どこかでオーバーフローが発生しても、ページ全体に
     横スクロール (= 「画面が動く」と感じる現象) を出さない最終防御。
     個別テーブルは内側で .scroll-x コンテナを使い、そこで意図的に
     横スクロールを許可する設計。 */
  overflow-x: hidden;
}

a { color:inherit; text-decoration:none; }
button { font-family:inherit; }

.header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4f7d 100%);
  color:#fff; padding:8px 18px 10px;
  position:sticky; top:0; z-index:10;
  box-shadow: 0 1px 3px rgba(15,23,42,.10);
  transition: transform 220ms ease-out;
  will-change: transform;
}
/* スクロール下方向で .header と .sticky-bar が画面外に逃げ、本文（出走表）
   が画面いっぱい使える。スクロール上方向（指を上にスワイプ→画面が下にスクロール
   ではなく逆）で元に戻る。
   Twitter/Mediumなどでお馴染みの "auto-hide on scroll down" パターン。 */
body.chrome-hidden .header {
  transform: translateY(-100%);
}
.header .nav-row, .header .brand-row {
  display:flex; justify-content:space-between; align-items:center; gap:10px;
}
.header .brand {
  font-size:18px; font-weight:700; letter-spacing:.02em;
  color:#fff; text-decoration:none; display:inline-flex; align-items:center; gap:6px;
  opacity:.95; transition: opacity var(--transition);
}
.header .brand:hover { opacity:1; }
.header .brand-mark { font-size:20px; }
.header .meta-right { font-size:13px; opacity:.8; }

/* 2026-05-25 追加: ヘッダ右上の選手検索リンク (P1.1 RUM 計測 0 PV 対策) */
.header-search-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  min-height: 36px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 10px;
  color: #fff;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  min-height: 44px;   /* 2026-07-13 UX: 36px→44px(HIG) */
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition), border-color var(--transition);
}
.header-search-link:hover {
  background: rgba(255,255,255,.24);
  border-color: rgba(255,255,255,.55);
}
.header-search-link:active { background: rgba(255,255,255,.30); }
.header-search-icon { font-size: 15px; }
.header-search-label { letter-spacing: .02em; }
@media (max-width: 480px) {
  .header-search-label { display: none; } /* 狭幅ではアイコンのみ */
  /* 2026-07-13 UX: アイコンのみ時も 44×44 の正方形タップ標的を確保 */
  .header-search-link { padding: 8px; min-width: 44px; justify-content: center; }
}
@media (min-width: 720px) {
  .header-search-link { font-size: 14px; padding: 9px 14px; min-height: 40px; }
}

/* Venue switcher dropdown (top-right of header) */
.venue-switcher { position: relative; }
.vs-trigger {
  background: rgba(255,255,255,.14); color: #fff;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 10px; padding: 10px 16px;
  font-size: 15px; font-family: inherit; font-weight: 600;
  cursor: pointer; line-height: 1.2;
  min-height: 44px;
  display: inline-flex; align-items: center;
  transition: background var(--transition), border-color var(--transition);
}
@media (min-width: 720px) {
  .vs-trigger { font-size: 16px; padding: 12px 18px; min-height: 48px; }
}
.vs-trigger:hover, .vs-trigger[aria-expanded="true"] {
  background: rgba(255,255,255,.24);
  border-color: rgba(255,255,255,.55);
}
.vs-trigger .vs-caret { display: inline-block; margin-left: 6px; font-size: 11px; }
.vs-panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; color: var(--text);
  border-radius: 12px; padding: 14px;
  box-shadow: 0 8px 24px rgba(15,23,42,.25), 0 2px 6px rgba(15,23,42,.15);
  z-index: 200;
  /* 2026-07-05 モバイル: 320px端末で右アンカー+min-width:320pxだと左端が
     画面外にはみ出し横スクロールが出る問題を修正。viewport clampで必ず収める。
     また縦の短い画面では下部会場が見切れるため max-height + 内部スクロール。 */
  min-width: min(320px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 720px) {
  .vs-panel { min-width: 400px; padding: 16px; }
}
.vs-title { font-size: 12px; color: var(--text-3); margin-bottom: 10px; font-weight: 600; }
.vs-rounds {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.vs-round {
  min-height: 44px;
  padding: 12px 0; font-size: 14px; font-weight: 600;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text);
  cursor: pointer; font-family: inherit; line-height: 1;
  transition: all var(--transition);
}
.vs-round:hover { background: #e5e7eb; border-color: var(--primary-light); }
.vs-round.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(30,58,95,.3);
}
.vs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.vs-cell {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 10px 4px; font-weight: 600;
  border-radius: 9px; text-decoration: none; color: var(--text);
  background: var(--surface);
  /* 各セルの境界をはっきり：1px 実線 + 微小な内側ハイライト + 影 で
     立体感を出して「タップ可能なボタン」感を強化。 */
  border: 1px solid #d8e1ee;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 1px 2px rgba(15, 23, 42, .05);
  transition: all var(--transition);
}
.vs-cell .vs-cell-name { font-size: 14px; line-height: 1.15; }
.vs-cell .vs-cell-races {
  font-size: 11px; color: var(--text-3); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.vs-cell.active .vs-cell-races { color: rgba(255,255,255,.85); }
@media (min-width: 720px) {
  .vs-cell { padding: 12px 4px; min-height: 60px; gap: 3px; }
  .vs-cell .vs-cell-name { font-size: 15px; }
  .vs-cell .vs-cell-races { font-size: 12px; }
}
.vs-cell:hover {
  background: #f4f8ff;
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 3px 8px rgba(30, 58, 95, .12);
}
.vs-cell:active {
  transform: translateY(0);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 1px 2px rgba(15, 23, 42, .08);
}
.vs-cell.active {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.15),
    0 2px 6px rgba(30,58,95,.32);
}
.vs-cell.disabled {
  opacity: .42; pointer-events: none;
  background: var(--bg-soft);
  border: 1px dashed #cbd5e1; color: var(--text-3);
  box-shadow: none;
}
.vs-cell.disabled .vs-cell-races { color: var(--text-3); }
/* グリッドの隙間も少し広げて境界が一層分かりやすく */
.vs-grid { gap: 8px !important; }
@media (min-width: 720px) { .vs-grid { gap: 10px !important; } }
.header .title-row {
  display:flex; align-items:baseline; justify-content:space-between;
  gap:10px; margin-top:6px;
  /* 2026-07-05 モバイル: subtitle が white-space:nowrap+flex-shrink:0 のため、
     狭幅では固定幅を確保してブランドタイトル(.title)を極細に潰し漢字が縦割れしていた。
     flex-wrap:wrap で収まらない時だけ subtitle を2行目へ落とす(広幅は従来の1行維持)。 */
  flex-wrap:wrap;
}
.header .title { font-size:22px; font-weight:800; letter-spacing:-.01em; line-height:1.2; margin:0; }
.header .subtitle {
  font-size:12px; opacity:.78; white-space:nowrap; flex-shrink:0;
  font-variant-numeric: tabular-nums;
}
.header .back-link {
  display:inline-block; font-size:12px; opacity:.8;
  margin-top:4px; transition: opacity var(--transition);
  /* F9: PC でも視認できる程度に padding を強化 */
  padding: 4px 10px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 8px;
  color: #fff; text-decoration: none;
}
.header .back-link:hover { opacity:1; background: rgba(255,255,255,.18); }
@media (min-width: 720px) {
  .header .back-link { font-size: 13px; padding: 6px 14px; }
}

/* ============================================================
   レース詳細ページ用のコンパクトヘッダー（1行レイアウト）。
   普段の3行ヘッダー (brand-row + title-row + back-link) を1行に
   まとめて約30px節約。データ表示のためのスペースを最大化。
   ============================================================ */
.header.header-compact {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  min-height: 0;
}
.header.header-compact .brand-icon {
  font-size: 22px;
  text-decoration: none;
  color: #fff; opacity: .92;
  flex-shrink: 0;
  line-height: 1;
}
.header.header-compact .brand-icon:hover { opacity: 1; }
.header.header-compact .hc-info {
  flex: 1 1 auto; min-width: 0;
  line-height: 1.2;
  display: flex; flex-direction: column;
}
.header.header-compact .hc-title {
  font-size: 17px; font-weight: 700; letter-spacing: .01em;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.header.header-compact .hc-sub {
  font-size: 11px; opacity: .75;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
  color: #fff;
}
.header.header-compact .hc-action {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.header.header-compact .hc-back {
  font-size: 12px; opacity: .9;
  color: #fff; text-decoration: none;
  padding: 6px 12px; border-radius: 7px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  transition: opacity var(--transition), background var(--transition);
  white-space: nowrap;
  font-weight: 600;
}
.header.header-compact .hc-back:hover {
  opacity: 1; background: rgba(255,255,255,.16);
}
/* Compact-header limits the venue switcher button so it doesn't
   dominate the row. */
.header.header-compact .vs-trigger {
  padding: 5px 9px; font-size: 12px; min-height: 32px;
  border-radius: 7px;
}
.header.header-compact .vs-trigger .vs-caret { font-size: 10px; }
/* 2026-07-05 モバイル: ヘッダ右上3ボタン(見方/戻る/会場▾)を44px級タップ標的に。
   縦方向の拡張のみ(横は詰めない)＋隣接ギャップを広げて近接誤タップを減らす。 */
@media (max-width: 719px) {
  .header.header-compact .hc-action { gap: 9px; }
  /* review3: 幅105px に nowrap で「びわこ 1R...」と切れていた → 2行まで許す */
  .header.header-compact .hc-title { white-space: normal; font-size: 15px; line-height: 1.15; }
  .header.header-compact .hc-back,
  .header.header-compact .vs-trigger,
  .header.header-compact .help-chip {
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
}
@media (min-width: 720px) {
  .header.header-compact { padding: 8px 18px; gap: 12px; }
  .header.header-compact .brand-icon { font-size: 26px; }
  .header.header-compact .hc-title { font-size: 22px; }
  .header.header-compact .hc-sub { font-size: 13px; }
  .header.header-compact .hc-back { font-size: 14px; padding: 8px 16px; }
  .header.header-compact .vs-trigger { font-size: 13px; padding: 7px 12px; min-height: 36px; }
}
@media (min-width: 1100px) {
  .header.header-compact { padding: 10px 24px; }
  .header.header-compact .brand-icon { font-size: 30px; }
  .header.header-compact .hc-title { font-size: 26px; }
  .header.header-compact .hc-sub { font-size: 14px; }
}

.body { padding:16px; max-width:560px; margin:0 auto; }
@media (min-width: 720px) {
  body { font-size:19px; }
  .body { max-width:820px; padding:22px 26px; }
  .header { padding:10px 26px 14px; }
  .header .brand { font-size:21px; }
  .header .title { font-size:28px; }
  .header .subtitle { font-size:14px; }
}
@media (min-width: 1100px) {
  body { font-size:20px; }
  .body { max-width:1080px; padding:28px 32px; }
  .header { padding:12px 32px 16px; }
  .header .brand { font-size:24px; }
  .header .title { font-size:32px; }
  .header .subtitle { font-size:15px; }
}
@media (min-width: 1500px) {
  body { font-size:21px; }
  .body { max-width:1320px; padding:32px 40px; }
  .header { padding:14px 40px 18px; }
  .header .title { font-size:36px; }
  .header .brand { font-size:26px; }
}

.card {
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); padding:12px;
  margin-bottom:12px; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
@media (min-width: 720px) { .card { padding: 20px; margin-bottom: 22px; } }
.notice-card { background:#fff5f6; border-color:#f7c1c8; }
.notice-card .title { font-weight:700; color:#b22a3d; font-size:13px; letter-spacing:.01em; }
.notice-card .body { font-size:12px; line-height:1.7; color:#444; margin-top:6px; }
/* chart-box 末尾に置いたときの版（card 全体スタイルではなく "チャートの脚注"
   扱いなので余白を控えめに）。 */
.chart-notice-card {
  margin-top: 10px;
  padding: 8px 12px;
  background:#fff5f6;
  border: 1px solid #f7c1c8;
  border-radius: 8px;
}
.chart-notice-card .title { font-weight:700; color:#b22a3d; font-size:13px; }
.chart-notice-card .body { font-size:12px; line-height:1.55; color:#444; margin-top:4px; }
@media (min-width: 720px) {
  .chart-notice-card .title { font-size:13px; }
  .chart-notice-card .body { font-size:12px; }
}
/* Top-page intro hero — describes the site to first-time visitors. */
.site-intro {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4f7d 100%);
  color: #fff;
  padding: 18px 20px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow-md);
}
.site-intro-title {
  margin: 0 0 8px; font-size: 22px; font-weight: 900; letter-spacing: -.01em;
  line-height: 1.3;
}
.site-intro-lead {
  margin: 0 0 10px; font-size: 14px; line-height: 1.75; opacity: .95;
}
.site-intro-lead b { color: #ffd470; font-weight: 700; }
.site-intro-features {
  margin: 8px 0 0; padding: 0; list-style: none;
}
.site-intro-features li {
  margin: 5px 0; font-size: 13px; line-height: 1.65; opacity: .92;
}
.site-intro-features li b { color: #ffd470; font-weight: 700; }
@media (min-width: 720px) {
  .site-intro { padding: 24px 28px; }
  .site-intro-title { font-size: 28px; }
  .site-intro-lead { font-size: 16px; }
  .site-intro-features li { font-size: 14px; }
}

/* Per-racer page styles */
/* B4: 選手プロフィール 1-col layout (全画面幅) */
.racer-grid { display: block; max-width: 720px; margin: 0 auto; }
.rcr-profile { margin-bottom: 14px; }
.rcr-profile-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
}
.rcr-profile-grid > div {
  display: flex; flex-direction: column; align-items: center;
}
.rcr-profile-grid .lbl { font-size: 11px; color: var(--text-3); }
.rcr-profile-grid .num { font-weight: 700; color: var(--text); font-size: 16px; }
.rcr-section { margin-top: 18px; }
.rcr-section h2 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 8px; }
.rcr-section h3 { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 12px 0 4px; }
.rcr-chart {
  width: 100%; height: auto; display: block;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px;
  user-select: none; -webkit-user-select: none;
}
.rcr-chart text { user-select: none; pointer-events: none; }
.rcr-table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
}
.rcr-table-wrap.scrolled-end {
  -webkit-mask-image: none; mask-image: none;
}
/* Initially hide rows beyond 10 — JS toggles via .style.display. */
tr.rcr-row-hidden { display: none; }
.rcr-expand-btn {
  display: block; width: 100%;
  margin-top: 8px; padding: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; color: var(--primary);
  cursor: pointer; font-family: inherit;
  transition: background var(--transition);
}
.rcr-expand-btn:hover { background: var(--bg-soft); }

.rcr-chart-toggles {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px; align-items: center;
}
.rcr-toggle {
  display: inline-flex; gap: 2px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}
.rcr-toggle .opt {
  background: transparent; border: none; padding: 6px 12px;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;   /* 2026-07-13 UX: 28→44px */
  -webkit-tap-highlight-color: transparent;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  cursor: pointer; font-family: inherit;
  border-radius: 999px;
  transition: all var(--transition);
}
.rcr-toggle .opt:hover { color: var(--primary); }
.rcr-toggle .opt.active {
  background: var(--primary); color: #fff;
  box-shadow: 0 1px 3px rgba(30,58,95,.3);
}
.rcr-range-toggle .rcr-range-label {
  font-size: 11px; color: var(--text-3); font-weight: 600;
  align-self: center; padding: 0 6px;
}
@media (min-width: 720px) {
  .rcr-toggle .opt { font-size: 13px; padding: 7px 14px; }
}

.rcr-chart-wrap {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px;
}
.rcr-chart-svg {
  width: 100%; height: auto; display: block; touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.rcr-chart-svg text { user-select: none; pointer-events: none; }
/* "選択した期間の平均" バッジ — グラフ上部に表示。
   範囲・コース・指標の組合せに対する平均を一目で把握できる。 */
.rcr-chart-mean-badge {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 0 0 8px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.rcr-chart-mean-badge .rcr-mean-label {
  font-size: 11px; color: var(--text-2); font-weight: 600;
}
.rcr-chart-mean-badge .rcr-mean-val {
  font-size: 22px; font-weight: 800;
  letter-spacing: -.01em;
}
.rcr-chart-mean-badge .rcr-mean-n {
  font-size: 11px; color: var(--text-3); font-weight: 600;
}
@media (min-width: 720px) {
  .rcr-chart-mean-badge { padding: 10px 14px; gap: 10px; }
  .rcr-chart-mean-badge .rcr-mean-label { font-size: 13px; }
  .rcr-chart-mean-badge .rcr-mean-val { font-size: 26px; }
  .rcr-chart-mean-badge .rcr-mean-n { font-size: 12px; }
}

.rcr-chart-empty {
  padding: 30px 16px; text-align: center;
  color: var(--text-3); font-size: 13px;
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}
.rcr-tip {
  position: absolute; pointer-events: none;
  background: rgba(15,23,42,.93); color: #fff;
  padding: 8px 12px; border-radius: 8px;
  font-size: 12px; line-height: 1.6;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  opacity: 0; transition: opacity 120ms;
  z-index: 5;
}
.rcr-tip.show { opacity: 1; }
.rcr-tip-d { font-size: 11px; color: #cdd5e3; margin-bottom: 2px; }
.rcr-tip-v { display: flex; gap: 8px; align-items: baseline; }
.rcr-tip-v .lbl { font-size: 11px; color: #cdd5e3; }
.rcr-tip-v .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.rcr-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-sm); overflow: hidden;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.rcr-table thead { background: var(--bg-soft); }
/* review3: 全レース履歴表が 390px で「0.1/4」「11/R」と途中改行していた(親 .rcr-table-wrap が横スクロール) */
#rcr-history-table th, #rcr-history-table td { white-space: nowrap; }
@media (max-width: 480px) { #rcr-history-table th, #rcr-history-table td { padding: 8px 6px; font-size: 12px; } }
.rcr-table th, .rcr-table td {
  padding: 8px 10px; text-align: left;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.rcr-table th { font-weight: 700; color: var(--text-2); font-size: 12px; }
.rcr-table tr:last-child td { border-bottom: none; }
/* 2026-09-06 選手ランキング表: 10列あるのでモバイルでは折り返さず横スクロールさせる
   (.rcr-table-wrap が overflow-x:auto とフェードマスクを持っている)。
   min-width を与えないと 430px で全セルが2行に割れて数値が読めない。 */
.rcr-table.rr-table { min-width: 720px; }
/* 単位は小さく添える。値そのものには単位を付けない(桁が読みにくくなるため) */
.rr-u { font-size: .82em; font-weight: 400; color: var(--text-3); margin-left: 1px; }
/* 列ソート: 見出しは押せることが分かるよう常時 ⇅ を出し、現在の並びは ▲▼ で示す */
.rcr-table.rr-table th[data-t] { cursor: pointer; -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent; }
.rcr-table.rr-table th[data-t]::after { content: "⇅"; opacity: .3; margin-left: 3px; font-size: .85em; }
.rcr-table.rr-table th[aria-sort="ascending"]::after { content: "▲"; opacity: .95; color: var(--primary); }
.rcr-table.rr-table th[aria-sort="descending"]::after { content: "▼"; opacity: .95; color: var(--primary); }
.rcr-table.rr-table th[data-t]:hover { color: var(--primary); }
.rcr-table.rr-table th[data-t]:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.rcr-table.rr-table th, .rcr-table.rr-table td { white-space: nowrap; }
.rcr-table.rr-table td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.rcr-table.rr-table th:nth-child(n+3) { text-align: right; }
.rcr-table.rr-table td:nth-child(2) { min-width: 5.2em; }
/* 最終行の「現役全体の平均」は基準線なので本文色を落として区別する */
.rcr-table.rr-table tbody tr:last-child { color: var(--text-2); background: var(--bg-soft); }
@media (min-width: 720px) {
  .rcr-table { font-size: 14px; }
  .rcr-section h2 { font-size: 18px; }
  .rcr-profile-grid .num { font-size: 18px; }
}

.hint-card { background: linear-gradient(135deg, #fff9e6 0%, #fffbed 100%); border-color:#f3d77a; }
.hint-card .title { font-weight:700; color:#7a5c00; font-size:13px; letter-spacing:.01em; }
.hint-card .body { font-size:13px; line-height:1.75; margin-top:6px; color:#5a4400; }
.hint-card .body p { margin: 6px 0; }
.hint-card .body ul { margin: 4px 0; padding-left: 20px; }
.hint-card .body ul li { margin: 3px 0; }
.hint-card .body b { color: #4a3700; }
@media (min-width: 720px) { .hint-card .body { font-size:14px; } }

/* 折りたたみ式 hint-card（<details>）— 既定は閉じ、タップで展開。
   summary は最低 48px のタップ高を確保。 */
.hint-details { padding: 0; overflow: hidden; }
.hint-details > .hint-summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; min-height: 48px;
  font-weight: 700; color: #7a5c00;
  font-size: 14px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.hint-details > .hint-summary::-webkit-details-marker { display: none; }
.hint-summary-title { flex: 1; }
.hint-summary-hint {
  font-size: 11px; font-weight: 600;
  color: var(--text-3); letter-spacing: .03em;
}
.hint-summary-caret {
  font-size: 11px; color: var(--text-3);
  transition: transform 200ms ease;
  display: inline-block;
}
.hint-details[open] > .hint-summary .hint-summary-caret { transform: rotate(180deg); }
.hint-details[open] > .hint-summary .hint-summary-hint { display: none; }
.hint-details > .body {
  padding: 0 18px 14px;
  border-top: 1px dashed rgba(122,92,0,.18);
  padding-top: 12px;
}
@media (min-width: 720px) {
  .hint-details > .hint-summary { font-size: 16px; padding: 16px 22px; min-height: 52px; }
  .hint-details > .body { padding: 14px 22px 18px; }
}

.tab-bar {
  display:flex; gap:2px; margin:14px 0 12px; font-size:13px;
  background: var(--surface); border-radius: var(--radius);
  overflow-x:auto; padding:3px;
  box-shadow: var(--shadow-sm); border:1px solid var(--border);
  scrollbar-width:none;
}
.tab-bar::-webkit-scrollbar { display:none; }
.tab {
  flex:0 0 auto; padding:7px 14px; border-radius: var(--radius-sm);
  display:inline-flex; align-items:center; min-height:44px;  /* 2026-07-13 UX: 全タブを44px標的に */
  -webkit-tap-highlight-color: transparent;
  color: var(--text-2); cursor:pointer; user-select:none; white-space:nowrap;
  font-size:13px;
  transition: background-color var(--transition), color var(--transition);
}
/* Inside .sticky-bar: even tighter to maximize data area */
.sticky-bar .tab-bar { padding: 2px; }
.sticky-bar .tab { padding: 6px 12px; font-size: 12.5px; }
/* Inline tab-bar inside .chart-box (タブ＆説明をグラフ領域に集約したパターン). */
.chart-box .tab-bar.tab-bar-inline {
  margin: 0 0 6px;
  font-size: 13px;
}
.chart-box .tab-bar.tab-bar-inline .tab { padding: 7px 14px; }
@media (min-width: 720px) {
  .sticky-bar .tab { padding: 8px 16px; font-size: 14px; }
}
@media (min-width: 1100px) {
  .tab { font-size:15px; padding:12px 20px; }
  .sticky-bar .tab { padding: 10px 18px; font-size: 15px; }
}
.tab:hover { background: rgba(30,58,95,.05); color: var(--primary); }
.tab.active { background: var(--primary); color:#fff; font-weight:600; }
/* Q1 (2026-05-27): 「全12R一覧」リンクは数値タブと視覚的に区別。
   - 数値 R タブ群と少し離す (左 margin)
   - 控えめだが視認可能なボーダー */
.tab.tab-list-link {
  margin-left: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
}
.tab.tab-list-link:hover {
  background: var(--surface);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* --- Tab grouping (選手 / 機材 のメンタルモデル分離) --- */
/* Used inside #tabs to label "選手" tabs vs "機材" tabs and put a thin
   visual divider between them. Without these labels users frequently
   mis-read モーター/ボート as "racer-at-this-machine" stats (it is in
   fact MACHINE-only stats — anyone who's ridden it counts). */
.tab-group-label {
  align-self: center; padding: 0 6px 0 6px;
  font-size: 10px; color: var(--text-3); font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none; user-select: none;
  text-transform: uppercase;
}
@media (min-width: 720px) {
  .tab-group-label { font-size: 11px; padding: 0 8px; }
}
.tab-group-divider {
  width: 1px; background: var(--border);
  margin: 6px 2px;
  flex-shrink: 0;
}

/* Contextual one-liner under the tab bar that explains what the active
   tab actually represents (selector vs machine vs venue scope).
   Compact spacing: this lives in the sticky-bar so every saved px
   directly increases the data view area. */
.tab-explainer {
  display: flex; align-items: flex-start; gap: 6px;
  margin: -4px 4px 6px;
  padding: 3px 8px;
  font-size: 10.5px; color: var(--text-2);
  background: linear-gradient(135deg, #f0f5fc 0%, #e7eef9 100%);
  border-left: 3px solid var(--primary-light);
  border-radius: 6px;
  line-height: 1.35;
  /* 2026-07-05 モバイル: 以前は white-space:nowrap+overflow:hidden+ellipsis で、
     狭幅だと末尾の但し書き「（誰が乗ってきたかは問わない機材データ）」が無音クリップされ、
     このバナー本来の誤読防止説明が読めなかった。折り返しを許可し情報欠落を無くす(高さ可変)。 */
}
.tab-explainer-icon { font-size: 14px; line-height: 1; }
.tab-explainer-text b { color: var(--primary); }
@media (min-width: 720px) { .tab-explainer { font-size: 13px; } }

/* 選手タブ専用：グラフだけ 全国／当地 を切替するためのサブセレクタ。
   chart-box 内に配置（sticky-bar からは移動）。
   モーター/ボート タブのときは JS で hidden 属性が付き非表示になる。
   chart-toggle と並べたときに揃って見えるよう、外見はそのスタイルを継承。 */
.scope-toggle[hidden] { display: none; }
.scope-toggle .scope-toggle-label {
  color: var(--text-3); font-weight: 600;
  font-size: 11px;
  letter-spacing: .03em;
  padding: 0 8px 0 6px;
  align-self: center;
  white-space: nowrap;
}
@media (min-width: 720px) {
  .scope-toggle .scope-toggle-label { font-size: 12px; }
}

.toggle-row {
  display:flex; background:#eef2f8; border-radius:10px; padding:4px;
  margin-bottom:14px; font-size:13px;
}
.toggle-row .opt {
  flex:1; text-align:center; padding:8px 4px; color: var(--text-2);
  display:flex; align-items:center; justify-content:center; min-height:44px;  /* 2026-07-13 UX: →44px */
  -webkit-tap-highlight-color: transparent;
  cursor:pointer; user-select:none; border-radius:7px;
  transition: all var(--transition);
}
.toggle-row .opt:hover { color: var(--primary); }
.toggle-row .opt.active {
  background: var(--surface); color: var(--primary); font-weight:600;
  box-shadow: var(--shadow-sm);
}

.player-row {
  display:flex; align-items:center; gap:10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.lane-badge {
  width:38px; height:38px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  font-weight:700; font-size:17px; flex-shrink:0;
  box-shadow: 0 1px 2px rgba(0,0,0,.15) inset, 0 1px 2px rgba(0,0,0,.08);
}
.player-row .name { flex:1; font-weight:700; font-size:17px; letter-spacing:.01em; }
.player-row .name-link {
  color: inherit; text-decoration: none;
  border-bottom: 1px dashed var(--border);
  display: inline-flex; align-items: center; gap: 4px;
  transition: color var(--transition), border-color var(--transition);
}
.player-row .name-link:hover {
  color: var(--primary); border-bottom-color: var(--primary);
}
.player-row .name-link-arrow {
  font-size: 0.85em; color: var(--text-3); font-weight: 500;
}
.player-row .name-link:hover .name-link-arrow { color: var(--primary); }
.player-row .meta { font-size:11px; color: var(--text-3); text-align:right; line-height:1.4; }
@media (min-width: 720px) {
  .lane-badge { width:48px; height:48px; font-size:21px; }
  .player-row .name { font-size:22px; }
  .player-row .meta { font-size:13px; }
}
@media (min-width: 1100px) {
  .lane-badge { width:52px; height:52px; font-size:23px; }
  .player-row .name { font-size:25px; }
  .player-row .meta { font-size:14px; }
}
.machine-row {
  display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  margin-top:8px; padding:6px 10px;
  background: linear-gradient(135deg, #f5f8ff 0%, #eaf0fa 100%);
  border:1px solid #d8e1ee; border-radius:10px;
  font-size:13px; color: var(--text);
}
.machine-row .machine-label {
  font-weight:600; color: var(--primary);
}
@media (min-width: 720px) { .machine-row { font-size:17px; padding:11px 16px; } }
@media (min-width: 1100px) { .machine-row { font-size:19px; padding:13px 18px; gap:12px; } }
.machine-note {
  margin-top: 4px;
  font-size: 11px; color: var(--text-3);
  line-height: 1.5;
}
@media (min-width: 720px) { .machine-note { font-size: 12px; } }
.champ {
  display:inline-flex; align-items:center; gap:4px;
  padding:4px 10px; border-radius:999px;
  background: linear-gradient(135deg, #fff4c2 0%, #fde08a 100%);
  border:1px solid #e9b831;
  color:#6b3e00; font-weight:700; font-size:12px;
  white-space:nowrap; letter-spacing:.01em;
  box-shadow: 0 1px 3px rgba(184,119,10,.2);
}
.champ.silver {
  background: linear-gradient(135deg, #f0f0f0 0%, #d6d6d6 100%);
  border-color:#a0a0a0; color:#444;
  box-shadow: 0 1px 3px rgba(80,80,80,.15);
}
.champ { cursor: pointer; position: relative; }
.champ-popup {
  position: fixed; z-index: 200;
  background: rgba(15,23,42,.94); color:#fff;
  padding:10px 14px; border-radius:10px;
  font-size:12px; line-height:1.7;
  box-shadow: var(--shadow-lg);
  max-width: 240px; min-width: 140px;
  opacity:0; pointer-events:none;
  transition: opacity 120ms;
}
.champ-popup.show { opacity:1; }
.champ-popup {
  word-break: keep-all;
  overflow-wrap: break-word;
  line-break: strict;
}
.champ-popup .pop-title { font-weight:700; margin-bottom:2px; font-size:13px; }
.champ-popup .pop-count {
  font-size:11px; color:#cdd5e3; font-weight:600;
  margin-bottom:6px;
  font-variant-numeric: tabular-nums;
}
.champ-popup .pop-date { font-variant-numeric: tabular-nums; }
.champ-popup .pop-more { color:#cdd5e3; font-size:11px; margin-top:4px; }
.champ-popup.silver { background: linear-gradient(135deg, #4a4a4a 0%, #2a2a2a 100%); }
@media (min-width: 720px) { .champ { font-size:15px; padding:7px 16px; } }
@media (min-width: 1100px) { .champ { font-size:17px; padding:8px 18px; } }
.champ.has-recent {
  box-shadow: 0 0 0 2px var(--accent), 0 1px 3px rgba(217,53,76,.35);
}
.champ-recent { font-size: 11px; line-height: 1; margin-left: 1px; }
.recent-note {
  margin-top: 6px;
  font-size: 12px; color: var(--accent);
  font-weight: 600;
  display: flex; gap: 6px; align-items: center;
}
@media (min-width: 720px) { .recent-note { font-size: 13px; } }

.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; margin-top:6px; }
.stat {
  text-align:center; background: var(--bg-soft);
  padding:8px 4px; border-radius: var(--radius-sm);
  border:1px solid #eef2f8;
}
.stat .num { font-weight:700; font-size:19px; color: var(--primary); letter-spacing:-.01em; }
.stat .lbl { font-size:11px; color: var(--text-3); margin-top:2px; }
@media (min-width: 720px) { .stat { padding:12px 4px; } .stat .num { font-size:26px; } .stat .lbl { font-size:13px; margin-top:4px; } }
@media (min-width: 1100px) {
  .stat { padding:18px 6px; }
  .stat .num { font-size:30px; }
  .stat .lbl { font-size:14px; }
}
/* Compact summary of course-specific stats below the grid-3.
   Title (e.g. "3コース時の成績（全国）(15走)") is on its own line,
   with the 勝率/2連/3連 numbers wrapping onto a second line below.
   Left-accent border keeps it visually distinct from the ST grey block. */
.course-mini {
  margin-top: 6px;
  padding: 5px 10px 6px 9px;
  background: transparent;
  border-left: 3px solid var(--primary-light);
  border-radius: 0 6px 6px 0;
  font-size: 11.5px; color: var(--text-2);
}
.course-mini .cm-label {
  display: block;
  font-weight: 700; color: var(--primary);
  font-size: 10.5px;
  margin-bottom: 3px;
  letter-spacing: .02em;
}
.course-mini .cm-row {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 2px 12px;
}
.course-mini .cm-val {
  display: inline-flex; align-items: baseline; gap: 3px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.course-mini .cm-val .lbl { color: var(--text-3); font-size: 11px; }
.course-mini .cm-val b { color: var(--primary); font-weight: 700; font-size: 13px; }
.course-mini.course-mini-empty {
  color: var(--text-3); font-size: 11px;
  display: block;
}
@media (min-width: 720px) {
  .course-mini { font-size: 13px; padding: 6px 14px 6px 12px; }
  .course-mini .cm-label { font-size: 11.5px; }
  .course-mini .cm-val .lbl { font-size: 12px; }
  .course-mini .cm-val b { font-size: 15px; }
}

/* Compact one-liner ST averages (全国 / 当地 / モーター / ボート).
   Sits inside .st-spark, right under the section heading. */
.st-mini {
  margin-top: 0;
  padding: 0;
  font-size: 11.5px; color: var(--text-2);
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 2px 10px;
}
.st-mini .sm-label {
  font-weight: 600; color: var(--text);
  margin-right: 4px;
}
.st-mini .sm-val {
  display: inline-flex; align-items: baseline; gap: 3px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.st-mini .sm-val .lbl { color: var(--text-3); font-size: 11px; }
.st-mini .sm-val b { color: var(--primary); font-weight: 700; font-size: 13px; }
@media (min-width: 720px) {
  .st-mini { font-size: 13px; }
  .st-mini .sm-val .lbl { font-size: 12px; }
  .st-mini .sm-val b { font-size: 15px; }
}
/* #3: 当地×コース のクロスST 1行 / 決まり手プロファイルの注記 */
.st-cross {
  margin-top: 4px; font-size: 11.5px; color: var(--text-2);
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.st-cross .lbl { color: var(--text-3); }
.st-cross b { color: var(--primary); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.km-note { margin-top: 4px; font-size: 10.5px; color: var(--text-3); line-height: 1.45; }
@media (min-width: 720px) {
  .st-cross { font-size: 13px; }
  .st-cross b { font-size: 15px; }
  .km-note { font-size: 11.5px; }
}

/* Sparkline SVG — disable text selection so axis labels can't be highlighted. */
.st-spark-svg, .st-spark-svg text { user-select: none; -webkit-user-select: none; }
.st-spark-svg text { pointer-events: none; }

/* Per-card ST sparkline (last N race STs). Wraps the .st-mini summary
   line + a compact SVG. Slight blue tint (instead of plain grey) so it
   visually separates from the grid-3 (white) and course-mini (white +
   left accent) above it. */
.st-spark {
  margin-top: 6px;
  padding: 6px 10px 8px;
  background: linear-gradient(135deg, #f5f8fc 0%, #eef3fa 100%);
  border-radius: var(--radius-sm);
  border: 1px solid #e3eaf3;
}
/* Section heading inside the ST block: small uppercase-style label so
   the role of this card section ("STデータ") is unambiguous. */
.st-section-head {
  font-size: 10px; font-weight: 700;
  color: var(--primary);
  letter-spacing: .04em;
  margin-bottom: 4px;
}
@media (min-width: 720px) { .st-section-head { font-size: 11px; } }
.st-spark-title {
  font-size: 10px; color: var(--text-3); font-weight: 600;
  margin: 4px 0 2px;
}
.st-spark-svg {
  width: 100%; height: auto; display: block;
}
.st-spark-latest {
  display: inline-flex; gap: 10px; flex-wrap: wrap;
  margin-top: 2px;
  font-size: 10.5px;
}
.st-spark-latest .lt-item {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-2);
}
.st-spark-latest .lt-key { font-size: 12px; line-height: 1; }
.st-spark-latest .lt-name { font-weight: 600; }
.st-spark-latest .lt-val {
  color: var(--text); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* Mean-of-tail row: averages of the displayed window. Sits just below
   .st-spark-latest with a thin divider so it's clearly a separate signal
   ("most recent" vs "average of recent"). */
.st-spark-means {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 4px; padding-top: 4px;
  border-top: 1px dashed var(--border);
  font-size: 10.5px;
}
.st-spark-means .mn-item {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-2);
}
.st-spark-means .mn-key { font-size: 12px; line-height: 1; }
.st-spark-means .mn-name { font-weight: 600; }
.st-spark-means .mn-val {
  color: var(--text); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 720px) {
  .st-spark-means { font-size: 12px; }
}
@media (min-width: 720px) {
  .st-spark { padding: 6px 16px 10px; }
  .st-spark-title { font-size: 12px; }
  .st-spark-latest { font-size: 12px; }
}
.st-spark-empty {
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 11px; color: var(--text-3);
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
@media (min-width: 720px) {
  .st-spark-label { font-size: 11px; }
}

.chart-box {
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius); padding:14px;
  margin-bottom:12px; box-shadow: var(--shadow-sm);
}
.chart-header {
  display:flex; justify-content:space-between; align-items:center;
  flex-wrap:wrap; gap:10px; margin-bottom:10px;
}
.chart-title {
  font-size:14px; font-weight:700; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.info-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 11px; font-weight: 700; line-height: 1;
  cursor: pointer; padding: 0;
  font-family: inherit;
  position: relative;
  transition: background var(--transition), color var(--transition);
}
.info-icon:hover, .info-icon.show {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.info-tip {
  position: fixed; z-index: 250;
  background: rgba(15,23,42,.94); color: #fff;
  padding: 10px 14px; border-radius: 10px;
  font-size: 12px; line-height: 1.6; font-weight: 400;
  box-shadow: var(--shadow-lg);
  max-width: 280px; min-width: 180px;
  opacity: 0; pointer-events: none;
  transition: opacity 120ms;
}
.info-tip.show { opacity: 1; }
@media (min-width: 720px) { .info-icon { width: 20px; height: 20px; font-size: 12px; } }
.chart-sub { font-size:11px; color: var(--text-3); margin-bottom:6px; }
.chart-dsq-note {
  font-size: 11px; color: var(--accent); font-weight: 600;
  margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
}
.chart-dsq-note[hidden] { display: none; }
.chart-dsq-note .x-mark {
  display: inline-block; width: 12px; height: 12px;
  position: relative; flex-shrink: 0;
}
.chart-dsq-note .x-mark::before,
.chart-dsq-note .x-mark::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 14px; height: 2px; background: var(--accent);
  transform-origin: center;
}
.chart-dsq-note .x-mark::before { transform: translate(-50%, -50%) rotate(45deg); }
.chart-dsq-note .x-mark::after  { transform: translate(-50%, -50%) rotate(-45deg); }
@media (min-width: 1100px) { .chart-title { font-size:16px; } }
.chart-toggle {
  display:inline-flex; background: var(--bg-soft);
  border-radius:8px; padding:3px; gap:0;
}
.chart-toggle .opt {
  padding:6px 12px; border-radius:6px;
  display:inline-flex; align-items:center; justify-content:center; min-height:44px;  /* 2026-07-13 UX: →44px */
  -webkit-tap-highlight-color: transparent;
  font-size:12px; color: var(--text-2);
  border:none; background:transparent; cursor:pointer;
  font-family:inherit; font-weight:500;
  transition: all var(--transition);
}
.chart-toggle .opt:hover:not(.active):not([hidden]) { color: var(--primary); }
.chart-toggle .opt.active {
  background: var(--surface); color: var(--primary); font-weight:700;
  box-shadow: var(--shadow-sm);
}
.chart-toggle .opt[hidden] { display:none; }
@media (min-width: 720px) {
  .chart-toggle .opt { font-size:13px; padding:7px 14px; }
}
@media (min-width: 1100px) {
  .chart-toggle .opt { font-size:14px; padding:8px 16px; }
}

/* グループ分割版（成績 vs ST）— ラベルとボタンを混在させる
   2グループ構成。ラベルは小さく非インタラクティブ、間に縦線で視覚分離。 */
.indicator-toggle-grouped {
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}
.indicator-toggle-grouped .ind-group-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: .05em;
  padding: 0 6px 0 4px;
  user-select: none;
}
.indicator-toggle-grouped .ind-group-divider {
  display: inline-block;
  width: 1px; height: 20px;
  background: var(--border);
  margin: 0 6px;
}
@media (min-width: 720px) {
  .indicator-toggle-grouped .ind-group-label { font-size: 11.5px; padding: 0 8px 0 6px; }
  .indicator-toggle-grouped .ind-group-divider { height: 22px; margin: 0 8px; }
}
/* 全ボタンが hidden の時はグループラベルも視覚的にミュート */
.indicator-toggle-grouped .ind-group-label[data-group="rate"]:has(~ .opt-rate:not([hidden])) { color: var(--text-2); }
.indicator-toggle-grouped .ind-group-label[data-group="st"]:has(~ .opt-st:not([hidden])) { color: var(--text-2); }

/* Range selector — sits below the indicator toggle. */
.chart-range-toggle {
  margin-top: 6px; flex-wrap: wrap; gap: 4px;
}
.chart-range-toggle .range-label {
  font-size: 11px; color: var(--text-3); font-weight: 600;
  align-self: center; margin-right: 4px;
}
@media (min-width: 720px) {
  .chart-range-toggle .range-label { font-size: 12px; }
}

.chart-wrap { position:relative; }
svg.chart {
  width:100%; height:auto; display:block; touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
/* On PC viewports, cap the SVG chart so the whole chart-box fits in
   one viewport height. We constrain only the SVG (not the box) so
   the toggles/legend stay visible. The minus accounts for header,
   sticky-bar, chart-header, two toggle rows, sub line, legend and
   the racer-cards visibility goal. */
@media (min-width: 1100px) {
  svg.chart { max-height: calc(100vh - 380px); min-height: 160px; }
}
@media (min-width: 1500px) {
  svg.chart { max-height: calc(100vh - 400px); }
}
svg.chart text { user-select: none; -webkit-user-select: none; pointer-events: none; }
.chart-tooltip, .legend, .legend-item {
  user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.chart-box { contain: layout paint; }
.chart-tooltip {
  position:absolute; pointer-events:none;
  background: rgba(15,23,42,.92); color:#fff;
  padding:8px 12px; border-radius:8px;
  font-size:11px; line-height:1.6;
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
  white-space: nowrap;
  opacity:0; transition: opacity 120ms;
  z-index:1;
}
.chart-tooltip.show { opacity:1; }
.chart-tooltip .row { display:flex; align-items:center; gap:6px; }
.chart-tooltip .dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.chart-tooltip .dt { color:#cdd5e3; font-size:10px; margin-bottom:4px; }
.chart-tooltip .val { font-variant-numeric: tabular-nums; }
.chart-guide {
  position:absolute; top:0; bottom:0; width:1px;
  background:rgba(30,58,95,.4); pointer-events:none;
  opacity:0; transition: opacity 120ms;
}
.chart-guide.show { opacity:1; }

.legend { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.legend-item {
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 12px; border:1px solid var(--border);
  border-radius: 999px; cursor:pointer; user-select:none;
  background: var(--surface); font-size:11px; font-weight:500;
  transition: all var(--transition);
}
.legend-item:hover { border-color: var(--primary-light); transform: translateY(-1px); }
.legend-item.off { opacity:.35; background: var(--bg); }
.legend-dot { width:10px; height:10px; border-radius:50%; }

.compare-fab {
  position:fixed; bottom:80px; left:50%; transform:translateX(-50%);
  background: var(--accent); color:#fff; border-radius:999px;
  padding:13px 22px; font-weight:600; font-size:13px;
  box-shadow: 0 6px 18px rgba(217,53,76,.35);
  cursor:pointer; user-select:none; z-index:5;
}

/* ============================================================
   日付ナビ（前日 / 翌日） — 曜日付き、48px+ タップ高、左右ボタン形状。
   元は .tab-bar に紛れていたが、独立した nav に格上げ。
   ============================================================ */
.date-nav {
  display: flex; gap: 8px;
  margin: 12px 0 14px;
  min-width: 0;            /* M3: flex 親が縮める許可 */
}
.date-nav-link {
  flex: 1 1 0; min-width: 0;  /* M3: 子も縮む */
  min-height: 52px;
  display: flex; align-items: center;
  gap: 6px; padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition), transform 120ms ease-out;
  font-weight: 600;
  overflow: hidden;  /* M3: はみ出した子を隠す */
}
.date-nav-link:hover {
  background: var(--bg-soft);
  border-color: var(--primary-light);
  transform: translateY(-1px);
}
.date-nav-link:active { transform: translateY(0); }
.date-nav-link.prev { justify-content: flex-start; }
.date-nav-link.next { justify-content: flex-end; }
.date-nav-link.disabled {
  opacity: .4; pointer-events: none;
  background: transparent; box-shadow: none;
}
.date-nav-arrow {
  font-size: 16px; color: var(--primary);
  flex-shrink: 0;
}
.date-nav-label {
  font-size: 11px; color: var(--text-3);
  font-weight: 700; letter-spacing: .04em;
}
.date-nav-date {
  font-size: 14px; font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.date-nav-link.next .date-nav-date { margin-left: 0; margin-right: auto; }
/* M3+M6 (2026-05-26): 狭い phone (~360px) で前日/翌日リンク全体が
   ◀ + 「前日」 + 日付 で詰まる。狭画面では日付を非表示にし
   矢印＋ラベル「前日 / 翌日」だけのコンパクト UI に切替える。
   日付の確認は中央の picker (2026/5/25（月）) で行える。 */
@media (max-width: 519px) {
  .date-nav { gap: 6px; }
  .date-nav-link {
    padding: 6px 8px; min-height: 48px; gap: 6px;
    min-width: 72px;   /* M6: 「前日」が 2 行に割れないだけの幅を確保 */
  }
  .date-nav-link.prev { justify-content: center; }
  .date-nav-link.next { justify-content: center; }
  .date-nav-label {
    font-size: 13px;
    white-space: nowrap;     /* M6: 「前日」「翌日」を絶対に縦割れさせない */
    word-break: keep-all;
    overflow-wrap: normal;
  }
  .date-nav-date { display: none; }       /* 狭画面で日付は隠す */
  .date-nav-arrow { font-size: 16px; }
  /* M6: 中央 picker を圧迫しすぎないよう select の max-width を縮める */
  .date-nav-select { max-width: 160px; font-size: 13px; }
  .date-nav-picker { padding: 0 10px; }
}
@media (min-width: 720px) {
  .date-nav-link { min-height: 56px; padding: 10px 18px; }
  .date-nav-arrow { font-size: 18px; }
  .date-nav-label { font-size: 12px; }
  .date-nav-date { font-size: 16px; }
}

/* 日付ドロップダウン — 前日と翌日の中央。native <select> をボタン風に装飾。
   iOS では native ピッカー（ホイール）が立ち上がるので操作性が高い。 */
.date-nav-picker {
  /* M6 (2026-05-26): 狭画面で picker が中央を占める設計に変更
     (前日/翌日は矢印＋ラベルのみで日付非表示)。
     flex:2 で picker を広げ、日付フル表示 (2026/5/25（月）) を確保。 */
  flex: 2 1 auto;
  min-width: 0;
  min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.date-nav-picker:hover {
  background: var(--bg-soft);
  border-color: var(--primary-light);
}
.date-nav-picker:focus-within {
  outline: 2px solid var(--primary-light);
  outline-offset: 1px;
}
.date-nav-picker-icon {
  font-size: 16px; line-height: 1;
  flex-shrink: 0;
}
.date-nav-picker-caret {
  font-size: 12px; color: var(--text-3);
  flex-shrink: 0;
  pointer-events: none;
}
.date-nav-select {
  /* native select だがボタン風に見せる：枠/矢印は親要素が描く */
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background: transparent; border: 0; outline: 0;
  font-family: inherit; font-weight: 700; font-size: 14px;
  color: var(--text);
  padding: 8px 0;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  /* iOS でテキストの省略を防ぐ */
  max-width: 220px;
}
@media (min-width: 720px) {
  .date-nav-picker { min-height: 56px; padding: 0 14px; }
  .date-nav-picker-icon { font-size: 18px; }
  .date-nav-select { font-size: 16px; }
}

/* ============================================================
   注目開催（SG/G1/G2/G3）セクション — 通常のグリッド上部に独立配置。
   タイル自体も "featured" バリアントで通常の倍ぐらい大きい。
   ============================================================ */
.featured-venues {
  margin-bottom: 18px;
  padding: 14px;
  background: linear-gradient(135deg, #fff5f6 0%, #fff9eb 50%, #fff5f6 100%);
  border: 1px solid rgba(217, 53, 76, .18);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 2px 8px rgba(217, 53, 76, .08),
    0 8px 24px rgba(217, 53, 76, .06);
}
.featured-venues-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  padding: 0 4px;
}
.featured-venues-icon { font-size: 22px; line-height: 1; }
.featured-venues-title {
  font-size: 16px; font-weight: 800;
  color: #b3163a;   /* review3: --accent は 4.3:1。ダークは _DARK_CSS で --accent に戻す */
  letter-spacing: .04em;
}
.featured-venues-sub {
  font-size: 11px; font-weight: 700;
  color: var(--text-3);
  letter-spacing: .03em;
  margin-left: auto;
}
@media (min-width: 720px) {
  .featured-venues { padding: 18px; margin-bottom: 24px; }
  .featured-venues-head { margin-bottom: 14px; }
  .featured-venues-icon { font-size: 26px; }
  .featured-venues-title { font-size: 19px; }
  .featured-venues-sub { font-size: 13px; }
}
/* Featured grid: 2 columns on mobile (each tile is bigger), 3-4 on PC */
.featured-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
}
@media (min-width: 720px) { .featured-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (min-width: 1100px) { .featured-grid { grid-template-columns: repeat(4, 1fr) !important; } }
@media (min-width: 1500px) { .featured-grid { grid-template-columns: repeat(5, 1fr) !important; } }

/* 注目開催が1〜2場のときは PC でも左寄せ＋タイル幅制限（右余白の間延びを防ぐ） */
.featured-grid.featured-grid-one,
.featured-grid.featured-grid-two {
  justify-content: start;
}
@media (min-width: 720px) {
  .featured-grid.featured-grid-one {
    grid-template-columns: minmax(220px, 320px) !important;
  }
  .featured-grid.featured-grid-two {
    grid-template-columns: repeat(2, minmax(200px, 280px)) !important;
  }
}

/* Featured tiles: bigger, more presence, with a subtle pulse on the
   gold/red glow to draw the eye. */
.venue-tile.venue-tile-featured {
  min-height: 110px;
  padding: 22px 8px 18px;
  font-weight: 800;
}
.venue-tile.venue-tile-featured .v-name {
  font-size: 19px; letter-spacing: .02em;
}
.venue-tile.venue-tile-featured .v-races {
  font-size: 13px; margin-top: 8px;
}
.venue-tile.venue-tile-featured .v-grade {
  top: 8px; right: 8px;
  font-size: 12px; padding: 4px 10px;
}
@media (min-width: 720px) {
  .venue-tile.venue-tile-featured { min-height: 130px; padding: 28px 10px 22px; }
  .venue-tile.venue-tile-featured .v-name { font-size: 22px; }
  .venue-tile.venue-tile-featured .v-races { font-size: 14px; }
  .venue-tile.venue-tile-featured .v-grade { font-size: 13px; padding: 4px 12px; }
}
@media (min-width: 1100px) {
  .venue-tile.venue-tile-featured { min-height: 140px; padding: 30px 12px 24px; }
  .venue-tile.venue-tile-featured .v-name { font-size: 26px; }
}

/* Subtle divider label between the featured section and the main grid */
.featured-venues-divider {
  margin: 6px 0 12px;
  text-align: center;
  font-size: 11px; color: var(--text-3); font-weight: 600;
  letter-spacing: .06em;
}
@media (min-width: 720px) {
  .featured-venues-divider { font-size: 12px; }
}

/* ============================================================
   本日の注目レース (P2.1) — データ駆動でピックアップした"見どころ"。
   日付ページの「注目開催」と「すべての会場」の間に表示。
   タグ：堅い(青)／妙味(赤)／接戦(橙) で色分け。
   ============================================================ */
.notable-races {
  margin: 4px 0 18px;
  padding: 14px;
  background: linear-gradient(135deg, #f0f6ff 0%, #fff8f0 100%);
  border: 1px solid rgba(46, 108, 208, .15);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.notable-races-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; padding: 0 4px;
}
.notable-races-icon { font-size: 20px; line-height: 1; }
.notable-races-title {
  font-size: 15px; font-weight: 800;
  color: var(--primary);
  letter-spacing: .03em;
}
.notable-races-sub {
  font-size: 11px; font-weight: 600;
  color: var(--text-3); letter-spacing: .03em;
  margin-left: auto;
}
@media (min-width: 720px) {
  .notable-races { padding: 18px; }
  .notable-races-title { font-size: 17px; }
  .notable-races-sub { font-size: 12px; }
}
.notable-races-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px;
}
.notable-races-grid::-webkit-scrollbar { height: 6px; }
.notable-races-grid::-webkit-scrollbar-thumb {
  background: rgba(15,23,42,.15); border-radius: 3px;
}
.notable-race-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none; color: var(--text);
  transition: all var(--transition);
  scroll-snap-align: start;
  box-shadow: var(--shadow-sm);
  min-height: 44px;
}
.notable-race-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.notable-tag {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 13px; font-weight: 800;
  color: #fff;
  letter-spacing: .02em;
}
.notable-tag-katai  { background: #2e6cd0; }
.notable-tag-myomi  { background: #d9354c; }
.notable-tag-sessen { background: #b45309; }   /* 2026-09-16: 白文字で 2.68→4.7:1 */
.notable-card-body { flex: 1; min-width: 0; }
.notable-venue-row {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 11px; color: var(--text-3);
}
.notable-venue { font-size: 14px; font-weight: 700; color: var(--text); }
.notable-round { font-size: 13px; font-weight: 600; color: var(--text-2); }
.notable-time { margin-left: auto; }
.notable-pick {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-top: 4px;
  /* M2 (2026-05-26): 「本命候補：◯◯（X号艇）」が 128px カードからはみ出す問題。
     nowrap+ellipsis では選手名が「…」で切れて意味が伝わらない。
     2行までは許容して、それでも長い場合のみ ellipsis する line-clamp 方式に。
     overflow-wrap (M1 baseline) で句読点なし日本語名も折り返せる。 */
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.notable-hint {
  font-size: 11px; color: var(--text-2);
  margin-top: 2px;
}
.notable-arrow {
  flex-shrink: 0; font-size: 16px; color: var(--text-3);
  margin-left: 2px;
}
@media (min-width: 720px) {
  .notable-races-grid { grid-auto-columns: minmax(260px, 300px); gap: 12px; }
  .notable-pick { font-size: 14px; }
}

/* 24会場タイルのグリッド（モバイル4列・タブレット6列・PC8列）。
   shadow が見やすいよう少し gap を広げてある（8→10px / 10→12px）。 */
.venue-grid {
  display:grid; grid-template-columns:repeat(4,1fr); gap:10px;
}
@media (min-width: 720px) {
  .venue-grid { grid-template-columns:repeat(6,1fr); gap:12px; }
}
@media (min-width: 1100px) {
  .venue-grid { grid-template-columns:repeat(8,1fr); }
}
/* 全24会場の一様グリッド: 常に横4列（=縦6行）で固定し、開催/非開催を同サイズで並べる。
   .venue-grid のレスポンシブ(6/8列)を上書きするため !important。 */
.venue-grid-all { grid-template-columns: repeat(4, 1fr) !important; }
/* ============================================================
   会場タイル — 立体感のある "押せる" デザイン
   - 上から下へ薄い水色グラデ（ボートレース→水のメタファー）
   - 多層シャドウで「面」が浮いている感じ
   - ::before で上端のハイライトライン（艶感）
   - ::after で下端の影（地に接した感じ）
   - hover で更に浮く / active(押下) で沈む
   - active タイル（本日開催中）はアクセント青の天面ストライプ
   ============================================================ */
.venue-tile {
  background: linear-gradient(180deg, #ffffff 0%, #eef4fc 100%);
  border: 1px solid rgba(30, 58, 95, .08);
  border-radius: var(--radius);
  padding: 18px 6px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  min-height: 88px;
  display: flex; flex-direction: column; justify-content: center;
  /* 多層シャドウ：上ハイライト＋微薄影＋遠目の柔らかい影 */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(30, 58, 95, .04),
    0 1px 2px rgba(15, 23, 42, .06),
    0 4px 14px rgba(15, 23, 42, .05);
  transition:
    transform 180ms cubic-bezier(.2,.8,.2,1),
    box-shadow 180ms ease-out,
    border-color 180ms ease-out;
  position: relative; overflow: hidden;
}
/* 上端のハイライト（ガラス感） */
.venue-tile::before {
  content: ""; position: absolute;
  top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent);
  pointer-events: none;
  z-index: 1;
}
@media (min-width: 720px) {
  .venue-tile .v-name { font-size: 16px; }
}
@media (min-width: 1100px) {
  .venue-tile { min-height: 108px; padding: 24px 8px; }
  .venue-tile .v-name { font-size: 19px; }
  .venue-tile .v-races { font-size: 12px; margin-top: 6px; }
}
/* Active = 本日開催。天面ストライプ＋やや濃いグラデで存在感アップ */
.venue-tile.active {
  background: linear-gradient(180deg, #ffffff 0%, #e7eff9 100%);
  border-color: rgba(30, 58, 95, .14);
}
.venue-tile.active::before {
  /* ハイライト線→アクセント青のストライプに変更（"開催中"の合図） */
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
  border-radius: var(--radius) var(--radius) 0 0;
}
/* Hover：明確に浮き上がる */
.venue-tile:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 6px 16px rgba(15, 23, 42, .12),
    0 12px 28px rgba(15, 23, 42, .08);
  border-color: var(--primary-light);
}
.venue-tile.active:hover .v-name { color: var(--primary); }
/* タップ／クリック時：押し込まれる感触 */
.venue-tile:active {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 1px 3px rgba(15, 23, 42, .10);
  transition-duration: 80ms;
}
/* AD1 (2026-05-29): 途中中止になった会場/レースの表示 ------------------- */
/* 日付ページの会場タイル: 右上に小さな「途中中止」リボン */
.venue-tile.venue-tile-chushi { }
.venue-tile .v-chushi {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  background: #b91c1c;
  color: #fff;
  font-size: 10px; font-weight: 800;
  line-height: 1.15;
  padding: 3px 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  text-align: center;
  letter-spacing: .02em;
  display: flex; flex-direction: column; align-items: center;
}
.venue-tile .v-chushi small { font-size: 8.5px; font-weight: 600; opacity: .92; }
.venue-tile.venue-tile-chushi {
  box-shadow: inset 0 0 0 2px rgba(185,28,28,.55);
  opacity: .65; pointer-events: none;
  background: linear-gradient(180deg, #fef2f2 0%, #f3e8e8 100%);
}
.venue-tile.venue-tile-chushi::before { display: none; }
.venue-tile.venue-tile-chushi .v-name { color: var(--text-3); }
/* 会場ページ: 見出し直下のバナー */
.venue-chushi-banner, .race-chushi-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 4px solid #dc2626;
  border-radius: var(--radius);
  color: #991b1b;
  font-size: 12.5px; font-weight: 700;
  line-height: 1.5;
}
.race-chushi-banner b, .venue-chushi-banner b { color: #b91c1c; }
@media (min-width: 720px) {
  .venue-chushi-banner, .race-chushi-banner { font-size: 13.5px; }
}
/* /now/ タイムライン: 中止レース行 */
.now-badge-chushi { background: #b91c1c !important; color: #fff !important; }
.now-race-row-chushi { opacity: .62; }
.now-race-row-chushi .now-top1 { text-decoration: line-through; color: var(--text-3); }
/* ---------------------------------------------------------------------- */
/* Empty = 本日未開催。陰影もミュートして「閉じている」感じ */
.venue-tile.empty {
  opacity: .55;
  pointer-events: none;
  background: linear-gradient(180deg, #f3f5f9 0%, #eaeef4 100%);
  box-shadow: inset 0 0 0 1px rgba(30,58,95,.05);
}
.venue-tile.empty::before { display: none; }
/* F12: コンパクトな非開催タイル (24 会場表示維持) */
.venue-tile.empty.compact {
  display: flex; flex-direction: row; align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  min-height: 36px;
  height: auto;
  border-radius: 8px;
}
.venue-tile.empty.compact .v-name {
  font-size: 13px; color: var(--text-2);
  text-shadow: none; margin: 0;
}
.venue-tile.empty.compact .v-races {
  font-size: 10px; color: var(--text-3);
  margin: 0; opacity: .8;
}
/* 非開催 grid: 6-col on desktop, 4-col on mobile (more compact than active) */
.venue-grid-inactive {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
@media (min-width: 480px) {
  .venue-grid-inactive { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .venue-grid-inactive { grid-template-columns: repeat(4, 1fr); gap: 8px; }
}
@media (min-width: 1100px) {
  .venue-grid-inactive { grid-template-columns: repeat(6, 1fr); }
}
.featured-venues-divider-inactive { margin-top: 18px; }
.featured-venues-divider-inactive span { color: var(--text-3); }
.venue-tile .v-name {
  font-weight: 700; font-size: 15px; line-height: 1.2;
  color: var(--primary);
  letter-spacing: .015em;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
  position: relative; z-index: 2;
}
.venue-tile.empty .v-name { color: var(--text-3); text-shadow: none; }
.venue-tile .v-races {
  font-size: 11px; color: var(--text-3);
  margin-top: 6px; line-height: 1.2;
  font-weight: 600;
  position: relative; z-index: 2;
}
.venue-tile.active .v-races { color: var(--primary); font-weight: 700; }
/* 開催状態の色分け（絵文字＋色の二重符号化で色覚配慮） */
.venue-tile .v-races.status-live {
  color: #1f6f3a; font-weight: 700;
}
.venue-tile .v-races.status-upcoming {
  color: #2e6cd0; font-weight: 700;
}
.venue-tile .v-races.status-finished {
  color: var(--text-3); font-weight: 600;
}
.venue-tile .v-grade {
  position: absolute; top: 4px; right: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: .03em;
  padding: 2px 6px; border-radius: 999px;
  color: #fff; line-height: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  z-index: 2;
}
@media (min-width: 720px) {
  .venue-tile .v-grade { font-size: 11px; padding: 3px 8px; top: 6px; right: 6px; }
}
.venue-tile .v-grade.grade-SG {
  background: linear-gradient(135deg, #d9354c 0%, #b32238 100%);
}
.venue-tile .v-grade.grade-G1 {
  background: linear-gradient(135deg, #8f6208 0%, #7a5207 100%);
}
.venue-tile .v-grade.grade-G2 {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}
.venue-tile .v-grade.grade-G3 {
  background: linear-gradient(135deg, #a06a3f 0%, #7a4f2c 100%);
}
/* SG/G1 大会ハブページ /tournament/ (2026-07-06) ------------------- */
.tour-badge {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px; color: #fff;
  vertical-align: 3px; margin-right: 8px; line-height: 1.3;
}
.tour-badge.grade-SG { background: linear-gradient(135deg, #d9354c 0%, #b32238 100%); }
.tour-badge.grade-G1 { background: linear-gradient(135deg, #8f6208 0%, #7a5207 100%); }
.tour-meta { color: var(--text-2); font-size: 13px; margin: 6px 0 14px; line-height: 1.7; }
.tour-status-live { color: #15803d; font-weight: 800; }
.tour-status-done { color: var(--text-3); font-weight: 700; }
.tour-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; margin: 10px 0;
  transition: border-color var(--transition);
}
.tour-card:hover { border-color: #d4a017; }
.tour-card .t-name { font-weight: 800; font-size: 15px; }
.tour-card .t-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.featured-tour-link {
  display: block; margin-top: 10px; font-size: 13px; font-weight: 700;
  color: #8a5e08; text-decoration: underline; text-underline-offset: 3px;   /* review3: 3.04→5.6:1 */
}
/* Graded tiles (SG/G1/G2/G3): tinted background + glow shadow to make
   "格上のレース開催中" feel premium and noticeable on first glance. */
.venue-tile.grade-tile-SG {
  background: linear-gradient(180deg, #fff5f6 0%, #ffe5e9 100%);
  border-color: #d9354c;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(217,53,76,.08),
    0 1px 3px rgba(217,53,76,.10),
    0 6px 18px rgba(217,53,76,.14);
}
.venue-tile.grade-tile-SG::before {
  background: linear-gradient(90deg, #d9354c, #ff6b85, #d9354c);
  height: 4px; left: 0; right: 0;
}
.venue-tile.grade-tile-SG .v-name { color: #b32238; }
.venue-tile.grade-tile-SG:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 8px 22px rgba(217,53,76,.22),
    0 14px 32px rgba(217,53,76,.14);
  border-color: #d9354c;
}

.venue-tile.grade-tile-G1 {
  background: linear-gradient(180deg, #fffaeb 0%, #fdf0c8 100%);
  border-color: #d4a017;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(212,160,23,.10),
    0 1px 3px rgba(212,160,23,.10),
    0 6px 18px rgba(212,160,23,.14);
}
.venue-tile.grade-tile-G1::before {
  background: linear-gradient(90deg, #d4a017, #f5cb5c, #d4a017);
  height: 4px; left: 0; right: 0;
}
.venue-tile.grade-tile-G1 .v-name { color: #7a5c0a; }   /* review3: 4.02→5.3:1 */
.venue-tile.grade-tile-G1:hover {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 8px 22px rgba(212,160,23,.22),
    0 14px 32px rgba(212,160,23,.14);
  border-color: #d4a017;
}

.venue-tile.grade-tile-G2 {
  background: linear-gradient(180deg, #f9fafb 0%, #e9ecf1 100%);
  border-color: #9ca3af;
}
.venue-tile.grade-tile-G2::before {
  background: linear-gradient(90deg, #6b7280, #9ca3af, #6b7280);
  height: 4px; left: 0; right: 0;
}
.venue-tile.grade-tile-G2 .v-name { color: #4b5563; }

.venue-tile.grade-tile-G3 {
  background: linear-gradient(180deg, #fdf6f0 0%, #f3e2ce 100%);
  border-color: #a06a3f;
}
.venue-tile.grade-tile-G3::before {
  background: linear-gradient(90deg, #7a4f2c, #c8915d, #7a4f2c);
  height: 4px; left: 0; right: 0;
}
.venue-tile.grade-tile-G3 .v-name { color: #7a4f2c; }

.race-list { display:grid; gap:10px; }
@media (min-width: 720px) {
  .race-list { grid-template-columns:1fr 1fr; gap:12px; }
}
@media (min-width: 1100px) {
  .race-list { grid-template-columns:repeat(3, 1fr); }
}
@media (min-width: 1500px) {
  .race-list { grid-template-columns:repeat(4, 1fr); }
}

/* ============================================================
   ホーム LP（ランディングページ）専用スタイル — 2026-05-13 追加
   マーケ提言 A-01: `/` を「サイトの強みを伝える固定LP」に変更。
   検索エンジン・SNSシェアの最初の接点として機能する設計。
   ============================================================ */
.lp-hero {
  text-align: center;
  padding: 28px 14px 24px;
  background: linear-gradient(135deg, #0e1116 0%, #1e3a5f 60%, #2d4f7d 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  margin: 8px 0 14px;
  box-shadow: var(--shadow-md);
}
.lp-hero-title {
  font-size: 28px; font-weight: 900; line-height: 1.2;
  margin: 0 0 14px; letter-spacing: -.01em;
  color: #fff;
}
.lp-hero-accent { color: #ffd84d; }
.lp-hero-sub {
  font-size: 14px; line-height: 1.85;
  color: rgba(255,255,255,.88);
  margin: 0 auto 20px; max-width: 540px;
  /* スマホ(85%のユーザ)では本文段落は左寄せで読みやすく。
     2文 × 各約30〜40字を中央寄せにすると行末がジグザグになり
     視線移動が増えるため、Japanese 本文は left を採用。
     デスクトップ(720px+) は hero 全体のシンメトリを保つため center に戻す。 */
  text-align: left;
}
@media (min-width: 720px) {
  .lp-hero-sub { text-align: center; }
}
.lp-hero-sub b { color: #ffd84d; font-weight: 700; }
/* 2026-07-17 R2タスク1: 初心者歓迎の一言(FV下部)。専門用語はタップ解説が出る安心感。 */
.lp-hero-beginner {
  margin: 12px 0 0; font-size: 13px; line-height: 1.6;
  color: rgba(255,255,255,.88); text-align: center;
}
.lp-hero-beginner b { color: #ffd84d; font-weight: 700; }
@media (min-width: 720px) { .lp-hero-beginner { font-size: 14px; } }
.lp-hero-demo {
  margin: 0 auto 18px;
  max-width: 340px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 10px 14px 12px;
}
.lp-hero-demo-label {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.lp-hero-demo-lanes {
  display: flex; gap: 6px; justify-content: center;
}
.lp-hero-lane {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  box-shadow: 0 2px 4px rgba(0,0,0,.3);
  transition: transform .3s ease;
}
.lp-hero-lane-moving {
  transform: translateY(-6px);
  box-shadow: 0 6px 12px rgba(0,0,0,.4);
}
.lp-hero-demo-result {
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,.6);
  margin-top: 8px;
  text-align: center;
}
@media (min-width: 720px) {
  .lp-hero-demo { max-width: 380px; padding: 12px 18px 14px; }
  .lp-hero-lane { width: 38px; height: 38px; font-size: 15px; }
  .lp-hero-demo-result { font-size: 12px; }
}
.lp-hero-cta-row {
  display: flex; flex-direction: column; gap: 10px; align-items: stretch;
  max-width: 360px; margin: 0 auto;
}
.lp-cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px; min-height: 48px;
  border-radius: 10px; font-weight: 700; font-size: 15px;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}
.lp-cta[hidden] { display: none !important; }   /* review7: .guide-cta-block .lp-cta に同特異度で負けていた */   /* 2026-09-16: hidden 属性は作者の display に負ける(会場ガイド以外でも「本日の該当会場へ」が出てトップへ飛んでいた) */
.lp-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.lp-cta:active { transform: translateY(0); }
.lp-cta-primary {
  background: #ffd84d; color: #1e3a5f;
  box-shadow: 0 4px 14px rgba(255,216,77,.45);
}
.lp-cta-secondary {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,.6);
}
@media (min-width: 720px) {
  .lp-hero { padding: 52px 28px 44px; margin: 16px 0 18px; }
  .lp-hero-title { font-size: 42px; letter-spacing: -.02em; }
  .lp-hero-sub { font-size: 16px; }
  .lp-hero-cta-row { flex-direction: row; max-width: 600px; }
  .lp-cta { flex: 1; padding: 16px 24px; font-size: 16px; }
}

/* ────────────────────────────────────────────────────────────
   2026-05-25 追加: 本日の見どころサマリー (hero 直下)
   Desktop 直帰 (1.0 PV/visit) 改善と notable/recommendations 発見性UP
   ──────────────────────────────────────────────────────────── */
.lp-today-stats {
  margin: 0 0 24px;
  padding: 14px 16px 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #7dd3fc;
  border-radius: var(--radius);
  box-shadow: 0 3px 12px rgba(125, 211, 252, .25);
}
.lp-today-stats-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: #075985;
  margin-bottom: 10px;
}
.lp-today-stats-emoji { font-size: 18px; }
.lp-today-stats-date { letter-spacing: .02em; }
.lp-today-stats-grid {
  display: grid;
  /* 2026-08-12: 3列固定→タイル数に追従(4枚目「ベストマッチ」追加のため)。
     3枚の日は3列・4枚の日は4列で常に1行に収まる。 */
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
}
.lp-today-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px;
  background: #fff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all .15s ease;
  min-height: 64px; /* タップ領域 */
}
.lp-today-stat:hover {
  background: #f0f9ff;
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(56, 189, 248, .25);
}
.lp-today-stat-num {
  font-size: 24px; font-weight: 900; color: #0369a1;
  line-height: 1.1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.lp-today-stat-label {
  font-size: 11px; color: #075985; font-weight: 700;
  letter-spacing: 0; text-transform: uppercase;
  white-space: nowrap;   /* 2026-09-16: 390px で「ベストマッ／チ」と語中改行していた */
}
@media (max-width: 419px) {
  .lp-today-stat { padding: 10px 2px; }
  .lp-today-stat-label { font-size: 10px; }
  .lp-today-stats-grid { gap: 6px; }
}
@media (min-width: 720px) {
  .lp-today-stats { padding: 18px 22px 22px; margin: 14px 0 24px; }
  .lp-today-stats-head { font-size: 16px; margin-bottom: 14px; }
  .lp-today-stats-grid { gap: 14px; }
  .lp-today-stat { padding: 14px 8px; min-height: 80px; }
  .lp-today-stat-num { font-size: 36px; }
  .lp-today-stat-label { font-size: 12px; }
}

/* 2026-05-25 追加: 「今すぐ：全レース時系列」 CTA — home の見どころ直下 */
/* G1: 2-CTA layout — タイムライン + 次のレース直行 を並列 */
.lp-now-cta-row {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  margin: 0 0 18px;
}
.lp-now-cta {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  border: 2px solid #ffd84d;
  border-radius: var(--radius);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15,23,42,.18);
  transition: transform var(--transition), box-shadow var(--transition);
  min-height: 64px;
}
.lp-now-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(15,23,42,.30);
}
/* G1: 次レース直行 CTA — 赤系のアクセントで「次が始まる」緊急感 */
.lp-now-cta-next {
  background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 100%);
  border-color: #f59e0b;
}
.lp-now-cta-next.lp-now-cta-active {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  animation: lp-pulse 2.6s ease-in-out infinite;
}
@keyframes lp-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(220,38,38,.30); }
  50% { box-shadow: 0 6px 22px rgba(245,158,11,.55); }
}
.lp-now-cta-next .lp-now-cta-title { color: #ffe4b5; }
.lp-now-cta-next .lp-now-cta-arrow { background: #f59e0b; color: #7f1d1d; }
.lp-now-cta-emoji {
  font-size: 28px; line-height: 1;
  flex-shrink: 0;
}
.lp-now-cta-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.lp-now-cta-title {
  font-size: 15px; font-weight: 800;
  color: #ffd84d;
  letter-spacing: .02em;
}
.lp-now-cta-sub {
  font-size: 12px; color: rgba(255,255,255,.82);
  line-height: 1.5;
}
.lp-now-cta-arrow {
  flex-shrink: 0;
  padding: 6px 12px;
  background: #ffd84d; color: #1e3a5f;
  border-radius: 8px;
  font-size: 18px; font-weight: 800;
}
@media (min-width: 720px) {
  .lp-now-cta-row { grid-template-columns: 1fr 1fr; gap: 14px; }
  .lp-now-cta { padding: 18px 22px; margin: 0; }
  .lp-now-cta-title { font-size: 17px; }
  .lp-now-cta-sub { font-size: 13px; }
}

.lp-section-title {
  font-size: 20px; font-weight: 800; color: var(--primary);
  margin: 36px 0 14px; padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-light);
  letter-spacing: -.01em;
}
@media (min-width: 720px) {
  .lp-section-title { font-size: 26px; margin: 48px 0 18px; }
}
.lp-band {
  background: #eef1f6;
  margin-left: -16px; margin-right: -16px;
  padding: 20px 16px 24px;
}
@media (min-width: 720px) {
  .lp-band { margin-left: -24px; margin-right: -24px; padding: 28px 24px 32px; }
}
.lp-band .lp-section-title { margin-top: 0; }

/* ────────────────────────────────────────────────────────────
   独自機能ヘッドライン (2026-05-30 追加)
   当サイト最大の差別化要因「艇番入れ替えシミュレーション」を
   ヒーロー直下で訴求するナビーグラデーション パネル。
   ──────────────────────────────────────────────────────────── */
.lp-feature-headline {
  display: block;
  text-decoration: none;
  color: #fff;
  margin: 8px 0 28px;
  padding: 22px 20px 20px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #4338ca 100%);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(49, 46, 129, .25);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
/* 左端アクセントライン — 視線誘導のための装飾 */
.lp-feature-headline::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%);
}
.lp-feature-headline:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(49, 46, 129, .35);
}
.lp-feature-headline-tag {
  display: inline-block;
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  background: rgba(167, 139, 250, .18);
  color: #c4b5fd;
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 10px;
  border: 1px solid rgba(167, 139, 250, .30);
}
.lp-feature-headline-title {
  font-size: 18px; font-weight: 800; color: #fff;
  margin: 0 0 8px; line-height: 1.4;
}
.lp-feature-headline-desc {
  font-size: 13.5px; line-height: 1.75;
  color: rgba(255,255,255,.92);
  margin: 0 0 12px;
}
.lp-feature-headline-desc b { color: #fff; font-weight: 800; text-decoration: underline; text-decoration-color: rgba(167,139,250,.5); text-underline-offset: 3px; }
.lp-feature-headline-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 14px;
}
.lp-feature-headline-chip {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 700; color: #fff;
  background: rgba(255,255,255,.12);
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: .01em;
}
.lp-feature-headline-cta {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 9px 16px;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.4);
  border-radius: 8px;
  font-size: 13.5px; font-weight: 800;
  box-shadow: none;
  letter-spacing: .02em;
  transition: background var(--transition), border-color var(--transition);
}
.lp-feature-headline-cta:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.6);
}
@media (min-width: 720px) {
  .lp-feature-headline { padding: 28px 26px 24px; margin: 10px 0 36px; }
  .lp-feature-headline-title { font-size: 22px; }
  .lp-feature-headline-desc { font-size: 15px; }
  .lp-feature-headline-chip { font-size: 12.5px; padding: 5px 12px; }
  .lp-feature-headline-cta { font-size: 14.5px; padding: 10px 20px; }
}
/* P4 (2026-05-31): 独自機能パネル直下に X (旧Twitter) シェアの導線。
   訪問者の口コミ波及と、運営の自身投稿の両方を 1 クリックで作る。 */
.lp-feature-headline-share-row {
  display: flex; justify-content: flex-end;
  margin: -10px 0 22px;
}
.lp-feature-headline-share {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; min-height: 44px;   /* 2026-07-13 UX: 35px→44px */
  -webkit-tap-highlight-color: transparent;
  border-radius: 999px;
  background: rgba(15,23,42,.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px; font-weight: 700;
  text-decoration: none;
  letter-spacing: .02em;
  transition: background var(--transition), color var(--transition);
}
.lp-feature-headline-share:hover {
  background: #000; color: #fff; border-color: #000;
}
.lp-feature-headline-share-icon {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 900; font-size: 13px;
}

/* 強みセクションの "唯一の機能" カード強調表示 (2026-05-30) */
.lp-strength-card--featured {
  position: relative;
  background: linear-gradient(180deg, rgba(74, 123, 184, .05) 0%, var(--surface) 100%);
  border: 1.5px solid var(--primary-light);
  box-shadow: 0 4px 14px rgba(74, 123, 184, .18);
}
.lp-strength-badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  background: var(--primary); color: #fff;
  padding: 3px 9px; border-radius: 999px;
  margin: 0 0 8px;
  vertical-align: middle;
}

/* ────────────────────────────────────────────────────────────
   データスポットライト (2026-05-19 追加)
   Hero 直下に置く目立つ注目データのCTAカード。
   X インフォグラフィック投稿との連動が前提で、訪問者を即座に
   /guide/course-1chaku-rate/#venues-ranking へ送り込む。
   ──────────────────────────────────────────────────────────── */
.lp-data-spotlight {
  display: block;
  text-decoration: none;
  color: inherit;
  margin: 8px 0 24px;
  padding: 20px 18px 18px;
  background: linear-gradient(135deg, #fff8e1 0%, #fef3c7 100%);
  border: 2px solid #facc15;
  border-radius: var(--radius);
  position: relative;
  box-shadow: 0 4px 16px rgba(250, 204, 21, .18);
  transition: transform var(--transition), box-shadow var(--transition);
}
.lp-data-spotlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(250, 204, 21, .28);
}
.lp-data-spotlight-badge {
  position: absolute;
  top: -12px; left: 16px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .05em;
  padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 2px 5px rgba(217, 53, 76, .35);
}
.lp-data-spotlight-title {
  font-size: 17px; font-weight: 800;
  color: #92400e;
  margin: 4px 0 10px;
  line-height: 1.4;
}
.lp-data-spotlight-desc {
  font-size: 14px; line-height: 1.7;
  color: #78350f;
  margin: 0 0 14px;
}
.lp-data-spotlight-desc b { color: var(--accent); }
.lp-data-spotlight-cta {
  display: inline-block;
  padding: 8px 16px;
  background: #92400e;
  color: #fff;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
}
@media (min-width: 720px) {
  .lp-data-spotlight { padding: 26px 22px 22px; margin: 10px 0 32px; }
  .lp-data-spotlight-title { font-size: 20px; }
  .lp-data-spotlight-desc { font-size: 15px; }
}

.lp-strength-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 16px;
}
@media (min-width: 720px) {
  .lp-strength-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .lp-strength-card--featured { grid-column: 1 / -1; display: flex; gap: 18px; align-items: flex-start; }
  .lp-strength-card--featured .lp-strength-icon { width: 34px; height: 34px; flex-shrink: 0; margin-bottom: 0; }
  .lp-strength-card--featured .lp-strength-body { flex: 1; }
}
@media (min-width: 960px) {
  .lp-strength-grid { grid-template-columns: repeat(3, 1fr); }
  .lp-strength-card--featured { grid-column: 1 / 3; }
}
.lp-strength-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.lp-strength-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.lp-strength-icon { width: 28px; height: 28px; margin-bottom: 10px;
  color: var(--primary); }
.lp-strength-icon svg, .lp-racer-search-icon svg { display: block; width: 100%; height: 100%; }
/* 並び替え機能だけは操作系の色 (--lineup-accent) を当てる。詳細度が
   .lp-strength-icon より高いので、基底ルールとの記述順に依存しない。 */
.lp-strength-card--featured .lp-strength-icon { width: 32px; height: 32px;
  color: var(--lineup-accent); }
.lp-strength-name {
  font-size: 15px; font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -.01em;
}
.lp-strength-desc {
  font-size: 13px; line-height: 1.75;
  color: var(--text-2);
  margin: 0;
}
@media (min-width: 720px) {
  .lp-strength-card { padding: 24px 22px; }
  .lp-strength-name { font-size: 17px; }
  .lp-strength-desc { font-size: 14px; }
}

.lp-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.lp-faq-item summary {
  cursor: pointer; font-weight: 700;
  color: var(--primary);
  font-size: 14.5px;
  padding: 11px 0;              /* 2026-07-13 UX: 4px→11px。総高32px→44pxのタップ標的化(HIG) */
  min-height: 44px;
  display: flex; align-items: center;  /* ▶マーカーと質問文を縦中央に */
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.lp-faq-item summary:active { color: var(--accent); }  /* タップ即応の視覚フィードバック */
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::before { content: '▶ '; font-size: 10px; color: var(--text-3); margin-right: 4px; }
.lp-faq-item[open] summary::before { content: '▼ '; }
.lp-faq-item p {
  font-size: 13.5px; line-height: 1.7;
  color: var(--text-2);
  margin: 8px 0 4px;
}
/* 2026-07-13 UX: 「すべてのガイドを見る →」— 旧 var(--accent)#d9354c は薄背景で
   コントラスト4.06(AA未達)＋高さ19pxで押しにくかった。#b3163a(≧4.5)＋44px化＋下線で改善 */
.lp-guide-more {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 10px 16px; color: #b3163a; font-weight: 700; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}
.lp-guide-more:active { opacity: .65; }

/* ============================================================
   /guide/ ガイド記事 — 2026-05-13 追加（マーケ提言 A-05）
   ロングテール検索流入の基盤となる解説記事の専用スタイル。
   ============================================================ */
.guide-intro {
  padding: 16px;
  margin-bottom: 18px;
}
.guide-intro p {
  font-size: 14px; line-height: 1.8;
  color: var(--text-2);
  margin: 0;
}
.guide-list {
  display: grid; gap: 12px;
}
@media (min-width: 720px) {
  .guide-list { grid-template-columns: 1fr 1fr; gap: 16px; }
}
/* 会場別ガイド: jcd順 4×6 カード格子（左→右で jcd 昇順）。
   「記事への入口」と分かるよう CTA＋📖を明示し、率の高低で左アクセント色を変える。 */
.guide-venue-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.guide-venue-card {
  position: relative;
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 10px 10px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent, var(--border));
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit;
  min-height: 78px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.guide-venue-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15,23,42,.14);
  border-color: var(--accent, var(--primary));
}
.guide-venue-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.gvc-name { font-weight: 800; font-size: 16px; line-height: 1.15; letter-spacing: .02em; }
.gvc-rate { font-size: 11.5px; font-weight: 700; color: var(--accent, var(--text-2)); }
.gvc-cta { font-size: 11px; font-weight: 600; color: var(--text-2); margin-top: auto; }
@media (max-width: 420px) {
  .guide-venue-grid { gap: 7px; }
  .guide-venue-card { padding: 10px 6px 8px 9px; min-height: 72px; border-left-width: 3px; }
  .gvc-name { font-size: 14px; }
  .gvc-rate { font-size: 10px; }
  .gvc-cta { font-size: 9.5px; }
}
.guide-card {
  display: block;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}
.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.guide-card-title {
  font-size: 16px; font-weight: 700;
  color: var(--primary);
  margin: 0 0 8px; line-height: 1.45;
}
.guide-card-desc {
  font-size: 13px; line-height: 1.7;
  color: var(--text-2);
  margin: 0 0 10px;
}
.guide-card-cta {
  font-size: 13px; font-weight: 700;
  color: var(--accent);
}
@media (min-width: 720px) {
  .guide-card-title { font-size: 17px; }
  .guide-card-desc { font-size: 14px; }
}

/* 2026-06-02: ガイド一覧のカテゴリ分け（URL・本文は不変、index表示のみグループ化）。
   トピッククラスタとして見せ、回遊性とSEOの構造を改善する。 */
.guide-cat-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 4px 0 22px;
}
.guide-cat-chip {
  display: inline-flex; align-items: center;
  font-size: 12.5px; font-weight: 700;
  color: var(--primary);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.guide-cat-chip:hover { background: rgba(30,58,95,.08); }
.guide-cat-chip.is-active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.guide-cat-chip:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }
.guide-cat-chip-n {
  margin-left: 6px; font-size: 11px; font-weight: 700;
  background: rgba(15,23,42,.08); color: inherit;
  border-radius: 999px; padding: 1px 7px; min-width: 18px; text-align: center;
}
.guide-cat-chip.is-active .guide-cat-chip-n { background: rgba(255,255,255,.25); }
.guide-cat { margin: 0 0 30px; scroll-margin-top: 76px; }
.guide-cat-title {
  font-size: 18px; font-weight: 800;
  color: var(--primary);
  margin: 0 0 4px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-light);
  display: flex; align-items: baseline; gap: 8px;
}
.guide-cat-count {
  font-size: 12px; font-weight: 700; color: var(--text-3);
}
.guide-cat-desc {
  font-size: 13px; line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 14px;
}
@media (min-width: 720px) {
  .guide-cat-title { font-size: 21px; }
  .guide-cat-desc { font-size: 14px; }
}

.guide-title {
  font-size: 18px !important; line-height: 1.4;
}
@media (min-width: 720px) {
  .guide-title { font-size: 22px !important; }
}

.guide-article {
  max-width: 720px; margin: 0 auto;
}

/* F13: PC sticky TOC for guide articles */
.guide-body {
  display: block;
}
.guide-toc {
  /* Mobile default: collapsible expandable block at top of article */
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 20px;
}
.guide-toc-head {
  font-size: 13px; font-weight: 700; color: var(--primary);
  margin-bottom: 8px;
}
.guide-toc-list {
  margin: 0; padding-left: 18px;
  font-size: 13.5px; line-height: 1.9;
}
.guide-toc-list a {
  color: var(--text); text-decoration: none;
}
.guide-toc-list a:hover {
  color: var(--accent); text-decoration: underline;
}
@media (min-width: 1100px) {
  /* PC: 2-col layout で TOC を左サイドに sticky 表示 */
  .guide-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
  }
  .guide-toc {
    position: sticky;
    top: calc(var(--header-h, 64px) + 16px);
    align-self: start;
    background: transparent;
    border: 0;
    padding: 12px 0 12px 12px;
    border-left: 2px solid var(--border);
    margin: 0;
  }
  .guide-toc-head { font-size: 12px; color: var(--text-3); }
  .guide-toc-list { font-size: 13px; padding-left: 0; list-style: none; }
  .guide-toc-list li {
    padding: 3px 8px;
    border-radius: 4px;
    transition: background var(--transition);
  }
  .guide-toc-list li:hover { background: rgba(46,108,208,.06); }
  .guide-article { max-width: 100%; margin: 0; }
}
/* 2026-07-13 UX③: ガイド記事の読了プログレス + scroll-spy 現在地 + モバイル追従バー */
.guide-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; background: transparent; }
.guide-progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .12s linear; }
@media (prefers-reduced-motion: reduce) { .guide-progress-fill { transition: none; } }
.guide-toc-list a.active { color: var(--accent); font-weight: 800; }
.guide-current {
  position: sticky; top: 3px; z-index: 40;   /* 3px=読了プログレスバーの直下 */
  display: flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 8px 14px; margin: 0 0 6px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-weight: 700; color: var(--primary);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.guide-current::before { content: '📍'; flex-shrink: 0; }
.guide-current-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 1100px) {
  .guide-current { display: none; }  /* PC はサイドTOCがsticky表示なので不要 */
  .guide-toc-list li.active { background: rgba(46,108,208,.12); }
  .guide-toc-list li.active a { color: var(--accent); font-weight: 800; }
}
.guide-lead {
  font-size: 15px; line-height: 1.85;
  color: var(--text);
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 8px 0 24px;
}
.guide-h2 {
  font-size: 18px; font-weight: 700;
  color: var(--primary);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-light);
}
.guide-h3 {
  font-size: 15px; font-weight: 700;
  color: var(--primary);
  margin: 18px 0 8px;
}
.guide-p {
  font-size: 15.5px; line-height: 1.85;   /* 2026-07-13 UX③: 14.5→15.5px 長文読了の可読性向上 */
  color: var(--text);
  margin: 0 0 16px;                        /* 段落間 12→16px。行間(≈29px)と差をつけ節の区切りを明確化 */
}
@media (min-width: 720px) {
  .guide-h2 { font-size: 22px; }
  .guide-h3 { font-size: 17px; }
  .guide-p { font-size: 16px; }            /* 2026-07-13 UX③: PCは16pxへ */
}
/* 2026-05-29: 「特記すべき数値」を一目で目立たせる。
   _emphasize_stats() が数値のみの <b> をこのクラスに格上げする。
   語句強調の <b>（近黒・標準サイズ）とは色とサイズで明確に差別化し、
   ぱっと見て重要な数字だけが飛び込んでくるようにする。 */
.guide-stat {
  font-size: 1.32em;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .005em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.guide-lead .guide-stat { color: var(--accent); }
@media (min-width: 720px) {
  .guide-stat { font-size: 1.42em; }
}
.guide-faq-block { margin-top: 32px; }
/* 2026-06-11 AIO/SEO: 記事冒頭の要点ボックス（スニペット/AI抽出向け）＋可視更新日 */
.guide-updated-date { font-size: 12px; color: var(--text-3); margin: 0 0 10px; }
.guide-keypoints {
  background: #f0f6ff; border: 1px solid #bfdbfe; border-radius: 12px;
  padding: 14px 18px; margin: 0 0 18px;
}
.guide-keypoints-title { font-weight: 800; color: #1e3a5f; margin: 0 0 8px; font-size: 14px; }
.guide-keypoints ul { margin: 0; padding-left: 20px; }
.guide-keypoints li { font-size: 14px; line-height: 1.75; margin: 4px 0; }
/* 2026-06-13 R3: ガイド記事のCTAは明るい背景。ダーク用 lp-cta-secondary(白文字+透明)が
   背景と同化して見えなかったため、ガイド内だけ視認性の高い配色へ上書き。 */
.guide-cta-block .lp-cta-secondary {
  background: #ffffff; color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: 0 2px 8px rgba(30,58,95,.12);
}
.guide-cta-block .lp-cta-secondary:hover { background: #eef4fb; }
/* 2026-06-13 E1: ガイド記事の「強調」を視認しやすく（要点ボックス/リード/重要語/マーカー）。 */
.guide-lead { font-size: 16px; font-weight: 500; }
@media (min-width: 720px) { .guide-lead { font-size: 17px; } }
.guide-keypoints { border-left: 5px solid #2563eb; }
.guide-keypoints-title { font-size: 15.5px; }
.guide-keypoints li { font-size: 15px; }
.guide-article b { font-weight: 800; }
/* マーカー強調（蛍光ペン風。リンクの青と混同しない黄ハイライト） */
.gk { background: linear-gradient(transparent 56%, #ffe48a 56%); font-weight: 800; padding: 0 1.5px; border-radius: 1px; }
/* 2026-06-11 P0-3: レース詳細ファーストビューのデータサマリーカード */
.race-quick-summary {
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 10px 14px; margin: 10px 0 4px; font-size: 13.5px; line-height: 1.7;
}
/* 2026-07-05 モバイル: 以前は white-space:nowrap 固定で、イン耐性チップ(rqs-vuln)や
   長い選手名を含むトップ率チップが320-375pxで折り返せずカード右端の判断数値(被差し%等)を
   クリップしていた。normal に戻し(親の word-break:keep-all+overflow-wrap:anywhereで
   日本語は自然折返し)、数値+単位ペアは各チップ側で nowrap span 保護する。 */
.race-quick-summary .rqs-item { white-space: normal; }
.race-quick-summary .rqs-lane {
  display: inline-block; min-width: 20px; text-align: center;
  border-radius: 5px; font-weight: 800; padding: 1px 5px; margin: 0 3px;
  border: 1px solid #cbd5e1; font-variant-numeric: tabular-nums;
}
/* 2026-07-05: イン耐性ミニパネル。1号艇の逃げが崩されにくいかを、判定語＋全国平均マーカー
   付きバーで一目化。以前はサマリー行の生数値チップ(被まくりX%・被差しY%)で「高い/低いが
   分からない・埋もれる」問題があったため独立パネルに刷新。色は緑=手堅い/橙=崩れやすい。 */
.in-taisei-panel {
  margin: 8px 0 4px;
  background: #fff; border: 1px solid #e2e8f0; border-left: 3px solid #94a3b8;
  border-radius: 0 12px 12px 0; padding: 10px 14px;
}
.in-taisei-panel.it-good { border-left-color: #15803d; }
.in-taisei-panel.it-bad { border-left-color: #c2410c; }
/* 2026-07-17: makuri-title と同型の圧縮リスク対策 — 幅不足時は判定バッジが
   下の行に落ちる(タイトルを1文字改行に追い込まない)。 */
.it-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-bottom: 9px; }
.it-title { font-size: 13px; font-weight: 800; line-height: 1.3; overflow-wrap: normal; }
.it-verdict { flex-shrink: 0; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.it-verdict.it-good { background: #dcfce7; color: #15803d; }
.it-verdict.it-bad { background: #ffedd5; color: #c2410c; }
.it-verdict.it-mid { background: #f1f5f9; color: #475569; }
.it-rows { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px 8px; font-size: 12px; }
.it-label { color: var(--text-2); white-space: nowrap; }
.it-bar { position: relative; height: 8px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 4px; }
.it-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.it-fill.it-good { background: #15803d; }
.it-fill.it-bad { background: #c2410c; }
.it-fill.it-mid { background: #94a3b8; }
.it-avg { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #0f172a; }
.it-val { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.it-val b { font-weight: 800; }
.it-val.it-good b { color: #15803d; }
.it-val.it-bad b { color: #c2410c; }
.it-val span { font-size: 11px; color: var(--text-3); font-weight: 600; }
.it-legend { margin-top: 8px; font-size: 11px; color: var(--text-3); line-height: 1.5; }
@media (min-width: 720px) {
  .it-title { font-size: 14px; }
  .it-rows { font-size: 13px; }
}
/* 2026-06-11 P1-5: 結果セクションの「データ答え合わせ」一言 */
.rr-data-check {
  margin: 10px 0 4px; font-size: 13px; color: var(--text-2);
  background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px;
  padding: 8px 12px;
}
/* 2026-06-12 B2: 結果セクション末尾の次アクション導線 */
.rr-next-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
/* 2026-06-11 UXバッチ: 回遊チップ(クラス化)・見方ガイド・数字等幅 */
.race-explore-strip {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 2px; margin: 2px 0 6px; scrollbar-width: none;
}
.race-explore-strip::-webkit-scrollbar { display: none; }
.race-explore-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  min-height: 44px; padding: 10px 16px; border-radius: 999px;  /* 2026-07-13 UX: 40px→44px(HIG) */
  background: #f4f7fb; border: 1px solid #d7e0ea; color: var(--primary);
  font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition), background var(--transition);
}
.race-explore-chip:active { transform: scale(.97); background: #e8eef6; }
@media (prefers-reduced-motion: reduce) {
  .race-explore-chip { transition: none; }
  .race-explore-chip:active { transform: none; }
}
.race-help { margin: 6px 0 8px; font-size: 13px; }
.race-help summary { cursor: pointer; color: var(--text-2); font-weight: 700; padding: 11px 4px; min-height: 44px; display: flex; align-items: center; -webkit-tap-highlight-color: transparent; }  /* 2026-07-13 UX: 41→44px */
.race-help p { margin: 8px 2px; line-height: 1.85; color: var(--text-2); background: #f8fafc; border-radius: 10px; padding: 10px 12px; }
/* 数字の桁揃え（表の可読性・tabular-nums） */
table { font-variant-numeric: tabular-nums; }
/* Android系ブラウザの強制ダーク反転による配色破壊を防ぐ（ライトテーマ宣言） */
html { color-scheme: light; }
/* UX⑩R3: 文脈型マイクロヒント — 下部の小トースト (1キー1回だけ・6秒で自動消滅) */
.micro-toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--bottom-nav-h, 64px) + 14px); z-index: 65;
  max-width: 92vw; padding: 10px 16px; border-radius: 999px;
  background: rgba(15,23,42,.92); color: #fff;
  font-size: 12.5px; font-weight: 700; line-height: 1.5; text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  animation: micro-toast-in .25s ease-out;
  pointer-events: none;
}
@keyframes micro-toast-in { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .micro-toast { animation: none; } }
/* UX⑩R3: 並び替えハンドル(⋮⋮)の初回のみパルス — 隠れた高度機能に気づかせる */
.brc-pulse-once { animation: secdrag-pulse 1.1s ease-in-out 3; border-radius: 6px; }
@keyframes secdrag-pulse {
  0%, 100% { background: transparent; box-shadow: none; }
  50% { background: rgba(245,158,11,.35); box-shadow: 0 0 0 4px rgba(245,158,11,.22); }
}
@media (prefers-reduced-motion: reduce) { .brc-pulse-once { animation: none; background: rgba(245,158,11,.3); } }
.fav-home { margin: 18px 0 4px; }
.fav-home-title { font-size: 14px; font-weight: 800; color: var(--primary); margin: 0 0 8px; }
.fav-home-list { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-related ul {
  list-style: none; padding: 0; margin: 0;
}
.guide-related li {
  margin: 8px 0;
}
.guide-related a {
  display: block; padding: 12px 14px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  color: var(--primary);
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
}
.guide-related a:hover { background: rgba(30,58,95,.08); }
.guide-cta-block {
  margin-top: 32px;
  padding: 18px 16px;
  background: linear-gradient(135deg, #f5f8fc 0%, #eef2f8 100%);
  border-radius: var(--radius);
  text-align: center;
}
.guide-cta-block p {
  margin: 0 0 12px;
  font-size: 14px; line-height: 1.7;
  color: var(--text);
}
.guide-cta-block .lp-cta {
  display: inline-flex;
  min-width: 240px;
}

/* ============================================================
   guide article 内の SVG 図 (2026-05-15 追加)
   解説テキストの理解を助ける視覚例。
   ============================================================ */
.guide-fig {
  margin: 18px 0 22px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.guide-fig-caption {
  display: block;
  font-size: 12.5px; font-weight: 700;
  color: var(--text-3);
  letter-spacing: .03em;
  margin-bottom: 8px;
}
.guide-fig-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  background: #fafbfd;
  border-radius: 6px;
  padding: 4px;
}
.guide-fig-note {
  display: block;
  font-size: 12px; line-height: 1.7;
  color: var(--text-2);
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
@media (min-width: 720px) {
  .guide-fig { padding: 18px; }
  .guide-fig-svg { padding: 8px; }
  .guide-fig-note { font-size: 13px; }
}

/* ============================================================
   guide article 内のデータ表 (2026-09-04 追加)
   実データを n / 率 / 対照 の3点セットで並べるための表。
   .guide-fig の中に置く前提。横幅が足りない端末では表だけ横スクロール
   させ、ページ本体は横スクロールさせない。
   ============================================================ */
.guide-dtbl-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.guide-dtbl {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.guide-dtbl th, .guide-dtbl td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}
.guide-dtbl thead th {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--text-2);
  font-size: 11.5px;
}
.guide-dtbl th:first-child, .guide-dtbl td:first-child {
  text-align: left;
  white-space: nowrap;
}
.guide-dtbl tbody tr:last-child td { border-bottom: none; }
.guide-dtbl .gd-hi { font-weight: 700; color: var(--text); }
.guide-dtbl .gd-mut { color: var(--text-3); }
.guide-dtbl-cap {
  display: block;
  font-size: 12.5px; font-weight: 700;
  color: var(--text-3);
  letter-spacing: .03em;
  margin: 14px 0 6px;
}
@media (min-width: 720px) {
  .guide-dtbl { font-size: 13.5px; }
  .guide-dtbl th, .guide-dtbl td { padding: 7px 10px; }
}

/* ============================================================
   V1 (2026-05-28): A-07 自然文サマリーの CSS は削除済。
   「📊 6艇のデータ要約をテキストで読む」機能撤去に伴い、
   .race-summary-natural* スタイルすべて不要となった。
   ============================================================ */

/* (2026-08-07: U-B「ホーム画面に追加」案内バナーは削除。関連CSSも撤去) */

/* ============================================================
   U-C: シェア / ブックマーク CTA (2026-05-13)
   ============================================================ */
.brc-share-section {
  margin: 22px 0 18px;
  padding: 14px;
  background: linear-gradient(135deg, #f5f8fc 0%, #eef2f8 100%);
  border-radius: var(--radius);
  text-align: center;
}
.brc-share-title {
  font-size: 13px; font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
.brc-share-row {
  display: flex; gap: 8px;
  justify-content: center; flex-wrap: wrap;
}
.brc-share-btn {
  flex: 1 1 auto; min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700; font-size: 13.5px;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  cursor: pointer; border: 0;
  font-family: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}
.brc-share-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.brc-share-btn:active { transform: translateY(0); }
.brc-share-x {
  background: #000; color: #fff;
}
.brc-share-bookmark {
  background: var(--surface); color: var(--primary);
  border: 1px solid var(--border);
}
.brc-share-icon { font-size: 16px; line-height: 1; }
@media (max-width: 379px) {
  .brc-share-btn { font-size: 12.5px; padding: 8px 10px; min-height: 44px; }
}

/* ============================================================
   U-D: 関連ラインの内部リンクボックス (2026-05-13)
   ============================================================ */
.related-links {
  margin: 18px 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.related-links-title {
  font-size: 12.5px; font-weight: 700;
  color: var(--text-3); letter-spacing: .04em;
  margin-bottom: 8px;
}
.related-links ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.related-links li a {
  display: inline-flex; align-items: center;   /* 2026-07-13 UX: 回遊リンク33→44px */
  min-height: 44px;
  padding: 6px 14px;
  background: var(--bg-soft);
  border-radius: 8px;
  color: var(--primary);
  font-size: 12.5px; font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.related-links li a:hover { background: rgba(30,58,95,.10); }
.related-links li a:active { background: rgba(30,58,95,.16); }
/* 2026-07-13 UX⑥ Task1: 本文終点の大型「次のレース」CTA。
   next-race-bar と同じ金＝サイト内で「次のレースへ」を意味する一貫した色言語。
   読了ユーザーの離脱点に最強の受け皿を置き、レース間の連続閲覧(PV回遊)を作る。 */
.next-race-cta-card {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 6px; padding: 14px 18px; min-height: 64px;
  background: #ffd84d; color: #1e3a5f; border-radius: 14px;
  font-weight: 800; text-decoration: none;
  box-shadow: 0 3px 10px rgba(15,23,42,.14);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition);
}
.next-race-cta-card:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) {
  .next-race-cta-card { transition: none; }
  .next-race-cta-card:active { transform: none; }
}
.nrc-icon { font-size: 24px; flex-shrink: 0; }
.nrc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nrc-main { font-size: 16px; line-height: 1.3; }
.nrc-sub { font-size: 12px; font-weight: 700; color: #6b5416;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nrc-arrow { font-size: 20px; flex-shrink: 0; }

/* ============================================================
   V1 (2026-05-28): U-E 用語解説 CTA と racer-link styles も
   サマリーブロック削除に伴い削除済。
   選手名リンクは .racer-chips-strip (下) と compare-table に集約。
   ============================================================ */

.racer-chips-strip {
  margin: 14px 0 6px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.racer-chips-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--text-2);
  margin-bottom: 8px;
}
.racer-chips-title .racer-chips-icon { font-size: 16px; }
.racer-chips-title .racer-chips-hint {
  margin-left: auto;
  font-size: 11px; font-weight: normal; color: var(--text-3);
}
.racer-chips-row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.racer-chip-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  min-height: 44px; /* 2026-07-13 UX: 36→44px タップ領域確保(HIG) */
  -webkit-tap-highlight-color: transparent;
  background: rgba(255,255,255,0.85);
  border: 1.5px solid var(--chip-color, var(--border));
  border-radius: 18px;
  color: var(--text-1);
  font-size: 13px;
  text-decoration: none;
  transition: all .15s ease;
}
.racer-chip-link:hover {
  background: var(--chip-color, var(--accent));
  color: #fff;
}
.racer-chip-link:hover .racer-chip-num { background: rgba(255,255,255,.25); color: #fff; }
.racer-chip-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  background: var(--chip-color, #888);
  color: var(--chip-fg, #fff); font-weight: 700; font-size: 11px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.18);   /* review3: 1号艇(白)の輪郭 */
}
.racer-chip-name {
  font-weight: 600; white-space: nowrap;
}
@media (min-width: 720px) {
  .racer-chip-link { font-size: 14px; padding: 9px 14px; }
}
.race-row {
  display:flex; align-items:center; padding:16px 18px;
  background: var(--surface); border-radius: var(--radius);
  border:1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: all var(--transition); font-size:16px;
}
/* レース番号の見出し（"第Nレース"）。flex:1 で残り幅を埋めるが、
   min-width:0 で本当に必要なら縮められるようにし、
   white-space:nowrap + ellipsis で文字単位の縦書き化を絶対に防ぐ。 */
.race-row .race-row-title {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 720px) {
  .race-row { font-size:17px; }
}
@media (min-width: 1100px) {
  .race-row { padding:20px 24px; font-size:18px; }
}
.race-row:hover {
  transform: translateY(-1px); box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.race-no {
  width:38px; height:38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color:#fff; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  font-weight:700; font-size:15px; margin-right:14px; flex-shrink:0;
  box-shadow: 0 2px 4px rgba(30,58,95,.3);
}
@media (min-width: 1100px) {
  .race-no { width:44px; height:44px; font-size:17px; margin-right:16px; }
}
.race-time {
  color: var(--text-3); font-size:12px; font-weight:600;
  font-variant-numeric: tabular-nums;
  margin-right:10px; white-space:nowrap;
}
.race-time.past { color: #6b7280; font-weight: 700; }   /* review5b: 2.48→4.8:1 */
/* 「（あと N 分）」ヒントは独立行に表示し、race-time が
   white-space:nowrap で幅を広く取り、隣の title が 1 文字幅まで
   潰されてレース名が縦書きになる崩れを防ぐ。 */
.race-time-hint {
  display: block;
  color: var(--accent);
  font-size: 11px;
  margin-left: 0;
  margin-top: 2px;
}
.race-arrow { color:#6b7280; font-size:11px; }
@media (min-width: 720px) {
  .race-time { font-size:13px; }
  .race-time-hint { font-size:12px; }
}

/* Past races (締切時刻 を過ぎた): faded so they don't compete visually
   with the upcoming one. Still tappable. */
.race-row.race-row-past {
  opacity: 0.75;   /* review5b: .55 は三重減光で実効 1.5〜2:1 */
  background: var(--bg-soft);
}
.race-row.race-row-past:hover { opacity: 0.85; }
.race-row.race-row-past .race-no {
  background: linear-gradient(135deg, #64748b, #6b7280);   /* review5b: 白文字で 4.5:1 以上 */
  box-shadow: none;
}

/* Next-upcoming race: highlighted with accent border + subtle glow. */
.race-row.race-row-next {
  border-color: var(--accent);
  border-width: 2px;
  background: linear-gradient(135deg, #fff5f6 0%, #fff 60%);
  box-shadow: 0 2px 8px rgba(217,53,76,.18), var(--shadow-sm);
  position: relative;
}
.race-row.race-row-next::before {
  content: "次のレース";
  position: absolute;
  top: -10px; left: 12px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 999px;
  box-shadow: 0 1px 3px rgba(217,53,76,.25);
}
.race-row.race-row-next .race-time { color: var(--accent); }

/* ───────────────────────────────────────────────────────────────
   トップページ「公開中の開催日」専用の状態スタイル。
   .race-row-today  本日: アクセント枠+グロー+左肩バッジ
   .race-row-future 予定: 通常 + 薄いハイライト
   .race-row-done   終了: 退色（race-row-past と類似だがレース用と分離）
   ─────────────────────────────────────────────────────────────── */
.race-row.race-row-today {
  border-color: var(--accent);
  border-width: 2px;
  background: linear-gradient(135deg, #fff5f6 0%, #fff 60%);
  box-shadow: 0 4px 14px rgba(217,53,76,.18), var(--shadow-sm);
  position: relative;
  padding-top: 22px;
}
.race-row.race-row-today::before {
  content: "🔴 本日";
  position: absolute;
  top: -10px; left: 14px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 1px 3px rgba(217,53,76,.30);
}
.race-row.race-row-today .date-status { color: var(--accent) !important; font-weight: 800; }
.race-row.race-row-future {
  border-color: var(--primary-light);
  background: linear-gradient(135deg, #f5faff 0%, #fff 70%);
}
.race-row.race-row-future .date-status { color: var(--primary-light) !important; font-weight: 700; }
/* #2 (2026-06-27): 「日付一覧」アンカー(/?stay=1#dates-title)着地時に、
   見出しが sticky ヘッダーへ潜らないよう余白を確保する。 */
#dates-title { scroll-margin-top: 72px; }
.race-row.race-row-done {
  opacity: 0.8;   /* review5b */
  background: var(--bg-soft);
}
.race-row.race-row-done:hover { opacity: 0.92; }

.no-data { text-align:center; color: var(--text-3); padding:30px 0; font-size:12px; }

/* ============================================================
   レース結果セクション — 着順1〜3着を「表彰台」風に強調表示、
   4〜6着を控えめに並べる。レース確定後にのみ表示。
   ============================================================ */
.race-result-section {
  margin-top: 6px; margin-bottom: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff8e1 0%, #fff5d6 100%);
  border: 1px solid #f3d77a;
  border-radius: var(--radius);
}
.rr-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px;
}
.rr-title { font-size: var(--fs-cardtitle); font-weight: 800; color: #7a5c00; }
.rr-update {
  font-size: 11px; color: #7a5c00; opacity: .8;
  font-variant-numeric: tabular-nums;
}
.rr-podium {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
@media (max-width: 519px) {
  /* 狭いスマホでは 3+3 の2行に */
  .rr-podium { grid-template-columns: repeat(3, 1fr); gap: 8px 6px; }
}
.rr-slot {
  background: var(--surface);
  border: 1px solid #f3d77a;
  border-radius: 10px;
  padding: 10px 6px 8px;
  text-align: center;
  position: relative;
  box-shadow: 0 1px 2px rgba(122,92,0,.08);
}
/* 1〜3着は表彰台風に色分け */
.rr-slot.rr-rank-1 {
  background: linear-gradient(180deg, #fef9c3 0%, #fde68a 100%);
  border-color: #facc15;
  box-shadow: 0 4px 12px rgba(250,204,21,.25);
  transform: translateY(-3px);
}
.rr-slot.rr-rank-2 {
  background: linear-gradient(180deg, #f1f5f9 0%, #cbd5e1 100%);
  border-color: #94a3b8;
}
.rr-slot.rr-rank-3 {
  background: linear-gradient(180deg, #fff7ed 0%, #fed7aa 100%);
  border-color: #fb923c;
}
.rr-rank-num {
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  color: var(--text-3);
}
.rr-slot.rr-rank-1 .rr-rank-num { color: #92710f; }
.rr-slot.rr-rank-2 .rr-rank-num { color: #475569; }
.rr-slot.rr-rank-3 .rr-rank-num { color: #9a3412; }
.rr-medal { font-size: 18px; line-height: 1; margin-bottom: 2px; }
.rr-souban-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  font-weight: 700; font-size: 12px;
  margin: 4px 0 4px;
}
.rr-name {
  font-size: 11.5px; font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  word-break: keep-all;
}
@media (min-width: 720px) {
  .rr-name { font-size: 13px; }
  .rr-rank-num { font-size: 12px; }
  .rr-medal { font-size: 22px; }
}
.rr-foot {
  margin-top: 10px;
  font-size: 10.5px; color: #7a5c00; opacity: .85;
  text-align: center;
}

/* 払戻金テーブル — 結果セクション内に配置 */
.rr-payouts {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid #f3d77a;
  border-radius: 10px;
}
.rr-payouts-head {
  font-size: 13px; font-weight: 800; color: #7a5c00;
  margin-bottom: 8px;
  letter-spacing: .04em;
}
.rr-payouts-table { display: flex; flex-direction: column; gap: 4px; }
.po-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 6px 10px;
  padding: 4px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed rgba(122,92,0,.18);
}
.po-row:last-child { border-bottom: none; }
.po-row-sub { opacity: .92; }
.po-row-sub .po-type { visibility: hidden; }
.po-type {
  font-weight: 800;
  color: #7a5c00;
  font-size: 11.5px;
  letter-spacing: .02em;
}
.po-combo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}
.po-lane {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-weight: 700; font-size: 12.5px;
  border: 1px solid rgba(15,23,42,.12);
}
.po-sep {
  color: var(--text-3);
  font-weight: 700;
  font-size: 14px;
  margin: 0 1px;
}
.po-amt {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  /* 10,000円 以下は黒、超過は赤（高配当強調）。JS が
     .po-amt-high クラスを付与する。 */
  color: var(--text);
  text-align: right;
  min-width: 70px;
}
.po-amt.po-amt-high { color: var(--accent); }
.po-pop {
  font-size: 10.5px;
  color: var(--text-3);
  font-weight: 600;
  white-space: nowrap;
}
@media (min-width: 720px) {
  .po-row { font-size: 13.5px; grid-template-columns: 64px 1fr auto auto; }
  .po-amt { font-size: 14.5px; min-width: 84px; }
  .rr-payouts-head { font-size: 14px; }
}
/* 2026-07-05 モバイル: 狭幅端末(≤400px)で払戻行が横あふれし、右端「人気N」が
   overflow:hiddenで見切れる問題を修正。ラベル列/舟番/金額最小幅/余白を圧縮して
   1行に収める(320pxでも収まる)。 */
@media (max-width: 400px) {
  .po-row { grid-template-columns: 46px 1fr auto auto; gap: 3px 6px; }
  .po-lane { width: 19px; height: 19px; font-size: 11px; }
  .po-sep { font-size: 12px; margin: 0; }
  .po-type { font-size: 11px; }
  .po-amt { min-width: 52px; font-size: 12px; }
  .po-pop { font-size: 10px; }
}

/* ============================================================
   総合スコア順カード — レース詳細のファーストビュー最上段。
   横スワイプ式 (snap)。全6艇をスコア順に並べ、本命/対抗/単穴 の
   ランクバッジで本命予想を可視化。
   ============================================================ */
.score-section {
  margin-top: 6px;
  margin-bottom: 14px;
}

/* ============================================================
   U-A: 予想軸候補サマリーバナー (2026-05-15 追加)
   ファーストビューに「結論」を1行で表示。
   X など短時間滞在ユーザに即座に価値を届ける。
   ============================================================ */
.top-picks-banner {
  margin: 8px 0 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #facc15;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(250, 204, 21, .15);
  /* BB3 (2026-05-28): CLS対策。中身は JS で後挿入され、ローディング1行→
     本命/対抗/単穴の2〜3行に伸びる。確定後の高さを先に確保してシフト防止。
     モバイルは折返しで3行になりやすいので広めに。 */
  min-height: 112px;
  box-sizing: border-box;
}
.top-picks-banner-loading {
  font-size: 12px;
  color: var(--text-3);
}
.top-picks-banner .tp-row {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
}
.top-picks-banner .tp-row + .tp-row { margin-top: 6px; }
.top-picks-banner .tp-honmei { font-weight: 700; color: #713f12; }
.top-picks-banner .tp-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 700;
  color: #fff;
}
/* 2026-07-03 中4: 本命タグを金色→primary系へ。「1位セルの金」との意味重複を解消し、
   金/黄は順位ハイライト専用に戻す。 */
.top-picks-banner .tp-tag-1 { background: var(--primary); color: #fff; }
.top-picks-banner .tp-tag-2 { background: #64748b; }   /* review3: 白文字で 2.56→4.6:1 */
.top-picks-banner .tp-tag-3 { background: #c2410c; }   /* review3: 白文字で 2.26→5.4:1 */
.top-picks-banner .tp-lane {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-weight: 700; font-size: 12px;
  border: 1px solid rgba(15,23,42,.15);
}
.top-picks-banner .tp-name {
  font-weight: 700; font-size: 14px;
}
.top-picks-banner .tp-name-sm {
  font-size: 12.5px; color: #3a3325;   /* review3: ダークで --text-2 が明色になり 1.71:1 */
  margin-right: 4px;
}
.top-picks-banner .tp-score {
  margin-left: auto;
  font-size: 11px;
  color: #7c6a1e;   /* review3: ダークで --text-3 が明色になり 2.36:1 */
  font-weight: 700;
  letter-spacing: .03em;
}
.top-picks-banner .tp-others .tp-tag {
  margin-left: 4px;
}
.top-picks-banner .tp-others .tp-tag:first-child { margin-left: 0; }
.top-picks-banner .tp-share {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  background: #000; color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px; font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}
.top-picks-banner .tp-share:hover { background: #1a1a1a; }
.top-picks-banner .tp-share:active { transform: translateY(1px); }
/* 2026-07-13 UX⑨ Task2: AI確信度ゲージ + 波乱警戒バッジ。
   ML予測の「凄み」を数字の羅列でなく計器として見せる (投資ツール調・控えめ発色)。
   確信度 = 本命スコア(0-100)。波乱警戒 = 本命と対抗のスコア差(gap)から3段階。 */
.tp-ai-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed rgba(120,113,58,.35);
  font-variant-numeric: tabular-nums;
}
.tp-ai-label { font-size: 10.5px; font-weight: 800; color: #7c6a1e; letter-spacing: .04em; flex-shrink: 0; }
.tp-gauge {
  flex: 1; height: 8px; min-width: 60px;
  background: rgba(120,113,58,.18); border-radius: 999px; overflow: hidden;
}
.tp-gauge-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #16a34a);
}
/* ============================================================
   2026-07-18 第11サイクル: 習慣化(T1) / 社会的証明(T2) / 計算完了演出(T3)
   ============================================================ */
/* T3: 「膨大な計算がいま確定した」体感。数値テキストは静的HTMLのまま即表示(LCP無影響)で、
   バー/ゲージだけが 0 から伸びる。CSSのみ＝JS実行ゼロ・追加リクエストゼロ。 */
@keyframes brc-bar-grow { from { width: 0; } }
.tp-gauge-fill, .mk-barfill, .it-fill { animation: brc-bar-grow .85s cubic-bezier(.22,.9,.3,1) both; }
@keyframes brc-radar-in { from { opacity: 0; transform: scale(.965); } }
.radar-svg { animation: brc-radar-in .55s ease-out both; }
/* T1: 連続チェック日数バッジ(習慣化フック・localStorage のみ・サーバー不要) */
.brc-streak {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 0 16px; padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fdba74; color: #7c2d12;
  font-size: 13.5px; font-weight: 800; line-height: 1.5;
}
.brc-streak .bs-n { font-size: 17px; color: #c2410c; font-variant-numeric: tabular-nums; }
.brc-streak .bs-sub { font-size: 11.5px; font-weight: 600; color: #9a3412; }
/* T2: 締切間近レースの「いま動いている」ハイライト(時間的緊急性による社会的証明) */
.now-race-row.is-hot { background: rgba(217,53,76,.06); }
.now-hot-badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  background: #d9354c; color: #fff; font-size: 10px; font-weight: 800;
  margin-right: 6px; white-space: nowrap;
  animation: brc-hot-pulse 1.8s ease-in-out infinite;
}
@keyframes brc-hot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .tp-gauge-fill, .mk-barfill, .it-fill, .radar-svg, .now-hot-badge { animation: none; }
}
@media (prefers-color-scheme: dark) {
  .brc-streak { background: linear-gradient(135deg, #2a1d10 0%, #241a0f 100%); border-color: #7c4a1e; color: #f0c674; }
  .brc-streak .bs-n { color: #ffab70; }
  .brc-streak .bs-sub { color: #d9a066; }
  .now-race-row.is-hot { background: rgba(217,53,76,.12); }
}
.tp-ai-num { font-size: 12px; font-weight: 800; color: #713f12; flex-shrink: 0; }
/* 2026-08-09: 本日の展開ベストマッチ一覧(トップページ)。レース詳細の
   .best-match-alert と同系の紫アクセント。行は44px以上のタップ標的。
   X予告からの受け皿(旧CTA「きょうの全レースぶんサイトに置いてるよ」)となる集約リスト。 */
.bm-today {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid #7c5cbf; border-radius: 12px;
  padding: 14px 16px 8px; margin: 14px 0;
}
.bm-today-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; color: #5b3fa8;
}
.bm-today-count {
  font-size: 11.5px; font-weight: 700; color: #fff;
  background: #7c5cbf; border-radius: 999px; padding: 2px 9px;
}
.bm-today-note { font-size: 11.5px; color: var(--text-2); margin: 6px 0 4px; line-height: 1.7; }
.bm-today-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 44px;
  padding: 4px 4px; border-top: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
/* 2026-08-10: 噛み合わせが複数ある場合の2件目以降(行内の2行目に折返し表示)
   2026-09-08 (オーナー指摘): 右端の「噛み合い」の続きなので右揃えにする。
   左端に折り返すと時刻/レース名の列に属する別情報に見えていた。
   右余白 = 矢印列(17px 固定) + 列gap(10px)。 */
.bm-today-sub {
  flex-basis: 100%; font-size: 11px; line-height: 1.5;
  color: var(--text-2); text-align: right; padding: 0 27px 2px 0;
}
.bm-today-row:first-of-type { border-top: none; }
.bm-today-time {
  font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text-2); font-size: 12.5px; flex-shrink: 0; width: 3.4em;
}
.bm-today-race { font-weight: 800; font-size: 14px; white-space: nowrap; }
.bm-today-sig { font-size: 12px; color: #5b3fa8; margin-left: auto; white-space: nowrap; }
/* 幅を固定するのは「ほか:」行の右余白(27px)を1つの数字で決められるようにするため。
   字形は右寄せなので、矢印の右端の位置は従来どおり行の右端。 */
.bm-today-arrow {
  color: var(--text-2); flex-shrink: 0; width: 17px; text-align: right;
}
/* 締切済みは「文字だけ」を薄くする(行ごと薄くすると背景の濃淡=倍率まで薄まり、
   濃い倍率の締切済みと薄い倍率の未締切が見分けられなくなる)。 */
.bm-today-row.bm-past > * { opacity: .42; }
/* 2026-09-08 (オーナー提案): 噛み合いの倍率で行に濃淡。同じ行は左右で同じ色になるので、
   レース名と噛み合いの対応も追いやすい。紫はセクションのアクセント色(#7c5cbf)の透過。
   透過なので、締切済みの opacity や dark の下地にもそのまま乗る。 */
.bm-today-row.bm-t1 { background: rgba(124, 92, 191, .04); }
.bm-today-row.bm-t2 { background: rgba(124, 92, 191, .10); }
.bm-today-row.bm-t3 { background: rgba(124, 92, 191, .19); }
.bm-today-row.bm-t3 .bm-today-sig { font-weight: 700; }
/* 2026-09-08 (オーナー指示): トップは10件までにして、残りは /bestmatch/ へ送る。
   全行はDOMに残し、表示する10件はJSが現在時刻で送る(夜に締切済みばかり並べない)。
   .bm-today-row の display:flex は UA の [hidden] より強いので明示的に消す。 */
.bm-today-row[hidden] { display: none; }
/* 2026-09-09 (オーナー判断): 2列組みは廃止。行の濃淡(下の bm-t1〜3)で左右の対応が
   追えるので、幅いっぱいの1行のままでよい。 */
.bm-today-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; margin-top: 2px; border-top: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: #5b3fa8; text-decoration: none;
}
.bm-today-more:hover { text-decoration: underline; text-underline-offset: 3px; }
/* 2026-08-10: /bestmatch/ の孤立防止リンク3種。
   bm-list-link=レースページの発火バナー内 / bm-perma-row=トップのセクション直下 /
   now-bm-link-row=/now/ の会場ナビ直下。 */
.bm-list-link {
  display: inline-flex; align-items: center; min-height: 32px; margin-top: 6px;
  font-size: 12.5px; font-weight: 700; color: #5b3fa8;
  text-decoration: underline; text-underline-offset: 3px;
}
.bm-perma-row { text-align: right; margin: -6px 0 14px; }
.bm-perma-row a {
  font-size: 12px; color: var(--text-2);
  text-decoration: underline; text-underline-offset: 3px;
}
.now-bm-link-row { margin: 4px 0 8px; }

/* 2026-08-08: 会場ページ → 会場別攻略ガイドへの導線カード。
   会場/レース詳細に既にある内部トラフィックを、読まれていないガイドへ流すための入口。 */
.venue-guide-card {
  display: block; margin: 10px 0 14px; padding: 13px 15px;
  background: linear-gradient(135deg, #f2f7ff 0%, #e8f0fb 100%);
  border: 1px solid #c5d8f0; border-left: 4px solid var(--primary);
  border-radius: 12px; text-decoration: none; color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.venue-guide-card:active { background: #e4edfa; }
.vgc-head { display: block; font-size: 14px; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.vgc-points { margin: 0 0 8px; padding-left: 1.1em; font-size: 12.5px; line-height: 1.75; color: var(--text-2); }
.vgc-points li { margin: 0; }
.vgc-points b { color: var(--text); font-variant-numeric: tabular-nums; }
.vgc-cta {
  display: inline-flex; align-items: center; min-height: 32px;
  font-size: 13px; font-weight: 800; color: #b3163a;
  text-decoration: underline; text-underline-offset: 3px;
}
@media (prefers-color-scheme: dark) {
  .venue-guide-card { background: linear-gradient(135deg, #17202e 0%, #141a25 100%); border-color: #2b3b52; }
  .venue-guide-card:active { background: #1d2635; }
  .vgc-cta { color: #ff9aa8; }
}
/* 2026-07-18 第12サイクルT1: スコア変動バッジ。主役(スコア)より一段小さく・淡く。
   |Δ|>=2 のときだけ生成されるので、画面に出る頻度そのものが低い＝ノイズにならない。 */
.tp-delta {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 999px; letter-spacing: .02em;
  font-variant-numeric: tabular-nums; opacity: .82;
}
/* 2026-07-18 第14サイクルT3: AIO用予測サマリー。LLMが引用しやすい完結した文章ブロック。
   ページ末尾の控えめトーン(非表示にはしない=cloaking回避)。 */
.ai-summary {
  margin: 18px 0 6px; padding: 12px 14px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  font-size: 12.5px; line-height: 1.8; color: var(--text-2);
}
.ai-summary-h { font-size: 12.5px; font-weight: 800; color: var(--text-2); margin: 0 0 6px; }
.ai-summary p { margin: 0 0 8px; }
.ai-summary-note { font-size: 11px; color: var(--text-3); margin: 0; }
.ai-summary a { color: var(--primary); }
@media (prefers-color-scheme: dark) { .ai-summary { background: #1a1a21; } }
.tp-delta-up { background: rgba(22,163,74,.14); color: #15803d; }
.tp-delta-down { background: rgba(148,163,184,.20); color: #475569; }
@media (prefers-color-scheme: dark) {
  .tp-delta-up { background: rgba(110,231,160,.16); color: #6ee7a0; }
  .tp-delta-down { background: rgba(148,163,184,.20); color: #aab4c0; }
}
.tp-upset-badge {
  flex-shrink: 0; font-size: 10.5px; font-weight: 800;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.tp-upset-low  { background: #dcfce7; color: #166534; }
.tp-upset-mid  { background: #e2e8f0; color: #334155; }
.tp-upset-high { background: #fee2e2; color: #b91c1c; }
/* 2026-07-13 UX⑩R1: 計器→行動の橋渡し行 (「で、どう買う?」への1タップ回答) */
.tp-hint-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 6px; font-size: 12px; line-height: 1.5;
}
.tp-hint-txt { color: #7c6a1e; font-weight: 600; }
.tp-hint-link {
  display: inline-flex; align-items: center; min-height: 32px;
  color: #b3163a; font-weight: 800; text-decoration: underline;
  text-underline-offset: 3px; -webkit-tap-highlight-color: transparent;
  position: relative;
}
.tp-hint-link::after { content: ''; position: absolute; inset: -8px -6px; } /* 44px級当たり判定 */
.tp-hint-link:active { opacity: .65; }
/* 2026-07-17 改行ハードニング: 短い操作ラベル/バッジは要素内で途中改行させない。
   親が flex-wrap なので「チップ単位」で折り返される＝末尾「→」等の1文字孤立改行を根絶。 */
.tp-hint-link, .tp-ai-detail, .now-badge, .race-explore-chip { white-space: nowrap; }
/* 2026-07-17 全数監査(52件のflex見出し/行を列挙・トリアージ): 内容可変のテキストと
   バッジ/リンクが折返し禁止flexに同居する7行に wrap を付与 — 幅不足時はバッジが
   潰れる/はみ出す代わりに次行へ落ちる。 */
.rec-card-head, .featured-venues-head, .notable-races-head, .notable-venue-row,
.score-section-head, .compare-table-title, .radar-title { flex-wrap: wrap; }
/* 2026-07-17 スマホ実機SS指摘: コンパクトヘッダーで「大村 11R…」「（金…」まで
   省略される — 狭幅ではボタン群を圧縮してタイトル/日付側に幅を返す。 */
@media (max-width: 400px) {
  .header.header-compact .hc-action a,
  .header.header-compact .hc-action button {
    padding: 6px 8px; font-size: 11.5px; gap: 3px;
  }
}
/* 2026-07-17: ダーク上書き(#d9c46a/#ff9aa8)を撤去 — top-picks-banner はダークでも
   ライトのクリーム地を保つ設計(金色の島)のため、薄色文字だと実測1.56:1で読めなかった。
   ライト用の茶/赤(4.79:1/6.10:1)をそのまま使う。 */
/* 2026-07-17: tp-ai-row/tp-upset のダーク変種を撤去 — バナーはダークでもクリーム地の
   ため、ライト用のパステルチップ(文字コントラスト6.49:1)をそのまま使うのが正。 */
@media (min-width: 720px) {
  .top-picks-banner { padding: 12px 18px; min-height: 84px; }
  .top-picks-banner .tp-row { font-size: 15px; }
  .top-picks-banner .tp-name { font-size: 15px; }
  .top-picks-banner .tp-name-sm { font-size: 13.5px; }
}
.score-section-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 4px 6px;
}
.score-section-title {
  font-size: var(--fs-cardtitle); font-weight: 700; color: var(--primary);
}
/* #2 (2026-06-27): スコア見出し横の「?」ヘルプ。/about-score/ へ誘導し初見の理解を補助。 */
.score-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 6px;
  border-radius: 50%;
  background: var(--primary); color: #fff;   /* review3: --primary-light は白文字で 4.36(ライト)/1.77(ダーク) */
  font-size: 11px; font-weight: 800; line-height: 1;
  text-decoration: none; vertical-align: middle;
}
.score-help:hover { opacity: 1; }
.score-section-hint {
  font-size: 10.5px; color: var(--text-3);
  /* 軽い揺れアニメ：スワイプ可能であることを示唆 */
  animation: sc-hint-pulse 2.4s ease-in-out infinite;
}
@keyframes sc-hint-pulse {
  0%, 100% { opacity: 0.5; transform: translateX(0); }
  50%      { opacity: 1; transform: translateX(-3px); }
}
.score-section-foot {
  margin-top: 6px;
  padding: 0 6px;
  font-size: 12px; color: var(--text-3);
  line-height: 1.45;
}
@media (min-width: 720px) {
  .score-section-title { font-size: 16px; }
  .score-section-hint { font-size: 12px; }
  .score-section-foot { font-size: 13px; }
}
/* 項目4 (2026-06-27): data.json 非同期取得中のスケルトン。:empty で JS 描画前
   のみ表示され、内容が入ると自動的に消える（追加HTML/JS不要・CLSと空白を抑制）。
   prefers-reduced-motion ではシマーを止める。 */
@keyframes brc-shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
#score-cards:empty, #compare-table:empty {
  min-height: 120px;
  border-radius: var(--radius);
  background: #eef2f7 linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,.65) 50%, rgba(255,255,255,0) 100%) no-repeat;
  background-size: 200px 100%;
  animation: brc-shimmer 1.2s ease-in-out infinite;
}
#compare-table:empty { min-height: 220px; }
@media (prefers-reduced-motion: reduce) {
  #score-cards:empty, #compare-table:empty { animation: none; }
}

.score-cards-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 4px 8px;
  /* BB3 (2026-05-28): CLS対策。カードは JS (renderScoreCards) で後から
     挿入されるため、空→155px に伸びてレーダー等の下方要素を押し下げ、
     Cloudflare RUM で CLS Poor を招いていた。レンダー後の高さを min-height
     で先に確保し、レイアウトシフトを防ぐ (カード高さは viewport 非依存で一定)。 */
  min-height: 155px;
}
.score-cards-scroll::-webkit-scrollbar { display: none; }

.score-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px 10px;
  position: relative;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  /* 全要素を card クリックで modal 開く一体ボタン化 */
  text-align: left;
  font-family: inherit;
}
.score-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.score-card:active { transform: translateY(0); }
/* キーボード Tab フォーカス可視化（マウスフォーカスでは出さず、:focus-visible のみ） */
.score-card:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
  border-color: var(--primary);
}

/* ============================================================
   スコアカード内: 「総合スコア」と「AIベース予想スコア」を並列表示。
   ベース予想（直前情報なし）が CSV にあるレースのみセカンダリ列が表示。
   AI スコアは小さめに、メインの SCORE は引き続き目立たせる。
   ============================================================ */
.sc-scores {
  display: flex; align-items: flex-end; gap: 10px;
  margin-top: 4px;
}
.sc-score-block {
  display: flex; flex-direction: column; align-items: flex-start;
  line-height: 1;
}
.sc-score-block.sc-primary .sc-score-num {
  font-size: 26px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.sc-score-block.sc-secondary {
  padding-left: 10px; border-left: 1px dashed var(--border);
}
.sc-score-block.sc-secondary .sc-score-num {
  font-size: 18px; font-weight: 700; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.sc-score-label {
  font-size: 9.5px; color: var(--text-3);
  font-weight: 700; letter-spacing: .04em;
  margin-top: 2px;
}
.sc-score-block.sc-primary .sc-score-label { color: var(--text-3); }
.sc-score-block.sc-secondary .sc-score-label { color: var(--primary-light); }
@media (min-width: 720px) {
  .sc-score-block.sc-primary .sc-score-num { font-size: 30px; }
  .sc-score-block.sc-secondary .sc-score-num { font-size: 20px; }
}
@media (min-width: 720px) {
  .score-card { flex: 0 0 210px; padding: 12px 14px; }
}

/* 本命/対抗/単穴 のランクバッジ装飾 — top 3 のみ視覚的にも特別扱い */
.score-card.sc-rank-1 {
  border-color: #facc15;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 1px 2px rgba(250,204,21,.20),
    0 6px 18px rgba(250,204,21,.22);
}
.score-card.sc-rank-2 {
  border-color: #cbd5e1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 1px 2px rgba(15,23,42,.06),
    0 4px 12px rgba(15,23,42,.08);
}
.score-card.sc-rank-3 {
  border-color: #fed7aa;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    0 1px 2px rgba(251,146,60,.16),
    0 4px 12px rgba(251,146,60,.16);
}

.sc-rank-label {
  position: absolute; top: 8px; right: 10px;
  font-size: 10px; font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .04em;
  line-height: 1.2;
  z-index: 2;
}
.sc-rank-1 .sc-rank-label {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #422006;
  box-shadow: 0 1px 2px rgba(250,204,21,.4);
}
.sc-rank-2 .sc-rank-label {
  background: #cbd5e1;
  color: #0f172a;
}
.sc-rank-3 .sc-rank-label {
  background: linear-gradient(135deg, #fed7aa, #fb923c);
  color: #7c2d12;
}
.sc-rank-other .sc-rank-label {
  background: var(--bg-soft);
  color: var(--text-3);
  border: 1px solid var(--border);
}

.sc-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  padding-right: 56px; /* バッジが上書きしないよう余白 */
}
.sc-lane {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.15) inset, 0 1px 2px rgba(0,0,0,.08);
}
.sc-name-block {
  flex: 1; min-width: 0;
}
.sc-name {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.sc-meta {
  font-size: 10px; color: var(--text-3);
  margin-top: 1px;
  font-weight: 600;
}

.sc-score-row {
  display: flex; align-items: baseline; gap: 5px;
  margin-bottom: 4px;
}
.sc-score {
  font-size: 32px; font-weight: 800;
  letter-spacing: -.02em;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sc-rank-1 .sc-score { color: #b45309; }
.sc-score-label {
  font-size: 10px; color: var(--text-3);
  font-weight: 700;
  letter-spacing: .05em;
}
.sc-tier {
  font-size: 10px; font-weight: 700;
  margin-top: 6px;
  letter-spacing: .02em;
  line-height: 1;
}
.sc-tier-high { color: #b45309; }
.sc-tier-mid  { color: var(--primary); }
.sc-tier-low  { color: var(--text-2); }
.sc-tier-weak { color: var(--text-3); }

.sc-sparkline {
  width: 100%;
  height: 32px;
  display: block;
  margin-top: 4px;
}

/* ============================================================
   6艇の総合力レーダー — 出走表の上に配置するサマリービュー。
   表は数値を見るため、レーダーは "形" で誰がどこで強いかを
   一目で掴むため。同じデータを違う角度で。
   ============================================================ */
.radar-card {
  margin-top: 10px;
  margin-bottom: 14px;
  padding: 0;
}
.radar-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #f5f8fc 0%, #eef2f8 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.radar-title {
  font-size: var(--fs-cardtitle); font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 6px;
}
.radar-sub {
  font-size: 10.5px; color: var(--text-3); font-weight: 600;
}
@media (min-width: 720px) {
  .radar-title { font-size: 15px; }
  .radar-sub { font-size: 12px; }
}
/* AC6 (2026-05-29): レーダー上部の「枠順 並び替えストリップ」。
   現在の枠順で号艇チップを横一列に表示。チップ全体がドラッグ対象。 */
.radar-order-bar {
  padding: 8px 10px 2px;
}
/* A11Y (2026-06-27): スクリーンリーダー専用テキスト（視覚的には不可視）。
   キーボード並べ替えの結果を aria-live で読み上げる #radar-order-live 用。 */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.radar-order-hint {
  display: block;
  font-size: 10.5px; color: var(--text-3); font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
}
.radar-order-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 60px;   /* CLS: JS で後挿入されるため確保 (モバイル実測~58px) */
}
.radar-order-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 44px;
  padding: 4px 5px 5px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: grab;
  /* A (2026-07-05): pan-y で縦フリックはページスクロールへ通し、横方向の
     意図的ドラッグだけを JS(pointermove の方向判定)へ回す。compare-table
     カード本体と同じ「touch-action:pan-y ＋ 移動閾値」方式。 */
  touch-action: pan-y;
  -webkit-user-select: none; -moz-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .1s ease-out, box-shadow .15s ease-out, border-color .15s ease-out;
}
.radar-order-chip:active { cursor: grabbing; }
.radar-order-chip .roc-course { font-size: 9px; font-weight: 700; color: var(--text-3); line-height: 1; }
.radar-order-chip .roc-course small { font-size: 8px; font-weight: 600; }
.radar-order-chip .roc-badge {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 12px;
}
.radar-order-chip .roc-name {
  font-size: 10px; font-weight: 600; color: var(--text-2);
  white-space: nowrap; max-width: 58px; overflow: hidden; text-overflow: ellipsis;
}
.radar-order-chip-dragging { opacity: 0.4; }
.radar-order-chip-drop-target {
  border-color: var(--lineup-accent);
  box-shadow: 0 0 0 2px var(--lineup-accent-soft);
}
@keyframes radar-order-chip-flash {
  0%   { background: rgba(245, 158, 11, 0.30); }
  100% { background: var(--surface, #fff); }
}
.radar-order-chip-just-reordered { animation: radar-order-chip-flash 700ms ease-out; }
@media (min-width: 720px) {
  .radar-order-hint { font-size: 12px; }
  .radar-order-strip { min-height: 64px; }   /* デスクトップはチップがやや高い */
  .radar-order-chip { min-width: 54px; }
  .radar-order-chip .roc-badge { width: 24px; height: 24px; font-size: 13px; }
  .radar-order-chip .roc-name { font-size: 11px; max-width: 72px; }
}
.radar-wrap {
  padding: 6px 0 0;
  display: flex; justify-content: center;
}
.radar-svg {
  width: 100%; max-width: 380px;
  height: auto; display: block;
}
@media (min-width: 720px) {
  .radar-svg { max-width: 460px; }
}
@media (min-width: 1100px) {
  .radar-svg { max-width: 540px; }
}
.radar-legend {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 6px;
  padding: 4px 10px 8px;
  /* BB3 / AC3 / AC5 (2026-05-29): CLS対策。凡例チップは JS で後挿入。
     AC5 で凡例のドラッグハンドルを廃止しチップが低くなった → モバイルで
     折返し約110px / デスクトップ1行=約43px。レンダー後の高さを先に確保。 */
  min-height: 110px;
  box-sizing: border-box;
}
@media (min-width: 720px) {
  /* デスクトップは1行に収まるため確保高さを縮小 */
  .radar-legend { min-height: 44px; }
}
.radar-legend-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.radar-legend-item:hover { background: var(--bg-soft); }
/* 選択中 (タップで明示的に "見せたい" 艇)。プライマリ色で輪郭強調。 */
.radar-legend-item.selected {
  background: rgba(30, 58, 95, .10);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary) inset;
}
/* フィルタで除外（他の艇が選択されているため非表示） */
.radar-legend-item.muted {
  opacity: .35;
  background: var(--bg-soft);
}
.radar-legend-item .rl-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(15,23,42,.1);
}
.radar-legend-item .rl-souban {
  font-weight: 700; color: var(--primary);
}
/* V2 (2026-05-28): レーダー凡例にコース切替 UI 追加 */
.radar-legend-item .rl-name {
  margin-left: 2px;
}
.radar-legend-item .rl-course-hint {
  margin-left: 6px;
  padding: 1px 5px;
  font-size: 10px; font-weight: 600;
  color: var(--text-3);
  background: var(--bg-soft);
  border-radius: 3px;
}
.radar-legend-item .rl-course-hint.rl-course-hint-moved {
  /* Y2 (2026-05-28): 凡例内で並ぶ濃いバッジが視覚ノイズだったため、
     薄いオレンジ背景＋濃いオレンジ文字に変更。識別はできるが主張は控えめ。 */
  color: #92400e;
  background: var(--lineup-accent-soft);
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.radar-legend-item .rl-drag-handle {
  /* AC2/AC3: 凡例側も「つかむ場所」をはっきりオレンジのグリップに。
     AC3 (2026-05-29): スマホで押しやすいよう的を拡大 (約40x36px)。 */
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 6px;
  padding: 0 11px;
  min-width: 40px; min-height: 36px;
  font-size: 17px;
  letter-spacing: -1px;
  /* AC4 (2026-05-29): 控えめなアウトライン型 (淡オレンジ塗り＋オレンジ枠) に統一 */
  color: #b45309;
  background: var(--lineup-accent-soft);
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  cursor: grab;
  touch-action: none;   /* AA3: ハンドルだけドラッグ専用ゾーン */
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease-out, transform .1s ease-out, border-color .15s ease-out;
}
.radar-legend-draggable:hover .rl-drag-handle { background: rgba(245,158,11,.20); border-color: var(--lineup-accent); }
.rl-drag-handle:active { cursor: grabbing; transform: scale(0.92); background: rgba(245,158,11,.30); }
.radar-legend-draggable {
  cursor: pointer;
  /* AA3: チップ本体は縦スクロール許可。ドラッグは .rl-drag-handle 上のみ。 */
  touch-action: pan-y;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.radar-legend-draggable, .radar-legend-draggable * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.radar-legend-dragging {
  opacity: 0.3; transform: scale(0.96); transition: opacity .15s, transform .15s;
}
.radar-legend-drop-target {
  box-shadow: inset 0 0 0 2px var(--lineup-accent);
}
/* W6 (2026-05-28): 並び替え直後のアイテムを 600ms フラッシュで強調 */
@keyframes radar-legend-flash {
  0%   { background-color: rgba(245, 158, 11, 0.30); }
  100% { background-color: transparent; }
}
.radar-legend-item.radar-legend-just-reordered {
  animation: radar-legend-flash 700ms ease-out;
}
@media (min-width: 720px) {
  .radar-legend-item { font-size: 12.5px; padding: 5px 12px; }
  .radar-legend-item .rl-dot { width: 12px; height: 12px; }
  .radar-legend-item .rl-course-hint { font-size: 11px; }
  .radar-legend-item .rl-drag-handle { font-size: 14px; }
}
.radar-foot {
  padding: 0 14px 10px;
  font-size: 12px; color: var(--text-3);
  line-height: 1.45;
}
@media (min-width: 720px) { .radar-foot { font-size: 13px; padding: 0 16px 12px; } }
/* 軸選択パネル — 折り畳み式。デフォルトは閉じた状態。
   開くとプリセット＋チップトグルでユーザーが軸を組み替えできる。 */
.radar-axis-toggle {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  margin: 2px 14px 8px;
  padding: 8px 12px; min-height: 44px;   /* 2026-07-13 UX: 34→44px */
  -webkit-tap-highlight-color: transparent;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
}
.radar-axis-toggle:hover { background: rgba(30,58,95,.06); color: var(--primary); }
.radar-axis-toggle[aria-expanded="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.radar-axis-toggle[aria-expanded="true"] .rax-caret { transform: rotate(180deg); }
.radar-axis-toggle .rax-caret { transition: transform 180ms; font-size: 10px; }
@media (min-width: 720px) {
  .radar-axis-toggle { font-size: 13px; padding: 10px 14px; }
}

.radar-axis-panel {
  margin: 0 14px 12px;
  padding: 10px 12px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.radar-axis-panel[hidden] { display: none; }
.rax-presets {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 4px 6px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.rax-presets-label {
  font-size: 10.5px; color: var(--text-3); font-weight: 700;
  margin-right: 4px;
}
.rax-preset {
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.rax-preset:hover { background: rgba(30,58,95,.08); color: var(--primary); }
.rax-preset.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.rax-hint {
  font-size: 10.5px; color: var(--text-3);
  margin-bottom: 8px;
}
.rax-hint #rax-count { font-weight: 700; color: var(--primary); }
.rax-groups {
  display: flex; flex-direction: column; gap: 8px;
}
.rax-group { }
.rax-group-label {
  font-size: 10.5px; font-weight: 700; color: var(--text-3);
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.rax-chips {
  display: flex; flex-wrap: wrap; gap: 4px 5px;
}
.rax-chip {
  padding: 4px 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
}
.rax-chip:hover { background: rgba(30,58,95,.08); color: var(--primary); }
.rax-chip.active {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}
.rax-chip.disabled-min {
  /* 最小3軸を下回ろうとしたときの一時的な禁止表示 */
  animation: rax-shake 240ms;
}
@keyframes rax-shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-3px); }
  75%     { transform: translateX( 3px); }
}
@media (min-width: 720px) {
  .rax-chip { font-size: 12.5px; padding: 5px 11px; }
  .rax-preset { font-size: 12.5px; padding: 5px 12px; }
  .rax-hint, .rax-presets-label, .rax-group-label { font-size: 11.5px; }
}

/* SVG-internal styles */
.radar-svg .radar-grid { fill: none; stroke: #e5e9f0; stroke-width: 0.8; }
.radar-svg .radar-axis { stroke: #cbd5e1; stroke-width: 0.5; }
.radar-svg .radar-label {
  fill: #4b5563; font-size: 11px; font-weight: 700;
  letter-spacing: .01em;
}
.radar-svg .radar-label-sub { fill: #9ca3af; font-size: 9px; font-weight: 600; }
/* W2: 並び替え時に「ST コース」軸はデータ未対応なのでグレーアウト */
.radar-svg .radar-label.radar-label-stale {
  fill: #cbd5e1;
  font-style: italic;
}
.radar-svg .radar-poly {
  transition: opacity 180ms ease-out, fill-opacity 180ms ease-out;
}
.radar-svg .radar-poly[data-active="false"] { opacity: 0.08; }
.radar-svg .radar-dot {
  transition: opacity 180ms ease-out;
}
.radar-svg .radar-dot[data-active="false"] { opacity: 0.15; }

/* ============================================================
   出走表（比較テーブル）
   - 6艇を横に並べて全メトリクスを一望できるよう、行＝メトリクス /
     列＝艇番 の転置型レイアウト
   - 各メトリクス行で TOP3 を赤系のヒートマップでハイライト
   - モバイルでも横スクロール無しで収まるよう、コンパクト font-size
   ============================================================ */
.compare-table-wrap {
  margin-top: 10px;
  margin-bottom: 14px;
  padding: 0;
  /* overflow:hidden REMOVED — it would create a containing block that
     prevents `position: sticky` on the thead from working against the
     page scroll. The table's own border-collapse + the .card border-
     radius already give us clean edges. */
}
.compare-table-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #f5f8fc 0%, #eef2f8 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.compare-table-title {
  font-size: var(--fs-cardtitle); font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 6px;
}
.compare-table-sub {
  font-size: 10.5px; color: var(--text-3);
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.compare-table-hint {
  font-size: 10.5px; color: var(--primary);
  font-weight: 600;
}
.compare-table-legend {
  font-size: 10.5px;
  display: flex; flex-wrap: wrap;
  justify-content: flex-end; gap: 2px 4px;
}
@media (max-width: 359px) {
  /* iPhone SE 等 360px 未満では凡例を独立行に */
  .compare-table-sub { width: 100%; align-items: flex-start; }
  .compare-table-legend { justify-content: flex-start; }
}
@media (min-width: 720px) {
  .compare-table-hint { font-size: 12px; }
}
@media (min-width: 720px) {
  .compare-table-title { font-size: 15px; }
  .compare-table-sub { font-size: 12px; }
}

.compare-table-scroll {
  /* 2026-07-17 オーナー決定: 「横スクロールなしで全艇が見える」を優先し、
     7/13の凍結列+横スクロール方式を撤回。テーブルはビューポート内に収める
     (table-layout:fixed + width:100%)。スクロールコンテナ化しないことで
     thead の sticky-top(縦スクロール時の艇名固定)も復活する。 */
  overflow: visible;
}
/* 出走表フッター注記（当地×コース別のサンプル少を明示） */
.compare-table-foot {
  margin-top: 10px;
  padding: 8px 10px;
  font-size: var(--fs-note);
  line-height: 1.6;
  color: var(--text-3);
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}
.compare-table-foot b { color: #b91c1c; }
@media (min-width: 720px) {
  .compare-table-foot { font-size: 13px; }
}
/* 2026-07-03 a11y: キーボードフォーカスの可視化（全interactive一括） */
:where(a, button, [role="button"], [tabindex], summary, input, select, textarea):focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
/* スターターバーのアンカー着地時に上端が詰まらないよう余白確保 */
#top-picks-banner, #compare-table, #race-summary, #race-help {
  scroll-margin-top: 12px;
}
/* 2026-07-02: まくられ展開シナリオカード（デフォルト折りたたみ） */
.makuri-card { margin-top: 14px; padding: 0; overflow: hidden; }
.makuri-card > summary { list-style: none; cursor: pointer; padding: 13px 40px 13px 16px; position: relative; }
.makuri-card > summary::-webkit-details-marker { display: none; }
.makuri-card > summary::after {
  content: "▼"; position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%); font-size: 11px; color: var(--text-3);
  transition: transform .2s;
}
.makuri-card[open] > summary::after { transform: translateY(-50%) rotate(180deg); }
.makuri-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 800; font-size: var(--fs-cardtitle); }
/* 2026-07-17 改行確認(ユーザー指摘): 幅不足時は flex がバッジ/文を圧縮し、
   overflow-wrap:anywhere が min-content=1文字まで許すため「？」孤立や
   バッジの縦積みが起き得た。→ 行としては折返し可(wrap)・文中は自然禁則のみ
   (anywhere禁止)・バッジは不可分に。 */
.makuri-title .mkt-txt { overflow-wrap: normal; min-width: 0; }
.makuri-badge { white-space: nowrap; flex-shrink: 0; }
.makuri-badge {
  font-size: 10.5px; font-weight: 700; color: #7c3aed;
  border: 1px solid #ddd6fe; background: #f5f3ff;
  border-radius: 999px; padding: 2px 8px;
}
.makuri-teaser { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.makuri-body { padding: 2px 14px 14px; }
/* 一般傾向であることの明示バナー（カード展開直後に必ず目に入る位置・サイズ） */
.makuri-caveat {
  margin: 8px 0 10px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.65;
  color: #78350f;
  font-weight: 600;
}
.makuri-caveat b { color: #b45309; font-weight: 800; }
@media (min-width: 720px) {
  .makuri-caveat { font-size: 14px; }
}
/* 2026-07-04(会場別化): 集計範囲トグル（この会場 / 全国）＋タブの当地/全国バッジ＋per-tab注記 */
.makuri-scope { display: flex; gap: 6px; margin: 6px 0 4px; }
.makuri-scope-btn {
  font-size: var(--fs-note); padding: 4px 12px; cursor: pointer;
  border: 1px solid #ddd6fe; border-radius: 999px; background: #fff; color: var(--text-2);
  font-weight: 700;
}
.makuri-scope-btn.active { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.mk-src { font-size: 9.5px; margin-left: 5px; padding: 0 5px; border-radius: 4px; font-weight: 700; }
.mk-src-v { background: #15803d; color: #fff; }
.mk-src-n { background: #64748b; color: #fff; }
.makuri-scopenote { font-size: var(--fs-note); margin: 2px 0 8px; line-height: 1.55; }
.mk-scope-v { color: #15803d; }
.mk-scope-fb { color: #92600a; background: #fffbeb; border-radius: 6px; padding: 5px 8px; }
.mk-scope-n { color: var(--text-3); }
/* 2026-07-04: 決まり手セグメント（まくり/差し/まくり差し） */
.makuri-kim-seg {
  display: inline-flex; gap: 0; margin: 8px 0 8px;
  border: 1px solid #ddd6fe; border-radius: 10px; overflow: hidden;
  background: #fff;
}
.makuri-kim-btn {
  padding: 7px 14px; border: none; cursor: pointer;
  background: transparent; color: var(--text-2);
  font-size: var(--fs-label); font-weight: 700;
  border-right: 1px solid #ede9fe;
}
.makuri-kim-btn:last-child { border-right: none; }
.makuri-kim-btn.active { background: #7c3aed; color: #fff; }
.makuri-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.makuri-tab {
  padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 12.5px; font-weight: 700; cursor: pointer;
  background: var(--surface); color: var(--text-2);
}
.makuri-tab.active { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.makuri-tab .mk-n { font-weight: 400; font-size: 10.5px; opacity: .75; margin-left: 3px; }
.makuri-winline {
  font-size: 13px; font-weight: 700; margin-bottom: 8px;
  padding: 8px 10px; background: #f5f3ff; border-radius: 8px; line-height: 1.5;
}
.makuri-winline .mk-kim { color: #7c3aed; }
.makuri-row { display: grid; grid-template-columns: 108px 1fr 52px; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.makuri-row:last-of-type { border-bottom: none; }
.makuri-who { font-size: 12px; line-height: 1.35; }
.makuri-who .mk-course { font-weight: 800; }
.makuri-who .mk-name { color: var(--text-2); font-size: 11.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.makuri-bars { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mk-barline { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--text-3); }
.mk-bartrack { flex: 1; height: 12px; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.mk-barfill { height: 100%; border-radius: 6px; min-width: 2px; }
.mk-barfill.mk2 { background: #f59e0b; }
.mk-barfill.mk3 { background: #94a3b8; }
.mk-barpct { width: 44px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-2); font-size: 11px; }
.makuri-top3 { font-size: 12.5px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.makuri-top3 small { display: block; font-size: 9.5px; font-weight: 400; color: var(--text-3); }
.makuri-note { margin-top: 10px; font-size: var(--fs-note); color: var(--text-3); line-height: 1.6; background: var(--bg-soft); border-radius: 8px; padding: 8px 10px; }
@media (min-width: 720px) {
  .makuri-teaser { font-size: 12.5px; }
  .makuri-row { grid-template-columns: 150px 1fr 64px; }
  .makuri-who { font-size: 13px; }
  .makuri-note { font-size: 13px; }
}
/* 2026-07-03 ベストマッチ: 展開シグナル帯（成立時のみJSが表示）。
   カラー憲法: 展開系=紫。警告(琥珀)とは区別した“シグナル”トーン。 */
.best-match-alert {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-left: 4px solid #8b5cf6;
  border-radius: 10px;
}
.bm-head {
  font-size: var(--fs-label); font-weight: 800; color: #5b21b6;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.bm-head .bm-count { font-size: var(--fs-micro); font-weight: 700; color: #7c3aed; background: #ede9fe; border-radius: 999px; padding: 1px 8px; }
.bm-line {
  margin-top: 6px; font-size: var(--fs-label); line-height: 1.6; color: #1f2937;
}
.bm-line b { color: #5b21b6; }
.bm-ratio { font-variant-numeric: tabular-nums; font-weight: 800; }
.bm-detail { margin-top: 6px; }
.bm-detail summary {
  font-size: var(--fs-note); color: #6d28d9; cursor: pointer; font-weight: 700;
  list-style: none;
}
.bm-detail summary::-webkit-details-marker { display: none; }
.bm-detail summary::before { content: '▸ '; }
.bm-detail[open] summary::before { content: '▾ '; }
.bm-detail-body {
  margin-top: 6px; font-size: var(--fs-note); line-height: 1.7; color: var(--text-2);
  background: #fff; border-radius: 8px; padding: 8px 10px;
}
.bm-note { margin-top: 6px; font-size: var(--fs-note); color: var(--text-3); }
/* 2026-07-03 中3: 用語チップ（初出用語のタップ解説・1画面最大5語の運用ルール） */
/* 2026-07-13 UX⑩R2: 用語チップの発見性強化 — 「押せる」と分かる見た目に。
   点線を淡い赤の実線寄り(1.5px dotted)へ濃く+右肩に極小の?マーカー。 */
.term {
  border-bottom: 1.5px dotted rgba(217,53,76,.6);
  cursor: help; position: relative;
  -webkit-tap-highlight-color: rgba(217,53,76,.12);
}
.term::after {
  content: '?'; font-size: 8px; font-weight: 800; line-height: 1;
  color: rgba(217,53,76,.75);
  position: relative; top: -0.55em; margin-left: 1px;
}
@media (prefers-color-scheme: dark) {
  .term { border-bottom-color: rgba(255,109,130,.65); }
  .term::after { color: rgba(255,109,130,.8); }
}
.tp-tag.term { border-bottom: none; cursor: pointer; }
.tp-tag.term::after { color: rgba(255,255,255,.85); }
/* UX⑩R2: 確信度→根拠(レーダー)の連結リンク */
.tp-ai-detail {
  flex-shrink: 0; font-size: 11px; font-weight: 800;
  color: #7c6a1e; text-decoration: underline; text-underline-offset: 2px;
  position: relative; -webkit-tap-highlight-color: transparent;
}
.tp-ai-detail::after { content: ''; position: absolute; inset: -12px -8px; }
#radar-card { scroll-margin-top: calc(var(--header-h, 64px) + 56px); }
/* 2026-07-17: .tp-ai-detail のダーク上書き撤去 (クリーム地バナー上で1.56:1だった) */
.term.term-open::after {
  content: attr(data-def);
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 80;
  margin-left: 0;   /* ?マーカー(.term::after)の margin を打ち消す */
  background: #1f2937; color: #fff;
  font-size: var(--fs-note); font-weight: 500; line-height: 1.7;
  text-align: left;
  /* 2026-07-17 ユーザー指摘(改行が不自然): body の word-break:keep-all +
     overflow-wrap:anywhere は狭い吹き出しで語中のぶつ切り改行を生む。
     吹き出し内は通常の日本語禁則(normal)に戻し、幅も 230→290px に拡大。 */
  word-break: normal; overflow-wrap: break-word; line-break: normal;
  padding: 9px 12px; border-radius: 8px;
  width: max-content; max-width: min(290px, calc(100vw - 24px)); white-space: normal;
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
/* 2026-07-04: 右寄りの用語は吹き出しを右端基準に反転（画面外はみ出し防止）。JSが term-flip を付与 */
.term.term-flip.term-open::after { left: auto; right: 0; }
.makuri-defline { font-size: var(--fs-note); color: var(--text-2); margin: 0 0 10px; }
/* 2026-07-04: イン選手本人の被決まり手率（シナリオカード内・平均比較つき） */
.makuri-invuln {
  font-size: var(--fs-note); line-height: 1.6;
  padding: 6px 10px; margin: 0 0 8px;
  background: var(--bg-soft); border-radius: 8px; color: var(--text-2);
}
.makuri-invuln b { font-size: 13px; }
.makuri-invuln.mk-invuln-high { background: #fef2f2; color: #7f1d1d; }
.makuri-invuln.mk-invuln-high b { color: #b91c1c; }
.makuri-invuln.mk-invuln-low { background: #f0fdf4; color: #14532d; }
.makuri-invuln.mk-invuln-low b { color: #15803d; }
/* 2026-07-03 中5: タッチターゲット44px確保。
   Rタブは実寸を44pxへ、小型チップは透明の当たり判定拡張（::after）で対応。 */
.sticky-bar .tab { min-height: 44px; display: inline-flex; align-items: center; }
.ct-drag-handle, .ct-sec-drag, .radar-legend-item, .makuri-tab { position: relative; }
.ct-drag-handle::after, .ct-sec-drag::after { content: ''; position: absolute; inset: -10px; }
.radar-legend-item::after { content: ''; position: absolute; inset: -9px -4px; }
.makuri-tab::after { content: ''; position: absolute; inset: -7px -3px; }
/* 2026-07-13 UX: 極小アイコン操作（?・✕・🚤・シェア）の当たり判定を44pxへ。
   見た目(視覚サイズ)は不変のまま透明の::afterで拡張＝情報密度を落とさずHIG準拠。
   ct-tutorial-bubble-close は既に position:absolute のため relative 指定から除外。 */
.score-help, .info-icon, .starter-close,
.header.header-compact .brand-icon,
.top-picks-banner .tp-share { position: relative; }
.score-help::after, .info-icon::after, .starter-close::after,
.header.header-compact .brand-icon::after,
.top-picks-banner .tp-share::after,
.ct-tutorial-bubble-close::after {
  content: ''; position: absolute; inset: -14px;
}
/* 2026-07-04: シナリオカードの scope/kim ボタンも44px級の当たり判定に（隣の makuri-tab と揃える） */
.makuri-scope-btn, .makuri-kim-btn { position: relative; }
.makuri-scope-btn::after, .makuri-kim-btn::after { content: ''; position: absolute; inset: -8px -3px; }
/* 2026-07-03 高1: スターターバー（初見向け・✕で永久非表示） */
.starter-bar {
  display: flex; align-items: center; gap: 7px;
  margin: 10px 0 0; padding: 8px 10px;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
  font-size: 12.5px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}
.starter-bar .starter-label { font-weight: 800; color: #1d4ed8; flex-shrink: 0; }
.starter-bar a {
  color: #1e40af; text-decoration: none; font-weight: 700; flex-shrink: 0;
  background: #fff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 3px 9px;
  display: inline-flex; align-items: center; min-height: 44px;  /* 2026-07-13 UX: 29→44px */
  -webkit-tap-highlight-color: transparent;
}
.starter-bar a.starter-more {
  background: transparent; border: none; text-decoration: underline; font-weight: 600;
}
.starter-close {
  margin-left: auto; flex-shrink: 0; border: none; background: transparent;
  color: #64748b; font-size: 14px; cursor: pointer; padding: 2px 6px; line-height: 1;
}
/* 高1: ヘッダーの「❓見方」チップ */
.help-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff;
  font-size: 12.5px; font-weight: 700; text-decoration: none;
  border: 1px solid rgba(255,255,255,.3);
}
.help-chip:hover { background: rgba(255,255,255,.22); }
/* 高2: 終了レースのバッジ */
.rr-done-badge {
  margin-left: 8px; font-size: 10.5px; font-weight: 700;
  color: #475569; background: #e2e8f0; border-radius: 999px;
  padding: 2px 8px; vertical-align: middle; white-space: nowrap;
}
/* 高2: 深夜のCTAサブラベル（LP・JSが0〜5時台のみ注入） */
.lp-cta .cta-subnote {
  display: block; font-size: 11.5px; font-weight: 600;
  opacity: .92; margin-top: 3px;
}
.compare-table {
  width: 100%;   /* 2026-07-17: min-width撤去=常にビューポート内に収まる(横スクロール不要) */
  border-collapse: separate; border-spacing: 0;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  table-layout: fixed;
  -webkit-user-select: none;
  user-select: none;
}
.compare-table th, .compare-table td {
  text-align: center;
  padding: 4px 1px;
  border-bottom: 1px solid #f0f3f8;
  border-right: 1px solid #f5f7fb;
}
.compare-table th:last-child, .compare-table td:last-child {
  border-right: 0;
}
.compare-table .ct-rowlabel {
  /* 2026-07-17: 横スクロール撤回に伴い sticky-left/連動シャドウも撤去 (元設計に復帰) */
  text-align: left;
  padding: 4px 6px;
  background: #fafbfd;
  color: var(--text-2);
  font-weight: 600; font-size: 10px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  /* 78px holds the longest label "モーター3連" without spilling into
     the data cells on the right. Was 60px, but モーター labels were
     overflowing. */
  width: 78px;
  min-width: 78px;
}
@media (max-width: 379px) {
  /* 小型スマホ（iPhone SE 375px 等）ではラベル列を 70px に圧縮し、
     データ列に幅を譲る。「モーター3連」は font-size を僅かに下げて収める。 */
  .compare-table .ct-rowlabel { width: 70px; min-width: 70px; font-size: 9.5px; padding: 4px 4px; }
}
.compare-table thead .ct-rowlabel { background: var(--surface); }
/* Sticky thead — stays visible while scrolling through the table so
   users always know which souban each column belongs to. Offset is
   the page header + sticky tab bar. JS publishes their heights as
   --header-h and --sticky-bar-h. */
.compare-table thead th {
  /* 2026-07-17: 横スクロール撤回に伴い sticky-top 復活 — 縦スクロール中も
     どの列がどの艇か常に見える (元設計)。offset はヘッダー+stickyタブ分。 */
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--header-h, 64px) + var(--sticky-bar-h, 0px));
  background: var(--surface);
  padding: 6px 2px 6px;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  z-index: 5;   /* below sticky-bar (z=9) but above tbody cells */
  box-shadow: 0 2px 4px rgba(15, 23, 42, .06);
}
/* Top-left corner: sticky in BOTH directions (top from thead rule
   above, left so the row-label column stays visible if a horizontal
   scroll ever engages on very narrow viewports). */
.compare-table thead .ct-rowlabel {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 6;
}
.compare-table .ct-thead-cell {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; line-height: 1.2;
}
.compare-table .ct-souban-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-weight: 700; font-size: 11px;
  box-shadow: 0 1px 2px rgba(0,0,0,.15) inset, 0 1px 1px rgba(0,0,0,.06);
  flex-shrink: 0;
}
.compare-table .ct-thead-name {
  font-size: 12px; font-weight: 700;
  width: 100%;
  line-height: 1.2;
  padding: 0;
  /* 2026-05-25 F2: mobile での縦割れ可読性向上。
     1字だけの行 (例: '佐藤' / '航') の名前にも視認性確保するため
     font-size を 11→12 へ。letter-spacing で字間を僅かに狭く。 */
  letter-spacing: -0.01em;
}
/* The whole cell (th.ct-thead-clickable) is the "button" that opens
   the racer modal. The inner name span stays styled like a tag for
   visual recognition, but tap area = entire cell. */
.compare-table .ct-thead-clickable {
  cursor: pointer;
  transition: background var(--transition);
  -webkit-tap-highlight-color: rgba(30,58,95,.12);
}
.compare-table .ct-thead-clickable:hover {
  background: rgba(30, 58, 95, .04);
}
.compare-table .ct-thead-clickable:active {
  background: rgba(30, 58, 95, .10);
}
.compare-table .ct-thead-clickable:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: -2px;
}
.compare-table .ct-thead-name {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 100%;
  padding: 3px 4px;
  background: rgba(30, 58, 95, .08);
  border: 1px solid rgba(30, 58, 95, .14);
  border-radius: 6px;
  color: var(--primary);
  font-weight: 700;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
  text-align: center;
  pointer-events: none;  /* clicks bubble to the th */
  line-height: 1.15;
  /* 2行レイアウト：苗字＋名前が改行される。横幅オーバー時は文字切れではなく
     fitHeaderNames JS が自動でフォントを縮めて収める。 */
  word-break: keep-all;
  overflow-wrap: break-word;
}
.compare-table .ct-name-last,
.compare-table .ct-name-first {
  display: block;
  white-space: nowrap;
}
.compare-table .ct-name-first {
  margin-top: 1px;
}
.compare-table .ct-thead-clickable:hover .ct-thead-name {
  background: rgba(30, 58, 95, .16);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(15, 23, 42, .12);
}
.compare-table .ct-thead-clickable:active .ct-thead-name {
  transform: translateY(0);
  background: rgba(30, 58, 95, .22);
}
@media (min-width: 720px) {
  .compare-table .ct-thead-name { padding: 4px 8px; }
}
.compare-table .ct-name-cell {
  font-size: 10px; line-height: 1.3;   /* 2026-07-17: 横スクロール撤回に伴い元の10pxへ */
  padding: 4px 1px;
}
.compare-table .ct-name-link {
  color: var(--primary);
  font-weight: 700;
  border-bottom: 1px dotted var(--border);
}
.compare-table .ct-section {
  /* 2026-07-03 カラー憲法v1: セクション見出しはニュートラル1色に統一。
     群の区別は左ボーダーの系統色のみ（下の data-section 別ルール参照）。 */
  background: #f1f5f9;
  text-align: left;
  padding: 10px 8px 10px 12px;   /* 2026-07-13 UX: 開閉行を35→約46pxのタップ標的に(8行分の高さ増を抑制) */
  font-size: 10.5px;
  font-weight: 700;
  color: #334155;
  letter-spacing: .03em;
  border-left: 4px solid #3b82f6;
  cursor: pointer;
  user-select: none;
  transition: filter .12s;
}
.compare-table .ct-section:hover { filter: brightness(.96); }
.compare-table .ct-section-chev {
  display: inline-block;
  width: 1em; text-align: center;
  transition: transform .2s;
  margin-right: 4px;
}
.compare-table .ct-section-row.ct-collapsed .ct-section-chev { transform: rotate(-90deg); }
.compare-table .ct-section-hint {
  font-weight: 400;
  font-size: 10px;
  color: #4b5563;   /* review3: #6b7280×opacity.7 は実効 2.6:1 */
  margin-left: 8px;
}
.compare-table .ct-sec-drag {
  float: right;
  cursor: grab;
  padding: 2px 8px;
  font-size: 14px;
  letter-spacing: 2px;
  color: #9ca3af;
  touch-action: none;
  user-select: none;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.compare-table .ct-sec-drag:hover {
  color: #6b7280;
  background: rgba(0,0,0,.06);
}
.ct-sec-ghost {
  position: fixed;
  z-index: 10000;
  padding: 6px 16px;
  background: #fff;
  border: 2px solid #2563eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  font-size: 13px;
  font-weight: 600;
  color: #1e3a5f;
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, 0);
  opacity: .92;
}
.ct-sec-drop-indicator {
  position: fixed;
  z-index: 9999;
  height: 3px;
  background: #2563eb;
  border-radius: 2px;
  pointer-events: none;
  display: none;
}
.compare-table .ct-sec-drag { color: #6b7280; }   /* review3: 把手 ⋮⋮ が 2.3:1 で気づけない */
.compare-table .ct-sec-dragging { opacity: .45; }
.ct-sec-reset-wrap {
  text-align: center;
  margin: 10px 0 4px;
}
.ct-sec-reset-btn {
  display: inline-block;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s;
}
.ct-sec-reset-btn:hover { background: #e5e7eb; }
.compare-table .ct-section-row.ct-collapsed + tr:not(.ct-section-row),
.compare-table .ct-section-row.ct-collapsed ~ tr:not(.ct-section-row) { }
.compare-table .ct-section-row td { border: 0; }
/* 2026-07-03 カラー憲法v1: 旧・虹色パステル8色を廃止。
   セクション行は統一ニュートラル（基底 .ct-section で定義）とし、
   左ボーダーの系統色だけで群を示す:
     選手系（全国/当地/コース別/コース別当地/平均ST）= 青 #3b82f6
     展開系（決まり手）                              = 紫 #8b5cf6
     機材系（全コース/コース時）                      = 緑 #10b981
   彩度の高い背景は順位ハイライト・警告・高額払戻など「データの意味」専用。 */
.compare-table .ct-section-row[data-section="all"] .ct-section,
.compare-table .ct-section-row[data-section="local"] .ct-section,
.compare-table .ct-section-row[data-section="course"] .ct-section,
.compare-table .ct-section-row[data-section="course_local"] .ct-section,
.compare-table .ct-section-row[data-section="st"] .ct-section {
  border-left-color: #3b82f6;
}
.compare-table .ct-section-row[data-section="kimarite"] .ct-section {
  border-left-color: #8b5cf6;
}
.compare-table .ct-section-row[data-section="machine-all"] .ct-section,
.compare-table .ct-section-row[data-section="machine-course"] .ct-section {
  border-left-color: #10b981;
}
.compare-table .ct-sec-hidden { display: none; }
.compare-table .ct-cell-empty { color: var(--text-3); }
.compare-table td.ct-row-note { text-align: left; padding: 4px 8px; color: var(--text-2); }
.compare-table .ct-val-zero { color: #6f7680; }   /* review3: 減光は残しつつ 4.9:1 */
/* review5b: 順位ハイライト(金/銀/銅)セルの上に載る n= と ST差は中間色の地で 3.3〜4.4 だった */
.compare-table :is(.ct-rank-1, .ct-rank-2, .ct-rank-3) .ct-pct-n { color: #374151; }
.compare-table :is(.ct-rank-1, .ct-rank-2, .ct-rank-3) .ct-pct-n-mid { color: #9a3412; }
.compare-table :is(.ct-rank-1, .ct-rank-2, .ct-rank-3) .ct-st-delta.pos { color: #991b1b; }

/* 2026-09-15: ? のある行名セルはセル全体がタップ標的(JS 側で ? に委譲) */
.compare-table td.ct-rowlabel:has(.ct-tip-trigger) { cursor: help; }
.ct-tip-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  font-size: 9px; font-weight: 800; line-height: 1;
  color: var(--text-3);
  background: var(--border);
  cursor: help;
  flex-shrink: 0;
  position: relative;
  vertical-align: middle;
  margin-left: 3px;
  -webkit-tap-highlight-color: transparent;
}
.ct-tip-trigger:hover, .ct-tip-trigger.ct-tip-open {
  color: #fff;
  background: var(--primary-light);
}
.ct-tip-bubble {
  display: none;
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--text);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.ct-tip-bubble::before {
  content: "";
  position: absolute;
  right: 100%; top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--text);
}
.ct-tip-trigger:hover .ct-tip-bubble,
.ct-tip-trigger.ct-tip-open .ct-tip-bubble {
  display: block;
}
@media (max-width: 719px) {
  .ct-tip-bubble {
    left: 0; top: calc(100% + 6px);
    transform: none;
    white-space: normal;
    min-width: 160px; max-width: 220px;
  }
  .ct-tip-bubble::before {
    right: auto; left: 4px;
    top: -10px;
    transform: none;
    border: 5px solid transparent;
    border-bottom-color: var(--text);
  }
}

/* ────────────────────────────────────────────────────────────────
   サンプルサイズバッジ（2026-05-16 追加）
   %値セルの下に "n=X" を小さく表示。コインフリップ級の雑音を可視化。
   平均STセルの delta 行と同じ視覚規約（8.5px / tabular nums）。
   ──────────────────────────────────────────────────────────────── */
.compare-table .ct-pct-n {
  /* 2026-07-05 モバイル: 8.5px→10px。標本数バッジは判断材料なので可読性優先
     (密表の本値ct-st-main 10.5px に揃える)。 */
  font-size: 10px;
  line-height: 1.1;
  margin-top: 1px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: #6b7280;
}
.compare-table .ct-pct-n-low {
  /* n=1〜2: 強警告（赤）。標準誤差±35pt超 = コインフリップ */
  color: #b91c1c;
}
.compare-table .ct-pct-n-mid {
  /* n=3〜9: 注意（橙）。標準誤差±15〜25pt = 参考程度 */
  color: #c2410c;
}
@media (min-width: 720px) {
  .compare-table .ct-pct-n { font-size: 10px; }
}

/* ST cell: 2-line layout — average ST on top (heat-mapped), delta vs
   exhibition ST below (sign-colored, smaller). */
.compare-table .ct-st-main {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
}
.compare-table .ct-st-delta {
  /* 2026-07-05 モバイル: 8.5px→10px。展示ST差も判断材料なので可読性優先。 */
  font-size: 10px;
  line-height: 1.1;
  margin-top: 1px;
  font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
/* Negative delta: racer is faster in 本走 than in 展示 — desirable（緑＝好調）。
   Positive delta: slower in 本走 — caution（赤＝注意）。 */
.compare-table .ct-st-delta.neg { color: #15803d; font-weight: 700; }  /* green-700 */
.compare-table .ct-st-delta.pos { color: #b91c1c; font-weight: 700; }  /* red-700 */
.compare-table .ct-st-delta.zero { color: var(--text-3); }
@media (min-width: 720px) {
  .compare-table .ct-st-main { font-size: 13px; }
  .compare-table .ct-st-delta { font-size: 10.5px; }
}

/* R3+R5+R7 (2026-05-27): 並び替え機能の見た目。
   設計思想 (R7 再設計版):
   - 列は「艇番カード」として扱う。艇番色と番号はレーサーの identity
     として固定 (5号艇は常に黄色"5") → 並び替えで黄色の列が動く感覚。
   - 列が現在どのコースに居るかは列位置から暗黙的に決まる (左から1〜6)。
   - 移動中は列内全セルにハイライト+半透明、ゴースト要素が pointer に追随。
   - ドロップ確定 (pointerup) 後に数値全体を再描画。
   - .ct-thead-draggable: ドラッグ操作の対象。touch-action:none で
     ブラウザ既定のスクロール／ピンチを無効化する (長押しドラッグ時)。
   - .ct-thead-dragging: 掴まれているヘッダ自体を半透明に。
   - .ct-col-dragging: その列全体 (body のセルも含む) を強調。
   - .ct-thead-drop-target: ドロップ先候補のヘッダにオレンジリング。
   - .ct-col-drop-target: ドロップ先候補列全体にうっすらオレンジ背景。
   - .ct-thead-moved: 本来位置から動いているレーサー列の下線。
   - .ct-course-hint: 「→ 1コース」と現在の coast を示すラベル。
   - .ct-reset-btn: 枠順リセットボタン。
   - .ct-drag-ghost: pointer 追随する固定位置のヘッダコピー。 */
.ct-thead-draggable {
  cursor: pointer;
  position: relative;
  /* AA3 (2026-05-28): カード本体は縦スクロールを許可 (touch-action:pan-y)。
     ドラッグ開始は ⠿ ハンドル (.ct-drag-handle, touch-action:none) 上だけに
     限定したので、固定ヘッダー上のスワイプもページスクロールとして効く。 */
  touch-action: pan-y;
  /* R8 (2026-05-27): テキスト選択を全ブラウザで完全無効。
     ベンダー prefix も明示し、ドラッグ中に文字列が highlight されない。 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;  /* iOS: 長押し時の callout (コピー等) を抑止 */
  -webkit-tap-highlight-color: transparent;  /* iOS: タップ時の灰色フラッシュを抑止 */
}
.ct-thead-draggable, .ct-thead-draggable * {
  /* R8: 子要素 (badge / name / hint) も全部選択不可 */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
/* AA3: ドラッグ可能なのはハンドル。本体タップは選手モーダルを開く (pointer)。 */
/* R8: body 全体に追加するフラグ。ドラッグ中だけ全要素選択不可にして
   万一 pointer が他のセル上を通っても text 選択を発火させない。 */
body.ct-dragging, body.ct-dragging * {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  user-select: none !important;
}
body.ct-dragging {
  cursor: grabbing !important;
}
.compare-table th.ct-thead-dragging { opacity: 0.3; transform: scale(0.96); transition: opacity .15s, transform .15s; }
.compare-table td.ct-col-dragging { opacity: 0.3; }
.compare-table th.ct-thead-drop-target {
  box-shadow: inset 0 0 0 2px var(--lineup-accent);
  background: rgba(245, 158, 11, 0.06);
  transition: box-shadow .12s, background .12s;
}
.compare-table td.ct-col-drop-target {
  background-color: rgba(245, 158, 11, 0.08);
}
.compare-table th.ct-thead-moved {
  box-shadow: inset 0 -3px 0 var(--lineup-accent);
}
.ct-course-hint {
  display: block;
  margin-top: 2px;
  font-size: 9px; font-weight: 500;
  color: var(--text-3, #888);
  letter-spacing: .02em;
  white-space: nowrap;
}
/* R9 F+G: 移動した列だけアクセントカラーで強調 (太字 + オレンジ) */
.ct-course-hint.ct-course-hint-moved {
  color: var(--lineup-accent);
  font-weight: 700;
}
/* R9 A+E / AA3 / AC2 / AC3: ドラッグハンドル — 並び替えの唯一の起点。
   AC3 (2026-05-29): スマホでタップ領域が小さく押しづらい問題を解消。
   モバイルは「列幅いっぱい・高さ44px のグリップバー」にして指で楽に掴める
   ようにする (iOS 44px / Material 48dp 基準)。⠿ アイコンも大きく。
   PC はマウスで精密に押せるので 800px 以上でコンパクトな丸薬型ピル＋
   「つかんで移動」ラベルに戻す (@media 参照)。
   touch-action:none で掴むと即ドラッグ (本体は pan-y でスクロール可)。 */
.ct-drag-handle {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%;                 /* 列幅いっぱい = 横方向の的を最大化 */
  margin: 6px 0 2px;
  padding: 0 6px;
  min-height: 44px;            /* 指で押しやすい高さを確保 */
  font-size: 11px; font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  /* AC4 (2026-05-29): フルページレビューでソリッドオレンジが主役のデータより
     目立つと指摘 → 淡いオレンジ塗り＋オレンジ枠＋濃オレンジ文字の控えめな
     アウトライン型に。大きさ(44px)で十分視認でき、押しやすさは維持。 */
  color: #b45309;
  background: var(--lineup-accent-soft);
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  border-radius: 8px;          /* 全幅なので角丸長方形 */
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease-out, transform .1s ease-out, border-color .15s ease-out;
}
.ct-drag-handle .cdh-dots { font-size: 20px; letter-spacing: -1px; }   /* スマホは大きめアイコン */
/* ラベルは列が狭いモバイルでは隠し、横幅に余裕のあるデスクトップでのみ表示 */
.ct-drag-handle .cdh-label { display: none; letter-spacing: .02em; }
.ct-thead-draggable:hover .ct-drag-handle { background: rgba(245,158,11,.20); border-color: var(--lineup-accent); }
.ct-drag-handle:active { cursor: grabbing; transform: scale(0.97); background: rgba(245,158,11,.30); }
/* R9 H (簡易版): 並び替え直後の列を 600ms フラッシュ */
@keyframes ct-just-reordered-flash {
  0%   { background-color: rgba(245, 158, 11, 0.20); }
  100% { background-color: transparent; }
}
.compare-table th.ct-just-reordered,
.compare-table td.ct-just-reordered {
  animation: ct-just-reordered-flash 600ms ease-out;
}
/* R9 B: 初回チュートリアルバブル — テーブル上部にふわっと出る */
.ct-tutorial-bubble {
  position: relative;
  margin: 8px 0;
  padding: 10px 32px 10px 14px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #f59e0b;
  border-radius: var(--radius, 10px);
  font-size: 12px; line-height: 1.5;
  color: #7c2d12;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
  animation: ct-tutorial-bubble-in 0.4s ease-out;
}
.ct-tutorial-bubble strong { font-weight: 700; }
.ct-tutorial-bubble-close {
  position: absolute; top: 4px; right: 6px;
  width: 24px; height: 24px;
  background: transparent; border: 0;
  font-size: 16px; cursor: pointer; color: #92400e;
}
.ct-tutorial-bubble-close:hover { color: #7c2d12; }
@keyframes ct-tutorial-bubble-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (min-width: 720px) {
  .ct-tutorial-bubble { font-size: 13px; padding: 12px 36px 12px 16px; }
}
@media (min-width: 800px) {
  /* AC3: PC はマウスで精密に押せるので、全幅バーではなくコンパクトな
     丸薬型ピル＋「つかんで移動」ラベルに戻す (列幅に余裕がある画面のみ)。 */
  .ct-drag-handle {
    width: fit-content; max-width: 100%;
    margin: 6px auto 2px;
    min-height: 0;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
  }
  .ct-drag-handle .cdh-dots { font-size: 15px; }
  .ct-drag-handle .cdh-label { display: inline; }
}
.ct-reset-btn {
  /* Y2 (2026-05-28): デザインレビューで「リセットボタンが大きすぎ」
     との指摘を受け、コンパクト化。アウトライン風ボタンに変更し
     主役の出走表/レーダー本体に視線が向くようにする。 */
  margin-left: auto;
  padding: 3px 9px; font-size: 11px; font-weight: 700;
  background: #fff; color: #92400e;
  border: 1px solid var(--lineup-accent);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  letter-spacing: .02em;
}
.ct-reset-btn:hover {
  background: var(--lineup-accent-soft);
  color: #7c2d12;
}
/* R7: ドラッグ追随ゴースト */
.ct-drag-ghost {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  background: var(--surface, #fff);
  border: 2px solid var(--lineup-accent);
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(245,158,11,.18);
  padding: 6px 10px;
  opacity: 0.95;
  font-size: 12px;
  transform: translate(-50%, -50%) rotate(2deg) scale(1.04);
  transition: box-shadow .15s ease-out;
  display: flex; align-items: center; gap: 6px;
}
.ct-drag-ghost .ct-souban-badge {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 700;
}
.ct-drag-ghost .ct-drag-ghost-name {
  font-weight: 700; color: var(--text, #111);
}
.ct-drag-ghost .ct-drag-ghost-hint {
  margin-left: 4px;
  padding: 2px 6px;
  font-size: 10px; font-weight: 700;
  color: #fff;
  background: var(--lineup-accent);
  border-radius: 3px;
}
@media (min-width: 720px) {
  .ct-reset-btn { padding: 4px 12px; font-size: 12px; }
  .ct-course-hint { font-size: 10px; }
}
/* Top-3 cells use medal colors (gold/silver/bronze) — three clearly
   different HUES rather than three shades of pink. This gives much
   stronger visual differentiation than the old monochromatic ramp,
   and the 金銀銅 metaphor is universally understood as ranking.
   - Gold #fef08a   : warm yellow (top performer)
   - Silver #cbd5e1 : cool grey-blue (second)
   - Bronze #fed7aa : warm orange (third)
   None of these conflict with the page's other accent colors:
   primary navy, accent red, lane colors, or ST delta blue/orange.
   (ST delta orange uses dark text-on-white, not background.) */
.compare-table .ct-rank-1 {
  background-color: #fef08a;
  color: #713f12;
  font-weight: 700;
  /* Subtle inner ring to make rank-1 feel "champion-like" */
  box-shadow: inset 0 0 0 1px #facc15;
}
.compare-table .ct-rank-2 {
  background-color: #cbd5e1;
  color: #0f172a;
  font-weight: 700;
}
.compare-table .ct-rank-3 {
  background-color: #fed7aa;
  color: #7c2d12;
  font-weight: 600;
}

/* Tablet & desktop: more breathing room.
   On wider PC viewports, font sizes scale up so the table is readable
   without zooming. The mobile defaults (10.5px) were sized for 360px-
   wide phones and felt cramped on a 1500+ desktop. */
@media (min-width: 720px) {
  .compare-table { font-size: 14px; }
  .compare-table th, .compare-table td { padding: 8px 5px; }
  .compare-table .ct-rowlabel {
    font-size: 13px; padding: 8px 14px;
    width: 150px; min-width: 150px;
  }
  .compare-table .ct-name-cell { font-size: 13px; }
  .compare-table .ct-section { font-size: 13px; padding: 7px 14px; }
  .compare-table .ct-souban-badge { width: 30px; height: 30px; font-size: 14px; }
  .compare-table .ct-thead-name { font-size: 13px; }
  .compare-table .ct-thead-cell { gap: 4px; }
}
@media (min-width: 1100px) {
  .compare-table { font-size: 16px; }
  .compare-table th, .compare-table td { padding: 10px 6px; }
  .compare-table .ct-rowlabel { font-size: 14.5px; padding: 10px 16px; width: 170px; min-width: 170px; }
  .compare-table .ct-name-cell { font-size: 14.5px; }
  .compare-table .ct-section { font-size: 14.5px; padding: 8px 16px; }
  .compare-table .ct-souban-badge { width: 34px; height: 34px; font-size: 15px; }
  .compare-table .ct-thead-name { font-size: 15px; }
  .compare-table .ct-thead-cell { gap: 5px; }
  .compare-table .ct-st-main { font-size: 15px; }
  .compare-table .ct-st-delta { font-size: 12px; }
}
@media (min-width: 1500px) {
  .compare-table { font-size: 17px; }
  .compare-table .ct-rowlabel { font-size: 15.5px; width: 190px; min-width: 190px; }
  .compare-table .ct-name-cell { font-size: 15.5px; }
  .compare-table .ct-section { font-size: 15.5px; }
  .compare-table .ct-thead-name { font-size: 16px; }
  .compare-table .ct-st-main { font-size: 16px; }
  .compare-table .ct-st-delta { font-size: 13px; }
}

/* Section divider — visually separates the *common* compare-table at
   the top from the tab-dependent detail area (chart + cards) below.
   Without this, the table felt like "another tab" instead of being
   the shared one-stop summary. */
.section-divider {
  margin: 18px 0 10px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4f7d 100%);
  color: #fff;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 10px;
  box-shadow: var(--shadow-sm);
}
.section-divider-label {
  font-size: 13px; font-weight: 700;
  letter-spacing: .03em;
}
.section-divider-hint {
  font-size: 10.5px; color: rgba(255,255,255,.78);
  font-weight: 500;
}
@media (min-width: 720px) {
  .section-divider { padding: 10px 16px; margin: 22px 0 12px; }
  .section-divider-label { font-size: 15px; }
  .section-divider-hint { font-size: 12px; }
}
@media (min-width: 1100px) {
  .section-divider { padding: 12px 20px; }
  .section-divider-label { font-size: 17px; }
  .section-divider-hint { font-size: 13px; }
}

/* ============================================================
   個別選手モーダル
   出走表で選手名をタップすると、その選手のカードを画面手前に表示。
   カード内容＋画面下部に "選手詳細ページへ" の大きなCTAボタン付き。
   ============================================================ */
.racer-modal {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  align-items: flex-end; justify-content: center;
}
.racer-modal.show { display: flex; }
.racer-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: rm-fade-in 180ms ease-out;
}
.racer-modal-panel {
  position: relative;
  width: 100%; max-width: 560px;
  /* モバイルは「固定高さ」にする — 全タブで同じパネルサイズ・✕ 位置が一定。
     コンテンツ量の差はすべて body の内部スクロールに渡す（モーター/ボート
     のように長いタブでも head と bottom-nav は常に画面内）。
     dvh (Dynamic Viewport Height) で iOS Safari の URL バー表示時の vh
     誤差を回避。dvh 非対応ブラウザは vh にフォールバック。 */
  height: 85vh;
  height: 85dvh;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 32px rgba(15,23,42,.32);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: rm-slide-up 240ms cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 720px) {
  .racer-modal { align-items: center; }
  .racer-modal-panel {
    /* PC ではコンテンツに応じて伸縮。モバイルと違ってクロップが起きにくい
       ので auto-fit のほうが自然。 */
    border-radius: var(--radius-lg);
    height: auto;
    min-height: 480px;
    max-height: 86vh;
    max-height: 86dvh;
    animation: rm-pop-in 200ms cubic-bezier(.2,.9,.3,1.05);
  }
}
@keyframes rm-fade-in { from { opacity: 0; } to { opacity: 1; } }
/* C3: スタガード・エントランス — IntersectionObserver で可視時にふわっと登場 */
@keyframes brc-enter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.brc-anim { opacity: 0; }
.brc-anim.brc-visible {
  animation: brc-enter 400ms cubic-bezier(.2,.8,.3,1) both;
}
@keyframes rm-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes rm-pop-in {
  from { transform: scale(.94); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.racer-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #f5f8fc 0%, #eef2f8 100%);
  flex-shrink: 0;
}
.racer-modal-title {
  flex: 1; min-width: 0;
  font-size: 14px; font-weight: 700; color: var(--primary);
  letter-spacing: .03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-right: 8px;
}
@media (min-width: 720px) { .racer-modal-title { font-size: 15px; } }
.racer-modal-close {
  background: transparent; border: 0;
  font-size: 18px; color: var(--text-2);
  /* タップターゲットは 44×44 以上（WCAG 2.5.5 / Apple HIG）*/
  width: 44px; height: 44px; border-radius: 50%;
  cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.racer-modal-close:hover { background: rgba(30, 58, 95, .12); }
.racer-modal-close:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* ============================================================
   モーダル底部ナビ：本文と CTA の下、パネル最下部に独立した行。
   コンテンツとは別レイヤーなので文字と重ならない。
   ✕ボタン（右上）とも物理的に最大距離で誤タップしにくい。
   ============================================================ */
.racer-modal-bottom-nav {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(245, 248, 252, .8) 0%, var(--bg-soft) 100%);
  flex-shrink: 0;
}
.rm-bn-btn {
  flex: 1 1 0; min-width: 0;
  min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit; font-weight: 700;
  color: var(--primary); font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition), transform 120ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.rm-bn-btn:hover:not([disabled]) {
  background: #f4f8ff;
  border-color: var(--primary-light);
}
.rm-bn-btn:active:not([disabled]) { transform: scale(.97); }
.rm-bn-btn[disabled] {
  opacity: .4;
  cursor: not-allowed;
  background: var(--bg-soft);
}
.rm-bn-btn:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}
.rm-bn-arrow { font-size: 13px; line-height: 1; }
.rm-bn-label { white-space: nowrap; }
.rm-bn-hint {
  font-size: 10.5px; color: var(--text-3);
  flex-shrink: 0;
  white-space: nowrap;
}
@media (min-width: 720px) {
  /* PC ではスワイプヒント不要 */
  .rm-bn-hint { display: none; }
  .rm-bn-btn { font-size: 14px; }
}
@media (max-width: 379px) {
  /* 狭いスマホでは中央のヒント文字を消してボタン幅を確保 */
  .rm-bn-hint { display: none; }
  .rm-bn-btn { font-size: 12px; }
}

/* ============================================================
   選手切替時のスライドアニメーション。
   タップ／スワイプ／キーボード いずれの遷移でも滑らかに。
   prefers-reduced-motion 設定時は無効化される（JS側で判定）。
   ============================================================ */
.rm-card-wrap {
  transition: opacity 170ms ease-out, transform 220ms cubic-bezier(.2,.8,.2,1);
  /* will-change は Safari でコンポジットレイヤーを作りすぎ、
     overflow:hidden の親クリッピングが効かなくなるケースがある → 外す */
}
.rm-card-wrap.rm-out-left  { opacity: 0; transform: translateX(-28px); }
.rm-card-wrap.rm-out-right { opacity: 0; transform: translateX( 28px); }
/* 進入の "始点"。transition: none で瞬時にジャンプ → クラス除去で滑り込み */
.rm-card-wrap.rm-in-left   { opacity: 0; transform: translateX(-28px); transition: none !important; }
.rm-card-wrap.rm-in-right  { opacity: 0; transform: translateX( 28px); transition: none !important; }
.racer-modal-body {
  padding: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* overflow-anchor: none — ブラウザのスクロールアンカリングを無効化。
     タブ切替でコンテンツが変わったとき、ブラウザが勝手にスクロール位置を
     調整しようとしてヘッダーが隠れる原因になるため OFF にする。 */
  overflow-anchor: none;
  /* flex: 1 1 auto + min-height: 0 で max-height 到達時に内部スクロール。
     iOS Safari では親パネルに明示 height が無いと flex child が正しく
     スクロール領域を計算できない。JS (fixModalPanelHeight) で明示高さを
     設定することで補完している。 */
  flex: 1 1 auto;
  min-height: 0;
}
/* Inside the modal, give the .card a flat presentation (no extra
   border/shadow — the modal panel already provides framing). */
.racer-modal-body .card {
  margin-bottom: 0;
  box-shadow: none;
  border: 0;
  padding: 0;
}
/* Detail-page CTA at modal bottom — primary action color, hard to miss. */
.rm-detail-cta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4f7d 100%);
  color: #fff; text-decoration: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.rm-detail-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.rm-detail-cta:active { transform: translateY(0); }
.rm-detail-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.rm-detail-text {
  flex: 1; font-size: 12.5px; line-height: 1.4;
}
.rm-detail-text b { font-size: 14px; }
.rm-detail-arrow { font-size: 18px; line-height: 1; flex-shrink: 0; opacity: .85; }
@media (min-width: 720px) {
  .rm-detail-cta { padding: 14px 16px; }
  .rm-detail-text { font-size: 13.5px; }
  .rm-detail-text b { font-size: 15px; }
}
/* Body scroll lock when modal is open.
   position:fixed approach is necessary on iOS Safari where overflow:hidden
   alone doesn't fully lock background scroll. JS adds top/left/right and
   restores scroll position on close. */
body.modal-open {
  overflow: hidden;
  width: 100%;
  /* position:fixed is set inline by JS along with top/left/right */
}

/* モーダル内のローカルタブ — ページ下のタブと独立。
   ここでの切替はカードの中身（grid-3 / course-mini / ST）を変えるだけで
   背景のグラフは影響を受けない。 */
.racer-modal-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 10px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* flex column コンテナの中で縮まないように。body が flex:1 で残り
     を占有するので、tabs と head は固定サイズで上部に張り付く。 */
  flex-shrink: 0;
}
.racer-modal-tabs::-webkit-scrollbar { display: none; }
.racer-modal-tabs .rm-tab {
  flex: 0 0 auto;
  padding: 12px 12px;          /* 縦パディングを増やしてタップターゲットを 44px 以上に */
  min-height: 44px;            /* WCAG 2.5.5 / Apple HIG 準拠 */
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
}
.racer-modal-tabs .rm-tab:hover {
  background: rgba(30, 58, 95, .07);
  color: var(--primary);
}
.racer-modal-tabs .rm-tab.active {
  background: var(--primary);
  color: #fff;
}
@media (min-width: 720px) {
  .racer-modal-tabs { padding: 8px 14px; }
  .racer-modal-tabs .rm-tab { padding: 7px 14px; font-size: 13px; }
}

/* モーダルタブ下の関係性注釈 — 「ここのタブはこのカード内のみ」 */
.racer-modal-tabs-hint {
  font-size: 10.5px;
  color: var(--text-3);
  padding: 4px 12px 6px;
  line-height: 1.4;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.racer-modal-tabs-hint .rm-hint-mute {
  color: var(--text-3);
  opacity: .85;
}
@media (max-width: 379px) {
  /* 狭いスマホでは後半（補足部分）を改行/省略しても可読 */
  .racer-modal-tabs-hint .rm-hint-mute { display: block; margin-top: 1px; }
}
@media (min-width: 720px) {
  .racer-modal-tabs-hint { font-size: 11.5px; padding: 5px 16px 7px; }
}

/* Compare-table: thead racer name cells (open the modal — entire cell). */
.compare-table .ct-thead-clickable {
  cursor: pointer;
}

/* Toggle button: reveals the legacy detailed cards under the table. */
.cards-toggle {
  display: block;
  width: 100%;
  margin: 6px 0 14px;
  padding: 12px; min-height: 44px;   /* 2026-07-13 UX: 43→44px */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--primary);
  font-weight: 600; font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition);
  /* #4: iOS Safari でタップが展開に繋がらない事象対策。touch-action:manipulation
     で 300ms ダブルタップ遅延/ズーム判定を切り、タップを確実に click にする。 */
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0.05);
}
.cards-toggle:hover { background: var(--bg-soft); }
@media (min-width: 720px) { .cards-toggle { font-size: 14px; padding: 14px; } }

.footer {
  background:#1a1f2b; color:#cbd5e1;
  padding:22px 18px 30px; margin-top:28px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-size:13px; line-height:1.8;
}
.footer .footer-title { color:#fff; font-weight:700; margin-bottom:10px; font-size:14px; letter-spacing:.02em; }
.footer ul { list-style:disc; padding-left:22px; margin:0; }
.footer li { margin-bottom:5px; }
/* CC1: フッターの法務リンク */
.footer-links {
  display:flex; flex-wrap:wrap; gap:8px 16px;
  margin-top:16px; padding-top:14px;
  border-top:1px solid rgba(255,255,255,.12);
}
.footer-links a { color:#cbd5e1; text-decoration:none; font-size:12.5px;
  display:inline-flex; align-items:center; min-height:44px;  /* 2026-07-13 UX: 23px→44px */
  -webkit-tap-highlight-color: transparent; }
.footer-links a:hover { color:#fff; text-decoration:underline; }
.footer-links a:active { color:#fff; }
@media (min-width: 720px) {
  .footer { font-size:14px; padding:26px 22px 36px; }
  .footer .footer-title { font-size:15px; }
  .footer-links a { font-size:13.5px; }
}
/* CC1: 法務ページ (privacy / contact / about) の本文 */
.legal-article { padding:18px 16px 22px; line-height:1.85; }
.legal-article .legal-lead { font-size:14px; color:var(--text-2); margin:0 0 16px; }
.legal-article .legal-h2 {
  font-size:15px; font-weight:700; color:var(--primary);
  margin:22px 0 8px; padding-bottom:5px; border-bottom:1px solid var(--border);
}
.legal-article p { font-size:13.5px; color:var(--text); margin:0 0 10px; }
.legal-article :is(p, li, td) a:not(.lp-cta) { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }   /* review3: 4.36:1 かつ金CTAまで青文字にしていた */
/* review3: ガイド記事・注記・ヒントの本文リンクが地の文と見分けられなかった(a{color:inherit}) */
.guide-article :is(p, li, td, dd) a:not(.lp-cta):not(.race-explore-chip), .tw-note a, .rcr-note a, .race-help p a, .tour-page :is(p, li, td) a {
  color: var(--primary); text-decoration: underline; text-underline-offset: 2px; font-weight: 700;
}
.hint-card .body a { color: #7a5c00; text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.legal-article .legal-list { padding-left:20px; margin:0 0 10px; }
.legal-article .legal-list li { font-size:13.5px; margin-bottom:6px; }
.legal-article .legal-updated { margin-top:20px; font-size:12px; color:var(--text-3); }
@media (min-width: 720px) {
  .legal-article { padding:24px 24px 28px; }
  .legal-article .legal-h2 { font-size:17px; }
  .legal-article p, .legal-article .legal-list li { font-size:14.5px; }
}

.about-card {
  background: var(--surface); border:1px solid var(--border);
  border-radius: var(--radius-lg); padding:18px 18px 16px;
  margin-top:24px; box-shadow: var(--shadow-sm);
  display:flex; gap:14px; align-items:flex-start;
}
@media (min-width: 720px) {
  .about-card { padding:22px 24px; gap:18px; }
}
.about-avatar {
  width:64px; height:64px; flex-shrink:0;
  border-radius:50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:26px;
  box-shadow: 0 2px 6px rgba(30,58,95,.25);
}
.about-avatar-img {
  width:64px; height:64px; flex-shrink:0;
  border-radius:50%; object-fit:cover;
  box-shadow: 0 2px 6px rgba(30,58,95,.25);
  background: var(--bg-soft);
}
@media (min-width: 720px) {
  .about-avatar, .about-avatar-img { width:72px; height:72px; }
  .about-avatar { font-size:30px; }
}
.about-content { flex:1; min-width:0; }
.about-name { font-size:18px; font-weight:700; color:var(--text); }
.about-tagline { font-size:13px; color:var(--text-2); margin-top:3px; }
.about-bio { font-size:14px; color:var(--text-2); line-height:1.75; margin-top:10px; }
.about-links { margin-top:12px; display:flex; gap:8px; flex-wrap:wrap; }
.about-link {
  display:inline-flex; align-items:center; gap:5px;
  padding:10px 14px; min-height:44px;   /* 2026-07-13 UX: 37px→44px */
  border:1px solid var(--border); border-radius:999px;
  font-size:13px; color: var(--primary); text-decoration:none;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--transition); background: var(--bg-soft);
}
.about-link:active { background:#e8eef6; }
@media (min-width: 1100px) {
  .about-name { font-size:20px; }
  .about-tagline { font-size:14px; }
  .about-bio { font-size:15px; }
}
.about-link:hover { border-color: var(--primary-light); transform: translateY(-1px); }
.about-follow-cta {
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 18px; min-height:44px;   /* 2026-07-13 UX: 43px→44px */
  -webkit-tap-highlight-color: transparent;
  border-radius:999px;
  background:#000; color:#fff !important;
  font-size:14px; font-weight:600; text-decoration:none;
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.about-follow-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
@media (min-width: 720px) {
  .about-follow-cta { padding:12px 22px; font-size:15px; }
}

.bottom-nav {
  position:fixed; bottom:0; left:0; right:0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top:1px solid var(--border);
  display:flex; z-index:100;
  box-shadow: 0 -2px 12px rgba(15,23,42,.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav a, .bottom-nav button {
  flex:1; padding:8px 4px 10px; text-align:center; font-size:11px;
  color: var(--text-2); background:none; border:none; cursor:pointer;
  text-decoration:none;
  transition: color var(--transition), background var(--transition), transform 120ms ease-out;
  position: relative;
  font-family: inherit;
  min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a:hover, .bottom-nav button:hover { color: var(--primary); }
.bottom-nav a:active, .bottom-nav button:active { transform: scale(0.92); }
.bottom-nav a:focus-visible, .bottom-nav button:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: -2px;
  border-radius: 6px;
}
.bottom-nav .nav-icon { display:block; font-size:22px; line-height:1; margin-bottom:4px; transition: transform 120ms ease-out; }
.bottom-nav a:active .nav-icon, .bottom-nav button:active .nav-icon { transform: scale(0.85); }
.bottom-nav .nav-label { display:block; font-size:11px; font-weight:600; letter-spacing:.02em; }
/* C4: 現在地ハイライト改善 — ピルバッジ背景＋アイコン拡大 */
.bottom-nav a.active, .bottom-nav button.active {
  color: var(--primary);
}
.bottom-nav a.active .nav-icon { transform: scale(1.12); }
.bottom-nav a.active .nav-label, .bottom-nav button.active .nav-label {
  font-weight: 700;
}
.bottom-nav a.active::before, .bottom-nav button.active::before {
  content: ""; position: absolute; top: 0; left: 18%; right: 18%;
  height: 3px; background: var(--primary); border-radius: 0 0 3px 3px;
}
.bottom-nav a.active::after, .bottom-nav button.active::after {
  content: ""; position: absolute; inset: 6px 8px;
  background: rgba(30,58,95,.05); border-radius: 8px;
  z-index: -1;
}
@media (min-width: 720px) {
  .bottom-nav .nav-icon { font-size: 24px; }
  .bottom-nav .nav-label { font-size: 12px; }
}

.region-title { font-size:12px; font-weight:700; color: var(--primary); margin:18px 0 8px; letter-spacing:.02em; text-transform:uppercase; }

/* Anti-flicker on tab switch:
   - Disable transitions during rerender (no-tx class on <html>).
   - Tell the browser not to use ephemeral elements (machine-row, notice)
     as the scroll anchor — these come and go between tabs and would
     cause visible jumps if the browser tries to keep them stable.
   - GPU compositing on the chart-content avoids partial paints. */
html.no-tx, html.no-tx * {
  transition: none !important;
  animation: none !important;
}
.machine-row, .notice-card { overflow-anchor: none; }
#chart-content { will-change: contents; transform: translateZ(0); }

.sticky-bar {
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 9;
  margin: 8px -16px 6px; padding: 4px 16px 2px;
  background: rgba(246,248,252,.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: transform 220ms ease-out;
  will-change: transform;
}
/* 同様に、自動非表示の対象。translateY(-100% - header-h) で
   ヘッダー高さ分も追加で上にずらして、完全に画面外へ。 */
body.chrome-hidden .sticky-bar {
  transform: translateY(calc(-100% - var(--header-h, 64px)));
}
/* 下部ナビも一緒に隠して画面領域を最大化 */
body.chrome-hidden .bottom-nav {
  transform: translateY(100%);
}
.bottom-nav {
  transition: transform 220ms ease-out;
  will-change: transform;
}
/* 出走表の sticky thead は通常 header+sticky-bar の高さ分だけ下にスティック
   するが、それらが隠れているときは画面の最上部にスティックさせる。 */
body.chrome-hidden .compare-table thead th {
  top: 0;
}
.sticky-bar .tab-bar { margin: 0 0 3px; }
.sticky-bar .tab-bar:last-child { margin-bottom: 0; }
@media (min-width: 720px) {
  .sticky-bar { margin-left: -26px; margin-right: -26px; padding-left: 26px; padding-right: 26px; }
}
@media (min-width: 1100px) {
  .sticky-bar { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; }
}

/* ============================================================
   選手一覧・検索ページ /racer/ (P1.1) — クライアントサイドJS検索
   ============================================================ */
.racer-index-intro {
  margin: 0 0 14px;
  font-size: 13px; color: var(--text-2);
  line-height: 1.75;
}
.racer-search-bar { position: relative; margin: 12px 0 14px; }
.racer-search-input {
  width: 100%; padding: 14px 16px 14px 44px;
  font-size: 16px; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  -webkit-appearance: none; appearance: none;
}
.racer-search-input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(74,123,184,.15);
}
.racer-search-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 18px; color: var(--text-3); pointer-events: none;
}
.racer-filter-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 6px; align-items: center;
}
.racer-filter-chip {
  padding: 7px 14px;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-soft); color: var(--text-2);
  cursor: pointer; transition: all var(--transition);
  min-height: 36px;
  /* F10: 「全階級」と A1/A2/B1/B2 の chip 幅を揃える。
     min-width で文字数差による視覚不均衡を解消。 */
  min-width: 52px;
  text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
}
.racer-filter-chip:hover { border-color: var(--primary-light); color: var(--text); }
.racer-filter-chip.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.racer-shibu-select {
  padding: 7px 12px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
  cursor: pointer; min-height: 36px;
}
.racer-result-count {
  font-size: 12px; color: var(--text-3); margin: 8px 0 12px;
}
.racer-result-count b { color: var(--text); font-weight: 700; }
.racer-cards-grid {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
@media (min-width: 600px) { .racer-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (min-width: 900px) { .racer-cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1300px) { .racer-cards-grid { grid-template-columns: repeat(4, 1fr); } }
.racer-list-card {
  display: block; padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none; color: var(--text);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.racer-list-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.racer-list-card-name {
  font-size: 17px; font-weight: 700; color: var(--text);
  margin-bottom: 2px;
}
.racer-list-card-touban {
  font-size: 11px; color: var(--text-3); margin-bottom: 8px;
}
.racer-list-card-meta {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 8px;
  font-size: 12px; color: var(--text-2);
}
.racer-grade-badge {
  padding: 2px 9px;
  font-size: 11px; font-weight: 700;
  border-radius: 999px; letter-spacing: .04em;
}
.racer-grade-A1 { background: #fff7e0; color: #b27800; border: 1px solid #e5c060; }
.racer-grade-A2 { background: #eef4ff; color: var(--primary); border: 1px solid #b9cce8; }
.racer-grade-B1 { background: #f3f4f6; color: var(--text); border: 1px solid var(--border); }
.racer-grade-B2 { background: #fff1f2; color: #be1f3d; border: 1px solid #f0c2c8; }
.racer-list-card-stats {
  display: flex; gap: 12px;
  font-size: 12px; color: var(--text-2);
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.racer-list-card-stats b { color: var(--text); font-weight: 700; }
.racer-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-2); font-size: 14px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
}

/* ホーム → 選手一覧 への入口バナー (P1.1) */
/* 2026-05-25 F4+F7: ショートカット PC 3-col、suffix 改行制御 */
.lp-shortcuts-grid {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  margin: 16px 0 32px;
}
.lp-racer-search-promo { margin: 0; }
.lp-racer-search-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #f0f6ff 0%, #fff8f0 100%);
  border: 1px solid rgba(46, 108, 208, .2);
  border-radius: var(--radius-lg);
  text-decoration: none; color: var(--text);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.lp-racer-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.lp-racer-search-icon { display: block; width: 24px; height: 24px; flex-shrink: 0;
  color: var(--primary); }
.lp-racer-search-text { flex: 1; min-width: 0; }
.lp-racer-search-title {
  display: block;
  font-size: 16px; font-weight: 700; color: var(--text);
  line-height: 1.35;
}
/* F4: カッコ部分は小フォント + 改行抑制で「(機械選定)」だけが
   別行に落ちる問題を回避 */
.lp-racer-search-suffix {
  font-size: 12px; font-weight: 600; color: var(--text-3);
  white-space: nowrap;
  margin-left: 2px;
}
.lp-racer-search-sub {
  display: block;
  font-size: 12px; color: var(--text-2); margin-top: 2px;
}
.lp-racer-search-arrow { font-size: 18px; color: var(--text-3); flex-shrink: 0; }
@media (min-width: 720px) {
  .lp-shortcuts-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .lp-racer-search-btn { padding: 18px 18px; flex-direction: column; align-items: stretch; text-align: left; }
  .lp-racer-search-icon { width: 26px; height: 26px; }
  .lp-racer-search-arrow { align-self: flex-end; }
}

/* ============================================================
   オススメレース /recommendations/ (Tier 1+2+3)
   ============================================================ */
.rec-history-banner {
  padding: 12px 16px;
  background: linear-gradient(135deg, #fff8e1 0%, #fff3d6 100%);
  border: 1px solid #f0c060;
  border-radius: var(--radius-md);
  font-size: 13px; color: var(--text);
  margin-bottom: 14px;
}
.rec-history-banner b { font-weight: 700; }
.rec-history-banner a { color: var(--primary); text-decoration: underline; }
.rec-intro {
  font-size: 13px; color: var(--text-2);
  line-height: 1.75; margin: 0 0 16px;
}
.rec-cards-grid {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  margin-bottom: 20px;
}
@media (min-width: 1100px) {
  .rec-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
.rec-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.rec-card-katai { border-left-color: #2e6cd0; }
.rec-card-myomi { border-left-color: #d9354c; }
.rec-card-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  color: #fff; letter-spacing: .04em;
  margin-bottom: 10px;
}
.rec-tag-katai { background: #2e6cd0; }
.rec-tag-myomi { background: #d9354c; }
.rec-card-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 8px;
}
.rec-card-race {
  font-size: 18px; font-weight: 800;
  color: var(--primary);
  /* 2026-09-16: ライトでは本文と同じ紺でリンクに見えなかった(「レース名タップで詳細へ」と案内しているのに) */
  text-decoration: underline; text-decoration-color: rgba(74,123,184,.5); text-underline-offset: 3px;
}
.rec-card-race:hover { text-decoration: underline; }
.rec-card-time {
  font-size: 12px; color: var(--text-3); margin-left: auto;
}
.rec-card-pick {
  font-size: 14px; color: var(--text); margin-bottom: 6px;
}
.rec-card-pick b { font-weight: 700; }
.rec-card-souban {
  display: inline-block;
  padding: 1px 8px;
  background: var(--bg-soft); border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  margin-left: 4px;
}
.rec-card-allwin {
  margin-left: 8px;
  font-size: 11px; color: var(--text-3);
}
.rec-card-pattern {
  margin: 8px 0 6px;
  font-size: 13px; color: var(--text);
}
.rec-card-pattern code {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-soft); border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; font-weight: 700;
  color: var(--accent);
}
.rec-card-meta {
  display: flex; gap: 14px;
  font-size: 12px; color: var(--text-2);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.rec-card-meta b { color: var(--text); font-weight: 700; }
.rec-empty {
  padding: 40px 16px;
  text-align: center; color: var(--text-2);
  background: var(--bg-soft); border-radius: var(--radius-md);
  font-size: 14px; line-height: 1.7;
}
.rec-disclaimer {
  margin-top: 24px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  font-size: 11px; color: var(--text-3);
  line-height: 1.6;
}
.rec-stats-overall {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  margin-bottom: 20px;
}
@media (min-width: 720px) {
  .rec-stats-overall { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
.rec-stat-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.rec-stat-all { border-top: 4px solid var(--primary); }
.rec-stat-katai { border-top: 4px solid #2e6cd0; }
.rec-stat-myomi { border-top: 4px solid #d9354c; }
.rec-stat-label {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 8px;
}
.rec-stat-row {
  display: flex; justify-content: space-between;
  align-items: baseline;
  font-size: 12px; color: var(--text-2);
  padding: 4px 0;
}
.rec-stat-row b { color: var(--text); font-weight: 700; font-size: 14px; }
.rec-h2 {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin: 24px 0 10px;
}
.rec-history-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.rec-history-table thead th {
  background: var(--bg-soft);
  padding: 8px; text-align: left;
  font-weight: 700; color: var(--text-2);
  font-size: 11px;
}
.rec-history-table tbody td {
  padding: 8px;
  border-top: 1px solid var(--border);
  color: var(--text);
}
.rec-history-table tbody tr:hover { background: var(--bg-soft); }
/* 2026-09-16: 390px で 7 列が「¥2,4／30」「2026-／09-15」と途中改行していた → 表だけ横スクロール */
.rec-history-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rec-history-table th, .rec-history-table td { white-space: nowrap; }
.rec-card-pattern code { color: #b8253b; }   /* review5b: --accent は 4.44:1 */
.rec-tag-small {
  display: inline-block;
  padding: 1px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
  color: #fff;
}

/* 情報ノート (直前情報の有無等) */
.rec-info-note {
  margin: 12px 0 16px;
  padding: 12px 16px;
  background: #fef9e7;
  border-left: 4px solid #f0b842;
  border-radius: var(--radius-md);
  font-size: 13px; color: var(--text);
  line-height: 1.7;
}
.rec-info-note b { font-weight: 700; }
.rec-info-note a {
  color: var(--primary); text-decoration: underline; font-weight: 600;
}
.rec-info-note-good {
  background: #e7f1fb;
  border-left-color: var(--primary-light);
}

/* ツイート予想カード variant */
.rec-card-pred { border-left-color: #6c5ce7; }
/* 2026-09-14: レースページの「買い目を見る →」で飛んできたとき、上の見出しに隠れず枠で分かるように */
.rec-card-pred { scroll-margin-top: 170px; }
.rec-card-pred:target { box-shadow: 0 0 0 3px #6c5ce7; }
.rec-tag-pred { background: #6c5ce7; }
.rec-pred-comment {
  margin: 8px 0 6px;
  font-size: 13px; color: var(--text-2);
  line-height: 1.6;
}
.pred-result {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 12px; font-weight: 600;
}
.pred-result-hit { background: #e7f7e7; color: #1f6e1f; }
.pred-result-miss { background: #fae5e5; color: #963131; }

/* 2026-05-25 F1: ツイート予想パターン chip 化 */
.rec-card-pattern-wrap {
  margin: 8px 0 6px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
}
.rec-card-pattern-label {
  font-size: 13px; font-weight: 700; color: var(--text); flex-shrink: 0;
}
.pred-pattern-chips {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
  flex: 1; min-width: 0;
}
.pred-pattern-chip {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(217,53,76,.08);
  border: 1px solid rgba(217,53,76,.20);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; font-weight: 700;
  color: #b8253b;   /* 2026-09-16: --accent(#d9354c) は淡ピンク地で 4.1:1 → 5.3:1 */
  letter-spacing: .03em;
}
.pred-pattern-count {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-soft);
  border-radius: 999px;
  font-size: 11px; font-weight: 700; color: var(--text-2);
  margin-left: 4px;
}
@media (min-width: 720px) {
  .pred-pattern-chip { font-size: 13px; padding: 3px 10px; }
}

/* D1: /now/ 全レース時系列タイムライン */
.now-intro {
  font-size: 14px; line-height: 1.7;
  color: var(--text-2); margin: 0 0 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #7dd3fc;
  border-radius: var(--radius-md);
}
.now-legend {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 16px;
}
.now-timeline {
  display: flex; flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden; overflow: clip;   /* review3: hidden はスクロールコンテナになり中の sticky(会場フィルタ/時間帯見出し)を無効にしていた */
}
.now-hour-sep {
  padding: 8px 12px;
  background: var(--bg-soft);
  font-size: 12px; font-weight: 700;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  position: sticky;
  /* F15: sticky 位置を header 下に明示固定。 z-index を 4 に下げて
     bottom-nav (z=100) や予想バナー (z=9) と競合しないように。 */
  top: 0;
  z-index: 4;
  /* 不透明な背景にして、下にある now-race-row が透けて見えないようにする */
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(15,23,42,.04);
}
.now-hour-sep:first-child { border-top: 0; }
.now-hour-sep-tbd { color: #94a3b8; }
.now-hour-label { letter-spacing: .04em; }

.now-race-row {
  display: grid;
  grid-template-columns: 64px 88px 1fr 20px;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  min-height: 56px;
  transition: background var(--transition);
}
.now-race-row:hover { background: rgba(59,130,246,.05); }
.now-race-row:first-child { border-top: 0; }
.now-time-col { font-weight: 800; color: var(--primary); }
.now-time { font-size: 15px; }
.now-time-tbd { font-size: 11px; color: #94a3b8; font-weight: normal; }
.now-venue-col {
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
.now-venue {
  font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.now-rno {
  font-size: 12px; font-weight: 600; color: var(--text-3);
}
.now-info-col {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.now-top1 {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text);
  min-width: 0;
  /* M3 (2026-05-26): 「号番 + 名前 + 全国1着率 X.XX」が 121px に入らない問題。
     flex-wrap:wrap で全国1着率を 2 行目に逃がす。狭画面でも名前は省略されない。 */
  flex-wrap: wrap;
  row-gap: 2px;
}
.now-top1-name { min-width: 0; }
.now-top1-rate {
  /* 2行目に折りたたまれたとき左寄せにする (margin-left:auto の維持) */
  flex-shrink: 0;
}
.now-top1-na { color: var(--text-3); font-style: italic; }
.now-sb-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  color: #fff; font-weight: 700; font-size: 11px;
  border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,.18);   /* review3: 1号艇(白)の輪郭 */
}
/* review3: レーダー枠順チップの 5号艇も黄地+黒文字(公式流儀)。線色(#daa520)はそのまま */
.radar-order-chip[data-souban="5"] .roc-badge { background: #f1c40f !important; color: #222 !important; }
.now-top1-name {
  font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.now-grade {
  display: inline-block;
  padding: 1px 6px;
  background: var(--bg-soft); border-radius: 4px;
  font-size: 10px; font-weight: 700; color: var(--text-2);
}
.now-top1-rate {
  font-size: 11px; color: var(--text-3); margin-left: auto;
  white-space: nowrap;
}
.now-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  color: #fff;
}
.now-badge-rec.now-badge-katai { background: #2e6cd0; }
.now-badge-rec.now-badge-myomi { background: #d9354c; }
.now-badge-notable.now-badge-katai { background: #2a5fb8; }   /* review3: 半透明で 3.8:1 → 不透明 5.4:1 */
.now-badge-notable.now-badge-myomi { background: #c42d44; }
.now-badge-notable.now-badge-sessen { background: #5f5955; }
.now-arrow {
  color: var(--text-3); font-weight: 700;
  text-align: right;
}
.now-empty {
  padding: 40px 16px;
  text-align: center; color: var(--text-2);
  background: var(--bg-soft);
}
.now-foot {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  font-size: 11.5px; color: var(--text-3);
  line-height: 1.7;
}

/* 「次これ」マーカー (JS で動的付与) */
.now-race-row.is-now {
  background: linear-gradient(90deg, rgba(255,216,77,.18) 0%, rgba(255,216,77,.05) 100%);
  border-left: 4px solid #ffd84d;
  position: relative;
}
.now-race-row.is-now::before {
  content: ''; position: absolute;
  left: -4px; top: 0; bottom: 0; width: 4px;
  background: #ffd84d;
  box-shadow: 0 0 8px rgba(255,216,77,.6);
}
.now-here-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  background: #ffd84d; color: #1e3a5f;
  border-radius: 999px;
  font-size: 10px; font-weight: 800;
  letter-spacing: .02em;
  margin-right: 2px;
}

/* 「現在時刻のレースへ」 floating button */
/* 2026-07-13 UX⑩R1: /now/ 会場フィルタチップ */
.now-filter {
  position: sticky; top: 0; z-index: 30;
  display: flex; gap: 6px; overflow-x: auto;
  padding: 8px 2px; margin: 4px 0 6px;
  background: rgba(244,246,250,.95);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  scrollbar-width: none; -ms-overflow-style: none;
}
.now-filter::-webkit-scrollbar { display: none; }
.now-filter-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center;
  min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.now-filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.now-filter-chip:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { .now-filter-chip:active { transform: none; } }
@media (prefers-color-scheme: dark) {
  .now-filter { background: rgba(18,18,22,.92); }
  .now-filter-chip.active { background: #2c5488; border-color: #3a6aa8; }
}
.now-jump-btn {
  position: fixed;
  right: 16px;
  bottom: calc(var(--bottom-nav-h, 64px) + 70px); /* sticky bar + bottom-nav の上 */
  z-index: 48;
  padding: 10px 16px;
  background: #ffd84d; color: #1e3a5f;
  border: 0; border-radius: 999px;
  font-size: 13px; font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15,23,42,.25);
  transition: transform var(--transition), box-shadow var(--transition);
}
.now-jump-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15,23,42,.35);
}

@media (min-width: 720px) {
  .now-race-row {
    grid-template-columns: 88px 120px 1fr 30px;
    padding: 14px 18px;
    min-height: 64px;
  }
  .now-time { font-size: 17px; }
  .now-venue { font-size: 16px; }
  .now-top1 { font-size: 14px; }
  .now-jump-btn { padding: 12px 20px; font-size: 14px; }
}
@media (min-width: 1100px) {
  .now-info-col { flex-direction: row; align-items: center; flex-wrap: wrap; row-gap: 4px; }   /* review3: バッジ2個の行で名前が「石.」に潰れていた */
  .now-top1 { flex: 1 1 150px; }
  .now-top1-name { flex-shrink: 0; max-width: 8em; }
  /* F8: PC 広幅 (>=1100px) で 2-col grid に。行密度 up + 余白削減 */
  .now-timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .now-race-row { border-left: 1px solid var(--border); }
  .now-race-row:nth-child(2n+1) { border-left: 0; }
  /* 時間帯セパレータは grid 全幅に */
  .now-hour-sep { grid-column: 1 / -1; }
}

/* D2: 次のレース sticky bar (全ページ共通) */
.next-race-bar {
  position: fixed;
  bottom: var(--bottom-nav-h, 64px);
  left: 0; right: 0;
  z-index: 49; /* bottom-nav より下、メイン content より上 */
  display: none; /* JS が表示状態を制御 */
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  border-top: 2px solid #ffd84d;
  box-shadow: 0 -4px 18px rgba(0,0,0,.20);
  transition: transform .3s ease;
}
body.chrome-hidden .next-race-bar { transform: translateY(110%); }
/* 2026-07-05(B): 次レースバー表示中は本文下に余白を追加し、最下部の
   リンク/ボタンがバーに覆われてタップできない問題を防ぐ。 */
body.has-next-bar { padding-bottom: calc(var(--bottom-nav-h, 64px) + 52px); }
.next-race-bar.visible { display: block; }
.next-race-bar-inner {
  display: flex; align-items: center;
  gap: 8px;
  /* 2026-07-05 モバイル: 右上の閉じ✕(絶対配置)とCTA「見る→」が重ならないよう
     右パディングを確保。✕の占有(right:2〜42px)を避けCTAが44px手前で終わる。 */
  padding: 6px 44px 6px 14px;
  max-width: 1400px; margin: 0 auto;
  color: #fff;
  text-decoration: none;
}
@media (min-width: 720px) {
  /* 右パディングは✕(40px,right:2px)の占有を避けるため全幅で確保。 */
  .next-race-bar-inner { padding: 10px 44px 10px 14px; gap: 10px; }
}
.next-race-bar-label {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  background: #ffd84d; color: #1e3a5f;
  border-radius: 999px;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
}
.next-race-bar-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.next-race-bar-venue {
  font-size: 14px; font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.next-race-bar-meta {
  font-size: 11.5px; color: rgba(255,255,255,.85);
}
.next-race-bar-meta b { color: #ffd84d; font-weight: 700; }
.next-race-bar-cta {
  flex-shrink: 0;
  padding: 6px 12px;
  background: #ffd84d; color: #1e3a5f;
  border-radius: 8px;
  font-size: 13px; font-weight: 800;
  white-space: nowrap;
}
.next-race-bar-close {
  /* 2026-07-05 モバイル: 22px→40pxのタップ標的に拡大。上寄せ配置をやめ
     右上角に寄せつつグリフを中央に。CTAとはinnerの右パディングで分離。
     2026-07-13 UX: 40px→44px で HIG 完全準拠。 */
  position: absolute; top: 2px; right: 2px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  color: rgba(255,255,255,.7);
  font-size: 16px; line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.next-race-bar-close:hover { color: #fff; }
.next-race-bar-close:active { color: #fff; transform: scale(.9); }
@media (min-width: 720px) {
  .next-race-bar-venue { font-size: 16px; }
  .next-race-bar-meta { font-size: 13px; }
  .next-race-bar-cta { padding: 8px 16px; font-size: 14px; }
}

/* D3: 会場カードに次レースプレビュー */
.venue-tile.has-preview {
  /* タイル全体が縦に伸びる。プレビュー部のラベル領域を確保。 */
  padding-bottom: 6px;
}
.v-next-preview {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 1px;
  margin-top: 8px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 8px;
  font-size: 10.5px;
  color: var(--text-2);
  line-height: 1.4;
  text-align: left;
}
/* B1 fix: hidden 属性を確実に効かせる (display:flex の上書き対策) */
.v-next-preview[hidden] { display: none !important; }
.v-next-head {
  display: flex; align-items: center; gap: 4px;
  font-weight: 700; color: var(--primary);
}
.v-next-head-rno { letter-spacing: .02em; }
.v-next-head-time { margin-left: auto; color: var(--accent); font-weight: 700; }
.v-next-pick {
  display: flex; align-items: center; gap: 4px;
  min-width: 0;
  overflow: hidden;          /* M7: 万一はみ出してもタイル外に飛び出さない */
}
.v-next-pick-sb {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  background: var(--sb-color, #888);
  color: #fff; font-weight: 700; font-size: 9px;
  border-radius: 50%; flex-shrink: 0;
}
.v-next-pick-name {
  /* M7 (2026-05-26): 4列タイル内で名前 (3-4文字) と勝率 (X.XX) が
     共存できるよう、名前側を flex:1 + min-width:0 で縮ませて
     ellipsis を効かせる。これで勝率がカード外に飛び出さない。 */
  flex: 1 1 0;
  min-width: 0;
  font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.v-next-pick-rate {
  margin-left: auto; flex-shrink: 0;
  display: inline-flex; align-items: baseline; gap: 3px;
  font-size: 10px;
}
.v-next-pick-rate-label {
  color: var(--text-3); font-weight: 400;
}
.v-next-pick-rate-value {
  color: var(--text-1); font-weight: 700;
}
/* M7 (2026-05-26): 4 列タイル × ~390px viewport では、
   1 行で「ドット＋名前＋勝率」を全部入れると名前が ellipsis で
   ほぼ消えるか、勝率がカード外にはみ出す。
   そこで狭幅では 2 段組に切替える:
     [souban-dot] 名前 (ellipsis 可)
                 勝率値 (右寄せ)
   これでドット・名前・数値の3つが同時に見える。
   「勝率」ラベルは数値だけで十分通じるので省く。 */
@media (max-width: 519px) {
  .v-next-pick {
    flex-wrap: wrap;
    row-gap: 0;
    column-gap: 4px;
    align-items: baseline;
  }
  .v-next-pick-sb {
    align-self: center;
  }
  .v-next-pick-name {
    /* 1行目の残り (= タイル幅 - dot) を全部もらう */
    flex: 1 1 calc(100% - 18px);
    min-width: 0;
  }
  .v-next-pick-rate {
    /* 2行目に独立して載る */
    flex: 0 0 100%;
    margin-left: 0;
    justify-content: flex-end;
    padding-right: 2px;
  }
  .v-next-pick-rate-label { display: none; }
  .v-next-pick-rate { gap: 0; }
}

@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
    background: linear-gradient(180deg, #15151b 0%, #101014 100%);
  }
  :root {
    --primary: #8ab4e8;          /* 見出し/ラベル/リンク: 明るい青 */
    --primary-light: #a3c6ee;
    --primary-dark: #6f9fd6;
    --accent: #ff6d82;           /* 赤→明るいローズ(dark で沈まない) */
    --bg: #121216;
    --bg-soft: #1a1a21;
    --surface: #1f1f28;          /* カード: bg より明るく=浮き */
    --border: #34343f;
    --text: #e6e8ec;             /* near-white(グレア低減) */
    --text-2: #b7bcc4;
    --text-3: #9aa0a9;
  }
  /* --primary を背景に使う active 状態 → 白文字が読める濃紺に個別上書き */
  .vs-round.active, .vs-cell.active, .rcr-toggle .opt.active, .tab.active,
  .guide-cat-chip.is-active, .top-picks-banner .tp-tag-1, .rax-chip.active,
  .radar-axis-toggle[aria-expanded="true"], .rax-preset.active,
  .racer-modal-tabs .rm-tab.active, .racer-filter-chip.active,
  .info-icon:hover, .info-icon.show {
    background: #2c5488; color: #fff; border-color: #3a6aa8;
  }
  /* ハードコード light サーフェスの暗転 */
  .card { background: var(--surface); }
  .compare-table .ct-section { background: #23232d; color: var(--text-2); }   /* review3: 文字色 #334155 のままで 1.5:1 だった */
  .compare-table .ct-section-hint { color: #9aa0a9; opacity: 1; }
  .compare-table .ct-sec-drag { color: #9aa0a9; }
  .compare-table .ct-rowlabel { background: #191921; }
  .compare-table thead .ct-rowlabel, .compare-table thead th { background: #23232d; }
  .compare-table th, .compare-table td { border-bottom-color: #2a2a34; border-right-color: #26262f; }
  .compare-table .ct-val-zero { color: #8a8f99; }
  .race-explore-chip { background: #23232b; border-color: #33333d; }
  .race-explore-chip:active { background: #2c2c37; }
  .about-link:active { background: #2c2c37; }
  /* 2026-09-16 レビュー指摘: --primary/--accent を背景や強調に使う部品はダークで沈む */
  .lp-strength-badge { background: #2c5488; color: #fff; }                 /* 「唯一の機能」2.15→7:1 */
  .lp-data-spotlight-desc b { color: #b91c1c; }                            /* クリーム島の中の強調 2.43→5.6:1 */
  .lp-data-spotlight-badge { background: #c0293d; color: #fff; }
  .pred-result-hit { background: #16341f; color: #8fe0a0; }                /* 結果行だけ明帯で浮いていた */
  .pred-result-miss { background: #3a1c20; color: #ff9aa8; }
  .pred-pattern-chip { color: var(--accent); }   /* review5a: ライト用の固定色 #b8253b は暗いカードで 2.4:1 */
  .rec-card-pattern code { color: var(--accent); }
  .gvc-rate { color: var(--text) !important; }   /* review5b: 会場カードの率はライト用の濃色をインラインで持つ */
  .race-time.past, .race-arrow, .race-row.race-row-done .date-status { color: var(--text-3) !important; }   /* review6: ライト用 #6b7280 は暗面で 3.58:1 */
  .guide-cat-chip.is-active .guide-cat-chip-n { background: #1f3f66; }   /* review6: 白文字 4.14→7:1 */
  .compare-table :is(.ct-rank-1, .ct-rank-2, .ct-rank-3) .ct-pct-n { color: #d1d5db; }
  .compare-table :is(.ct-rank-1, .ct-rank-2, .ct-rank-3) .ct-pct-n-low,
  .compare-table :is(.ct-rank-1, .ct-rank-2, .ct-rank-3) .ct-st-delta.pos { color: #ffa3a3; }
  .starter-bar { background: #182130; border-color: #294061; }
  .starter-bar a { background: #202b3b; border-color: #294061; color: #a3c6ee; }
  .guide-current { background: rgba(25,25,33,.94); border-color: #34343f; }
  .lp-guide-more { color: #ff9aa8; }
  .compare-table-foot b { color: #ff8585; }
  /* 追加(実測で検出したハードコード light パネル/バッジの暗転) */
  .sticky-bar { background: rgba(20,20,26,.94); }
  .race-quick-summary { background: var(--surface); border-color: var(--border); }
  .in-taisei-panel { background: var(--surface); border-color: var(--border); }
  .rr-data-check { background: #16161c; border-color: #3a3a45; }
  .rr-done-badge { background: #2c3340; color: #cdd5e0; }
  .racer-chip-link { background: rgba(38,38,48,.9); }
  .makuri-badge { background: #241a3a; color: #c4b5fd; border-color: #4c3d7a; }
  /* 順位ハイライト(金/銀/銅)はダーク調に沈める(意味=色相は保持) */
  .compare-table .ct-rank-1 { background-color: #4a4018; color: #ffe08a; }
  .compare-table .ct-rank-2 { background-color: #33373f; color: #d6dde6; }
  .compare-table .ct-rank-3 { background-color: #43331e; color: #f0c088; }
  /* イン耐性の判定バッジ(手堅い/標準/崩れやすい) */
  .in-taisei-panel .it-verdict.it-good { background: #16341f; color: #86efac; }
  .in-taisei-panel .it-verdict.it-bad { background: #3a1c14; color: #fca987; }
  .race-help p { background: #16161c; }
  .race-help summary { color: var(--text-2); }
  .bottom-nav { background: rgba(20,20,26,.92); border-top-color: #2a2a33; }
  /* ガイド/ホーム固有の light コンポーネント */
  .guide-keypoints { background: #16202e; border-color: #294061; }
  .guide-cta-block .lp-cta-secondary { background: #1f1f28; color: #8ab4e8; border-color: #3a6aa8; box-shadow: none; }
  /* 2026-07-13 UX⑥ 横断スイープの残件 (racer/tournament=0件・now/homeで実測検出) */
  .now-hour-sep { background: #1c1c24; color: var(--text-2); }
  .lp-today-stat { background: var(--surface); }
  .lp-band { background: #17171e; }
  /* ============================================================
     2026-07-17b: 機械監査(全CSSルール×暗面コントラスト計算)で検出した
     「白背景前提の濃色文字が暗転サーフェスに取り残された」箇所の一括修正。
     方針: コンテナごと明示的にダーク化 or 文字を明色系へ。全ペア4.5:1以上を検証済み。
     ============================================================ */
  /* ヒントカード (.card.hint-card は .card のダーク上書きが勝つため文字も追従させる) */
  .hint-card { background: linear-gradient(135deg, #26200f 0%, #211c10 100%); border-color: #4a3d13; }
  .hint-card .title, .hint-details > .hint-summary { color: #e8c55a; }
  .hint-card .body { color: #d8cfae; }
  .hint-card .body b { color: #f0e0a0; }
  /* 注意カード (ローズ系パネルの暗転) */
  .notice-card, .chart-notice-card { background: #241418; border-color: #5c2730; }
  .notice-card .title, .chart-notice-card .title { color: #ff8fa0; }
  .notice-card .body, .chart-notice-card .body { color: #d3c7c9; }
  /* レース結果カード見出し/払戻ヘッダ/優勝欄 (ダークカード上の暗金・暗灰) */
  .rr-title, .rr-update, .rr-foot, .rr-payouts-head, .po-type { color: #e3c96a; }
  .champ { color: #f0d080; }
  .champ.silver { color: #c9d1dc; }
  .rr-slot.rr-rank-1 .rr-rank-num { color: #ffe08a; }
  .rr-slot.rr-rank-2 .rr-rank-num { color: #cbd5e1; }
  .rr-slot.rr-rank-3 .rr-rank-num { color: #f0a878; }
  /* 出走表セルの意味色 (低%赤/中%橙/緑デルタ/薄灰) を暗面で読める明度へ */
  .compare-table .ct-pct-n { color: #9aa1ad; }
  .compare-table .ct-pct-n-low { color: #ff8585; }
  .compare-table .ct-pct-n-mid { color: #ffab70; }
  .compare-table .ct-st-delta.pos { color: #ff8585; }
  .compare-table .ct-st-delta.neg { color: #6ee7a0; }
  .compare-table .ct-section-hint { color: #8b919b; }
  .compare-table .ct-sec-drag:hover { color: #b7bcc4; }
  .ct-drag-handle { color: #e8a35c; }
  .ct-reset-btn:hover { color: #f0a878; }
  /* イン耐性/まくり系カード内の意味色 */
  .it-val.it-good b { color: #86efac; }
  .it-val.it-bad b { color: #fca987; }
  .mk-scope-v { color: #86efac; }
  .makuri-winline .mk-kim { color: #c4b5fd; }
  .makuri-caveat b { color: #f0b060; }
  /* ベストマッチカード (紫系) */
  .bm-head { color: #c4b5fd; }
  .bm-line { color: #d5d9e0; }
  .bm-line b { color: #c4b5fd; }
  .bm-detail summary { color: #b5a3f5; }
  .bm-detail-body { background: #1f1f28; }
  /* 会場タイル (日付ページの主面) をテーマに揃えて暗転 + グレード色を明色へ */
  .venue-tile { background: linear-gradient(180deg, #232330 0%, #1c1c26 100%); border-color: #34343f; }
  .venue-tile.grade-tile-SG .v-name { color: #ff8fa0; }
  .venue-tile.grade-tile-G1 .v-name { color: #e8c55a; }
  .venue-tile.grade-tile-G2 .v-name { color: #c3c8d0; }
  .venue-tile.grade-tile-G3 .v-name { color: #d4a678; }
  .venue-tile .v-races.status-live { color: #6ee7a0; }
  .venue-tile .v-races.status-upcoming { color: #8ab4e8; }
  /* 大会ページの開催中ステータス / レーダー凡例の移動注記 */
  .tour-status-live { color: #6ee7a0; }
  .radar-legend-item .rl-course-hint.rl-course-hint-moved { color: #f0b060; }
  /* ホーム見どころチップ内 (チップは暗転済・ラベルが暗青のままだった) */
  .lp-today-stat-label { color: #9ccbe8; }
  .lp-today-stat-num { color: #7cc0ec; }
  /* スターターバー内の濃青ラベル/グレー✕ */
  .starter-bar .starter-label { color: #8ab4e8; }
  .starter-close { color: #a8b0ba; }
  /* ガイド要点ボックスの見出し (箱は#16202eに暗転済み) */
  .guide-keypoints-title { color: #a3c6ee; }

  /* ============================================================
     2026-07-17c: 逆方向の全数監査 — 「ライト維持の明背景 × ダーク用トークン文字」。
     実例: ホームのナビカード(白地にほぼ白のタイトル)・お問い合わせの金ボタン
     (黄地に水色リンク)。方針: 原則コンテナを暗転(トークン文字が自動で正しくなる)、
     意図的な金/ライト島には明示の濃色文字を安全網として付与。
     ============================================================ */
  /* ホームのナビカード群 (白地+var(--text) → 暗転で自動解決) */
  .lp-racer-search-btn { background: var(--surface); border-color: #34343f; }
  /* お問い合わせ等の金CTA: .legal-body a の var(--primary) 上書きに勝つ */
  a.lp-cta-primary { color: #1e3a5f; text-decoration: none; }
  /* 会場切替パネル/ホバー */
  .vs-panel { background: var(--surface); border-color: var(--border); }
  .vs-round:hover, .vs-cell:hover { background: #2a2a35; }
  /* タブ説明帯・トグル行・チャート小物 */
  .tab-explainer { background: #1a1a21; }
  .toggle-row { background: #23232d; }
  .st-spark { background: #1a1a21; }
  .machine-row { background: var(--surface); }
  /* ホームの帯/セクション */
  .featured-venues, .notable-races { background: #17171e; }
  .lp-today-stats { color: #0f3a56; }             /* ライト島の継承文字の安全網 */
  .lp-today-stat:hover { background: #262630; }
  .lp-data-spotlight { color: #4a3410; }          /* ライト島の安全網 */
  /* 会場タイルの変種 (active/中止/empty/グレード) — 基底の暗転を変種にも適用 */
  .venue-tile.active, .venue-tile.venue-tile-chushi, .venue-tile.empty,
  .venue-tile.grade-tile-SG, .venue-tile.grade-tile-G1,
  .venue-tile.grade-tile-G2, .venue-tile.grade-tile-G3 {
    background: linear-gradient(180deg, #232330 0%, #1c1c26 100%);
  }
  /* ガイドCTAブロック/要点チップ/図解SVG面 */
  .guide-cta-block { background: #17171e; }
  .guide-cta-block .lp-cta-secondary:hover { background: #262630; }
  .gk { background: #1f2b3d; }
  .guide-fig-svg { background: #16161c; }
  .guide-dtbl thead th { background: #1e1e26; }
  /* シェア節/日付リスト行/結果セクション */
  .brc-share-section { background: var(--surface); }
  .race-row.race-row-next { background: #1e2430; }
  .race-row.race-row-today { background: var(--surface); }
  .race-row.race-row-future { background: #1a1a21; }
  .race-result-section { background: var(--surface); }
  /* 払戻スロット (金/銀/銅) — 順位ハイライトのダーク調に統一 */
  .rr-slot.rr-rank-1 { background: #4a4018; }
  .rr-slot.rr-rank-2 { background: #33373f; }
  .rr-slot.rr-rank-3 { background: #43331e; }
  .top-picks-banner { color: #3a3325; }           /* ライト島の安全網 */
  /* スケルトン/イン耐性バー軌道/レーダー周辺 */
  #score-cards:empty, #compare-table:empty { background: #1f1f28; }
  .it-bar { background: #2a2a35; }
  .radar-head { background: var(--surface); }
  .radar-order-chip { background: #23232d; }
  .compare-table-head { background: var(--surface); }
  .ct-sec-reset-btn:hover { background: #2a2a35; }
  /* まくり系チップ/行/ベストマッチ地 */
  .makuri-scope-btn { background: #23232d; }
  .makuri-kim-seg { background: #23232d; }
  .makuri-winline { background: #1a1a21; }
  .best-match-alert { background: #241a3a; border-color: #4c3d7a; }
  /* 2026-08-09 本日の展開ベストマッチ一覧(トップ)。背景/枠/本文はトークンで暗転済み。
     紫の固定色だけ明るい紫へ持ち上げる(暗地での 4.5:1 確保)。 */
  .bm-today { border-left-color: #8f6fe0; }
  .bm-today-head, .bm-today-sig, .bm-today-more { color: #bda8f2; }
  /* 暗い下地では紺紫が沈むので、濃淡は明るい側(#a78bfa)の透過でつける */
  .bm-today-row.bm-t1 { background: rgba(167, 139, 250, .07); }
  .bm-today-row.bm-t2 { background: rgba(167, 139, 250, .14); }
  .bm-today-row.bm-t3 { background: rgba(167, 139, 250, .24); }
  .bm-today-count { background: #6b4fc0; }
  .bm-list-link { color: #bda8f2; }
  /* 選手モーダル/級別チップ */
  .racer-modal-head { background: var(--surface); }
  .rm-bn-btn:hover:not([disabled]) { background: #2a2a35; }
  .racer-grade-A1, .racer-grade-A2, .racer-grade-B1, .racer-grade-B2 { background: #2a2a35; }
  .racer-grade-A1 { color: #e8c55a; }
  .racer-grade-B2 { color: #ff8fa0; }
  /* オススメ/実績ページの注記帯 */
  .rec-history-banner, .rec-info-note { background: #1a1a21; }
  .rec-info-note-good { background: #16341f; }
  .now-intro { background: #1a1a21; }
  .now-race-row.is-now::before { background: #2a2517; }
  .ct-drag-ghost { background: #23232d; border-color: #3a6aa8; }
  /* venue-tile の子: 背景を暗転しても残る「白text-shadow/濃色ステータス/白rgbaプレビュー」 */
  .venue-tile .v-name { text-shadow: none; }
  .venue-tile .v-races.status-live { color: #6ee7a0; }
  .venue-tile .v-races.status-upcoming { color: #8ab4e8; }
  .v-next-preview { background: #23232d; border-color: #3a3a45; }   /* rgba(255,255,255,.85)を暗転 */
  .featured-tour-link { color: #e8c55a; }
  .tour-card:hover { border-color: #b8860b; }
  /* 選手モーダル下部ナビ: グラデ上端の rgba(245,248,252,.8) がダークでも明るく継承文字が沈む */
  .racer-modal-bottom-nav { background: linear-gradient(180deg, #23232d 0%, #16161c 100%); }

  /* ============================================================
     2026-07-17: チャート類のダーク対応 (ユーザー指摘「レーダーが見づらい」)。
     SVGの色は presentation属性 (stroke="#..") なのでCSSが必ず勝つ。
     問題の核: 1号艇=#777(灰)・2号艇=#222(ほぼ黒) が暗背景で消える。
     ============================================================ */
  /* レーダー: グリッド/軸/ラベル (CSSクラス定義の上書き) */
  .radar-svg .radar-grid { stroke: #33333d; }
  .radar-svg .radar-axis { stroke: #45454f; }
  .radar-svg .radar-label { fill: #c3c8d0; }
  .radar-svg .radar-label-sub { fill: #8b919b; }
  .radar-svg .radar-label.radar-label-stale { fill: #5a5a66; }
  /* レーダー: 艇別ポリゴン/ドット — 1号艇(白艇)は明灰白、2号艇(黒艇)は中明灰へ */
  .radar-poly[data-souban="1"] { stroke: #eceff4; fill: #eceff4; }
  .radar-dot[data-souban="1"]  { fill: #eceff4; }
  .radar-poly[data-souban="2"] { stroke: #9aa1ae; fill: #9aa1ae; }
  .radar-dot[data-souban="2"]  { fill: #9aa1ae; }
  .radar-poly[data-souban="4"] { stroke: #5f92e8; fill: #5f92e8; }
  .radar-dot[data-souban="4"]  { fill: #5f92e8; }
  /* 凡例ドット/枠順ストリップのバッジ (inline style なので !important が必要) */
  .radar-legend-item[data-souban="1"] .rl-dot { background: #eceff4 !important; }
  .radar-legend-item[data-souban="2"] .rl-dot { background: #9aa1ae !important; }
  .radar-legend-item .rl-dot { box-shadow: 0 0 0 1px rgba(255,255,255,.22); }
  .radar-order-chip[data-souban="1"] .roc-badge { background: #eceff4 !important; color: #16161c !important; }
  .radar-order-chip[data-souban="2"] .roc-badge { background: #4a505b !important; box-shadow: 0 0 0 1px #7a8290; }
  /* 全チャート共通 (時系列/スパークライン/選手ページSVG/コース棒):
     ハードコード16進を属性セレクタで暗色系に差し替え */
  svg rect[fill="#fafbfd"] { fill: #16161c; }
  /* review3: 選手ページ推移グラフの「勝率」(既定タブ)は紺 #1e3a5f をインラインで焼き込んでおりダークで 1.5:1 */
  svg [stroke="#1e3a5f"] { stroke: #8ab4e8; }
  svg text[fill="#1e3a5f"] { fill: #8ab4e8; }
  .rcr-chart-mean-badge[style*="#1e3a5f"] { border-left-color: #8ab4e8 !important; }
  .rcr-mean-val[style*="#1e3a5f"] { color: #8ab4e8 !important; }
  /* review3: 2号艇(黒)のバッジがダークで背景に溶けていた → 全部品に薄い輪郭 */
  .rr-souban-badge, .po-lane, .sc-lane, .ct-souban-badge, .racer-chip-num, .now-sb-dot, .tp-lane, .tw-lane { box-shadow: 0 0 0 1px rgba(255,255,255,.22); }
  .featured-venues-title { color: var(--accent); }
  .score-help { background: #2c5488; }
  .hint-card .body a { color: inherit; }
  svg [stroke="#e5e9f0"] { stroke: #33333d; }
  svg [stroke="#f1f4f9"], svg [stroke="#f0f3f8"] { stroke: #26262e; }
  svg [stroke="#cbd5e1"] { stroke: #4a4a56; }
  svg [stroke="#94a3b8"] { stroke: #6a7280; }
  svg [stroke="#ddd"] { stroke: #3a3a45; }
  svg text[fill="#6b7280"] { fill: #b7bcc4; }
  svg text[fill="#9ca3af"], svg text[fill="#888"] { fill: #a2a8b2; }
  svg [stroke="#777"] { stroke: #b9c0ca; }
  svg [fill="#777"]   { fill: #b9c0ca; }
  svg [stroke="#222"] { stroke: #9aa1ae; }
  svg [fill="#222"]   { fill: #9aa1ae; }
  svg [stroke="#2e6cd0"] { stroke: #5f92e8; }
  svg [fill="#2e6cd0"]   { fill: #5f92e8; }
}

/* FV帯 — ヒーローより上に置く「今日変わるもの」。モバイル375px基準 */
.yday-strip{display:flex;gap:8px;align-items:stretch;margin:10px 0;}
.yday-strip .yday-main{flex:1;min-width:0;display:block;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--radius, 10px);
  padding:9px 12px;text-decoration:none;color:var(--text);
  font-size:12.5px;line-height:1.55;box-shadow:var(--shadow-sm);}
.yday-strip .yday-main b{color:var(--primary);font-variant-numeric:tabular-nums;}
.yday-strip .yday-more{opacity:.75;font-size:11.5px;white-space:nowrap;}
.yday-strip .yday-today{flex:0 0 auto;display:flex;flex-direction:column;
  justify-content:center;gap:2px;background:var(--bg-soft);
  border:1px solid var(--border);border-radius:var(--radius, 10px);
  padding:8px 10px;font-size:11px;color:var(--text);text-align:center;}
.yday-strip .yday-today b{font-size:13.5px;font-variant-numeric:tabular-nums;}
.yday-strip .yday-tmrw{flex:0 0 auto;display:flex;align-items:center;
  background:var(--bg-soft);border:1px solid var(--border);
  border-radius:var(--radius, 10px);padding:8px 10px;font-size:11.5px;
  color:var(--text);text-decoration:none;white-space:nowrap;}
/* 会場データハブ(会場恒久ページ内) */
.venue-hub{margin:14px 0;}
.venue-hub h2{font-size:15px;margin:0 0 8px;}
.venue-hub .vh-row{font-size:12.5px;line-height:1.7;margin:4px 0;}
.venue-hub .vh-row b{font-variant-numeric:tabular-nums;}
.venue-hub .vh-links{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.venue-hub .vh-links a{font-size:12px;padding:5px 9px;background:var(--bg-soft);
  border:1px solid var(--border);border-radius:999px;text-decoration:none;
  color:var(--text);}

.tw-h2{font-size:16px;margin:22px 0 8px;color:var(--primary);display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;}
.tw-h2 small{font-size:12px;color:var(--text-3);font-weight:400;}
.tw-day-h{font-size:14px;margin:14px 0 6px;color:var(--text);display:flex;align-items:baseline;gap:8px;}
.tw-day-h small{font-size:11.5px;color:var(--text-3);font-weight:400;}
.tw-table td,.tw-table th{padding:6px 7px;font-size:12.5px;white-space:nowrap;vertical-align:middle;}
.tw-table .tw-name{font-weight:700;}
.tw-table .tw-name a{color:inherit;text-decoration:none;border-bottom:1px dashed var(--border);}
/* 2026-09-08 (オーナー指摘): 詳細ページが残っている行だけリンク。見た目で分かるようにする。 */
.tw-table .tw-race-link{color:var(--primary);font-weight:700;text-decoration:none;}
.tw-table .tw-race-link .tw-race-name{text-decoration:underline;text-underline-offset:2px;}
.tw-table .tw-race-link .tw-go{margin-left:3px;font-weight:800;}
.tw-table .tw-race-link:hover .tw-race-name{text-decoration-thickness:2px;}
.tw-table .tw-race-off{color:var(--text-3);}
.tw-table .tw-grade{font-size:11px;color:var(--text-3);margin-left:3px;}
.tw-lane{width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;
  font-weight:700;font-size:13px;box-shadow:0 1px 2px rgba(0,0,0,.15) inset,0 1px 2px rgba(0,0,0,.08);}
.tw-badge{display:inline-block;font-size:11px;padding:1px 7px;border-radius:999px;border:1px solid var(--border);
  background:var(--bg-soft);color:var(--text-2);line-height:1.6;}
.tw-badge.tw-out{color:var(--text-3);border-style:dashed;}
.tw-badge.tw-posted{background:#e8f4ec;border-color:#9fd3b0;color:#1f6b3a;}
.tw-badge.tw-pre{background:#eef4fb;border-color:#b9cde6;color:#2b4f80;}
.tw-win{font-weight:700;color:#8a4b00;background:#fff3e0;border:1px solid #f3c27a;border-radius:6px;padding:1px 6px;}
.tw-thumb{display:inline-block;width:40px;height:50px;border-radius:4px;object-fit:cover;border:1px solid var(--border);
  vertical-align:middle;background:#0b2145;}
.tw-note{font-size:12px;color:var(--text-3);margin:6px 0 0;line-height:1.6;}
.tw-empty{font-size:13px;color:var(--text-2);padding:10px 12px;background:var(--bg-soft);border:1px dashed var(--border);
  border-radius:8px;margin:6px 0;}
.tw-month{margin:8px 0;} .tw-month summary{cursor:pointer;font-weight:700;color:var(--primary);padding:6px 0;font-size:14px;}
.tw-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:8px 0;}
.tw-stat{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:10px 6px;text-align:center;}
.tw-stat b{display:block;font-size:20px;color:var(--primary);font-variant-numeric:tabular-nums;}
.tw-stat span{font-size:11px;color:var(--text-3);}
.tw-home-row{margin:4px 0 12px;display:flex;gap:8px;flex-wrap:wrap;}
@media (prefers-color-scheme: dark){
  .tw-badge.tw-posted{background:#173322;color:#9fd3b0;border-color:#2f6b45;}
  .tw-badge.tw-pre{background:#1c2a40;color:#b9cde6;border-color:#3a5a88;}
  .tw-win{background:#3a2a10;color:#f3c27a;border-color:#8a6a2a;}
}
/* 2026-09-08 レース詳細(結果セクション .rr-slot)の跳ね上げチップ。中立色(艇番色に合わせない)・10px・
   375px の3列スロット(内側≈88px)では「チルト3.0」と「跳ね上げ」が2段に折り返す(グリッド幅は変えない)。 */
.tilt-chip{display:inline-flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:0 3px;
  margin-top:5px;padding:2px 6px;max-width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:999px;
  background:var(--bg-soft);color:var(--text-2);font-size:10px;line-height:1.3;font-weight:500;
  cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;}
.tilt-chip b{font-weight:700;font-variant-numeric:tabular-nums;}
.tilt-chip small{font-size:10px;}
.tilt-chip::after{content:'?';font-size:8px;font-weight:800;line-height:1;color:var(--text-3);margin-left:1px;
  position:relative;top:-.4em;}
.tilt-chip:hover,.rr-slot.tilt-open .tilt-chip{background:#1f2937;color:#fff;border-color:#1f2937;}
.rr-slot.tilt-open .tilt-chip::after{color:rgba(255,255,255,.8);}
.tilt-chip:focus-visible{outline:2px solid var(--primary);outline-offset:1px;}
.tilt-pop{display:none;position:absolute;left:0;top:calc(100% + 6px);z-index:82;
  background:#1f2937;color:#fff;font-size:var(--fs-note);font-weight:500;line-height:1.7;text-align:left;
  word-break:normal;overflow-wrap:break-word;line-break:normal;
  padding:9px 12px;border-radius:8px;width:max-content;max-width:min(290px,calc(100vw - 24px));white-space:normal;
  box-shadow:0 6px 18px rgba(0,0,0,.28);}
.rr-slot.tilt-open{z-index:81;}   /* rr-rank-1 の transform が作る stacking context でも隣スロットより上に */
.rr-slot.tilt-open .tilt-pop{display:block;}
.tilt-pop-line{display:block;}
.tilt-pop-line:first-child{font-weight:700;}
.tilt-pop-note{display:block;font-size:10.5px;color:rgba(255,255,255,.72);margin-top:5px;line-height:1.5;}
.tilt-pop-links{display:flex;gap:12px;margin-top:5px;}
.tilt-pop a{color:#ffd66b;font-weight:700;text-decoration:underline;text-underline-offset:2px;}
/* 比較表の「跳ね上げ時の記録」セクション見出しの色(2026-09-14 からは数値行。トグル/パネル用のCSSは撤去) */
.compare-table .ct-section-row[data-section="tilt"] .ct-section{border-left-color:#8b5cf6;}
/* 会場ページのレース一覧: 跳ね上げ艇がいた(結果入り)レースの印 */
.race-tilt-flag{flex-shrink:0;font-size:13px;line-height:1;margin-right:6px;}
