/* ═══════════════════════════════════════
   天才ボートくん — Design System v2
   ═══════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  /* Brand */
  --navy-900: #0a1528;
  --navy-800: #0f1e3c;
  --navy-700: #1a2d52;
  --navy-600: #243d6a;
  --navy-50: #f4f6fa;

  /* Accent */
  --accent-700: #b42e14;
  --accent-600: #c7351a;
  --accent-500: #e8401c;
  --accent-400: #f06040;
  --accent-100: #fde8e4;

  /* Functional */
  --success-700: #15532d;
  --success-600: #166534;
  --success-500: #22c55e;
  --success-100: #dcfce7;
  --info-700: #1e3a8a;
  --info-600: #1e40af;
  --info-500: #3b82f6;
  --info-100: #dbeafe;
  --warn-600: #92400e;
  --warn-100: #fef3c7;
  --purple-700: #5b21b6;
  --purple-600: #6d28d9;
  --purple-100: #ede9fe;
  --rose-700: #9f1239;
  --rose-600: #be123c;
  --rose-100: #ffe4e6;

  /* Neutrals */
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;

  /* Waku */
  --waku-1-bg: #f0f0f0; --waku-1-text: #333;
  --waku-2-bg: #1a1a1a; --waku-2-text: #fff;
  --waku-3-bg: #dc2626; --waku-3-text: #fff;
  --waku-4-bg: #1d4ed8; --waku-4-text: #fff;
  --waku-5-bg: #eab308; --waku-5-text: #333;
  --waku-6-bg: #16a34a; --waku-6-text: #fff;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 100px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}


/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--info-600); text-decoration: none; transition: color .15s; }
a:hover { color: var(--info-700); }

img { max-width: 100%; display: block; }


/* ─── Layout ─── */
.container { max-width: 1060px; margin: 0 auto; padding: 0 16px; }


/* ─── Header ─── */
.site-header {
  background: var(--navy-900);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--accent-500);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .3px;
}
.site-logo:hover { text-decoration: none; opacity: .92; }
.logo-mark { flex-shrink: 0; }
.logo-text { color: var(--white); }
.logo-ai { color: var(--accent-400); }

.site-nav { display: flex; align-items: center; gap: 14px; }
.nav-link {
  color: rgba(255,255,255,.8);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: var(--white); text-decoration: none; }
.nav-date { color: rgba(255,255,255,.45); font-size: 12px; font-weight: 400; }


/* ─── Footer ─── */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,.45);
  text-align: center;
  padding: 28px 0;
  margin-top: 56px;
  font-size: 12px;
  line-height: 1.7;
}
.footer-brand {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255,255,255,.6);
  margin-bottom: 10px;
  letter-spacing: .5px;
}
.footer-warn { margin-bottom: 8px; max-width: 520px; margin-left: auto; margin-right: auto; }
.footer-copy { color: rgba(255,255,255,.25); }


/* ─── Main ─── */
.site-main { padding: 24px 0 56px; min-height: 60vh; }


/* ─── Breadcrumb ─── */
.breadcrumb { font-size: 12px; color: var(--gray-400); margin-bottom: 16px; }
.breadcrumb a { color: var(--gray-400); font-weight: 400; }
.breadcrumb a:hover { color: var(--info-600); }
.breadcrumb span { color: var(--gray-600); }


/* ─── Page Header ─── */
.page-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--gray-200); }
.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 4px;
  letter-spacing: -.2px;
}
.page-title small {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 400;
  margin-left: 10px;
}
.page-subtitle { color: var(--gray-500); font-size: 13px; font-weight: 400; }


/* ─── Date Nav ─── */
.date-nav { display: flex; gap: 8px; align-items: center; justify-content: center; margin-bottom: 20px; }
.date-arrow {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--navy-700);
  border: none;
  font-size: 16px;
  color: var(--white);
  font-weight: 700;
  transition: all .2s var(--ease-out);
  flex-shrink: 0;
}
.date-arrow:hover { background: var(--navy-800); text-decoration: none; color: var(--white); }
.date-arrow.disabled { background: var(--gray-300); pointer-events: none; }
.date-picker-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 2px solid var(--navy-700);
  border-radius: 8px;
  padding: 6px 16px;
}
.date-label { font-size: 14px; font-weight: 700; color: var(--navy-800); white-space: nowrap; }
.date-picker-input {
  font-size: 15px; font-weight: 700;
  color: var(--navy-800);
  border: none; outline: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}


/* ─── Ad Slot ─── */
.ad-slot { margin: 0; overflow: hidden; height: 0; transition: height .3s, margin .3s; }
.ad-slot.ad-loaded { height: auto; margin: 20px 0; }
.ad-placeholder {
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  text-align: center;
  padding: 24px;
  color: var(--gray-400);
  font-size: 12px;
}


