@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --bg-card: #ffffff;
  --border: #e3e8f2;
  --border-strong: #c0cae0;
  --text: #0f1733;
  --text-soft: #4a5578;
  --text-muted: #8088a0;

  /* Silk palette */
  --silk-yellow: #f1c40f;
  --silk-yellow-soft: #fbe390;
  --silk-blue: #1e4ea8;
  --silk-blue-soft: #4774c6;
  --silk-black: #1a1a1a;
  --silk-red: #c8102e;
  --silk-red-soft: #e23a52;
  --silk-white: #ffffff;
  --gray-id: #5b6770;
  --gray-id-soft: #7d8a94;
  --brown-id: #8b6f47;
  --brown-id-soft: #a98863;

  /* Accent: G1 logo blue */
  --accent: #0153ED;
  --accent-hover: #0040bf;
  --accent-soft-bg: rgba(1, 83, 237, 0.06);

  --row-zebra: #f7f9fd;
  --row-hover: #e8efff;
  --pill-idle: #f0f3fa;
  --pill-idle-border: #d4dbeb;
  --shadow-sm: 0 1px 2px rgba(1, 83, 237, 0.05);
  --shadow-md: 0 4px 16px rgba(1, 83, 237, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont,
    'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s, text-decoration-color 0.15s;
}
@media (hover: hover) {
  a:hover { color: var(--accent-hover); text-decoration: underline; }
}
a:active { opacity: 0.7; }

button { font-family: inherit; }

