:root {
  color-scheme: light;
  --ink: #142f49;
  --brand-navy: #083053;
  --muted: #526779;
  --line: #d9e3e7;
  --green: #3e611b;
  --lime: #c6e784;
  --blue: #34638a;
  --paper: #f5f7f9;
  --body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  --numbers: "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.6 var(--body); }
a { color: var(--green); text-underline-offset: .22em; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--brand-navy); outline-offset: 3px; }
.wrap { width: min(100% - 64px, 1080px); margin-inline: auto; }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { z-index: 10; top: 10px; left: 12px; width: auto; height: auto; padding: 8px 15px; margin: 0; clip-path: none; background: white; }
.mast { background: #fff; border-bottom: 1px solid var(--line); }
.mast-inner { min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 147px; height: auto; display: block; }
.global { display: flex; align-items: stretch; gap: 27px; align-self: stretch; }
.global a { position: relative; display: flex; align-items: center; color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.global a:hover, .global [aria-current] { color: var(--brand-navy); }
.global [aria-current]::after { content: ""; position: absolute; height: 2px; background: var(--brand-navy); bottom: 13px; left: 0; right: 0; }
.trail { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 15px; font-size: .82rem; color: var(--muted); }
.trail nav { display: flex; align-items: center; gap: 8px; }
.trail nav span[aria-hidden] { color: #98a9b2; }
.trail a { color: var(--muted); }
.trail .daily { font-weight: 600; }
.hero { display: grid; grid-template-columns: minmax(0, 1.46fr) minmax(300px, .86fr); background: #153249; border-radius: 14px; overflow: hidden; color: #fff; }
.race-intro { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 32px 36px; }
.race-intro::after { content: ""; pointer-events: none; position: absolute; z-index: -1; width: 235px; height: 150px; bottom: -103px; right: -25px; border: 1px solid #567c9b; border-radius: 90px; box-shadow: 0 0 0 8px #153249, 0 0 0 9px #466a88, 0 0 0 17px #153249, 0 0 0 18px #365974, 0 0 0 26px #153249, 0 0 0 27px #2b4c65; transform: rotate(-22deg); }
.race-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: .91rem; font-weight: 650; color: #e8eff2; }
.race-kind i { height: 13px; width: 1px; background: #6b808e; margin-inline: 2px; }
/* Same grade badge as the race list. */
.gbadge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px;
  padding: 3px 9px; border-radius: 999px; background: #4c5bb5; color: #fff;
  font: 600 .6875rem/1.4 -apple-system, BlinkMacSystemFont, "Hiragino Sans", Meiryo, sans-serif; white-space: nowrap;
}
.hero h1 { margin: 12px 0 7px; color: white; font-size: clamp(2.15rem, 4.3vw, 3.1rem); letter-spacing: .035em; line-height: 1.22; font-weight: 800; }
.date-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 14px; margin: 0; font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.date-line span { font-weight: 500; color: #d5e0e8; }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 0; list-style: none; margin: 14px 0 0; padding: 0; color: #d5e0e8; font-size: .88rem; }
.facts li + li::before { content: ""; display: inline-block; width: 1px; height: 11px; margin-inline: 10px; background: #697e8a; vertical-align: -1px; }
.leaders { margin: 24px 28px 24px 0; padding: 0 0 0 25px; border-left: 1px solid #486071; align-self: center; min-width: 0; }
.leaders h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; margin: 0 0 7px; color: #dce8ee; font-size: .9rem; font-weight: 650; }
.leaders h2 span { color: #c6d6df; font-size: .77rem; font-weight: 500; }
.leaders ol { list-style: none; padding: 0; margin: 0; }
.leaders li { display: grid; min-height: 35px; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 10px; }
.leaders li + li { border-top: 1px solid #354f60; }
.place { font: 700 .8rem/19px var(--numbers); text-align: center; color: #d4e0e7; background: #334d5e; border-radius: 3px; }
.leaders li:first-child .place { background: var(--lime); color: #1b3526; }
.leaders li b { font: 700 1.26rem/1.2 var(--numbers); font-variant-numeric: tabular-nums; }
.leaders li:first-child b { color: var(--lime); }
.leader-name { display: block; cursor: pointer; text-align: left; color: #fff; border: 0; background: none; font: 650 .93rem/1.5 var(--body); padding: 3px 0; }
.leader-name:hover, .horse button:hover { text-decoration: underline; text-underline-offset: .2em; }
.leader-name:focus-visible { outline-color: var(--lime); }
.runners { margin-top: 31px; scroll-margin-top: 10px; }
.section-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.section-head h2 { margin: 0; line-height: 1.4; font-size: 1.55rem; letter-spacing: .015em; }
.section-head p { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.panel { border: 1px solid #cedae0; border-radius: 10px; overflow: clip; background: #fff; }
.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 11px 17px; }
.js-only, [hidden] { display: none !important; }
.js .order-tools.js-only { display: flex !important; }
html:not(.js) .tools { display: none; }
.order-tools { align-items: center; gap: 17px; margin-left: auto; }
.order, .result-control { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; color: #435969; white-space: nowrap; }
.order select { appearance: none; padding: 5px 28px 5px 10px; min-height: 34px; font-size: .87rem; border: 1px solid #bdcdd4; border-radius: 5px; color: var(--ink); background-color: white; background-image: linear-gradient(45deg,transparent 52%,#4f626c 54%),linear-gradient(135deg,#4f626c 48%,transparent 52%); background-size: 5px 5px,5px 5px; background-repeat: no-repeat; background-position: calc(100% - 14px) 52%,calc(100% - 9px) 52%; }
.result-control { min-height: 34px; cursor: pointer; }
.result-control input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.field-table { border-spacing: 0; width: 100%; text-align: left; line-height: 1.35; font-variant-numeric: tabular-nums; }
.field-table thead th { background: #edf2f5; color: #354e61; padding: 8px 10px; font-size: .86rem; font-weight: 700; border-block: 1px solid var(--line); }
.field-table thead small { font-size: .73rem; display: block; font-weight: 500; margin-top: 2px; }
.field-table tbody td, .field-table tbody th { border-bottom: 1px solid var(--line); padding: 11px 10px; }
.field-table tbody tr:last-child > * { border-bottom: 0; }
.field-table .number { width: 66px; text-align: center; }
.field-table .horse { width: 30%; }
.field-table .average, .field-table .previous { width: 14%; text-align: right; }
.field-table thead .average { background: #e7efd9; color: #39551b; }
.field-table tbody .average { background: #f4f8ec; }
.field-table .origins { padding-left: 25px; }
.field-table .result { display: none; width: 60px; text-align: center; white-space: nowrap; }
.show-results .result { display: table-cell; }
.field-table tbody tr:hover td, .field-table tbody tr:hover th { background: #f4f7f9; }
.field-table tbody tr:hover .average { background: #edf4df; }
.horse button { display: inline; padding: 2px 0; background: none; border: 0; color: var(--ink); font-size: 1.02rem; font-weight: 750; letter-spacing: .005em; text-align: left; line-height: 1.45; overflow-wrap: anywhere; }
.field-table tbody .horse small, .field-table tbody .previous small, .compact-venues { display: block; font-size: .75rem; font-weight: 450; color: var(--muted); line-height: 1.5; }
.compact-venues { display: none; white-space: normal; }
.compact-venues span { white-space: nowrap; }
.average b { font: 750 1.36rem/1.25 var(--numbers); color: #37551c; }
.previous b { font: 650 1.09rem/1.3 var(--numbers); }
.gate { display: inline-grid; place-items: center; width: 32px; height: 31px; border-radius: 5px; border: 1px solid transparent; font: 750 1rem/1 var(--numbers); }
.g1 { background: #fff; color: #293e50; border-color: #a7b6bf; }
.g2 { background: #333b45; color: #fff; }
.g3 { background: #c7484d; color: #fff; }
.g4 { background: #3866a3; color: #fff; }
.g5 { background: #f4d457; color: #413605; }
.g6 { background: #397557; color: white; }
.g7 { background: #f2a75a; color: #42270a; }
.g8 { background: #edb1ca; color: #54243b; }
.runs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.run-chip { display: block; min-width: 0; padding-left: 7px; border-left: 2px solid #8a98a4; }
.run-chip small { display: block; font-size: .74rem; color: #486071; white-space: nowrap; }
.run-chip b { display: block; font: 650 .94rem/1.35 var(--numbers); margin-top: 1px; }
.run-chip time { display: none; }
.mean-runs { margin: 0 22px 15px; }
.mean-runs h3 { margin: 6px 0; color: var(--ink); font-size: .95rem; }
.mean-runs .runs { padding: 10px; background: #f3f6f8; border-radius: 5px; }
.mean-runs .run-chip time { display: block; font-size: .73rem; color: var(--muted); }
.scratch { display: inline-block; padding: 1px 4px; border: 1px solid #c8b8a4; color: #755330; background: #fff8ec; margin-inline: 5px 0; vertical-align: 2px; border-radius: 3px; font-size: .72rem; }
.withdrawn .horse button { color: #627280; }
.footnote { margin: 12px 2px 0; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.related { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 15px; margin: 23px 0 32px; font-size: .9rem; }
.related span { font-weight: 650; }
.all-races { margin-left: auto; }
.footer { border-top: 1px solid var(--line); }
.footer .wrap { min-height: 60px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: .83rem; }
.footer span { font-weight: 700; margin-right: auto; }
.footer a { color: var(--muted); }
@media (max-width: 890px) {
  .wrap { width: calc(100% - 40px); }
  .hero { grid-template-columns: minmax(0,1.25fr) minmax(245px,.85fr); }
  .race-intro { padding: 25px; }
  .leaders { padding-left: 17px; margin-right: 19px; }
  .field-table .horse { width: 26%; }
  .field-table .origins { padding-left: 12px; }
}
@media (max-width: 730px) {
  .mast-inner { min-height: 65px; }
  .brand img { width: 123px; }
  .global { gap: 17px; }
  .hero { grid-template-columns: 1fr; }
  .race-intro { padding: 19px 22px 18px; }
  .leaders { border: 0; border-top: 1px solid #486071; padding: 10px 0 12px; margin: 0 22px; }
  .leaders h2 { justify-content: flex-start; gap: 7px; margin: 0 0 5px; }
  .leaders ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .leaders li { min-width: 0; display: grid; grid-template-columns: 14px minmax(0,1fr); gap: 1px 4px; }
  .leaders li + li { border: 0; }
  .leaders li b { grid-column: 2; font-size: 1.07rem; }
  .place { font-size: .71rem; line-height: 15px; }
  .leader-name { font-size: .79rem; line-height: 1.35; overflow-wrap: anywhere; }
  .tools { padding: 9px 12px; gap: 6px 12px; }
  .field-table .origins { display: none; }
  .field-table .horse { width: auto; }
  .field-table .average, .field-table .previous { width: 17%; }
  .field-table thead .previous small { display: none; }
  .compact-venues { display: block; }
}
@media (max-width: 530px) {
  .wrap { width: calc(100% - 24px); }
  .mast-inner { min-height: 56px; gap: 12px; }
  .brand img { width: 104px; }
  .global { gap: 12px; }
  .global a { font-size: .8rem; }
  .global [aria-current]::after { bottom: 6px; }
  .trail { padding-block: 9px; font-size: .76rem; }
  .trail nav { gap: 4px; }
  .hero { border-radius: 10px; }
  .race-intro { padding: 16px 15px 13px; }
  .race-kind { font-size: .82rem; gap: 7px; }
  .hero h1 { font-size: clamp(1.8rem, 7.9vw, 2.2rem); margin: 7px 0 5px; }
  .date-line { font-size: .89rem; gap: 4px 8px; }
  .facts { margin-top: 7px; font-size: .79rem; }
  .facts li + li::before { margin-inline: 6px; }
  .leaders { margin-inline: 15px; }
  .leaders ol { gap: 7px; }
  .leaders h2 { font-size: .79rem; }
  .leader-name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
  .runners { margin-top: 18px; }
  .section-head { align-items: baseline; flex-wrap: wrap; gap: 3px 12px; margin-bottom: 9px; }
  .section-head h2 { font-size: 1.25rem; }
  .section-head p { font-size: .79rem; }
  .tools { padding: 7px 9px; }
  .order-tools { gap: 10px; }
  .order, .result-control { font-size: .78rem; }
  .order select { font-size: .8rem; }
  .field-table thead th, .field-table tbody td, .field-table tbody th { padding-inline: 5px; }
  .field-table thead th { padding-block: 7px; font-size: .78rem; }
  .field-table thead small { font-size: .69rem; }
  .field-table tbody td, .field-table tbody th { padding-block: 8px; }
  .field-table .number { width: 36px; padding-left: 6px; }
  .gate { width: 25px; height: 26px; font-size: .88rem; }
  .horse button { font-size: .89rem; }
  .average b { font-size: 1.1rem; }
  .previous b { font-size: 1rem; }
  .field-table tbody .horse small, .field-table tbody .previous small, .compact-venues { font-size: .69rem; }
  .field-table .average, .field-table .previous { width: 19%; white-space: nowrap; }
  .field-table .result { width: 32px; font-size: .77rem; }
  .show-results .field-table .average, .show-results .field-table .previous { width: 17%; }
  .section-head, .footnote { padding-inline: 2px; }
}
@media (max-width: 355px) {
  .wrap { width: calc(100% - 16px); }
  .global { gap: 9px; }
  .global a { font-size: .75rem; }
  .brand img { width: 92px; }
  .facts li { font-size: .74rem; }
}