/* ─── AI Performance Banner (compact) ─── */
.ai-perf-banner {
  background: linear-gradient(135deg, #0f1a2e 0%, #1a2744 100%);
  border-radius: 12px;
  border: 1px solid rgba(100,150,255,.15);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.ai-perf-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.ai-perf-header-icon {
  width: 22px; height: 22px;
  color: #f97316;
  display: flex;
  align-items: center;
}
.ai-perf-header-icon svg { width: 22px; height: 22px; }
.ai-perf-header-text {
  font-size: 15px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .5px;
}
.ai-perf-header-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.08);
  padding: 2px 8px;
  border-radius: 10px;
}
.ai-perf-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.ai-perf-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.ai-perf-card-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  margin-bottom: 6px;
  letter-spacing: .5px;
}
.ai-perf-card-num {
  margin-bottom: 4px;
}
.ai-perf-card-big {
  font-size: 32px;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.ai-perf-card-slash {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.4);
  margin-left: 2px;
}
.ai-perf-card-rate {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 8px;
}
.ai-perf-card-tenbo .ai-perf-card-rate { color: #f97316; }
.ai-perf-card-odds .ai-perf-card-rate { color: #38bdf8; }
.ai-perf-card-bar {
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  overflow: hidden;
}
.ai-perf-card-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .6s ease;
}
.ai-perf-bar-tenbo { background: linear-gradient(90deg, #f97316, #fb923c); }
.ai-perf-bar-odds { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }

.ai-perf-30d {
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ai-perf-30d-title {
  font-size: 10px;
  color: rgba(255,255,255,.4);
  font-weight: 700;
  background: rgba(255,255,255,.08);
  padding: 2px 8px;
  border-radius: 4px;
}
.ai-perf-30d-item {
  font-size: 12px;
  color: rgba(255,255,255,.55);
}
.ai-perf-30d-item strong { color: var(--white); font-weight: 800; }
.ai-perf-30d-sep { font-size: 10px; color: rgba(255,255,255,.15); }

@media (max-width: 640px) {
  .ai-perf-banner { padding: 12px 14px; margin-bottom: 10px; }
  .ai-perf-header { margin-bottom: 10px; }
  .ai-perf-header-text { font-size: 13px; }
  .ai-perf-cards { gap: 8px; }
  .ai-perf-card { padding: 10px 8px; }
  .ai-perf-card-big { font-size: 26px; }
  .ai-perf-card-rate { font-size: 16px; }
  .ai-perf-card-label { font-size: 10px; }
  .ai-perf-30d { gap: 4px; }
  .ai-perf-30d-item { font-size: 11px; }
}


/* ─── 24 Venue Grid (Dark Style) ─── */
.venue-grid-24 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}
.vg-card {
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: all .2s var(--ease-out);
  position: relative;
}

/* 開催中カード */
.vg-active {
  background: #1c2538;
  border: 1px solid rgba(100,140,220,.25);
}
.vg-active:hover {
  border-color: rgba(100,160,255,.5);
  box-shadow: 0 4px 20px rgba(30,80,180,.2);
  text-decoration: none;
  transform: translateY(-2px);
}

/* 非開催カード */
.vg-inactive {
  background: #2a2f3e;
  border: 1px solid rgba(255,255,255,.06);
}
.vg-inactive .vg-header {
  background: #3a3f50;
  padding: 10px 8px 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.vg-inactive .vg-body-empty {
  padding: 22px 8px;
  min-height: 50px;
}
.vg-inactive .vg-name { color: rgba(255,255,255,.45); font-size: 15px; font-weight: 800; }

/* 矢印アイコン (>) */
.vg-arrow {
  color: rgba(255,255,255,.3);
  font-size: 14px;
  font-weight: 700;
}
.vg-active:hover .vg-arrow { color: rgba(255,255,255,.6); }

/* ヘッダー (グレード左端absolute + 会場名カード全幅中央) */
.vg-header {
  background: linear-gradient(135deg, #2e4a7a 0%, #3d6098 100%);
  padding: 8px 6px 7px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vg-header .vg-grade { position: absolute; left: 5px; z-index: 1; }
.vg-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 1px;
  text-align: center;
}
.vg-arrow { position: absolute; right: 5px; }

/* ボディ */
.vg-body {
  padding: 10px 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.vg-day {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
}
.vg-done {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,.4);
}
.vg-live {
  font-size: 15px;
  font-weight: 900;
  color: #f97316;
  text-shadow: 0 0 8px rgba(249,115,22,.3);
}

/* 締切間近 */
.vg-closing {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1f1a 100%);
  border-color: #f97316;
  box-shadow: 0 0 12px rgba(249,115,22,.4), inset 0 0 20px rgba(249,115,22,.08);
  animation: vg-pulse 2s ease-in-out infinite;
}
.vg-closing .vg-header {
  background: linear-gradient(135deg, #7c2d12 0%, #c2410c 100%);
}
@keyframes vg-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(249,115,22,.3), inset 0 0 15px rgba(249,115,22,.05); }
  50%      { box-shadow: 0 0 20px rgba(249,115,22,.55), inset 0 0 25px rgba(249,115,22,.12); }
}
.vg-closing-text {
  font-size: 13px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251,191,36,.4);
}

/* フッター (グレード + アイコン + 的中) */
.vg-footer {
  padding: 5px 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-left: -2px;
}
.vg-grade {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .5px;
}
.vg-grade-ippan { background: rgba(255,255,255,.15); color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.25); }
.vg-grade-sg  { background: #f59e0b; color: #fff; }
.vg-grade-g1  { background: #ef4444; color: #fff; }
.vg-grade-g2  { background: #3b82f6; color: #fff; }
.vg-grade-g3  { background: #22c55e; color: #fff; }
.vg-tz-icon { font-size: 16px; }
.vg-hits {
  font-size: 12px;
  font-weight: 800;
  color: #f97316;
}

/* Venue Grid モバイル（ベーススタイルの後に配置） */
@media (max-width: 640px) {
  .venue-grid-24 { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .vg-header { padding: 5px 4px; }
  .vg-header .vg-grade { font-size: 7px; padding: 1px 3px; left: 3px; }
  .vg-name { font-size: 13px; letter-spacing: 0; }
  .vg-arrow { display: none; }
  .vg-body { padding: 5px 4px 4px; }
  .vg-day { font-size: 11px; }
  .vg-done { font-size: 10px; }
  .vg-live { font-size: 11px; }
  .vg-closing-text { font-size: 10px; }
  .vg-card { min-height: 80px; }
  .vg-inactive .vg-header { padding: 7px 4px; }
  .vg-inactive .vg-name { font-size: 13px; }
  .vg-inactive .vg-body-empty { flex: 1; padding: 8px 4px; min-height: unset; }
}


/* ─── Race Detail Tabs ─── */
.race-tabs {
  display: flex;
  gap: 0;
  background: var(--navy-800);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.race-tab {
  flex: 1;
  padding: 12px 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
  border-bottom: 3px solid transparent;
}
.race-tab:hover { color: rgba(255,255,255,.8); }
.race-tab-active {
  color: var(--white);
  border-bottom-color: #f97316;
  background: rgba(255,255,255,.08);
}
.race-tab-content { display: none; }
.race-tab-show { display: block; }


/* ─── Icon Legend (collapsible) ─── */
.icon-legend {
  margin-bottom: 24px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  overflow: hidden;
}
.icon-legend-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  list-style: none;
}
.icon-legend-toggle::-webkit-details-marker { display: none; }
.icon-legend-chevron {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-400);
  transition: transform .2s;
}
.icon-legend[open] .icon-legend-chevron { transform: rotate(90deg); }
.icon-legend-body {
  padding: 0 16px 16px;
}
.icon-legend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 16px;
}
@media (max-width: 480px) {
  .icon-legend-grid { grid-template-columns: repeat(2, 1fr); }
}
.il-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-600);
}
.il-icon { font-size: 18px; }


/* ─── Badges (common) ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-pred { background: rgba(255,255,255,.12); color: rgba(180,200,255,.9); }
.badge-result { background: rgba(255,255,255,.12); color: rgba(160,240,176,.9); }


/* ─── Venue Count Note ─── */
.venue-count-note {
  text-align: center;
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 700;
  margin-bottom: 16px;
  padding: 8px 0;
}

/* ─── Venue Grid (Top page) ─── */
.venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.venue-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow .2s var(--ease-out), transform .2s var(--ease-out);
}
.venue-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.venue-card-header {
  padding: 12px 16px 10px;
  background: var(--navy-50);
  border-left: 4px solid var(--navy-800);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.venue-header-left { display: flex; flex-direction: row; align-items: center; gap: 6px; }
.venue-name { font-size: 16px; font-weight: 800; color: var(--navy-800); display: flex; align-items: center; gap: 6px; }
.venue-name a { color: var(--navy-800); }
.venue-name a:hover { text-decoration: none; opacity: .8; }
.grade-badge {
  display: inline-flex; align-items: center;
  padding: 1px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .5px;
}
.grade-sg  { background: #fef3c7; color: #92400e; }
.grade-g1  { background: #fde8e4; color: #b42e14; }
.grade-g2  { background: #dbeafe; color: #1e40af; }
.grade-g3  { background: #dcfce7; color: #166534; }
.timezone-badge {
  display: inline-flex; align-items: center;
  padding: 1px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
  background: var(--gray-100); color: var(--gray-600);
}
.venue-title-bar {
  padding: 6px 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
  font-size: 12px;
}
.venue-event-title {
  color: var(--gray-700); font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.venue-period { color: var(--gray-400); font-size: 11px; white-space: nowrap; }
.venue-progress { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }


/* ─── Race List (Top page items) ─── */
.race-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 10px 10px; }
.race-item {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 4px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  border: 1px solid var(--gray-200);
  transition: all .15s var(--ease-out);
  background: var(--white);
  min-width: 0;
  overflow: hidden;
}
.race-item:hover {
  text-decoration: none;
  background: var(--navy-50);
  border-color: var(--navy-700);
  box-shadow: var(--shadow-xs);
}
.race-no { font-weight: 800; color: var(--gray-800); font-size: 13px; flex-shrink: 0; }
.race-time { color: var(--gray-400); font-size: 11px; font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.race-status-label { font-size: 9px; white-space: nowrap; margin-left: auto; font-weight: 700; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; }

.race-item.status-result { background: var(--success-100); border-color: #a7f3d0; }
.race-item.status-result .race-status-label { color: var(--success-600); }
.race-item.status-predicted { background: var(--info-100); border-color: #93c5fd; }
.race-item.status-predicted .race-status-label { color: var(--info-600); }
.race-item.status-before { background: var(--warn-100); border-color: #fde68a; }
.race-item.status-before .race-status-label { color: var(--warn-600); }
.race-item.status-entry .race-status-label { color: var(--gray-400); }
.race-item.status-waiting .race-status-label { color: var(--gray-300); }


/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s var(--ease-out);
  text-align: center;
  border: none;
  gap: 6px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn-venue {
  background: var(--navy-800);
  color: var(--white);
  width: 100%;
  font-weight: 700;
}
.btn-venue:hover { background: var(--navy-700); color: var(--white); }

.btn-detail {
  background: var(--navy-800);
  color: var(--white);
  font-size: 13px;
}
.btn-detail:hover { background: var(--navy-700); color: var(--white); }

.venue-card-footer { padding: 10px 14px 14px; }


/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 64px 20px; color: var(--gray-500); }
.empty-icon {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  background: var(--gray-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-icon svg { width: 24px; height: 24px; }
.empty-note { font-size: 13px; margin-top: 8px; color: var(--gray-400); }


/* ─── Site About ─── */
.site-about {
  margin-top: 48px;
  padding: 28px 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}
.site-about h2 {
  font-size: 17px;
  margin-bottom: 20px;
  color: var(--navy-800);
  font-weight: 800;
  padding-left: 14px;
  border-left: 4px solid var(--accent-500);
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.about-item { padding: 0 4px; }
.about-icon {
  width: 40px; height: 40px;
  margin-bottom: 10px;
  background: var(--navy-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-icon svg { width: 20px; height: 20px; color: var(--navy-800); }
.about-item h3 { font-size: 14px; margin-bottom: 6px; color: var(--gray-800); font-weight: 800; }
.about-item p { font-size: 13px; color: var(--gray-500); line-height: 1.7; }

/* ─── 会場解説セクション ─── */
.venue-info-section {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}
.venue-info-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 4px solid var(--accent-500);
}
.venue-info-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--gray-600);
}

/* ─── 静的ページ (About / Logic / Results) ─── */
.static-page-content {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  padding: 28px 24px;
  margin-top: 16px;
}
.sp-section { margin-bottom: 28px; }
.sp-section:last-child { margin-bottom: 0; }
.sp-section h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 4px solid var(--accent-500);
}
.sp-section p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 8px;
}
.sp-section ul {
  padding-left: 20px;
  margin: 8px 0;
}
.sp-section li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 4px;
}
.sp-note { font-size: 12px; color: var(--gray-400); }

/* 的中実績テーブル */
.results-table-wrap { overflow-x: auto; }
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.results-table th {
  background: var(--navy-800);
  color: var(--white);
  padding: 8px 10px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.results-table td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.results-table tbody tr:hover { background: var(--navy-50); }
.rt-month { font-weight: 700; color: var(--navy-800); text-align: left !important; }
.rt-rate { font-weight: 700; }
.rt-rate-good { color: #059669; }
.rt-rate-ok { color: var(--navy-800); }
.rt-payout { color: var(--accent-500); font-weight: 700; }

/* フッターリンク */
.footer-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.footer-links a {
  color: var(--gray-400);
  font-size: 12px;
  text-decoration: none;
  transition: color .2s;
}
.footer-links a:hover { color: var(--white); }


/* ─── Venue Page: Race Cards ─── */
.race-cards { display: flex; flex-direction: column; gap: 14px; }
.race-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: box-shadow .2s var(--ease-out);
}
.race-card:hover { box-shadow: var(--shadow-md); }

.race-card-header {
  padding: 12px 16px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.race-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.race-no-badge {
  background: var(--navy-800);
  color: var(--white);
  padding: 3px 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 14px;
}
.race-time-badge { color: var(--gray-600); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.race-name-small { color: var(--gray-400); font-size: 12px; }

.race-status-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}
.badge-result { background: var(--success-100); color: var(--success-600); }
.badge-before { background: var(--warn-100); color: var(--warn-600); }
.badge-predicted { background: var(--purple-100); color: var(--purple-700); }
.badge-entry { background: var(--gray-100); color: var(--gray-600); }
.badge-waiting { background: var(--gray-100); color: var(--gray-400); }


/* ─── Result Bar (Venue page) ─── */
.result-bar {
  padding: 10px 16px;
  background: var(--success-100);
  border-bottom: 1px solid #bbf7d0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.result-combo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 18px;
  font-weight: 800;
  color: var(--success-700);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}
.result-payout { color: var(--success-600); font-weight: 700; }
.hit-badge {
  background: var(--accent-500);
  color: var(--white);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
}
.hit-chuana { background: var(--purple-600); }
.hit-ana { background: var(--rose-700); }


/* ─── Prediction Summary (Venue cards) ─── */
.pred-summary { padding: 12px 16px; }
.stable-rate-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stable-label { font-size: 11px; color: var(--gray-500); white-space: nowrap; font-weight: 700; }
.stable-bar-outer { flex: 1; height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.stable-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-800), var(--info-500));
  border-radius: 3px;
  transition: width .4s var(--ease-out);
}
.stable-value { font-size: 12px; font-weight: 800; color: var(--navy-800); white-space: nowrap; }

.buy-targets { display: flex; gap: 6px; flex-wrap: wrap; }
.buy-item { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-sm); }
.buy-item.honmei { background: var(--info-100); }
.buy-item.chuana { background: var(--purple-100); }
.buy-item.ana { background: var(--rose-100); }
.buy-label { font-size: 10px; font-weight: 800; color: var(--gray-500); }
.buy-combo {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
}
.buy-more {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  margin-left: 2px;
}

.race-card-footer { padding: 10px 16px 14px; }


/* ─── Race Detail Page ─── */
.section {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  padding: 20px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 4px solid var(--accent-500);
  display: flex;
  align-items: center;
  gap: 8px;
}


/* ─── Result Banner ─── */
.result-banner {
  background: var(--navy-800);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.result-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.result-content { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.result-combo-large {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 5px;
  background: rgba(255,255,255,.1);
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-variant-numeric: tabular-nums;
}
.result-payouts { display: flex; flex-wrap: wrap; gap: 8px; }
.payout-item {
  font-size: 13px;
  background: rgba(255,255,255,.08);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.8);
}
.payout-item strong { color: var(--white); }
.hit-announcement {
  font-size: 16px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251,191,36,.12);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251,191,36,.3);
}


/* ─── Result Section (Redesigned) ─── */
.result-section {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  margin-bottom: 16px;
  overflow: hidden;
}
.result-header {
  background: var(--navy-800);
  color: var(--white);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.result-header-title {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.result-status-badge {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  font-weight: 700;
}
.result-hit-bar {
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  color: #b45309;
  background: rgba(251,191,36,.12);
  padding: 10px 16px;
  border-bottom: 1px solid rgba(251,191,36,.25);
  animation: pulse-glow 1.5s ease-in-out 3;
}

/* Two-column result tables */
.result-tables-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.result-order-wrap {
  padding: 12px 16px 16px;
  border-right: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, #1a3a5c 0%, #1e4a6e 30%, #1a4060 100%);
  position: relative;
}
.result-order-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(255,255,255,.04) 28px, rgba(255,255,255,.04) 29px);
  pointer-events: none;
}
.result-payout-wrap {
  padding: 12px 16px 16px;
}

/* Finishing Order Table */
.result-order-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.result-order-table th {
  padding: 6px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.6);
  border-bottom: 2px solid rgba(255,255,255,.15);
}
.result-order-table th:last-child { text-align: left; }
.result-order-table td {
  padding: 8px 8px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.result-rank-cell {
  font-weight: 800;
  font-size: 16px;
  color: rgba(255,255,255,.9);
  width: 36px;
}
.result-rank-1 .result-rank-cell { color: #f97316; }
.result-waku-cell { width: 44px; }
.result-name-cell {
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  color: rgba(255,255,255,.95);
  padding-left: 12px;
  white-space: nowrap;
}
.result-boat-cell { width: 80px; padding: 4px 0; }
.result-boat-icon { height: 32px; width: auto; object-fit: contain; }
.result-st-cell {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255,255,255,.9);
  width: 50px;
  text-align: right;
  padding-right: 12px;
  font-family: 'Courier New', monospace;
}
.st-flying { color: #ef4444; font-weight: 900; }
.st-late { color: #f59e0b; font-weight: 900; }
.result-racer-name { display: block; }
.result-race-time { display: block; font-size: 11px; color: rgba(255,255,255,.5); font-weight: 500; }
.result-technique-cell {
  font-size: 12px; font-weight: 800; color: rgba(255,255,255,.7);
  white-space: nowrap; text-align: right; padding-right: 8px;
}
.result-rank-fl td { opacity: .6; }
.result-rank-incident { color: #ef4444; font-weight: 900; }
.result-rank-4 .result-rank-cell,
.result-rank-5 .result-rank-cell,
.result-rank-6 .result-rank-cell { color: var(--gray-500); font-size: 14px; }
.result-rank-4 td, .result-rank-5 td, .result-rank-6 td { border-bottom: 1px solid var(--gray-100); }
.result-time-cell { font-size: 12px; color: var(--gray-500); font-family: 'Courier New', monospace; }

/* 着順テーブル 明るい版 (水面背景なし) */
.result-order-light {
  background: var(--white) !important;
  padding: 12px 16px 16px;
  border-right: 1px solid var(--gray-200);
}
.result-order-light::before { display: none !important; }
.result-order-light .result-order-table th {
  color: var(--gray-500);
  border-bottom: 2px solid var(--gray-200);
}
.result-order-light .result-order-table td {
  border-bottom: 1px solid var(--gray-100);
}
.result-order-light .result-rank-cell { color: var(--navy-800); }
.result-order-light .result-rank-1 .result-rank-cell { color: var(--accent-500); }
.result-order-light .result-name-cell { color: var(--gray-800); }
.result-order-light .result-st-cell { color: var(--gray-700); }
.result-order-light .result-technique-cell { color: var(--gray-600); }
.result-order-light .result-race-time { color: var(--gray-500); }

/* ─── スタート情報パネル (水面背景) ─── */
.start-info-panel {
  margin-top: 0;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}
.exh-start-panel {
  margin-top: 16px;
  border-radius: 12px;
}
.start-info-title {
  background: var(--navy-800);
  color: rgba(255,255,255,.8);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
}
.start-info-water {
  background: linear-gradient(180deg, #1a3a5c 0%, #1e4a6e 30%, #1a4060 100%);
  padding: 16px 16px 20px;
  position: relative;
}
.start-line-label {
  position: absolute;
  top: 4px;
  right: calc(30% - 40px);
  font-size: 10px;
  color: rgba(255,255,255,.35);
  letter-spacing: 1px;
}
.start-boat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.start-boat-row:last-child { margin-bottom: 0; }
.start-course-num {
  width: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,.6);
}
.start-boat-lane {
  flex: 1;
  height: 40px;
  position: relative;
}
.start-line {
  position: absolute;
  right: 30%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,.25);
  border-right: 1px dashed rgba(255,255,255,.15);
}
.start-boat-pos {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: right .3s;
}
.start-boat-img { height: 30px; width: auto; }
.start-st-val {
  width: 42px;
  text-align: right;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,.9);
}

/* Payout Table */
.result-payout-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.result-payout-table th {
  padding: 6px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  border-bottom: 2px solid var(--gray-200);
}
.result-payout-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--gray-100);
}
.payout-label-cell {
  font-weight: 800;
  color: var(--navy-800);
  width: 56px;
  font-size: 12px;
  text-align: center;
}
.payout-combo-cell { text-align: center; }
.payout-combo-inner {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.combo-sep {
  color: var(--gray-400);
  font-weight: 700;
  font-size: 12px;
  margin: 0 1px;
}
.payout-amount-cell {
  font-weight: 800;
  color: var(--accent-600);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.payout-pop-cell {
  text-align: center;
  font-weight: 700;
  color: var(--navy-700);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 13px;
}
.payout-pop-cell small {
  font-size: 10px;
  font-weight: 500;
  color: var(--gray-500);
  margin-left: 1px;
}

/* 払戻サブ行（拡連複2行目以降・複勝2行目） */
.payout-sub-row .payout-label-cell { border-top: none; padding-top: 0; }
.payout-sub-row td { border-top: none; padding-top: 2px; }

/* 返還行 */
.payout-refund-row td { border-top: 1px dashed var(--gray-200); }
.payout-refund-cell {
  font-weight: 700;
  color: #dc2626;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── 水面気象情報 ─── */
.result-weather-panel {
  margin-top: 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 14px 16px;
}
.result-weather-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 10px;
}
.result-weather-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.rw-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rw-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 600;
}
.rw-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy-800);
}
.rw-wind-arrow {
  display: inline-block;
  font-size: 14px;
  color: #3b82f6;
  margin-left: 2px;
}

/* Small waku badge (for payout combos) */
.waku-badge-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 3px;
  font-weight: 800;
  font-size: 11px;
}
.waku-badge-sm.waku-color-1 { background: var(--waku-1-bg); color: var(--waku-1-text); border: 2px solid #ccc; }
.waku-badge-sm.waku-color-2 { background: var(--waku-2-bg); color: var(--waku-2-text); }
.waku-badge-sm.waku-color-3 { background: var(--waku-3-bg); color: var(--waku-3-text); }
.waku-badge-sm.waku-color-4 { background: var(--waku-4-bg); color: var(--waku-4-text); }
.waku-badge-sm.waku-color-5 { background: var(--waku-5-bg); color: var(--waku-5-text); }
.waku-badge-sm.waku-color-6 { background: var(--waku-6-bg); color: var(--waku-6-text); }


/* ─── Race Incidents (Flying/Late/Absent) ─── */
.race-incident {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 4px;
  font-weight: 700;
}
.incident-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 800;
  border-radius: var(--radius-sm);
  color: white;
}
.incident-flying { background: #ef4444; }
.incident-late { background: #f97316; }
.incident-absent { background: #6b7280; }
.incident-refund { background: #f59e0b; color: #000; }

/* ─── Entries Table ─── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entries-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.entries-table th {
  background: var(--navy-800);
  color: var(--white);
  padding: 9px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}
.entries-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--gray-100);
  text-align: center;
  transition: background .1s;
}
.entries-table tbody tr:hover td { background: var(--navy-50); }
.entries-table tr.focus-player td { background: #fffbeb; }

.waku-cell { width: 38px; }
.waku-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  color: var(--white);
  font-size: 13px;
}
.waku-color-1 { background: var(--waku-1-bg); color: var(--waku-1-text); border: 2px solid #ccc; }
.waku-color-2 { background: var(--waku-2-bg); }
.waku-color-3 { background: var(--waku-3-bg); }
.waku-color-4 { background: var(--waku-4-bg); }
.waku-color-5 { background: var(--waku-5-bg); color: var(--waku-5-text); }
.waku-color-6 { background: var(--waku-6-bg); }

.th-name { min-width: 120px; }
.name-cell { text-align: left; min-width: 120px; white-space: nowrap; }
.racer-name { font-weight: 700; font-size: 14px; color: var(--gray-800); }
.racer-sub { font-size: 11px; color: var(--gray-400); }
.num-cell { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--gray-700); }
.st-cell { font-weight: 800; font-family: 'Courier New', monospace; }
/* 連対率 2段表示 */
.dual-rate-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.3;
}
.dual-rate-cell .rate-2 { font-size: 12px; font-weight: 700; color: var(--gray-700); }
.dual-rate-cell .rate-3 { font-size: 11px; color: var(--gray-400); }
.best-time { color: var(--accent-500); font-weight: 800; }
.no-data { color: var(--gray-400); text-align: center; padding: 24px; }

.class-badge { padding: 2px 6px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 800; }
.class-A1 { background: var(--warn-100); color: var(--warn-600); }
.class-A2 { background: var(--info-100); color: var(--info-600); }
.class-B1 { background: var(--purple-100); color: var(--purple-700); }
.class-B2 { background: var(--gray-100); color: var(--gray-600); }


/* ─── Prediction Section ─── */
.phase-note {
  background: var(--warn-100);
  border-left: 3px solid #f59e0b;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--warn-600);
  margin-bottom: 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.stable-rate-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.stable-rate-label {
  font-size: 13px;
  color: var(--navy-800);
  font-weight: 800;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stable-rate-desc { font-size: 12px; color: var(--gray-500); font-weight: 400; }
.stable-rate-bar-wrap { margin-bottom: 4px; }
.stable-rate-bar-outer { height: 22px; background: var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; }
.stable-rate-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-800), var(--info-500));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  min-width: 40px;
  transition: width .5s var(--ease-out);
}

/* 3-Pattern Predictions */
.predictions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.pred-card {
  border-radius: var(--radius-md);
  padding: 16px;
  border-left: 4px solid;
  background: var(--white);
  box-shadow: var(--shadow-xs);
}
.pred-honmei { border-left-color: var(--info-500); background: #f8faff; }
.pred-chuana { border-left-color: var(--purple-600); background: #faf8ff; }
.pred-ana { border-left-color: var(--rose-600); background: #fff8f8; }

.pred-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pred-type-badge { font-weight: 800; font-size: 15px; }
.pred-honmei .pred-type-badge { color: var(--info-600); }
.pred-chuana .pred-type-badge { color: var(--purple-600); }
.pred-ana .pred-type-badge { color: var(--rose-600); }
.pred-odds-level {
  font-size: 10px;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

.pred-buy {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.pred-honmei .pred-buy { color: var(--info-700); }
.pred-chuana .pred-buy { color: var(--purple-700); }
.pred-ana .pred-buy { color: var(--rose-700); }

/* 6-point buy list */
.pred-buy-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
/* When EV items present, switch to single column */
.pred-buy-list:has(.pred-buy-item-ev) {
  grid-template-columns: 1fr;
}
.pred-buy-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 6px 8px;
  background: rgba(0,0,0,.03);
  border-radius: var(--radius-sm);
  text-align: center;
}
.pred-honmei .pred-buy-item { color: var(--info-700); }
.pred-chuana .pred-buy-item { color: var(--purple-700); }
.pred-ana .pred-buy-item { color: var(--rose-700); }
.pred-buy-item:first-child {
  font-size: 19px;
  background: rgba(0,0,0,.06);
}

.pred-desc { font-size: 12px; color: var(--gray-500); line-height: 1.7; }

.pred-generated-at { font-size: 11px; color: var(--gray-400); text-align: right; margin-top: 6px; }

/* Total investment note */
.pred-total-note {
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 700;
  margin-bottom: 16px;
  padding: 8px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}


/* ─── Narrative ─── */
.pred-narrative {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--navy-800);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin-top: 18px;
  line-height: 1.9;
}
.pred-narrative p {
  font-size: 14px;
  color: var(--gray-700);
  margin-bottom: 10px;
}
.pred-narrative p:last-child { margin-bottom: 0; }
.narrative-heading {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy-800);
  margin: 18px 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--accent-500);
}
.narrative-heading:first-child { margin-top: 0; }


/* ─── Prediction Pending ─── */
.pred-pending { text-align: center; padding: 40px 20px; color: var(--gray-500); }
.pending-icon {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pending-icon svg { width: 24px; height: 24px; color: var(--gray-400); }


/* ─── Generate Buttons ─── */
.btn-generate {
  background: var(--accent-500);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  padding: 14px 36px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 16px;
  transition: all .2s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-generate:hover { background: var(--accent-600); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-generate:disabled { background: var(--gray-300); cursor: wait; transform: none; box-shadow: none; }
.btn-generate.generating { background: var(--gray-500); }

.btn-regenerate {
  background: transparent;
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
}
.btn-regenerate:hover { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }
.btn-regenerate:disabled { border-color: var(--gray-200); color: var(--gray-300); cursor: wait; }
.btn-regenerate.generating { border-color: var(--gray-300); color: var(--gray-400); }

.pred-actions { margin-top: 18px; text-align: right; }

.generate-error {
  color: var(--accent-600);
  font-size: 13px;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--accent-100);
  border-radius: var(--radius-sm);
  border: 1px solid #fecaca;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ─── EV (Expected Value) Badges ─── */
.pred-buy-item-ev {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(0,0,0,.03);
  border-radius: var(--radius-sm);
}
.pred-buy-item-ev:first-child {
  background: rgba(0,0,0,.06);
}
.pred-buy-combo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 52px;
}

.pred-buy-odds {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ev-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: .3px;
}
.ev-badge.ev-positive { background: var(--success-100); color: var(--success-700); }
.ev-badge.ev-neutral { background: var(--warn-100); color: var(--warn-600); }
.ev-badge.ev-negative { background: var(--accent-100); color: var(--accent-700); }
.ev-badge.ev-unknown { background: var(--gray-100); color: var(--gray-500); }


/* ─── EV Summary (Recommendation) ─── */
.ev-summary {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 18px;
  margin-bottom: 16px;
}
.ev-summary-section { margin-bottom: 16px; }
.ev-summary-section:last-of-type { margin-bottom: 8px; }

.ev-summary-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid;
}
.ev-title-positive { color: var(--success-700); border-left-color: var(--success-500); }
.ev-title-negative { color: var(--accent-700); border-left-color: var(--accent-500); }

.ev-combo-list { display: flex; flex-direction: column; gap: 6px; }
.ev-combo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  font-size: 13px;
}
.ev-combo-name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  color: var(--navy-800);
  min-width: 52px;
}
.ev-combo-pattern {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.ev-pattern-本命 { background: var(--info-100); color: var(--info-700); }
.ev-pattern-中穴 { background: var(--purple-100); color: var(--purple-700); }
.ev-pattern-穴 { background: var(--rose-100); color: var(--rose-700); }

.ev-combo-detail {
  font-size: 11px;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  white-space: nowrap;
}
.ev-note {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 10px;
  line-height: 1.5;
}


/* ─── Before Info (Collapsible) ─── */
.beforeinfo-section { padding: 0; }
.beforeinfo-details { }
.beforeinfo-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.beforeinfo-summary::-webkit-details-marker { display: none; }
.beforeinfo-summary .section-title { margin-bottom: 0; }

.beforeinfo-toggle-icon {
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}
.beforeinfo-toggle-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--gray-400);
  border-bottom: 2px solid var(--gray-400);
  transform: translate(-50%, -65%) rotate(45deg);
  transition: transform 0.2s var(--ease-out);
}
details[open] > .beforeinfo-summary .beforeinfo-toggle-icon::before {
  transform: translate(-50%, -35%) rotate(-135deg);
}

.beforeinfo-body { padding: 0 20px 20px; }

.beforeinfo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.beforeinfo-table th {
  background: var(--navy-800);
  color: var(--white);
  padding: 8px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}
.beforeinfo-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--gray-100);
  text-align: center;
}
.beforeinfo-table tbody tr:hover td { background: var(--navy-50); }

.flying-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-500);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
}