/* ─── Header stripe: solid gold line (v2 2026-05-14) ─── */
.silk-stripe {
  height: 4px;
  background: linear-gradient(to right,
    var(--v2-gold, #c9a961) 0%,
    var(--v2-gold-bright, #d4af37) 50%,
    var(--v2-gold, #c9a961) 100%);
}

/* ─── Silk SVG wrapper ─── */
.silk {
  display: inline-block;
  vertical-align: middle;
  line-height: 0;
  flex-shrink: 0;
}
.silk svg { display: block; width: 100%; height: 100%; }
.silk-xs { width: 14px; height: 14px; }
.silk-sm { width: 18px; height: 18px; }
.silk-md { width: 32px; height: 32px; }
.silk-lg { width: 88px; height: 88px; }

/* ─── Site header ─── */
.site-header {
  padding: 14px 24px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 60;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-logo-silks {
  display: flex;
  gap: 5px;
  padding: 6px 9px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.header-logo-silks .silk { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18)); }
.header-text { min-width: 0; flex: 1; }
.site-header h1 {
  margin: 0 0 3px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.site-header .lede {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
}
.last-updated { color: var(--text-muted); font-size: 11.5px; }

/* ─── Sticky status bar ─── */
.status-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 8px 24px;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

/* ─── Search bar (always visible, outside the collapsible filter) ─── */
.search-bar {
  display: flex;
  gap: 8px;
  padding: 10px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.search-bar input[type="search"] {
  font: inherit;
  font-size: 14.5px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  flex: 1;
  min-height: 36px;
}
.search-bar input[type="search"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}
.search-bar #reset {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  min-height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
@media (hover: hover) {
  .search-bar #reset:hover { background: var(--row-hover); }
}
.search-bar #reset:active { background: var(--border); }

/* ─── Filter wrap (collapsible on mobile) ─── */
.filters-wrap {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.filters-summary {
  display: none; /* PC: hidden; mobile: shown */
  list-style: none;
  cursor: pointer;
}
.filters-summary::-webkit-details-marker { display: none; }
.filters-summary::marker { display: none; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  padding: 12px 24px;
  align-items: flex-start;
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 4px 10px 4px 0;
}
.filter-group + .filter-group {
  border-left: 1px solid var(--border);
  padding-left: 16px;
}
.filter-group-selects { gap: 8px 14px; flex-wrap: wrap; }
.filter-label {
  font-size: 11.5px;
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-right: 4px;
  white-space: nowrap;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ─── Pill toggle ─── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--pill-idle);
  border: 1px solid var(--pill-idle-border);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 32px;
  user-select: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.05s;
  color: var(--text);
}
.pill input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
@media (hover: hover) {
  .pill:hover { background: #e6dfca; border-color: var(--border-strong); }
}
.pill:active { transform: scale(0.97); }

/* checked state via :has() with class fallback */
.pill:has(input:checked),
.pill.is-checked {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pill[data-color="farm-shadai"]:has(input:checked),
.pill[data-color="farm-shadai"].is-checked {
  background: #b8985c; color: #fff; border-color: #8a6d3b;
}
.pill[data-color="farm-shiraoi"]:has(input:checked),
.pill[data-color="farm-shiraoi"].is-checked {
  background: #506a73; color: #fff; border-color: #3c4a52;
}
.pill[data-color="farm-northern"]:has(input:checked),
.pill[data-color="farm-northern"].is-checked {
  background: #557a55; color: #fff; border-color: #3a5a3c;
}
.pill[data-color="farm-oiwake"]:has(input:checked),
.pill[data-color="farm-oiwake"].is-checked {
  background: #8a4d3e; color: #fff; border-color: #6e3f33;
}

.pill[data-color="club-shadai"]:has(input:checked),
.pill[data-color="club-shadai"].is-checked {
  background: var(--silk-yellow); color: #2b2200; border-color: #b89a0a;
}
.pill[data-color="club-sunday"]:has(input:checked),
.pill[data-color="club-sunday"].is-checked {
  background: var(--silk-black); color: #fff; border-color: var(--silk-black);
}
.pill[data-color="club-g1"]:has(input:checked),
.pill[data-color="club-g1"].is-checked {
  background: #2b0f15; color: #fff; border-color: var(--silk-red);
}
.pill[data-color="club-chuoow"]:has(input:checked),
.pill[data-color="club-chuoow"].is-checked {
  background: var(--gray-id); color: #fff; border-color: var(--gray-id);
}
.pill[data-color="club-chihoow"]:has(input:checked),
.pill[data-color="club-chihoow"].is-checked {
  background: var(--brown-id); color: #fff; border-color: var(--brown-id);
}

.pill[data-color="sex-male"]:has(input:checked),
.pill[data-color="sex-male"].is-checked {
  background: #2c4a78; color: #fff; border-color: #1f3a62;
}
.pill[data-color="sex-female"]:has(input:checked),
.pill[data-color="sex-female"].is-checked {
  background: #8a3a3a; color: #fff; border-color: #6a2929;
}

/* ─── Selects (sire / broodmare sire) ─── */
.select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filters select {
  font: inherit;
  font-size: 13.5px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background-color: #fff;
  color: var(--text);
  min-height: 36px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-soft) 50%),
                    linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.filters select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

/* ─── Table ─── */
.table-wrap {
  padding: 0;
  overflow-x: auto;
}
table#horses {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 14px;
}
table#horses thead th {
  background: #fcfaf3;
  text-align: left;
  padding: 10px 12px 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  white-space: nowrap;
  user-select: none;
  background-image:
    linear-gradient(to top,
      var(--silk-yellow) 0 33.3%,
      var(--silk-black) 33.3% 66.6%,
      var(--silk-red) 66.6% 100%);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: bottom;
  border-bottom: none;
  transition: background-color 0.12s;
}
table#horses thead th[data-sort] { cursor: pointer; }
@media (hover: hover) {
  table#horses thead th[data-sort]:hover {
    background-color: #f0e6c8;
    color: var(--text);
  }
}
table#horses thead th[data-sort]::after {
  content: " ⇅";
  color: #c9bb9c;
  font-size: 11px;
}
table#horses thead th.sort-asc,
table#horses thead th.sort-desc {
  background-color: var(--accent-soft-bg);
  color: var(--accent);
}
table#horses thead th.sort-asc::after { content: " ▲"; color: var(--accent); }
table#horses thead th.sort-desc::after { content: " ▼"; color: var(--accent); }
table#horses tbody td.col-sorted { background-color: var(--accent-soft-bg); }

table#horses tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table#horses tbody tr:nth-child(even) { background: var(--row-zebra); }
@media (hover: hover) {
  table#horses tbody tr:hover { background: var(--row-hover); }
}
table#horses tbody tr.hidden { display: none; }

/* Whole-cell link on PC for the name column */
table#horses td.cell-name { padding: 0; }
table#horses td.cell-name > a {
  display: block;
  padding: 9px 12px;
  font-weight: 700;
  color: var(--accent);
  min-height: 44px;
  line-height: 1.4;
}
@media (hover: hover) {
  table#horses td.cell-name > a:hover { background: var(--accent-soft-bg); text-decoration: none; }
}

.sex {
  display: inline-block;
  width: 1.6em;
  text-align: center;
  font-weight: 700;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 13px;
}
.sex-male { background: #dde5f0; color: #2c4a78; }
.sex-female { background: #f3dede; color: #8a3a3a; }

/* ─── Club tag (silk + label) ─── */
.club-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.club-tag.club-shadai  .club-label { color: #8a6900; }
.club-tag.club-sunday  .club-label { color: var(--silk-red); }
.club-tag.club-g1      .club-label { color: var(--silk-red); }
.club-tag.club-chuoow  .club-label { color: var(--gray-id); }
.club-tag.club-chihoow .club-label { color: var(--brown-id); }

/* ─── Farm badges ─── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.farm-shadai   { background: #efe5d0; color: #5b4a26; border-color: #d8c89b; }
.farm-shiraoi  { background: #e9eef0; color: #3c4a52; border-color: #c1cfd5; }
.farm-northern { background: #e3ecdf; color: #3a5a3c; border-color: #b8d2b6; }
.farm-oiwake   { background: #f0e3df; color: #6e3f33; border-color: #d8b3a8; }

.site-footer {
  padding: 14px 24px 24px;
  font-size: 11.5px;
  color: var(--text-soft);
}

/* ─── Horse detail page ─── */
.horse-page { background: var(--bg); }
.horse-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 0;
  box-shadow: var(--shadow-md);
}
.horse-header .back {
  margin: 0;
  padding: 12px 16px;
  font-size: 13.5px;
  background: var(--bg-soft);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.horse-header .back a { display: inline-block; padding: 4px 6px; }

.horse-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}
.silk-hero { filter: drop-shadow(0 4px 8px rgba(0,0,0,0.35)); }
.horse-hero .hero-text { flex: 1; min-width: 0; }
.horse-hero h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  line-height: 1.25;
  word-break: break-word;
  text-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.horse-hero h1 .sex { font-size: 16px; }
.horse-hero .badges {
  margin: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.horse-hero.club-shadai {
  background: linear-gradient(135deg, var(--silk-yellow) 0%, #f9d847 60%, #f1c40f 100%);
  color: #2b2200;
}
.horse-hero.club-shadai h1 { color: #2b2200; }
.horse-hero.club-shadai .badges .club-tag .club-label { color: #2b2200; }

.horse-hero.club-sunday {
  background:
    linear-gradient(135deg, rgba(200,16,46,0.18) 0%, rgba(200,16,46,0) 50%),
    linear-gradient(135deg, #1a1a1a 0%, #2c1416 100%);
  color: #fff;
}
.horse-hero.club-sunday h1 { color: #fff; }
.horse-hero.club-sunday .badges .club-tag .club-label { color: var(--silk-yellow); }

.horse-hero.club-g1 {
  background:
    linear-gradient(135deg, rgba(200,16,46,0.25) 0%, rgba(200,16,46,0) 55%),
    linear-gradient(135deg, #1a1a1a 0%, #3a0a14 100%);
  color: #fff;
}
.horse-hero.club-g1 h1 { color: #fff; }
.horse-hero.club-g1 .badges .club-tag .club-label { color: var(--silk-red-soft); }

.horse-hero.club-chuoow {
  background: linear-gradient(135deg, var(--gray-id) 0%, var(--gray-id-soft) 100%);
  color: #fff;
}
.horse-hero.club-chuoow h1 { color: #fff; }
.horse-hero.club-chuoow .badges .club-tag .club-label { color: #fff; }

.horse-hero.club-chihoow {
  background: linear-gradient(135deg, var(--brown-id) 0%, var(--brown-id-soft) 100%);
  color: #fff;
}
.horse-hero.club-chihoow h1 { color: #fff; }
.horse-hero.club-chihoow .badges .club-tag .club-label { color: #fff; }

.horse-hero .badge {
  background: rgba(255,255,255,0.92);
  color: #2b2620;
  border-color: rgba(255,255,255,0.5);
}
.horse-hero.club-shadai .badge { background: rgba(255,255,255,0.7); }

.horse-page section {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.horse-page section h2 {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
}

.info-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 640px;
  font-size: 15px;
}
.info-table th, .info-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.info-table th {
  width: 7em;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-weight: 700;
}

/* ─── External link cards ─── */
.link-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
}
.link-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  min-height: 44px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.link-card .link-card-title { font-size: 14.5px; }
.link-card .link-card-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}
@media (hover: hover) {
  .link-card:hover {
    background: #fcf6e1;
    border-color: var(--border-strong);
    text-decoration: none;
  }
}
.link-card:active { transform: scale(0.99); background: var(--row-hover); }

.note p {
  margin: 0;
  padding: 12px 14px;
  background: var(--bg-soft);
  border-left: 3px solid var(--silk-red);
  border-radius: 0 4px 4px 0;
}

.ai-eval .placeholder {
  margin: 0;
  padding: 22px;
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: 4px;
  color: var(--text-soft);
  text-align: center;
  font-size: 13.5px;
}

.horse-footer {
  padding: 16px 24px 28px;
  font-size: 13px;
}
.horse-footer .back-link {
  display: inline-block;
  padding: 10px 16px;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-soft);
}
@media (hover: hover) {
  .horse-footer .back-link:hover {
    background: var(--row-hover);
    text-decoration: none;
  }
}

/* ─── Mobile (≤ 720px) ─── */

  .info-table tr:last-child { border-bottom: none; }
  .info-table th {
    width: 100%;
    padding: 0 0 4px;
    font-size: 11.5px;
    background: transparent;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: none;
  }
  .info-table td {
    padding: 0;
    font-size: 15px;
    border-bottom: none;
  }

  .horse-footer { padding: 14px 14px 22px; }

  .site-footer { padding: 14px 14px 24px; }
}

/* ============================================================
   REDESIGN OVERRIDES — G1 logo blue (#0153ED) accent
   silk-* / 勝負服SVG / 各クラブカラーの色値は変更しない
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ─── Site header (white-base, logo-led) ─── */
.site-header {
  background: #ffffff;
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
.site-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 24px;
  margin-bottom: 14px;
}
.site-logo img {
  height: 96px;
  width: auto;
  display: block;
}
.site-header .header-inner {
  padding: 0 24px;
}
.site-header .lede {
  color: var(--text-soft);
  font-size: 14.5px;
}

/* ─── Search bar (rounded, accent focus) ─── */
.search-bar input[type="search"] {
  min-height: 48px;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 0 16px;
  background: #ffffff;
  font-size: 14.5px;
}
.search-bar input[type="search"]::placeholder {
  color: var(--text-muted);
}
.search-bar input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(1, 83, 237, 0.12);
}
.search-bar #reset {
  min-height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: #ffffff;
}

/* ─── Pills (idle/hover/checked) ─── */
.pill {
  background: var(--pill-idle);
  color: var(--text-soft);
  border: 1px solid var(--pill-idle-border);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
}
@media (hover: hover) {
  .pill:hover {
    background: var(--pill-idle);
    border-color: var(--accent);
    color: var(--accent);
  }
}
.pill:has(input:checked),
.pill.is-checked {
  background: var(--accent);
  color: #ffffff;
  border: 1.5px solid var(--accent);
  font-weight: 700;
}
@media (hover: hover) {
  .pill:has(input:checked):hover,
  .pill.is-checked:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #ffffff;
  }
}

/* Club-color pills: keep club identity via 4px left border on selected */
.pill[data-color="farm-shadai"]:has(input:checked),
.pill[data-color="farm-shadai"].is-checked {
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
  border-left: 4px solid #b8985c;
}
.pill[data-color="farm-shiraoi"]:has(input:checked),
.pill[data-color="farm-shiraoi"].is-checked {
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
  border-left: 4px solid #506a73;
}
.pill[data-color="farm-northern"]:has(input:checked),
.pill[data-color="farm-northern"].is-checked {
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
  border-left: 4px solid #557a55;
}
.pill[data-color="farm-oiwake"]:has(input:checked),
.pill[data-color="farm-oiwake"].is-checked {
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
  border-left: 4px solid #8a4d3e;
}
.pill[data-color="club-shadai"]:has(input:checked),
.pill[data-color="club-shadai"].is-checked {
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
  border-left: 4px solid var(--silk-yellow);
}
.pill[data-color="club-sunday"]:has(input:checked),
.pill[data-color="club-sunday"].is-checked {
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
  border-left: 4px solid var(--silk-black);
}
.pill[data-color="club-g1"]:has(input:checked),
.pill[data-color="club-g1"].is-checked {
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
  border-left: 4px solid var(--silk-red);
}
.pill[data-color="club-chuoow"]:has(input:checked),
.pill[data-color="club-chuoow"].is-checked {
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
  border-left: 4px solid var(--gray-id);
}
.pill[data-color="club-chihoow"]:has(input:checked),
.pill[data-color="club-chihoow"].is-checked {
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent);
  border-left: 4px solid var(--brown-id);
}

/* ─── Filters summary (mobile collapsible header) ─── */
.filters-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text);
}

/* ─── Selects: rounded blue focus ─── */
.filters select {
  border-radius: 10px;
  border: 1.5px solid var(--border-strong);
}
.filters select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(1, 83, 237, 0.12);
}

/* ─── Table card frame ─── */
.table-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin: 16px 24px 24px;
}
table#horses thead th {
  background: #ffffff;
  background-image: none;
  color: var(--text);
  font-weight: 700;
  padding: 14px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--accent);
}
@media (hover: hover) {
  table#horses thead th[data-sort]:hover {
    background-color: var(--accent-soft-bg);
    color: var(--accent);
  }
}
table#horses tbody td {
  padding: 14px;
  font-size: 14.5px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