/* ─── Weather Grid (Redesigned) ─── */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.weather-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 10px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-align: center;
  transition: box-shadow .15s var(--ease-out);
}
.weather-card:hover { box-shadow: var(--shadow-sm); }
.weather-card-icon {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--info-100);
  color: var(--info-600);
  padding: 6px;
}
.weather-card-icon svg { width: 100%; height: 100%; }
.weather-icon-temp { background: var(--accent-100); color: var(--accent-600); }
.weather-icon-water { background: #e0f2fe; color: #0284c7; }
.weather-icon-wind { background: var(--gray-100); color: var(--gray-600); }
.weather-icon-wave { background: #e0f2fe; color: #0369a1; }
.weather-card-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: .3px;
}
.weather-card-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.weather-card-value small {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  margin-left: 1px;
}


/* ─── Odds ─── */
.odds-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.odds-item {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
}
.odds-combo { font-weight: 800; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.odds-value { color: var(--accent-500); font-weight: 800; }
.odds-note { font-size: 11px; color: var(--gray-400); }


/* ─── Race Nav ─── */
.race-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-nav {
  background: var(--gray-50);
  color: var(--navy-800);
  font-size: 13px;
  border: 1px solid var(--gray-200);
  font-weight: 700;
}
.btn-nav:hover { background: var(--gray-200); color: var(--navy-800); }
.btn-nav-center {
  background: var(--navy-800);
  color: var(--white);
  flex: 1;
  font-weight: 700;
}
.btn-nav-center:hover { background: var(--navy-700); color: var(--white); }


/* ─── Card Appear Animation ─── */
.card-animate {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.card-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ─── Hit announcement pulse ─── */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
  50% { box-shadow: 0 0 16px 4px rgba(251,191,36,.3); }
}
.hit-announcement { animation: pulse-glow 1.5s ease-in-out 3; }


/* ─── Responsive ─── */
@media (max-width: 768px) {
  .page-title { font-size: 19px; }
  .venue-grid { grid-template-columns: 1fr; }
  .predictions-grid { grid-template-columns: 1fr; }
  .result-content { flex-direction: column; align-items: flex-start; }
  .result-combo-large { font-size: 28px; }
  .pred-buy { font-size: 22px; }
  .pred-buy-item { font-size: 15px; }
  .pred-buy-item:first-child { font-size: 17px; }
  .pred-buy-list { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .pred-buy-item-ev { gap: 4px; padding: 5px 6px; }
  .pred-buy-combo { font-size: 14px; min-width: 44px; }
  .ev-combo-item { flex-wrap: wrap; gap: 4px; padding: 6px 8px; }
  .ev-combo-detail { margin-left: 0; }
  .ev-summary { padding: 14px 14px; }
  .result-tables-wrap { grid-template-columns: 1fr; }
  .weather-grid { grid-template-columns: repeat(3, 1fr); }
  .result-order-wrap { border-right: none; border-bottom: 1px solid var(--gray-200); padding: 12px 14px; }
  .result-payout-wrap { padding: 12px 14px; }
  .result-header { padding: 10px 14px; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .header-inner { height: 48px; }
  .site-logo { font-size: 16px; gap: 8px; }
  .logo-mark { width: 20px; height: 20px; }
  .page-title { font-size: 17px; }
  .entries-table { font-size: 11px; }
  .entries-table th, .entries-table td { padding: 6px 5px; }
  .pred-buy { font-size: 20px; }
  .result-combo-large { font-size: 24px; letter-spacing: 3px; }
  .pred-narrative { padding: 14px 16px; }
  .stable-rate-bar-inner { font-size: 11px; }
  .result-order-table { font-size: 13px; }
  .result-payout-table { font-size: 12px; }
  .waku-badge-sm { width: 20px; height: 20px; font-size: 10px; }
  .beforeinfo-table { font-size: 11px; width: 100%; }
  .beforeinfo-table th, .beforeinfo-table td { padding: 5px 2px; }
  .beforeinfo-table .name-cell { font-size: 10px; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .beforeinfo-body { padding: 0 2px 10px; }
  .weather-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .weather-card { padding: 8px 4px 6px; }
  .weather-card-icon { width: 26px; height: 26px; padding: 5px; }
  .weather-card-value { font-size: 15px; }
  .beforeinfo-summary { padding: 12px 14px; }
  .section { padding: 16px 14px; }
  .btn-generate { padding: 12px 24px; font-size: 14px; }
  .race-number-nav { grid-template-columns: repeat(4, 1fr); }
  .race-list { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════════════════════════════════
   オッズ展開予想
   ═══════════════════════════════════════ */

.odds-pred-section {
  margin-top: 0;
}

.odds-pred-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin: -6px 0 12px;
}

.threshold-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: 8px;
  font-size: 13px;
}

.threshold-label {
  color: var(--gray-600);
  white-space: nowrap;
}

.threshold-input {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
  background: #fff;
}

.threshold-input-sm {
  width: 48px;
}

.btn-threshold {
  padding: 5px 14px;
  background: var(--info-500);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-threshold:hover {
  opacity: 0.85;
}

.odds-fetching-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
  background: var(--gray-50);
  border-radius: 8px;
  margin: 8px 0;
}
.odds-reload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  background: var(--navy-800);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.odds-reload-btn:hover {
  background: var(--navy-700);
}

.odds-hit {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.tenbo-hit {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.pred-buy-item-ev.combo-hit {
  background: rgba(16, 185, 129, 0.15);
  border-radius: 6px;
  padding: 2px 4px;
}

/* 推定的中率カード */
.coverage-rate-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy-50);
  border: 2px solid var(--navy-600);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 14px;
}

.coverage-rate-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-600);
}

.coverage-rate-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy-800);
}

.coverage-rate-pts {
  font-size: 13px;
  color: var(--gray-500);
}

/* 軸ペアセクション */
.odds-axis-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.odds-axis-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 12px 14px;
}