table#horses tbody tr:nth-child(even) { background: var(--row-zebra); }
@media (hover: hover) {
  table#horses tbody tr:hover { background: var(--row-hover); }
}
table#horses td.cell-name > a {
  padding: 14px;
  font-weight: 700;
  color: var(--accent);
}
@media (hover: hover) {
  table#horses td.cell-name > a:hover {
    background: var(--accent-soft-bg);
    color: var(--accent-hover);
    text-decoration: underline;
  }
}

/* ─── Status bar pill ─── */
.status-bar {
  position: static;
  background: #ffffff;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 8px 18px;
  color: var(--accent);
  font-weight: 700;
  display: inline-block;
  margin: 16px 24px;
  font-size: 13.5px;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

/* ─── Links ─── */
a { color: var(--accent); }
@media (hover: hover) {
  a:hover { color: var(--accent-hover); text-decoration: underline; }
}

/* ─── Link cards (horse detail page) — soft accent hover ─── */
.link-card { color: var(--accent); }
@media (hover: hover) {
  .link-card:hover {
    background: var(--accent-soft-bg);
    border-color: var(--accent);
  }
}

/* ─── Mobile tweaks for new layout ─── */
@media (max-width: 720px) {
  .site-logo {
    padding: 0 16px;
    justify-content: center;
  }
  .site-logo img { height: 64px; }
  .site-header { padding: 16px 0 14px; }
  .site-header .header-inner { padding: 0 14px; }
  .table-wrap { margin: 12px 12px 20px; border-radius: 10px; }
  .status-bar { margin: 12px 14px; }
}

/* ============================================================
   HERO REDESIGN — sauna-ikitai style: blue flat hero with centered logo
   ============================================================ */

:root {
  --hero-bg: #1d4ed8;
}

/* Hide the in-header logo; hero takes over */
.site-logo--header { display: none; }

/* Slim header bar (silk-stripe stays separate above) */
.site-header {
  background: #ffffff;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}

/* Hero section — full-width visual image (1680x720) with overlay lede */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1680 / 720;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: var(--hero-bg); /* fallback before image loads */
  overflow: hidden;
}
.hero-lede {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #ffffff;
  font-weight: 700;
  font-size: clamp(13px, 1.5vw, 22px);
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
}
@supports not (aspect-ratio: 1) {
  .hero {
    height: 0;
    padding-bottom: calc(720 / 1680 * 100%);
  }
}

@media (max-width: 720px) {
  .hero-lede {
    top: 14%;
    font-size: clamp(11px, 3.2vw, 16px);
    letter-spacing: 0.02em;
  }
}

/* ============================================================
   FOOTER REDESIGN — sauna-ikitai style: blue band + centered logo
   ============================================================ */
.site-footer {
  background: #003ADC;
  color: #ffffff;
  padding: 48px 24px;
  margin-top: 64px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-logo img {
  width: 80px;
  height: 80px;
  display: block;
  background: #ffffff;
  border-radius: 12px;
  padding: 8px;
}
.footer-copy {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #ffffff;
  opacity: 0.9;
}
@media (max-width: 720px) {
  .site-footer { padding: 32px 16px; margin-top: 40px; }
  .footer-logo img { width: 64px; height: 64px; }
  .footer-copy { font-size: 12px; }
}

/* ============================================================
   CLUB NAVIGATION — tab-style cards under hero
   ============================================================ */
.club-nav {
  background: #ffffff;
  padding: 32px 0 8px;
}
.club-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.club-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.club-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.club-card.is-active {
  border-color: var(--accent);
  background: var(--accent-soft-bg);
  border-width: 2px;
}
.club-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}
.club-card-icon[data-silk="shadai"] {
  background: linear-gradient(135deg, var(--silk-yellow) 50%, var(--silk-black) 50%);
}
.club-card-icon[data-silk="sunday"] {
  background: conic-gradient(var(--silk-red) 0deg 120deg, var(--silk-black) 120deg 240deg, var(--silk-yellow) 240deg 360deg);
}
.club-card-icon[data-silk="g1"] {
  background: linear-gradient(135deg, var(--silk-red) 50%, var(--silk-black) 50%);
}
.club-card-icon[data-silk="chuo"] {
  background: var(--gray-id);
}
.club-card-icon[data-silk="chiho"] {
  background: var(--brown-id);
}
.club-card-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.club-card-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
@media (max-width: 720px) {
  .club-nav { padding: 20px 0 4px; }
  .club-nav-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 12px;
  }
  .club-card { padding: 12px 4px; }
  .club-card-icon { width: 32px; height: 32px; }
  .club-card-label { font-size: 12px; }
  .club-card-count { font-size: 10px; }
}

/* ============================================================
   MOBILE REDESIGN — sauna-ikitai style finishing (≤720px)
   PC layout untouched; existing mobile rules preserved (table→cards etc).
   ============================================================ */

/* Always hide the in-header decorative silk SVG trio (3 white-card icons) */
.header-logo-silks { display: none; }

@media (max-width: 720px) {
  .hero {
    aspect-ratio: 5 / 6;
    background-size: cover;
    background-position: center center;
    background-color: var(--hero-bg);
    display: block;
    padding: 0;
    min-height: 0;
  }
  .hero-lede {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    width: calc(100% - 32px);
    max-width: 100%;
    white-space: normal;
    text-align: center;
    color: #ffffff;
    font-size: clamp(11px, 3.4vw, 15px);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
    z-index: 2;
  }

  /* ── Header: thin band only (silk-stripe stays separate) ── */
  .site-header {
    padding: 0;
    border-bottom: 1px solid var(--border);
  }
  .site-header .header-inner { padding: 6px 12px; }
  .site-logo--header { display: none; }

  /* ── Search bar: full-width, 48px tall, rounded ── */
  .search-bar {
    padding: 12px 16px;
    gap: 8px;
  }
  .search-bar input[type="search"] {
    min-height: 48px;
    height: 48px;
    font-size: 16px;
    border-radius: 12px;
    border-width: 1.5px;
    padding: 0 16px;
    width: 100%;
  }
  .search-bar #reset {
    min-height: 48px;
    height: 48px;
    border-radius: 12px;
    border-width: 1.5px;
    padding: 0 14px;
  }

  /* ── Status bar pill ── */
  .status-bar {
    margin: 12px 16px;
    padding: 8px 16px;
    font-size: 13px;
  }

  /* ── Filters summary header ── */
  .filters-summary {
    border-radius: 10px;
    margin: 0 12px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    background: var(--bg-card);
  }

  /* ── Pills (already configured upstream; nudge typography) ── */
  .pill {
    font-size: 13px;
    padding: 8px 14px;
    flex-shrink: 0;
  }
  .pills {
    flex-wrap: wrap;
  }

  /* ── Club nav: 3 cols × 2 rows, compact ── */
  .club-nav { padding: 16px 0 4px; }
  .club-nav-inner {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 12px;
  }
  .club-card {
    padding: 12px 4px;
    border-radius: 10px;
  }
  .club-card-icon { width: 36px; height: 36px; }
  .club-card-label { font-size: 12px; font-weight: 700; }
  .club-card-count { font-size: 10px; }

  /* ── Horse list cards (existing structure preserved, palette tightened) ── */
  table#horses tbody tr {
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin: 10px 14px;
    padding: 14px 14px;
  }
  table#horses td.cell-name > a {
    color: var(--accent);
    font-weight: 700;
  }

  /* ── Footer: blue band + centered white logo card + copy ── */
  .site-footer {
    padding: 32px 16px;
    margin-top: 40px;
  }
  .footer-logo img {
    width: 64px;
    height: 64px;
    padding: 6px;
    border-radius: 10px;
  }
  .footer-copy {
    font-size: 12px;
    letter-spacing: 0.06em;
  }

  /* ── Body typography ── */
  body { font-size: 14px; }
}

/* ============================================================
   SCROLL TO TOP BUTTON
   ============================================================ */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease, color 0.15s ease;
  z-index: 100;
  padding: 0;
}
.scroll-to-top.is-visible {
  opacity: 0.85;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-to-top:hover {
  opacity: 1;
  background: var(--accent);
  color: #ffffff;
}
.scroll-to-top svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 720px) {
  .scroll-to-top {
    width: 40px;
    height: 40px;
    bottom: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.82);
  }
  .scroll-to-top svg {
    width: 16px;
    height: 16px;
  }
}


/* ── 募集情報セクション（募集総額・一口価格・入厩予定厩舎） */
.recruit-info { margin-top: 1.4rem; }
.recruit-info .unannounced {
  color: #8a94a3;
  font-style: italic;
  font-size: 0.92em;
}
.cell-recruit-empty { color: #b8bdc6; }


/* === Hero <picture> optimization (added 2026-05-12) === */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--hero-bg, #1d4ed8), #312e81); }
.hero-picture { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
.hero-picture img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.hero .hero-lede { position: relative; z-index: 2; }
@media (max-width: 720px) {
  .hero-picture img { object-position: center top; }
}









/* === Index list SP card layout v2 (2026-05-12) === */
@media (max-width: 720px) {
  table.horse-list { width: 100%; border-collapse: collapse; }
  table.horse-list thead { display: none; }
  table.horse-list tbody { display: block; }
  table.horse-list tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "no club silk"
      "name name name"
      "sire sire sire"
      "dam dam dam"
      "bmsire bmsire bmsire"
      "farm farm farm"
      "total total total"
      "share share share";
    gap: 6px 10px;
    margin: 12px 0;
    padding: 14px 14px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    align-items: center;
  }
  table.horse-list tr > td {
    display: block;
    padding: 0;
    border: none;
    text-align: left;
    width: auto;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
  }
  table.horse-list tr > td * { writing-mode: horizontal-tb !important; }

  table.horse-list td.cell-no {
    grid-area: no;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111;
    background: transparent;
    border: 1.5px solid #1d4ed8;
    padding: 2px 10px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
    justify-self: start;
  }
  table.horse-list td.cell-club {
    grid-area: club;
    font-size: 0.95rem;
    font-weight: 700;
    color: #b91c1c;
  }
  table.horse-list td.cell-silk { grid-area: silk; justify-self: end; }
  table.horse-list td.cell-silk svg,
  table.horse-list td.cell-silk img { width: 28px; height: auto; }

  table.horse-list td.cell-name {
    grid-area: name;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: #1d4ed8 !important;
    line-height: 1.3 !important;
    margin: 4px 0 2px;
    word-break: keep-all;
    overflow-wrap: anywhere;
    white-space: normal;
    display: flex !important;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
  }
  table.horse-list td.cell-name a {
    color: #1d4ed8 !important;
    text-decoration: none;
  }
  table.horse-list td.cell-sex {
    display: inline-block !important;
    font-size: 0.78rem;
    background: rgba(0,0,0,0.06);
    color: #333;
    padding: 2px 10px;
    border-radius: 999px;
    margin-left: 8px;
    align-self: center;
    grid-column: 1 / -1;
    justify-self: start;
  }

  table.horse-list td.cell-sire,
  table.horse-list td.cell-dam,
  table.horse-list td.cell-broodmare-sire,
  table.horse-list td.cell-farm,
  table.horse-list td.cell-recruit-total,
  table.horse-list td.cell-recruit-share {
    display: flex !important;
    align-items: center;
    font-size: 0.94rem;
    color: #222;
    padding: 5px 0 !important;
    border-bottom: 1px solid #f1f1f4;
  }
  table.horse-list td.cell-sire { grid-area: sire; }
  table.horse-list td.cell-dam { grid-area: dam; }
  table.horse-list td.cell-broodmare-sire { grid-area: bmsire; }
  table.horse-list td.cell-farm { grid-area: farm; }
  table.horse-list td.cell-recruit-total { grid-area: total; }
  table.horse-list td.cell-recruit-share { grid-area: share; }

  table.horse-list td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 72px;
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 600;
  }
  table.horse-list td.cell-no::before,
  table.horse-list td.cell-club::before,
  table.horse-list td.cell-silk::before,
  table.horse-list td.cell-name::before,
  table.horse-list td.cell-sex::before { content: none !important; }

  table.horse-list td.cell-recruit-total strong,
  table.horse-list td.cell-recruit-share strong {
    font-size: 0.94rem;
    color: #222;
    font-weight: 600;
  }
  table.horse-list td.cell-recruit-total {
    grid-area: total;
    background: transparent;
    padding-left: 0 !important;
  }
  table.horse-list td.cell-recruit-share {
    grid-area: share;
    background: transparent;
    padding-left: 0 !important;
  }

  table.horse-list td.cell-planned-stable { display: none !important; }
}






/* AI Analysis Section */
.ai-report-section {
  max-width: 800px; margin: 28px auto 32px;
  padding: 32px 28px 24px; background: var(--hp-bg-card);
  border: 1px solid var(--hp-border); border-radius: var(--hp-radius);
  box-shadow: var(--hp-shadow-md); box-sizing: border-box; position: relative;
}
.ai-report-section::before {
  content: "AI ANALYSIS"; position: absolute; top: -12px; left: 28px;
  display: inline-block; padding: 4px 14px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em; color: #fff;
  background: linear-gradient(135deg, var(--hp-accent) 0%, #4f46e5 60%, #7c3aed 100%);
  border-radius: 999px; box-shadow: 0 2px 6px rgba(29,78,216,0.25);
}
.ai-report-section > h2 {
  margin: 0 0 24px; padding: 0 0 16px;
  font-size: 1.45rem; font-weight: 800; color: var(--hp-text);
  border-bottom: 2px solid var(--hp-accent-soft); letter-spacing: -0.01em;
}
.ai-report-section > h2::after {
  content: ""; display: block; width: 48px; height: 3px;
  background: var(--hp-accent); margin-top: 12px; border-radius: 2px;
}

.ai-report-body { color: var(--hp-text); line-height: 2.0; font-size: 1.06rem; letter-spacing: 0.005em; }
.ai-report-body h1 { display: none; }
.ai-report-body h2 {
  font-size: 1.18rem; font-weight: 700; margin: 32px 0 16px;
  padding: 0 0 0 16px; color: var(--hp-accent-dark);
  border-left: 4px solid var(--hp-accent); letter-spacing: 0;
  background: none; border-radius: 0;
}
.ai-report-body h2:first-of-type { margin-top: 8px; }
.ai-report-body h3 { font-size: 1.06rem; font-weight: 700; margin: 22px 0 10px; color: var(--hp-text); }
.ai-report-body p { margin: 0 0 18px; text-align: justify; word-break: normal; overflow-wrap: break-word; }
.ai-report-body ul, .ai-report-body ol { margin: 14px 0 22px; padding-left: 28px; }
.ai-report-body li { margin-bottom: 8px; line-height: 1.9; }
.ai-report-body strong { color: var(--hp-accent-dark); font-weight: 700; }

.ai-report-body table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 26px 0 14px; background: #fff;
  border: 1px solid var(--hp-border); border-radius: var(--hp-radius);
  overflow: hidden; box-shadow: var(--hp-shadow-sm);
}
.ai-report-body table thead { background: linear-gradient(135deg, var(--hp-accent-dark), var(--hp-accent)); }
.ai-report-body table th {
  padding: 14px 16px; color: #fff; font-weight: 600;
  font-size: 0.92rem; letter-spacing: 0.04em; text-align: left; border: none;
}
.ai-report-body table td {
  padding: 14px 16px; border-bottom: 1px solid var(--hp-border-soft);
  font-size: 1rem; color: var(--hp-text); vertical-align: middle;
}
.ai-report-body table tr:last-child td { border-bottom: none; }
.ai-report-body table td:first-child { font-weight: 600; color: var(--hp-text-sub); width: 32%; font-size: 0.95rem; }
.ai-report-body table td:nth-child(2) {
  color: #f59e0b; font-weight: 700; letter-spacing: 0.08em;
  font-size: 1.12rem; white-space: nowrap; width: 22%;
}
.ai-report-body table tr:last-child { background: linear-gradient(90deg, var(--hp-accent-soft), #fff); }
.ai-report-body table tr:last-child td:first-child { color: var(--hp-accent-dark); font-weight: 800; }
.ai-report-body table tr:last-child td:nth-child(2) { font-size: 1.2rem; }

.ai-report-body hr { margin: 28px 0 18px; border: none; border-top: 1px dashed var(--hp-border); }
.ai-report-body em {
  display: block; margin: 18px 0 0;
  padding: 14px 18px; background: var(--hp-border-soft);
  border-radius: var(--hp-radius-sm);
  color: var(--hp-text-mute); font-size: 0.85rem;
  font-style: normal; line-height: 1.65; border-left: 3px solid var(--hp-text-mute);
}

.horse-page h2, body > main > h2 {
  max-width: 800px; margin: 28px auto 12px; padding: 0 20px;
  font-size: 1.22rem; font-weight: 700; color: var(--hp-text); letter-spacing: -0.01em;
}

@media (max-width: 720px) {
  .horse-header { padding: 14px 14px 0; }
  .horse-hero { padding: 18px 18px 16px; border-radius: 12px; }
  .silk-md { width: 34px; }
  .club-name-text { font-size: 0.96rem; }
  .no-box { font-size: 0.82rem; padding: 3px 10px; min-width: 32px; }
  .horse-name-main { font-size: 1.7rem; gap: 8px; }
  .horse-name-main .hsex { font-size: 0.5em; padding: 3px 10px; }
  .profile { padding: 0 14px; margin-bottom: 20px; }
  .profile-list li { padding: 12px 16px; min-height: 46px; gap: 12px; }
  .profile-key { flex: 0 0 80px; font-size: 0.78rem; }
  .profile-val { font-size: 0.98rem; }
  .profile-price-v { font-size: 1.06rem !important; }
  .ai-report-section { padding: 26px 18px 18px; margin: 22px auto 24px; border-radius: 12px; }
  .ai-report-section::before { left: 18px; font-size: 0.66rem; padding: 3px 11px; }
  .ai-report-section > h2 { font-size: 1.25rem; margin-bottom: 20px; padding-bottom: 14px; }
  .ai-report-section > h2::after { width: 40px; margin-top: 10px; }
  .ai-report-body { font-size: 1.0rem; line-height: 1.9; }
  .ai-report-body h2 { font-size: 1.06rem; margin: 24px 0 12px; padding-left: 12px; }
  .ai-report-body h3 { font-size: 1.0rem; margin: 18px 0 8px; }
  .ai-report-body p { margin-bottom: 16px; }
  .ai-report-body table { font-size: 0.9rem; }
  .ai-report-body table th { padding: 11px 12px; font-size: 0.86rem; }
  .ai-report-body table td { padding: 11px 12px; font-size: 0.92rem; }
  .ai-report-body table td:first-child { font-size: 0.85rem; }
  .ai-report-body table td:nth-child(2) { font-size: 1.0rem; }
  .ai-report-body table tr:last-child td:nth-child(2) { font-size: 1.08rem; }
  .horse-page h2, body > main > h2 { padding: 0 14px; font-size: 1.12rem; }
}





/* === Evaluation Summary === */
.eval-summary {
  background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 60%, #7c3aed 100%);
  border-radius: var(--hp-radius, 14px);
  padding: 22px 24px 20px;
  margin: 0 0 20px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(29,78,216,0.22);
  position: relative;
  overflow: hidden;
}
.eval-summary::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle at 90% 20%, rgba(255,255,255,0.12), transparent 50%);
  pointer-events: none;
}
.eval-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
}
.eval-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  background: rgba(255,255,255,0.18);
  padding: 5px 14px;
  border-radius: 999px;
  text-transform: uppercase;
}
.eval-total {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.3rem;
  color: #fde047;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.eval-total-num {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  font-family: "SF Mono", Menlo, monospace;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.eval-axes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 14px;
  position: relative;
}
.eval-axis { display: flex; align-items: center; gap: 8px; min-width: 0; }
.eval-axis-label {
  flex: 0 0 38px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.04em;
}
.eval-axis-bar {
  flex: 1 1 auto;
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
  overflow: hidden;
  min-width: 0;
}
.eval-axis-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #fde047, #f59e0b);
  border-radius: 999px;
}
.eval-axis-val {
  flex: 0 0 26px;
  font-size: 0.82rem;
  text-align: right;
  font-family: "SF Mono", Menlo, monospace;
  color: rgba(255,255,255,0.92);
  font-weight: 600;
}