.axis-pair-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.axis-pair-combo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.axis-odds {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-700);
}

.axis-count {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 600;
}

.axis-combos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.combo-odds-3t {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
  margin-left: 2px;
  white-space: nowrap;
}

/* ハイライト（閾値以下）*/
.odds-highlighted {
  background: var(--accent-100) !important;
  border-color: var(--accent-400) !important;
}

/* clickable summary */
.section-title.clickable {
  cursor: pointer;
  user-select: none;
}
.section-title.clickable:hover {
  color: var(--navy-600);
}

/* カバレッジテーブル */
.coverage-section {
  margin-top: 0;
}

.coverage-table-wrap {
  padding-top: 10px;
}

.coverage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.coverage-table th {
  background: var(--navy-50);
  padding: 8px 12px;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  color: var(--navy-600);
  border-bottom: 2px solid var(--gray-200);
}

.coverage-table td {
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
}

.coverage-pct {
  font-weight: 700;
  color: var(--navy-800);
}

.coverage-current {
  background: var(--accent-100);
  font-weight: 700;
}
.coverage-current td {
  border-color: var(--accent-400);
}


/* ═══════════════════════════════════════
   的中サマリーバナー（トップページ）
   ═══════════════════════════════════════ */
.daily-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 0;
}
.summary-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .15s;
}
.summary-card:hover { box-shadow: var(--shadow-md); }

.summary-icon-wrap {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-100);
  color: var(--accent-600);
  flex-shrink: 0;
  padding: 7px;
}
.summary-icon-wrap svg { width: 100%; height: 100%; }
.summary-icon-odds {
  background: var(--info-100);
  color: var(--info-600);
}
.summary-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.summary-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: .3px;
}
.summary-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy-800);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.summary-value small {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-400);
}
.summary-rate {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-500);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.summary-ai .summary-rate { color: var(--accent-500); }
.summary-odds .summary-rate { color: var(--info-600); }

/* 的中バッジ（会場カードヘッダー） */
.badge-hit {
  background: rgba(251,191,36,.15);
  color: #b45309;
}

/* 的中ドット（レースアイテム内） */
.race-hit-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
}
.hit-positive { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,.4); }
.hit-odds { background: #3b82f6; box-shadow: 0 0 4px rgba(59,130,246,.4); }
.hit-miss { background: var(--gray-300); }
.race-hit-double {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}
.race-hit-double .race-hit-dot {
  margin-left: 0;
}

/* 的中ドット凡例 */
.hit-dot-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 16px;
  font-size: 11px;
  color: var(--gray-500);
}
.hit-dot-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hit-dot-legend-item .race-hit-dot {
  margin-left: 0;
  width: 8px;
  height: 8px;
}