/* === Info Grid (基本情報を横並び) === */
.info-grid-section { margin: 0 0 20px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.info-card {
  background: #fff;
  border: 1px solid var(--hp-border, #e5e7eb);
  border-radius: var(--hp-radius-sm, 10px);
  padding: 12px 14px 14px;
  box-shadow: var(--hp-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.info-card-key {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--hp-text-mute, #6b7280);
  font-weight: 700;
  text-transform: uppercase;
}
.info-card-val {
  font-size: 1.0rem;
  color: var(--hp-text, #111827);
  font-weight: 600;
  word-break: break-word;
  line-height: 1.4;
}
.info-card-val a {
  color: var(--hp-accent, #1d4ed8);
  text-decoration: none;
  border-bottom: 1px solid rgba(29,78,216,0.25);
}
.info-card-val a:hover { border-bottom-color: var(--hp-accent, #1d4ed8); }

/* === Price Box === */
.price-box-section { margin: 0 0 24px; }
.price-box {
  background: #fff;
  border: 1px solid var(--hp-border, #e5e7eb);
  border-radius: var(--hp-radius, 14px);
  padding: 18px 22px 20px;
  box-shadow: var(--hp-shadow-sm);
  position: relative;
}
.price-box .price-label {
  position: absolute;
  top: -10px;
  left: 18px;
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #4f46e5);
  border-radius: 999px;
}
.price-rows { display: flex; flex-wrap: wrap; gap: 22px 32px; padding-top: 4px; }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price-key {
  font-size: 0.85rem;
  color: var(--hp-text-mute, #6b7280);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.price-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--hp-accent, #1d4ed8);
  letter-spacing: 0.02em;
  font-feature-settings: "tnum";
}
.price-val small { font-size: 0.65em; font-weight: 600; color: var(--hp-text-mute); letter-spacing: 0.04em; }
.price-val-soft { font-size: 1.0rem !important; color: var(--hp-text, #111827) !important; font-weight: 600 !important; }

/* === AI report もう少しタイトに (Hybrid版) === */
.ai-report-section { margin: 0 0 28px; }

/* === スマホ最適化 === */
@media (max-width: 720px) {
  .horse-main { padding: 0 14px 24px; }
  .eval-summary { padding: 18px 16px 16px; margin-bottom: 14px; }
  .eval-summary-header { margin-bottom: 14px; }
  .eval-total { font-size: 1.1rem; }
  .eval-axes { grid-template-columns: 1fr; gap: 8px; }
  .eval-axis-label { flex-basis: 50px; font-size: 0.82rem; }
  .info-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .info-card { padding: 10px 12px 12px; }
  .info-card-key { font-size: 0.68rem; }
  .info-card-val { font-size: 0.95rem; }
  .price-box { padding: 16px 16px 16px; }
  .price-rows { gap: 14px 24px; }
  .price-val { font-size: 1.2rem; }
}

@media (min-width: 721px) and (max-width: 959px) {
  .eval-axes { grid-template-columns: repeat(5, 1fr); }
  .info-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 960px) {
  .info-grid { grid-template-columns: repeat(8, 1fr); }
  .info-card { padding: 14px 16px 16px; }
  .info-card-val { font-size: 1.05rem; }
  .eval-summary { padding: 26px 28px 24px; }
  .eval-total { font-size: 1.45rem; }
  .price-val { font-size: 1.6rem; }
}

@media (min-width: 1100px) {
  .ai-report-body { font-size: 1.08rem; line-height: 2.0; }
}


/* ============================================================
   Horse Page Redesign 2026-05-13 (Modern Clean)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;800&family=Inter:wght@500;600;700&display=swap');

:root {
  --hp-font-jp: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --hp-font-en: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --hp-accent: #1d4ed8;
  --hp-accent-dim: rgba(29, 78, 216, 0.08);
  --hp-bg: #ffffff;
  --hp-bg-soft: #fafbfc;
  --hp-text: #0f172a;
  --hp-text-sub: #475569;
  --hp-text-mute: #94a3b8;
  --hp-border: #e2e8f0;
  --hp-border-strong: #cbd5e1;
  --hp-radius: 16px;
  --hp-radius-sm: 10px;
}

body.horse-page {
  background: var(--hp-bg-soft);
  font-family: var(--hp-font-jp);
  color: var(--hp-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.horse-header { max-width: 1200px; margin: 0 auto; padding: 24px 24px 0; box-sizing: border-box; }
.horse-header .back { margin: 0 0 20px; font-size: 0.88rem; }
.horse-header .back a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  color: var(--hp-text-sub); text-decoration: none;
  background: #fff; border: 1px solid var(--hp-border);
  border-radius: 999px; font-weight: 500;
  transition: all 0.15s ease;
}
.horse-header .back a:hover { border-color: var(--hp-accent); color: var(--hp-accent); }

.horse-hero {
  position: relative; background: var(--hp-bg);
  border: 1px solid var(--hp-border); border-radius: var(--hp-radius);
  padding: 36px 40px 32px; margin: 0 0 24px; overflow: hidden;
}
.horse-hero::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--hp-accent);
}
.horse-hero * { writing-mode: horizontal-tb !important; text-orientation: mixed !important; }
.hero-row-1 {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 0 0 18px;
  border-bottom: 1px solid var(--hp-border);
}
.silk-md { width: 36px; height: auto; flex-shrink: 0; }
.club-name-text { font-size: 0.95rem; font-weight: 700; color: var(--hp-text); letter-spacing: 0.04em; }
.no-box {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; padding: 5px 12px;
  font-family: var(--hp-font-en); font-size: 0.92rem; font-weight: 700;
  color: var(--hp-accent); background: var(--hp-accent-dim);
  border-radius: 8px; letter-spacing: 0.02em;
}
.horse-name-main {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px;
  margin: 0;
  font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
  color: var(--hp-text);
  word-break: keep-all; overflow-wrap: anywhere;
}
.horse-name-main .hname { font-size: 1em; }
.horse-name-main .hsex {
  font-size: 0.48em; font-weight: 600;
  padding: 5px 14px; background: #f1f5f9; color: var(--hp-text-sub);
  border-radius: 999px; letter-spacing: 0.04em;
}

.horse-main { max-width: 1200px; margin: 0 auto; padding: 0 24px 48px; box-sizing: border-box; }

/* === EVAL SUMMARY === */
.eval-summary {
  background: var(--hp-bg); border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius); padding: 32px 40px 28px; margin: 0 0 24px;
}
.eval-summary-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--hp-font-en); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; color: var(--hp-accent); text-transform: uppercase;
  margin: 0 0 14px;
}
.eval-summary-label::before { content: ""; display: inline-block; width: 18px; height: 2px; background: var(--hp-accent); }
.eval-summary-title {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em;
  margin: 0 0 28px; color: var(--hp-text);
}
.eval-total-row {
  display: flex; align-items: center; gap: 28px;
  padding: 0 0 28px; margin: 0 0 28px;
  border-bottom: 1px solid var(--hp-border);
}
.eval-total-score { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.eval-total-number {
  font-family: var(--hp-font-en); font-size: 3.6rem; font-weight: 800;
  line-height: 1; color: var(--hp-accent); letter-spacing: -0.03em;
}
.eval-total-number .max { font-size: 0.5em; color: var(--hp-text-mute); margin-left: 4px; }
.eval-total-stars { font-size: 1.25rem; letter-spacing: 0.1em; color: #f59e0b; }
.eval-total-label { flex: 1; font-size: 0.92rem; color: var(--hp-text-sub); line-height: 1.7; }

.eval-axes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.eval-axis { display: flex; flex-direction: column; gap: 8px; }
.eval-axis-name { font-size: 0.82rem; font-weight: 600; color: var(--hp-text-sub); letter-spacing: 0.02em; }
.eval-axis-bar { position: relative; height: 6px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.eval-axis-bar-fill { position: absolute; top: 0; left: 0; bottom: 0; background: var(--hp-accent); border-radius: 999px; transition: width 0.3s ease; }
.eval-axis-value {
  display: flex; align-items: baseline; gap: 6px;
  font-family: var(--hp-font-en); font-weight: 700; font-size: 1.1rem; color: var(--hp-text);
}
.eval-axis-value .stars { font-size: 0.8rem; color: #f59e0b; letter-spacing: 0.05em; }

/* === INFO GRID === */
.info-grid-section {
  background: var(--hp-bg); border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius); padding: 28px 32px; margin: 0 0 24px;
}
.info-grid-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--hp-font-en); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; color: var(--hp-text-sub); text-transform: uppercase;
  margin: 0 0 18px;
}
.info-grid-label::before { content: ""; width: 18px; height: 2px; background: var(--hp-text-sub); }
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border-top: 1px solid var(--hp-border); border-left: 1px solid var(--hp-border);
}
.info-card { padding: 14px 16px; border-right: 1px solid var(--hp-border); border-bottom: 1px solid var(--hp-border); }
.info-card-key { font-size: 0.72rem; color: var(--hp-text-mute); font-weight: 600; letter-spacing: 0.05em; margin: 0 0 6px; }
.info-card-val { font-size: 1.0rem; font-weight: 600; color: var(--hp-text); line-height: 1.4; word-break: break-word; }
.info-card-val a { color: var(--hp-accent); text-decoration: none; border-bottom: 1px solid rgba(29,78,216,0.3); }
.info-card-val a:hover { border-bottom-color: var(--hp-accent); }

/* === PRICE BOX === */
.price-box-section {
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 1px solid var(--hp-border); border-radius: var(--hp-radius);
  padding: 28px 32px; margin: 0 0 24px;
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.price-box-label {
  font-family: var(--hp-font-en); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; color: var(--hp-accent); text-transform: uppercase;
  padding: 6px 14px; background: var(--hp-accent-dim); border-radius: 999px; flex-shrink: 0;
}
.price-box-items { display: flex; gap: 40px; flex-wrap: wrap; flex: 1; }
.price-box-item { display: flex; flex-direction: column; gap: 4px; }
.price-box-item-key { font-size: 0.78rem; color: var(--hp-text-mute); font-weight: 600; }
.price-box-item-val {
  font-family: var(--hp-font-en); font-size: 1.5rem; font-weight: 800;
  color: var(--hp-text); letter-spacing: -0.01em;
}
.price-box-item-val.muted { color: var(--hp-text-sub); font-size: 1.1rem; font-family: var(--hp-font-jp); }

/* === AI REPORT === */
.ai-report-section {
  background: var(--hp-bg); border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius); padding: 40px 48px 36px;
  margin: 0; position: relative;
}
.ai-report-section::before {
  content: "AI ANALYSIS"; position: absolute; top: 24px; left: 48px;
  font-family: var(--hp-font-en); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; color: var(--hp-accent);
}
.ai-report-section > h2 {
  margin: 26px 0 36px; padding: 0;
  font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; color: var(--hp-text);
}
.ai-report-body { font-size: 1.05rem; line-height: 2.0; color: var(--hp-text); letter-spacing: 0.01em; }
.ai-report-body h1 { display: none; }
.ai-report-body h2 {
  position: relative; margin: 44px 0 18px; padding: 0 0 0 18px;
  font-size: 1.25rem; font-weight: 700; color: var(--hp-text);
  letter-spacing: -0.01em; border-left: none;
}
.ai-report-body h2::before {
  content: ""; position: absolute; left: 0; top: 0.35em; bottom: 0.35em;
  width: 4px; background: var(--hp-accent); border-radius: 2px;
}
.ai-report-body h2:first-of-type { margin-top: 8px; }
.ai-report-body h3 { font-size: 1.05rem; font-weight: 700; margin: 24px 0 10px; color: var(--hp-text); }
.ai-report-body p { margin: 0 0 18px; text-align: left; max-width: 100%; }
.ai-report-body ul, .ai-report-body ol { margin: 14px 0 22px; padding-left: 26px; }
.ai-report-body li { margin-bottom: 10px; line-height: 1.9; }
.ai-report-body strong { color: var(--hp-accent); font-weight: 700; }
.ai-report-body a { color: var(--hp-accent); text-decoration: none; border-bottom: 1px solid rgba(29,78,216,0.3); }

.ai-report-body table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 28px 0 16px; background: var(--hp-bg);
  border: 1px solid var(--hp-border); border-radius: var(--hp-radius-sm); overflow: hidden;
}
.ai-report-body table thead { background: var(--hp-text); }
.ai-report-body table th {
  padding: 14px 18px; text-align: left;
  font-size: 0.86rem; font-weight: 600; letter-spacing: 0.04em; color: #fff; border: none;
}
.ai-report-body table td { padding: 16px 18px; border-bottom: 1px solid var(--hp-border); font-size: 0.96rem; vertical-align: middle; }
.ai-report-body table tr:last-child td { border-bottom: none; }
.ai-report-body table td:first-child { font-weight: 600; color: var(--hp-text-sub); width: 30%; }
.ai-report-body table td:nth-child(2) {
  color: #f59e0b; font-weight: 700; letter-spacing: 0.08em;
  font-size: 1.05rem; white-space: nowrap; width: 22%;
}
.ai-report-body table tr:last-child td { background: var(--hp-accent-dim); font-weight: 700; }
.ai-report-body table tr:last-child td:first-child { color: var(--hp-text); }
.ai-report-body table tr:last-child td:nth-child(2) { color: var(--hp-accent); font-size: 1.15rem; }

.ai-report-body em {
  display: block; margin: 22px 0 0; padding: 14px 18px;
  background: #f8fafc; border-radius: var(--hp-radius-sm);
  border-left: 3px solid var(--hp-border-strong);
  color: var(--hp-text-sub); font-size: 0.85rem; font-style: normal; line-height: 1.7;
}
.ai-report-body hr { margin: 28px 0 18px; border: none; border-top: 1px solid var(--hp-border); }

/* === SP === */
@media (max-width: 720px) {
  .horse-header { padding: 16px 16px 0; }
  .horse-hero { padding: 24px 22px 22px; border-radius: 14px; }
  .horse-name-main { font-size: 1.85rem; gap: 10px; }
  .horse-name-main .hsex { font-size: 0.5em; padding: 4px 11px; }
  .silk-md { width: 32px; }
  .no-box { font-size: 0.86rem; min-width: 40px; padding: 4px 10px; }

  .horse-main { padding: 0 16px 32px; }
  .eval-summary { padding: 22px 22px 20px; border-radius: 14px; }
  .eval-summary-title { font-size: 1.2rem; margin-bottom: 22px; }
  .eval-total-row { flex-direction: column; gap: 12px; align-items: flex-start; padding-bottom: 22px; margin-bottom: 22px; }
  .eval-total-number { font-size: 2.8rem; }
  .eval-total-stars { font-size: 1.05rem; }
  .eval-axes { grid-template-columns: 1fr; gap: 16px; }
  .eval-axis { flex-direction: row; align-items: center; gap: 12px; }
  .eval-axis-name { flex: 0 0 75px; font-size: 0.78rem; }
  .eval-axis-bar { flex: 1; }
  .eval-axis-value { flex: 0 0 60px; font-size: 0.95rem; justify-content: flex-end; }

  .info-grid-section { padding: 20px 20px; border-radius: 14px; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .info-card { padding: 12px 14px; }
  .info-card-val { font-size: 0.92rem; }

  .price-box-section { padding: 22px 22px; gap: 16px; border-radius: 14px; }
  .price-box-items { gap: 24px; }
  .price-box-item-val { font-size: 1.25rem; }

  .ai-report-section { padding: 32px 22px 24px; border-radius: 14px; }
  .ai-report-section::before { top: 18px; left: 22px; }
  .ai-report-section > h2 { font-size: 1.4rem; margin: 24px 0 26px; }
  .ai-report-body { font-size: 0.98rem; line-height: 1.9; }
  .ai-report-body h2 { font-size: 1.1rem; margin: 30px 0 14px; padding-left: 14px; }
  .ai-report-body h3 { font-size: 0.98rem; }
  .ai-report-body table { font-size: 0.86rem; }
  .ai-report-body table th, .ai-report-body table td { padding: 11px 12px; }
  .ai-report-body table td:nth-child(2) { font-size: 0.95rem; }
}

@media (min-width: 1100px) {
  .ai-report-body { font-size: 1.1rem; line-height: 2.05; }
}


/* === Horse page width-fix & polish (2026-05-13 final) === */
.horse-main .ai-report-section {
  width: 100%;
  max-width: 100% !important;
  margin: 0;
  box-sizing: border-box;
}

.ai-report-section { padding-top: 56px !important; }
.ai-report-section::before {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 28px;
  left: 48px;
  padding: 6px 14px;
  font-family: var(--hp-font-en);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 100%);
  border-radius: 999px;
  text-transform: uppercase;
  z-index: 1;
}
.ai-report-section > h2 {
  margin: 8px 0 32px !important;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}
.ai-report-section > h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--hp-accent);
  margin-top: 16px;
  border-radius: 2px;
}

.ai-report-body {
  font-size: 1.06rem;
  line-height: 2.0;
  letter-spacing: 0.012em;
}
.ai-report-body p {
  margin: 0 0 20px;
  max-width: 100%;
  text-align: justify;
  text-justify: inter-character;
}
.ai-report-body h2 {
  font-size: 1.32rem !important;
  margin: 48px 0 20px !important;
  padding: 0 0 0 20px !important;
}
.ai-report-body h2:first-of-type { margin-top: 0 !important; }
.ai-report-body h2::before {
  width: 5px !important;
  top: 0.4em !important;
  bottom: 0.4em !important;
}

.ai-report-body table {
  margin: 32px 0 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ai-report-body table th {
  padding: 16px 22px !important;
  font-size: 0.88rem !important;
}
.ai-report-body table td {
  padding: 18px 22px !important;
  font-size: 1.0rem !important;
}
.ai-report-body table td:first-child { width: 26% !important; }
.ai-report-body table td:nth-child(2) { width: 18% !important; font-size: 1.12rem !important; }

@media (min-width: 1100px) {
  .horse-main { padding: 0 32px 56px; }
  .ai-report-section { padding: 56px 64px 48px !important; }
  .ai-report-section::before { left: 64px; top: 32px; }
  .ai-report-section > h2 { font-size: 2.0rem; margin: 12px 0 36px !important; }
  .ai-report-body { font-size: 1.1rem; line-height: 2.1; }
  .ai-report-body h2 { font-size: 1.4rem !important; margin: 56px 0 22px !important; }
  .ai-report-body p { margin-bottom: 22px; }

  .eval-summary { padding: 40px 64px 36px; }
  .eval-summary-title { font-size: 1.7rem; }
  .eval-total-number { font-size: 4.2rem; }
  .eval-axes { gap: 28px; }

  .info-grid-section { padding: 32px 64px; }
  .info-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .info-card { padding: 18px 22px; }
  .info-card-val { font-size: 1.05rem; }

  .price-box-section { padding: 32px 64px; gap: 40px; }
  .price-box-item-val { font-size: 1.7rem; }

  .horse-hero { padding: 44px 56px 38px; }
  .horse-name-main { font-size: 2.7rem; }
}

@media (min-width: 721px) and (max-width: 1099px) {
  .ai-report-section { padding: 48px 40px 36px !important; }
  .ai-report-section::before { left: 40px; }
  .eval-summary { padding: 32px 36px 28px; }
  .info-grid-section { padding: 28px 36px; }
  .price-box-section { padding: 28px 36px; }
  .horse-hero { padding: 36px 40px 32px; }
}

@media (max-width: 720px) {
  .horse-main { padding: 0 14px 32px; }
  .ai-report-section { padding: 48px 20px 24px !important; }
  .ai-report-section::before { top: 16px; left: 20px; font-size: 0.65rem; padding: 5px 11px; }
  .ai-report-section > h2 { font-size: 1.4rem; margin: 4px 0 22px !important; }
  .ai-report-section > h2::after { width: 44px; margin-top: 12px; }
  .ai-report-body { font-size: 0.98rem; line-height: 1.88; }
  .ai-report-body p { margin-bottom: 16px; text-align: left; }
  .ai-report-body h2 { font-size: 1.12rem !important; margin: 32px 0 14px !important; padding-left: 14px !important; }
  .ai-report-body table td { padding: 12px 12px !important; font-size: 0.92rem !important; }
  .ai-report-body table th { padding: 11px 12px !important; font-size: 0.84rem !important; }
  .ai-report-body table td:nth-child(2) { font-size: 1.0rem !important; }
}

.horse-name-main { align-items: center !important; }
.horse-name-main .hsex {
  align-self: center;
  position: relative;
  top: -2px;
}

.hero-row-1 { gap: 12px; }
.club-name-text { font-weight: 700; }

.price-box-label {
  font-size: 0.68rem;
  padding: 5px 12px;
  letter-spacing: 0.2em;
}


/* === Breadcrumb SEO (2026-05-13) === */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px 0;
  font-size: 0.82rem;
  color: var(--hp-text-mute, #94a3b8);
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.breadcrumb li {
  display: flex;
  align-items: center;
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin: 0 8px;
  color: var(--hp-border, #e2e8f0);
}
.breadcrumb a {
  color: var(--hp-text-sub, #475569);
  text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb a:hover {
  color: var(--hp-accent, #1d4ed8);
}
.breadcrumb [aria-current="page"] {
  color: var(--hp-text, #0f172a);
  font-weight: 500;
}

@media (max-width: 720px) {
  .breadcrumb { padding: 10px 16px 0; font-size: 0.78rem; }
}

/* H1タグとしての horse-name-main のスタイル (タグ変更による調整) */
h1.horse-name-main {
  /* 既存スタイル維持、display:flex は継続 */
}




/* ============================================================
   Legal pages redesign (2026-05-14)
   - トップ・個別ページと統一感のあるModern Clean
   - Noto Sans JP + Inter
   - max-width: 800px、コンテナ・ヒーロー・カード階層
   ============================================================ */

body.legal-page {
  background: var(--hp-bg-soft, #fafbfc);
  font-family: var(--hp-font-jp, "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif);
  color: var(--hp-text, #0f172a);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.legal-page .site-header {
  background: #fff;
  border-bottom: 1px solid var(--hp-border, #e2e8f0);
  padding: 14px 0;
}
body.legal-page .site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}
body.legal-page .site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
body.legal-page .site-logo img {
  display: block;
  height: 36px;
  width: auto;
}

body.legal-page .breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 0;
  font-size: 0.85rem;
  color: var(--hp-text-mute, #94a3b8);
}
body.legal-page .breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
body.legal-page .breadcrumb li {
  display: flex;
  align-items: center;
}
body.legal-page .breadcrumb li:not(:last-child)::after {
  content: "/";
  margin: 0 10px;
  color: var(--hp-border, #e2e8f0);
}
body.legal-page .breadcrumb a {
  color: var(--hp-text-sub, #475569);
  text-decoration: none;
  transition: color 0.15s;
}
body.legal-page .breadcrumb a:hover {
  color: var(--hp-accent, #1d4ed8);
}
body.legal-page .breadcrumb [aria-current="page"] {
  color: var(--hp-text, #0f172a);
  font-weight: 500;
}

body.legal-page .legal-main {
  max-width: 800px;
  margin: 24px auto 48px;
  padding: 0 24px;
  box-sizing: border-box;
}






body.legal-page .legal-main h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 14px;
  padding: 0 0 0 16px;
  border-left: 4px solid var(--hp-accent, #1d4ed8);
  color: var(--hp-text, #0f172a);
  letter-spacing: -0.01em;
}

body.legal-page .legal-main p {
  font-size: 1.0rem;
  line-height: 1.95;
  margin: 0 0 14px;
  color: var(--hp-text, #0f172a);
}
body.legal-page .legal-main p:last-child {
  margin-bottom: 0;
}
body.legal-page .legal-main ul {
  margin: 14px 0 0;
  padding-left: 24px;
}
body.legal-page .legal-main ul li {
  margin-bottom: 10px;
  line-height: 1.85;
  font-size: 0.98rem;
}
body.legal-page .legal-main a {
  color: var(--hp-accent, #1d4ed8);
  text-decoration: none;
  border-bottom: 1px solid rgba(29, 78, 216, 0.25);
  transition: border-color 0.15s;
}
body.legal-page .legal-main a:hover {
  border-bottom-color: var(--hp-accent, #1d4ed8);
}

body.legal-page .legal-lead {
  font-size: 1.05rem;
  color: var(--hp-text-sub, #475569);
  line-height: 1.85;
}

body.legal-page .legal-note {
  background: #f8fafc !important;
  border: 1px solid var(--hp-border, #e2e8f0) !important;
  border-left: 4px solid var(--hp-text-mute, #94a3b8) !important;
  padding: 14px 20px !important;
  font-size: 0.9rem;
  color: var(--hp-text-sub, #475569);
  border-radius: 8px !important;
  margin-bottom: 16px !important;
}

body.legal-page .legal-footer-note {
  background: transparent !important;
  border: none !important;
  padding: 16px 0 0 !important;
  font-size: 0.82rem;
  color: var(--hp-text-mute, #94a3b8);
  text-align: right;
  margin: 0 !important;
}

body.legal-page .contact-form {
  padding: 32px;
}
body.legal-page .form-group {
  margin-bottom: 22px;
}
body.legal-page .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--hp-text, #0f172a);
}
body.legal-page .form-group .required {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.7rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
body.legal-page .form-group input[type="text"],
body.legal-page .form-group input[type="email"],
body.legal-page .form-group select,
body.legal-page .form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--hp-border-strong, #cbd5e1);
  border-radius: 10px;
  font-size: 1.0rem;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  color: var(--hp-text, #0f172a);
}
body.legal-page .form-group input[type="text"]:hover,
body.legal-page .form-group input[type="email"]:hover,
body.legal-page .form-group select:hover,
body.legal-page .form-group textarea:hover {
  border-color: var(--hp-text-sub, #475569);
}
body.legal-page .form-group input[type="text"]:focus,
body.legal-page .form-group input[type="email"]:focus,
body.legal-page .form-group select:focus,
body.legal-page .form-group textarea:focus {
  outline: none;
  border-color: var(--hp-accent, #1d4ed8);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}
body.legal-page .form-group select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3e%3cpath fill='%23475569' d='M6 8L0 0h12z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  padding-right: 44px;
}
body.legal-page .form-group textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.7;
}
body.legal-page .form-consent {
  background: #f8fafc;
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid var(--hp-border, #e2e8f0);
}
body.legal-page .form-consent label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  font-size: 0.93rem;
  cursor: pointer;
  margin-bottom: 0;
  line-height: 1.6;
}
body.legal-page .form-consent input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--hp-accent, #1d4ed8);
  flex-shrink: 0;
}
body.legal-page .form-submit {
  margin-top: 32px;
  text-align: center;
}
body.legal-page .form-submit button {
  display: inline-block;
  padding: 15px 64px;
  background: var(--hp-accent, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1.0rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.06em;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
}
body.legal-page .form-submit button:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.28);
}
body.legal-page .form-submit button:active {
  transform: translateY(0);
}

body.legal-page .form-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.legal-page .back-home-wrap {
  text-align: center;
  padding: 24px 32px;
}
body.legal-page .back-home {
  display: inline-block;
  padding: 12px 36px;
  background: var(--hp-accent, #1d4ed8);
  color: #fff !important;
  text-decoration: none;
  border-bottom: none !important;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: opacity 0.15s, transform 0.15s;
}
body.legal-page .back-home:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

body.legal-page .site-footer {
  margin-top: 48px;
  padding: 36px 24px;
  background: var(--hp-text, #0f172a);
  color: #cbd5e1;
}
body.legal-page .site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
body.legal-page .footer-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
body.legal-page .footer-nav a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
body.legal-page .footer-nav a:hover {
  color: #fff;
}
body.legal-page .footer-copyright {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0 0 12px;
}
body.legal-page .footer-disclaimer {
  font-size: 0.78rem;
  color: #94a3b8;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
}
body.legal-page .footer-disclaimer a {
  color: #cbd5e1;
  text-decoration: underline;
}

@media (max-width: 720px) {
  body.legal-page .site-header { padding: 12px 0; }
  body.legal-page .site-header .container { padding: 0 16px; }
  body.legal-page .site-logo img { height: 32px; }
  body.legal-page .breadcrumb { padding: 14px 16px 0; font-size: 0.78rem; }
  body.legal-page .breadcrumb li:not(:last-child)::after { margin: 0 7px; }
  body.legal-page .legal-main { padding: 0 16px; margin: 16px auto 32px; }
  
  
  body.legal-page .legal-main h2 { font-size: 1.05rem; padding-left: 12px; }
  body.legal-page .legal-main p { font-size: 0.96rem; line-height: 1.85; }
  body.legal-page .contact-form { padding: 22px; }
  body.legal-page .form-group input,
  body.legal-page .form-group select,
  body.legal-page .form-group textarea { padding: 12px 14px; font-size: 0.96rem; }
  body.legal-page .form-submit button { padding: 13px 48px; font-size: 0.95rem; }
  body.legal-page .footer-nav { gap: 18px; }
  body.legal-page .site-footer { margin-top: 32px; padding: 28px 16px; }
}


/* === Legal pages 1枚カード統合版 (2026-05-14) === */
body.legal-page .legal-main {
  background: #fff;
  border: 1px solid var(--hp-border, #e2e8f0);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  position: relative;
}
body.legal-page .legal-main::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--hp-accent, #1d4ed8);
}
body.legal-page .legal-main > h1 {
  margin: 0;
  padding: 40px 40px 20px;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hp-text, #0f172a);
  border-bottom: 1px solid var(--hp-border, #e2e8f0);
  position: relative;
}
body.legal-page .legal-main > h1::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--hp-accent, #1d4ed8);
  margin-top: 14px;
  border-radius: 2px;
}
body.legal-page .legal-main > p,
body.legal-page .legal-main > section,
body.legal-page .legal-main > .contact-form,
body.legal-page .legal-main > .back-home-wrap {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 40px;
  margin-bottom: 0;
}
body.legal-page .legal-main > p {
  padding-top: 20px;
  padding-bottom: 0;
}
body.legal-page .legal-main > section {
  padding-top: 28px;
  padding-bottom: 4px;
}
body.legal-page .legal-main > section:last-of-type {
  padding-bottom: 32px;
}
body.legal-page .legal-main > section + section {
  border-top: 1px solid var(--hp-border-soft, #f3f4f6);
  margin-top: 8px;
  padding-top: 28px;
}
body.legal-page .legal-main > .contact-form {
  padding-top: 28px;
  padding-bottom: 36px;
}
body.legal-page .legal-main > .back-home-wrap {
  padding: 16px 40px 36px;
  text-align: center;
}

@media (max-width: 720px) {
  body.legal-page .legal-main > h1 { padding: 28px 22px 18px; font-size: 1.45rem; }
  body.legal-page .legal-main > p,
  body.legal-page .legal-main > section,
  body.legal-page .legal-main > .contact-form,
  body.legal-page .legal-main > .back-home-wrap {
    padding-left: 22px;
    padding-right: 22px;
  }
  body.legal-page .legal-main > section { padding-top: 22px; }
  body.legal-page .legal-main > .contact-form { padding-bottom: 28px; }
  body.legal-page .legal-main > .back-home-wrap { padding: 14px 22px 28px; }
}


/* ============================================================
   V2 Dark Luxury Theme (2026-05-14)
   - 新ヒーロー画像(ダーク+ゴールドラインアート)に合わせた配色
   - 社台グループ各クラブの「ゴールド」共通要素を反映
   ============================================================ */

:root {
  --v2-gold: #c9a961;
  --v2-gold-bright: #d4af37;
  --v2-gold-dim: rgba(201, 169, 97, 0.15);
  --v2-dark: #0a1228;
  --v2-dark-mid: #14213d;
  --v2-dark-soft: #1a2540;
}

body { background: #fafbfc; }

.hero,
.site-hero,
section.hero,
.top-hero {
  background-color: var(--v2-dark) !important;
  position: relative;
}

.hero::before,
.site-hero::before,
section.hero::before,
.top-hero::before {
  background: transparent !important;
}

body .btn-primary,
body .filter-btn.active,
body .tab.active,
body .club-tab.active,
body button.primary {
  background: linear-gradient(135deg, var(--v2-gold) 0%, var(--v2-gold-bright) 100%) !important;
  color: var(--v2-dark) !important;
  border-color: var(--v2-gold) !important;
  font-weight: 700;
  letter-spacing: 0.04em;
}

body .btn-primary:hover,
body .filter-btn.active:hover,
body .tab.active:hover {
  filter: brightness(1.08);
}

body main a,
body .horse-list a,
body .horse-card a {
  color: var(--v2-dark) !important;
}
body main a:hover,
body .horse-list a:hover,
body .horse-card a:hover {
  color: var(--v2-gold-bright) !important;
}

.site-header,
header.site-header,
body > header {
  background: var(--v2-dark) !important;
  border-bottom: 2px solid var(--v2-gold) !important;
}
.site-header a,
.site-header .site-logo,
header.site-header a {
  color: var(--v2-gold) !important;
}

body footer.site-footer {
  background: var(--v2-dark) !important;
  border-top: 2px solid var(--v2-gold) !important;
}
body footer.site-footer a {
  color: var(--v2-gold) !important;
}
body footer.site-footer a:hover {
  color: var(--v2-gold-bright) !important;
}
body footer.site-footer .footer-copyright,
body footer.site-footer .footer-disclaimer {
  color: rgba(201, 169, 97, 0.7) !important;
}

.horse-card,
.horse-list-item {
  border-top: 3px solid var(--v2-gold) !important;
}

.club-tab,
.tab,
.filter-btn {
  border: 1.5px solid var(--v2-dark-mid);
  color: var(--v2-dark);
  transition: all 0.15s;
}

.no-box,
.club-no,
.pdf-no {
  background: var(--v2-gold-dim) !important;
  color: var(--v2-dark) !important;
  border-color: var(--v2-gold) !important;
}

@media (min-width: 960px) {
  .site-header {
    background: rgba(10, 18, 40, 0.85) !important;
    backdrop-filter: blur(8px);
  }
}


/* === Hide redundant back link (breadcrumb covers same nav) 2026-05-14 === */
.horse-header .back {
  display: none !important;
}
/* 個別ページのbreadcrumbを上部に自然配置 */
body.horse-page .breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px 0;
}
@media (max-width: 720px) {
  body.horse-page .breadcrumb { padding: 12px 16px 0; }
}