/* ═══════════════════════════════════════
   勝率ビジュアルバー（出走表）
   ═══════════════════════════════════════ */
.rate-cell {
  position: relative;
  min-width: 52px;
}
.rate-bar-bg {
  position: absolute;
  inset: 3px 4px;
  background: var(--gray-100);
  border-radius: 2px;
  overflow: hidden;
}
.rate-bar-fill {
  height: 100%;
  background: var(--gray-200);
  border-radius: 2px;
  transition: width .3s var(--ease-out);
}
.rate-bar-fill.rate-mid { background: var(--info-100); }
.rate-bar-fill.rate-high { background: var(--accent-100); }
.rate-text {
  position: relative;
  z-index: 1;
}


/* ═══════════════════════════════════════
   メダルバッジ（展示タイム順位）
   ═══════════════════════════════════════ */
.medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  color: var(--white);
}
.medal-gold { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 1px 3px rgba(245,158,11,.4); }
.medal-silver { background: linear-gradient(135deg, #9ca3af, #6b7280); box-shadow: 0 1px 3px rgba(107,114,128,.3); }
.medal-bronze { background: linear-gradient(135deg, #c2703a, #a35a2c); box-shadow: 0 1px 3px rgba(180,100,50,.3); }
.rank-top { font-weight: 800; }


/* ─── Responsive (additions) ─── */
@media (max-width: 768px) {
  .daily-summary { grid-template-columns: 1fr; }
  .summary-rate { font-size: 18px; }
}
@media (max-width: 480px) {
  .summary-card { padding: 10px 12px; gap: 8px; }
  .summary-icon-wrap { width: 30px; height: 30px; padding: 6px; }
  .summary-value { font-size: 17px; }
  .summary-rate { font-size: 16px; }
}

/* ─── Race Number Nav (1R-12R) ─── */
.race-number-nav {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  margin-bottom: 12px;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.race-num-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  font-size: 14px;
  font-weight: 700;
  background: #e8edf5;
  color: var(--navy-800);
  text-decoration: none;
  transition: background 0.15s;
}
.race-num-link:hover {
  background: var(--gray-200);
  text-decoration: none;
}
.race-num-active {
  background: #e08080;
  color: var(--white);
}
.race-num-active:hover {
  background: #d06060;
  color: var(--white);
}

/* ─── Filter Mode Tabs ─── */
.filter-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 8px;
}
.mode-tab {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  cursor: pointer;
  transition: background 0.15s;
}
.mode-tab:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.mode-tab:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: none;
}
.mode-tab-active {
  background: var(--navy-800);
  color: var(--white);
  border-color: var(--navy-800);
}
.threshold-sep {
  color: var(--gray-400);
  font-weight: 700;
  margin: 0 2px;
}
.filter-mode-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

/* ─── Combo Hit Marking ─── */
.combo-hit {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
  border: 2px solid #f59e0b !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}
.combo-hit-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
  background: #f59e0b;
  color: #fff;
  border-radius: 8px;
  margin-left: 4px;
}

/* ─── Responsive: Race Nav ─── */
@media (max-width: 480px) {
  .race-num-link {
    min-width: 28px;
    height: 28px;
    font-size: 11px;
  }
}


/* ═══════════════════════════════════════
   的中検証ページ
   ═══════════════════════════════════════ */
.verify-filter-section { padding: 20px 16px; }
.verify-form { max-width: 600px; }

.verify-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.verify-field { flex: 1; }
.verify-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.verify-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--white);
  color: var(--gray-800);
}
.verify-mode-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.verify-mode-tab {
  flex: 1;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  background: var(--white);
  color: var(--gray-500);
  border: none;
  transition: all .15s;
}
.verify-mode-tab.active {
  background: var(--navy-800);
  color: var(--white);
}
/* 日付チェックボックスリスト */
.verify-date-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.verify-date-check {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  background: var(--white);
  transition: all .15s;
  user-select: none;
}
.verify-date-check:hover:not(.disabled) {
  border-color: var(--info-500);
  background: var(--info-100);
}
.verify-date-check:has(input:checked) {
  border-color: var(--navy-800);
  background: var(--navy-50);
}
.verify-date-check.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.verify-date-check input[type="checkbox"] {
  accent-color: var(--navy-800);
  margin: 0;
  width: 14px;
  height: 14px;
}
.verify-date-text {
  font-weight: 600;
  color: var(--navy-800);
}
.verify-date-count {
  color: var(--gray-400);
  font-size: 10px;
  font-weight: 600;
}
.verify-date-check:has(input:checked) .verify-date-text {
  font-weight: 800;
}
.date-cell {
  white-space: nowrap;
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 600;
}

.verify-panel { margin-bottom: 16px; }
.verify-range-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.verify-range-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-800);
  min-width: 48px;
}
.verify-range-sep, .verify-range-unit {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
}
.verify-input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.verify-input:focus {
  outline: none;
  border-color: var(--info-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}
.btn-verify {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--navy-800);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background .2s;
}
.btn-verify:hover { background: var(--navy-700); }

/* サマリーカード */
.verify-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.verify-stat {
  text-align: center;
  padding: 16px 8px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}
.verify-stat.highlight {
  background: var(--info-100);
  border-color: #93c5fd;
}
.verify-stat.roi-plus {
  background: var(--success-100);
  border-color: #a7f3d0;
}
.verify-stat.roi-minus {
  background: var(--accent-50, #fff1f2);
  border-color: #fecaca;
}
.verify-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.verify-stat-value small {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
}
.verify-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  margin-top: 4px;
}

/* 投資/回収 */
.verify-money-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--navy-50);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.verify-money { text-align: center; }
.verify-money-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 2px;
}
.verify-money-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}
.verify-money-arrow {
  font-size: 18px;
  color: var(--gray-400);
}
.text-plus { color: var(--success-600); }
.text-minus { color: var(--accent-600); }

/* テーブル */
.subsection-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 10px;
}
.verify-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
  -webkit-overflow-scrolling: touch;
}
.verify-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.verify-table th {
  padding: 8px 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
.verify-table td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
  font-variant-numeric: tabular-nums;
}
.verify-table .venue-name-cell { text-align: left; font-weight: 700; }
.verify-table .venue-name-cell a { color: var(--navy-800); text-decoration: none; }
.verify-table .venue-name-cell a:hover { text-decoration: underline; }
.verify-table .payout-cell { text-align: right; font-weight: 700; }
.verify-table .result-combo-cell { white-space: nowrap; }

.verify-hit-row { background: var(--success-100); }
.verify-hit-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--success-500);
  color: var(--white);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}
.verify-miss-badge {
  color: var(--gray-300);
  font-size: 14px;
}
.verify-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--gray-400);
  font-size: 14px;
}

/* レスポンシブ */
@media (max-width: 480px) {
  .verify-summary { grid-template-columns: repeat(2, 1fr); }
  .verify-stat-value { font-size: 22px; }
  .verify-money-row { flex-direction: column; gap: 8px; }
  .verify-money-arrow { transform: rotate(90deg); }
  .verify-range-row { gap: 4px; }
  .verify-input { width: 56px; font-size: 13px; }
  .verify-table { font-size: 12px; }
  .verify-table th, .verify-table td { padding: 6px 6px; }
}

/* ─── Daily Results Section (トップページ結果一覧) ─── */
.daily-results-section { margin-top: 32px; }

.dr-venue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}
.dr-venue-card {
  background: var(--color-surface);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.dr-venue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(232,64,28,0.08) 0%, transparent 60%);
  user-select: none;
  list-style: none;
}
.dr-venue-header::-webkit-details-marker { display: none; }
.dr-venue-header::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
  flex-shrink: 0;
}
details[open] > .dr-venue-header::after {
  transform: rotate(-135deg);
}
.dr-venue-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-text);
}
.dr-venue-count {
  font-size: 11px;
  color: var(--color-text-muted);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 8px;
}
.dr-race-list {
  display: flex;
  flex-direction: column;
}
.dr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.dr-row:hover {
  background: rgba(255,255,255,0.03);
}
.dr-row-hit {
  background: rgba(239, 68, 68, 0.07);
}
.dr-row-hit:hover {
  background: rgba(239, 68, 68, 0.12);
}
.dr-rno {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 28px;
  text-align: center;
}
.dr-combo {
  display: flex;
  align-items: center;
  gap: 1px;
}
.dr-combo .waku-badge { width: 20px; height: 20px; font-size: 11px; }
.dr-combo .combo-sep { font-size: 10px; color: var(--color-text-muted); }
.dr-hit-badges {
  margin-left: auto;
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.dr-hit-badge,
.dr-hit-placeholder {
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.dr-payout {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}
.dr-row-manshuu .dr-payout {
  color: #f59e0b;
}
.dr-pop {
  font-size: 11px;
  color: var(--color-text-muted);
  min-width: 42px;
  text-align: right;
}
.dr-pop small { font-size: 10px; }
.dr-hit-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding: 2px 6px;
  border-radius: 9px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.dr-hit-tenbo {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.35);
}
.dr-hit-odds {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.35);
}
.dr-hit-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .dr-venue-grid { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 400px) {
  .dr-row { padding: 5px 10px; gap: 6px; }
  .dr-combo .waku-badge { width: 18px; height: 18px; font-size: 10px; }
  .dr-payout { font-size: 12px; }
  .dr-pop { font-size: 10px; min-width: 36px; }
}


/* ═══════════════════════════════════════
   予想印・AI信頼度・買い目アイコン
   ═══════════════════════════════════════ */

/* ─── 予想印 (◎◯▲△) ─── */
.mark-cell {
  width: 32px;
  text-align: center;
  padding: 2px 4px;
}
.yosou-mark {
  display: inline-block;
  font-weight: 900;
  line-height: 1;
}
.yosou-honmei {
  color: var(--accent-500);
  font-size: 20px;
}
.yosou-taikou {
  color: var(--info-600);
  font-size: 18px;
}
.yosou-ana {
  color: var(--purple-600);
  font-size: 16px;
}
.yosou-osaee {
  color: var(--gray-500);
  font-size: 15px;
}

/* ─── AI信頼度バッジ ─── */
.confidence-badge-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}
.confidence-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-weight: 800;
  flex-shrink: 0;
}
.confidence-grade {
  font-size: 20px;
  line-height: 1;
}
.confidence-label {
  font-size: 11px;
  font-weight: 700;
}
.confidence-S {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border: 1px solid #f59e0b;
}
.confidence-A {
  background: var(--info-100);
  color: var(--info-700);
  border: 1px solid var(--info-500);
}
.confidence-B {
  background: var(--success-100);
  color: var(--success-700);
  border: 1px solid var(--success-500);
}
.confidence-C {
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-300);
}
.confidence-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.confidence-context {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
}
.confidence-tag {
  font-size: 11px;
  color: var(--info-600);
  background: var(--info-100);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .confidence-badge-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 12px;
  }
  .confidence-grade { font-size: 18px; }
}

/* ─── 買い目 Driver アイコン ─── */
.pick-driver {
  font-size: 13px;
  flex-shrink: 0;
  cursor: help;
  opacity: 0.7;
  transition: opacity .15s;
}
.pick-driver:hover {
  opacity: 1;
}

/* pred-buy-item-ev に flex gap 追加（既存のflex layoutに統合） */
.pred-buy-item-ev {
  gap: 6px;
}

/* ─── AI注目穴目 ─── */
.ai-longshot-section {
  border-top: 2px dashed var(--gray-200);
  margin-top: 0;
  padding-top: 20px;
}

.ai-longshot-desc {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 14px;
}

.ai-longshot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-longshot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  transition: box-shadow .15s var(--ease-out);
}

.ai-longshot-item:hover {
  box-shadow: var(--shadow-sm);
}

.ai-longshot-item.combo-hit {
  background: #fef3c7;
  border-left-color: #d97706;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.ai-longshot-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
}

.ai-longshot-odds {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  font-variant-numeric: tabular-nums;
}

.ai-longshot-pop {
  font-size: 11px;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  white-space: nowrap;
}

.ai-longshot-reason {
  font-size: 11px;
  color: #b45309;
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
}

.ai-longshot-note {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 10px;
  text-align: center;
}

@media (max-width: 768px) {
  .ai-longshot-item {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }
  .ai-longshot-reason {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .ai-longshot-odds { font-size: 12px; }
  .ai-longshot-pop { font-size: 10px; }
}

/* ─── AI見立てボックス ─── */
.ai-mitate-box {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #86efac;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  align-items: flex-start;
}
.ai-mitate-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.ai-mitate-content {
  flex: 1;
  min-width: 0;
}
.ai-mitate-label {
  font-size: 11px;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.ai-mitate-text {
  font-size: 14px;
  color: #15803d;
  font-weight: 600;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .ai-mitate-box {
    padding: 10px 14px;
    gap: 8px;
  }
  .ai-mitate-icon { font-size: 20px; }
  .ai-mitate-text { font-size: 13px; }
}

/* ─── 予想メタ情報 ─── */
.pred-meta-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--gray-200);
  flex-wrap: wrap;
}
.pred-meta-item {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ─── 高額配当演出 (レースページ結果セクション) ─── */

/* ¥10,000+ amber */
.result-section.payout-nice {
  border-left: 4px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb, var(--white));
}

/* ¥20,000+ orange */
.result-section.payout-big {
  border-left: 4px solid #ea580c;
  background: linear-gradient(135deg, #fff7ed, var(--white));
}
.result-section.payout-big .payout-amount-cell {
  color: #ea580c;
  font-weight: 800;
}

/* ¥50,000+ gold + pulse */
.result-section.payout-jackpot {
  border-left: 4px solid #dc2626;
  background: linear-gradient(135deg, #fef3c7, #fde68a22);
  animation: jackpot-glow 2s ease-in-out infinite;
}
@keyframes jackpot-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.15); }
  50% { box-shadow: 0 0 16px 4px rgba(220, 38, 38, 0.1); }
}

/* 天ボくん的中バー — 高額演出 */
.tenbo-hit-big {
  background: linear-gradient(135deg, #f97316, #ea580c) !important;
  font-weight: 800;
}
.tenbo-hit-jackpot {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  font-weight: 800;
  font-size: 16px;
  animation: jackpot-pulse-bar 1.5s ease-in-out infinite;
}
@keyframes jackpot-pulse-bar {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* ─── 高額配当演出 (日次結果 dr-row) ─── */
.dr-row-big {
  background: #fff7ed !important;
  border-left: 3px solid #ea580c;
}
.dr-row-big .dr-payout {
  color: #ea580c;
  font-weight: 800;
}
.dr-row-jackpot {
  background: linear-gradient(135deg, #fef3c7, #fde68a44) !important;
  border-left: 3px solid #dc2626;
  animation: jackpot-glow 2s ease-in-out infinite;
}
.dr-row-jackpot .dr-payout {
  color: #dc2626;
  font-weight: 800;
  font-size: 15px;
}

/* ─── 高額配当演出 (venue.html) ─── */
.result-bar.payout-nice {
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
}
.result-bar.payout-big {
  border-left: 3px solid #ea580c;
  background: #fff7ed;
}
.result-bar.payout-big .result-payout,
.result-payout-big {
  color: #ea580c;
  font-weight: 800;
}
.result-bar.payout-jackpot {
  border-left: 3px solid #dc2626;
  background: linear-gradient(135deg, #fef3c7, #fde68a44);
  animation: jackpot-glow 2s ease-in-out infinite;
}

/* ─── 高額的中カード (トップページ) ─── */
.big-hits-section {
  margin-bottom: 24px;
}
.big-hits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.big-hit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
  text-align: center;
}
.big-hit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* hit-nice (¥5k-20k) */
.big-hit-card.hit-nice {
  background: #fffbeb;
  border: 1px solid #f59e0b;
}
.big-hit-card.hit-nice .big-hit-payout {
  color: #b45309;
}

/* hit-big (¥20k-50k) */
.big-hit-card.hit-big {
  background: #fff7ed;
  border: 1px solid #ea580c;
}
.big-hit-card.hit-big .big-hit-payout {
  color: #ea580c;
}

/* hit-jackpot (¥50k+) */
.big-hit-card.hit-jackpot {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #dc2626;
  animation: jackpot-glow 2s ease-in-out infinite;
}
.big-hit-card.hit-jackpot .big-hit-payout {
  color: #dc2626;
  font-size: 22px;
}

.big-hit-venue {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
}
.big-hit-payout {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.big-hit-combo {
  display: flex;
  align-items: center;
  gap: 2px;
}
.big-hit-pop {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 600;
}

@media (max-width: 480px) {
  .big-hits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .big-hit-card { padding: 12px 10px; }
  .big-hit-payout { font-size: 16px; }
}

/* ─── AI予想実績ダッシュボード ─── */
.ai-stats-section {
  margin-top: 24px;
  margin-bottom: 24px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-align: center;
}
.stat-card.stat-highlight {
  background: linear-gradient(135deg, #fef3c7, #fde68a22);
  border-color: #f59e0b;
}
.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-800);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-value small {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-align: center;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .stat-value { font-size: 20px; }
  .stat-card { padding: 14px 10px; }
}

/* ═══ AI予測勝率セクション ═══ */

.ai-winrate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.ai-winrate-desc {
  color: var(--gray-500);
  font-size: 12px;
}
.ai-confidence {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--navy-50);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}
.ai-confidence-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
}
.ai-confidence-stars {
  font-size: 14px;
  letter-spacing: 1px;
}
.ai-conf-5 { color: #ef4444; }
.ai-conf-4 { color: #f59e0b; }
.ai-conf-3 { color: #10b981; }
.ai-conf-2 { color: #6b7280; }
.ai-conf-1 { color: #9ca3af; }
.ai-confidence-text {
  font-size: 11px;
  font-weight: 800;
  color: var(--navy-800);
}
.ai-winrate-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-winrate-row {
  display: grid;
  grid-template-columns: 110px 1fr 140px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.ai-winrate-row:first-child {
  border: 2px solid #e8401c;
  background: #fef7f5;
}
.ai-winrate-boat {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-winrate-name {
  font-size: 12px;
  font-weight: 700;
  color: #1a2d52;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-winrate-bar-wrap {
  position: relative;
  height: 30px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
}
.ai-winrate-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease-out;
  min-width: 4px;
}
.waku-bar-1 { background: linear-gradient(90deg, #d4d4d4, #a3a3a3); }
.waku-bar-2 { background: linear-gradient(90deg, #404040, #1a1a1a); }
.waku-bar-3 { background: linear-gradient(90deg, #ef4444, #dc2626); }
.waku-bar-4 { background: linear-gradient(90deg, #3b82f6, #2563eb); }
.waku-bar-5 { background: linear-gradient(90deg, #facc15, #eab308); }
.waku-bar-6 { background: linear-gradient(90deg, #22c55e, #16a34a); }

.ai-winrate-pct {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 800;
  color: #1a2d52;
  text-shadow: 0 0 4px rgba(255,255,255,0.8);
}

/* 因子ミニバー */
.ai-winrate-factors {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.factor-mini {
  display: flex;
  align-items: center;
  gap: 4px;
}
.factor-mini-label {
  font-size: 10px;
  color: #64748b;
  width: 14px;
  text-align: center;
  font-weight: 800;
}
.factor-mini-bar {
  flex: 1;
  height: 7px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.factor-mini-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease-out;
}
.factor-power   { background: #e8401c; }
.factor-machine { background: #3b82f6; }
.factor-course  { background: #22c55e; }

/* 出走表内インラインバッジ */
.ai-winrate-cell { text-align: center; }
.ai-winrate-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
}
.ai-winrate-rank-1 {
  background: #fef3c7;
  color: #b45309;
}
.ai-winrate-rank-2 {
  background: #dbeafe;
  color: #1d4ed8;
}
.ai-winrate-rank-3 {
  background: #ede9fe;
  color: #6d28d9;
}

.ai-winrate-note {
  color: #94a3b8;
  font-size: 11px;
  margin-top: 12px;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .ai-winrate-row {
    grid-template-columns: 90px 1fr;
    gap: 6px;
    padding: 8px 10px;
  }
  .ai-winrate-factors {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 8px;
  }
  .factor-mini { flex: 1; }
  .ai-winrate-name { font-size: 11px; }
}
@media (max-width: 480px) {
  .ai-winrate-row { padding: 6px 8px; }
  .ai-winrate-bar-wrap { height: 24px; }
  .ai-winrate-pct { font-size: 13px; right: 6px; }
  .factor-mini-bar { height: 5px; }
}

/* ═══ 節間成績 Session Results (Light theme) ═══ */
.session-section {
  padding: 0;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
}
.session-section .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.session-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--white);
  color: var(--gray-800);
}

/* ─ Header ─ */
.session-table thead th {
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  background: var(--gray-50);
  white-space: nowrap;
  border-bottom: 2px solid var(--gray-200);
}
.ss-day-header {
  border-left: 2px solid var(--gray-200);
  letter-spacing: .5px;
  font-size: 12px;
  color: var(--navy-800);
}
.ss-today-header {
  background: rgba(59,130,246,.08) !important;
  color: var(--info-600) !important;
}

/* ─ Fixed left columns ─ */
.ss-fixed-col {
  background: var(--gray-50);
}
.ss-th-waku { width: 32px; }
.ss-th-name { width: 80px; text-align: left; padding-left: 6px !important; }
.ss-th-class { width: 32px; }
.ss-th-label { width: 22px; }

.ss-waku-cell {
  text-align: center;
  vertical-align: middle;
  padding: 2px;
}
.ss-name-cell {
  padding: 4px 4px;
  font-weight: 700;
  font-size: 12px;
  color: var(--navy-800);
  vertical-align: middle;
  white-space: nowrap;
  text-align: left;
}
.ss-class-cell {
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid var(--gray-200);
  padding: 2px;
}
.ss-label {
  padding: 2px 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  text-align: center;
  border-right: 1px solid var(--gray-200);
}

/* ─ Data cells ─ */
.ss-cell {
  padding: 3px 2px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  border-right: 1px solid var(--gray-100);
  min-width: 30px;
}
.ss-st {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-500);
}

/* Racer separator */
.ss-row-first td {
  border-top: 1px solid var(--gray-200);
}

/* ─ Course badges ─ */
.ss-course {
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 3px;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
}
.ss-course-1 { background: #fff; color: #111; border: 1px solid var(--gray-300); }
.ss-course-2 { background: #222; color: #fff; }
.ss-course-3 { background: #e74c3c; }
.ss-course-4 { background: #2980b9; }
.ss-course-5 { background: #f1c40f; color: #111; }
.ss-course-6 { background: #27ae60; }

/* ─ Rank colors ─ */
.ss-rank { font-weight: 800; font-size: 13px; }
.ss-rank-1 { color: #ea580c; }
.ss-rank-2 { color: #2563eb; }
.ss-rank-3 { color: #db2777; }
.ss-rank-4, .ss-rank-5, .ss-rank-6 { color: var(--gray-400); }
.ss-rank-fl { color: #ef4444; font-weight: 900; font-size: 12px; }

/* ─ Responsive ─ */
@media (max-width: 640px) {
  .session-table { font-size: 10px; }
  .ss-cell { font-size: 10px; padding: 2px 1px; min-width: 24px; }
  .ss-name-cell { font-size: 10px; padding: 3px 3px; }
  .ss-th-name { width: 52px; }
  .ss-th-waku { width: 26px; }
  .ss-th-class { width: 26px; }
  .ss-th-label { width: 18px; }
  .ss-course { width: 15px; height: 15px; line-height: 15px; font-size: 9px; }
  .ss-rank { font-size: 11px; }
  .ss-rank-fl { font-size: 10px; }
  .ss-day-header { font-size: 9px; padding: 4px 2px; }
  .ss-label { font-size: 9px; padding: 1px 1px; }
  .ss-st { font-size: 9px; }
  .session-table thead th { padding: 4px 2px; font-size: 9px; }
  .ss-waku-cell { padding: 1px; }
  .ss-class-cell { padding: 1px; }
}
