:root {
  --bg: #eef3ef;
  --paper: #ffffff;
  --card: #ffffff;
  --ink: #14231c;
  --muted: #6b7d73;
  --band: #e4ebe6;
  --band-soft: #f5f8f6;
  --line: #cfdbd4;
  --line-soft: #e9efeb;
  --accent: #b3352f;
  --green: #0f6b45;
  --radius: 6px;
  --radius-data: 2px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  padding-bottom: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px max(16px, calc((100vw - 1120px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.header-action {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green);
  padding: 0;
}

.header-action.is-active {
  background: #e5f3eb;
}

.header-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.text-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green);
  padding: 9px 12px;
  font-weight: 600;
}

@media (max-width: 390px) {
  .site-header {
    gap: 8px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand small {
    font-size: 10px;
  }

  .header-tools {
    gap: 6px;
  }
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.app-shell.is-top-page {
  width: 100%;
  padding-top: 0;
  padding-right: 0;
  padding-left: 0;
}

.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 56px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.bottom-nav span {
  font-size: 18px;
  line-height: 1;
}

.bottom-nav button.is-active {
  background: #e5f3eb;
  color: var(--green);
}

.nav-icon {
  position: relative;
  display: inline-block;
  width: 21px;
  height: 21px;
  color: currentColor;
}

.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.nav-home::before {
  inset: 6px 4px 3px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.nav-home::after {
  left: 4px;
  top: 3px;
  width: 13px;
  height: 13px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.nav-horse {
  display: block;
  background: currentColor;
  -webkit-mask: url("../assets/icons/horse.svg") center / contain no-repeat;
  mask: url("../assets/icons/horse.svg") center / contain no-repeat;
}

.season-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
}

.season-selector-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.season-selector select {
  min-width: 148px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--green);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  width: min(1120px, 100%);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 16px;
}

.site-footer-updated,
.site-footer-copyright {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.site-footer-copyright {
  margin-left: auto;
  white-space: nowrap;
}

.about-panel p {
  margin: 0 0 10px;
  line-height: 1.7;
}

.about-panel p:last-child {
  margin-bottom: 0;
}

.about-breadcrumb {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.about-breadcrumb a:hover,
.about-back a:hover {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-breadcrumb-separator {
  color: #a9b8b0;
}

.about-heading {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}

.about-heading h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.about-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
}

.about-intro {
  max-width: 720px;
  margin: 16px 0 0;
  color: #3f5148;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.85;
}

.about-link-grid,
.pet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.about-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 20px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 16px 22px;
}

.about-link-card:hover,
.pet-card:hover {
  border-color: var(--green);
}

.about-link-card strong,
.about-link-card small {
  display: block;
}

.about-link-card strong {
  font-size: 17px;
}

.about-link-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.about-link-mark {
  color: #8b9a92;
  font-size: 14px;
  font-weight: 600;
}

.pet-grid {
  margin-top: 20px;
}

.pet-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-data);
  background: var(--paper);
  padding: 14px 16px;
}

.pet-card img {
  width: 112px;
  max-height: 96px;
  object-fit: contain;
  border-radius: 3px;
}

.pet-card-copy,
.pet-card-copy > span,
.pet-card-copy > strong {
  display: block;
}

.pet-card-copy > strong {
  font-size: 17px;
}

.pet-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.pet-card-meta span:last-child {
  color: #9aa8a0;
  font-weight: 500;
}

.pet-card-summary {
  margin-top: 8px;
  color: #3f5148;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
}

.pet-card-more {
  margin-top: 9px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.pet-detail,
.conquest-content {
  max-width: 820px;
  margin-top: 28px;
}

.pet-detail {
  max-width: 760px;
}

.pet-detail p,
.conquest-content > p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.95;
}

.pet-detail p + p {
  margin-top: 16px;
}

.conquest-content > h2,
.conquest-regions-title {
  margin: 32px 0 12px;
  font-size: 18px;
}

.conquest-summary {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  padding: 20px 24px 22px;
}

.conquest-summary > div,
.conquest-summary > p,
.conquest-unvisited {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.conquest-summary > div {
  justify-content: space-between;
  gap: 12px;
}

.conquest-summary h2 {
  margin: 0;
  font-size: 16px;
}

.conquest-summary > div > span,
.conquest-unvisited > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.conquest-summary > p {
  gap: 18px;
  margin: 14px 0 0;
  color: #3f5148;
  font-size: 14px;
  font-weight: 600;
}

.conquest-summary > p strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.conquest-summary > p strong small {
  color: #8b9a92;
  font-size: 18px;
  font-weight: 600;
}

.conquest-summary .conquest-unvisited {
  gap: 14px;
  margin-top: 16px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

.conquest-unvisited b {
  font-size: 15px;
}

.conquest-regions-title {
  margin-top: 36px;
}

.conquest-region {
  margin-top: 26px;
}

.conquest-region h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 15px;
}

.conquest-region h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dbe4de;
}

.conquest-table {
  margin-top: 8px;
  border-top: 1px solid var(--line-soft);
}

.conquest-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 180px;
  gap: 24px;
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 16px;
  color: #3f5148;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
}

.conquest-row-head {
  background: #f3f7f4;
  color: #9aa8a0;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
}

.conquest-row strong {
  color: var(--ink);
  font-weight: 700;
}

.conquest-row.is-unvisited span,
.conquest-row.is-unvisited strong {
  color: #52605a;
}

.about-back {
  margin: 36px 0 0;
  border-top: 1px solid #dbe4de;
  padding-top: 18px;
  font-size: 14px;
  font-weight: 700;
}

.page-title {
  margin: 10px 0 16px;
}

.page-title h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 500;
}

.update-banner {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  padding: 0;
  text-align: left;
}

.update-banner-inner {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(1120px, 100%);
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

.notice-icon {
  display: block;
  width: 24px;
  height: 24px;
}

.notice-title {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-page {
  width: 100%;
}

.top-full-bleed {
  width: 100%;
}

.top-content {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

.top-hero {
  position: relative;
  overflow: hidden;
  height: 210px;
}

.top-hero::after {
  content: "";
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(180deg, rgba(238, 243, 239, 0), var(--bg) 94%);
  pointer-events: none;
}

.top-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.top-summary {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin: -34px 0 14px;
  padding: 0;
}

.top-summary-copy {
  min-width: 0;
}

.top-summary-week {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.top-summary h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.top-summary-copy > p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 108px));
  gap: 0;
  margin: 0;
}

.summary-stats div {
  min-width: 0;
  min-height: 64px;
  border-left: 1px solid var(--line);
  padding: 4px 12px;
  text-align: center;
}

.summary-stats div:first-child {
  border-left: 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

dd {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.summary-stats dd {
  font-size: 24px;
  white-space: nowrap;
}

.note-strip,
.panel,
.filter-panel,
.article-card,
.loading-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.note-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  padding: 12px 0;
}

.note-strip span {
  color: var(--ink);
  font-weight: 700;
}

.note-strip p {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 24px;
}

.quick-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: center;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  text-align: left;
}

.quick-tile.has-meta { grid-template-areas: "icon title" "icon sub"; }
.quick-tile.no-meta { grid-template-areas: "icon title" "icon title"; }

.quick-tile .nav-icon {
  grid-area: icon;
  color: var(--green);
}

.quick-tile strong {
  grid-area: title;
  font-size: 16px;
}

.quick-tile small {
  grid-area: sub;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.panel,
.filter-panel,
.loading-card,
.empty-state {
  margin-bottom: 18px;
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2,
.panel h2 {
  margin: 0;
  font-size: 20px;
}

.top-page .section-head .text-button {
  min-height: auto;
  border: 0;
  background: transparent;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-size: 11px;
}

.rank-mini,
.horse-list,
.library-grid {
  display: grid;
  gap: 12px;
}

.library-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.article-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.top-featured-race {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-data);
}

.top-featured-race-head {
  border-top: 2px solid var(--ink);
  background: var(--band-soft);
  padding: 9px 12px;
}

.top-featured-race-head p,
.top-featured-race-head h3 {
  margin: 0;
}

.top-featured-race-head p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.top-featured-race-head h3 {
  margin-top: 5px;
  font-size: 17px;
}

.top-featured-entries {
  display: grid;
}

.top-featured-entry {
  display: grid;
  gap: 16px;
  align-items: center;
  min-height: 54px;
  border-top: 1px solid var(--line-soft);
  padding: 10px 14px;
}

.top-featured-entry:first-child {
  border-top: 0;
}

.top-featured-entry.is-scheduled {
  grid-template-columns: 240px 56px 126px auto;
  grid-template-areas: "horse sex jockey owner";
  justify-content: start;
}

.top-featured-entry.is-result {
  grid-template-columns: 240px 56px 126px 72px 60px auto;
  grid-template-areas: "horse sex jockey popularity result owner";
  justify-content: start;
}

.top-entry-name {
  grid-area: horse;
  min-width: 0;
  overflow: hidden;
  border-left: 3px solid var(--owner-color);
  padding-left: 10px;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-entry-sex { grid-area: sex; }
.top-entry-jockey { grid-area: jockey; }
.top-entry-popularity { grid-area: popularity; text-align: right; }
.top-entry-result { grid-area: result; text-align: right; }
.top-entry-owner { grid-area: owner; justify-self: start; }

.top-entry-sex,
.top-entry-jockey,
.top-entry-popularity {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.top-entry-result {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.top-entry-result.is-win {
  color: var(--accent);
}

.top-empty {
  margin: 0;
  border-top: 2px solid var(--ink);
  padding: 14px 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.grade {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-data);
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  vertical-align: middle;
}

.grade-other {
  background: #fff;
  color: var(--ink);
}

.grade-g1 { border-color: #3A2578; background: #3A2578; }
.grade-g2 { border-color: #8A3A28; background: #8A3A28; }
.grade-g3 { border-color: #17573A; background: #17573A; }
.grade-listed { border-color: var(--ink); background: var(--ink); }

.owner-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--owner-color), #fff 45%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--owner-color), #fff 88%);
  color: var(--owner-color);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.rank-mini {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-data);
}

.top-rank-header {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr) 116px 140px;
  gap: 16px;
  align-items: center;
  min-height: 0;
  background: var(--band-soft);
  border-bottom: 1px solid var(--line);
  padding: 9px 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.top-rank-header span:last-child { text-align: right; }

.top-rank-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr) 116px 140px;
  gap: 16px;
  align-items: center;
  min-width: 0;
  min-height: 60px;
  border-top: 1px solid var(--line-soft);
  padding: 10px 14px;
}

.top-rank-row:first-child {
  border-top: 0;
}

.award-row p {
  color: var(--muted);
  font-weight: 600;
}

.top-rank-position {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-weight: 800;
}

.top-rank-position b { font-size: 22px; line-height: 1; }
.top-rank-position small { font-size: 12px; font-weight: 800; }

.top-rank-position.is-gold { color: #9a7b1f; }
.top-rank-position.is-silver { color: #6f7a80; }
.top-rank-position.is-bronze { color: #8a5a2b; }

.top-rank-owner {
  border-left: 3px solid var(--owner-color);
  padding-left: 10px;
}

.top-rank-ace,
.top-rank-record {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.top-rank-record { color: #3f5148; font-weight: 500; }

.top-rank-points {
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
}

.top-rank-points {
  display: inline-flex;
  justify-content: end;
  align-items: baseline;
  gap: 2px;
  text-align: right;
}

.top-rank-points strong { font-size: inherit; }
.top-rank-points small { color: var(--muted); font-size: 12px; font-weight: 600; }

.filter-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.photo-masthead {
  position: relative;
  overflow: hidden;
  height: 160px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.photo-masthead-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-masthead-timeline .photo-masthead-image {
  object-position: 50% 42%;
}

.photo-masthead-horses .photo-masthead-image {
  object-position: 50% 67%;
}

.photo-masthead-horses {
  width: 100vw;
  margin-top: -18px;
  margin-right: calc(50% - 50vw);
  margin-bottom: 0;
  margin-left: calc(50% - 50vw);
}

.photo-masthead-horses .photo-masthead-scrim {
  background: linear-gradient(90deg, rgba(12, 20, 16, .74) 0%, rgba(12, 20, 16, .36) 42%, rgba(12, 20, 16, .06) 100%);
}

.photo-masthead-horses .photo-masthead-copy {
  left: 50%;
  bottom: 20px;
  width: min(1120px, 100%);
  max-width: none;
  padding: 0 16px;
  transform: translateX(-50%);
}

.photo-masthead-horses .photo-masthead-copy h1 {
  font-size: 28px;
}

.photo-masthead-horses .photo-masthead-copy p {
  margin-top: 6px;
  font-size: 14px;
}

.photo-masthead-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 100%);
}

.photo-masthead-copy {
  position: absolute;
  left: 16px;
  bottom: 12px;
  max-width: calc(100% - 32px);
  color: #fff;
}

.photo-masthead-copy h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.photo-masthead-copy p {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.week-nav {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  max-width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 0 14px;
}

.week-nav button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.week-nav button:disabled {
  cursor: default;
  opacity: .38;
}

.week-nav .latest-button {
  padding: 0 12px;
}

.latest-button-mobile { display: none; }

.week-nav strong,
.week-nav span {
  display: block;
}

.week-nav strong {
  font-size: 22px;
}

.week-nav span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-chip {
  min-height: 36px;
  border: 1px solid color-mix(in srgb, var(--owner-color, var(--green)), #fff 48%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--owner-color, var(--green)), #fff 91%);
  color: var(--owner-color, var(--green));
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
}

.owner-chip.is-active {
  background: var(--owner-color, var(--green));
  color: #fff;
}

.search-info {
  margin: 0;
  border-radius: var(--radius);
  background: var(--band-soft);
  color: var(--ink);
  padding: 9px 11px;
  font-weight: 600;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.segmented button,
.control-row select,
.control-row input,
.check {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px 10px;
  font-weight: 600;
}

.segmented button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.control-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
}

.timeline-controls {
  grid-template-columns: minmax(0, 1fr) 108px;
}

.timeline-owner-select { display: none; }

.timeline-filter {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.date-section {
  margin-bottom: 18px;
}

.date-section > h2 {
  margin: 24px 0 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  padding: 0 0 8px;
  font-size: 19px;
}

.timeline-sections .date-section > h2 {
  position: sticky;
  top: 64px;
  z-index: 10;
}

.race-group {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.timeline-sections .date-section:last-child .race-group:last-child { border-bottom: 0; }

.timeline-sections .empty-state {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 20px 0;
}

.race-group-head {
  display: block;
  padding: 14px 0 0;
  background: transparent;
  border-bottom: 0;
}

.race-group-head p,
.race-group-head h3 {
  margin: 0;
}

.race-group-head p {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.race-group-head h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 3px;
  font-size: 19px;
}

.entry-list {
  display: block;
}

.horse-row {
  min-width: 0;
  background: transparent;
  padding: 8px 0 2px;
}

.entry-list .horse-row + .horse-row {
  border-top: 0;
}

.horse-row-grid {
  display: grid;
  grid-template-columns: 250px 46px 112px 116px 68px 56px 92px;
  gap: 14px;
  align-items: center;
  min-height: 48px;
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

.horse-row-grid h4 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 3px solid var(--owner-color);
  padding-left: 10px;
  font-size: 19px;
}

.entry-meta-separator { display: none; }

@media (min-width: 781px) {
  .horse-row-grid > .entry-horse-name { grid-column: 1; }
  .horse-row-grid > .entry-sex { grid-column: 2; }
  .horse-row-grid > .entry-jockey { grid-column: 3; }
  .horse-row-grid > .owner-badge { grid-column: 4; }
  .horse-row-grid > .entry-result-meta { display: contents; }
  .horse-row-grid > .entry-result-meta > .entry-popularity { grid-column: 5; }
  .horse-row-grid > .entry-result-meta > .entry-result { grid-column: 6; }
  .horse-row-grid > .entry-result-meta > .entry-points { grid-column: 7; }
}

.entry-sex { font-size: 14px; font-weight: 600; }
.entry-jockey,
.entry-popularity {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.entry-result {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.entry-points {
  text-align: right;
  font-size: 15px;
  font-weight: 700;
}

.timeline-controls .check { white-space: nowrap; }

.horse-row.is-win .entry-result { color: var(--accent); }

.ai-review {
  margin: 12px 0 0;
  border-top: 2px solid var(--ink);
  background: var(--band-soft);
  padding: 10px;
}

.ai-review span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ai-review p {
  margin: 0;
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 600;
}

.reaction-row span {
  border: 1px solid var(--line);
  border-radius: var(--radius-data);
  background: #fff;
  padding: 4px 9px;
}

.race-link {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.ranking-title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  border-bottom: 2px solid var(--ink);
  padding: 26px 0 10px;
}

.ranking-title-row h1 {
  font-size: 26px;
}

.rank-table {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.rank-table-header,
.rank-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) minmax(0, 1fr) 132px 132px;
  gap: 16px;
  align-items: center;
}

.rank-table-header {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 700;
}

.rank-table-header span:first-child,
.rank-position {
  text-align: center;
}

.rank-table-header span:last-child,
.rank-points {
  text-align: right;
}

.rank-row {
  min-height: 58px;
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 14px;
}

.rank-position {
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
}

.rank-position.is-gold { color: #9a7b1f; }
.rank-position.is-silver { color: #6f7a80; }
.rank-position.is-bronze { color: #8a5a2b; }

.rank-position small {
  font-size: 12px;
  font-weight: 700;
}

.rank-owner {
  min-width: 0;
  border-left: 3px solid var(--owner-color);
  overflow: hidden;
  padding-left: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 700;
}

.rank-ace {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
}

.rank-record {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.rank-points strong {
  font-size: 19px;
  font-weight: 800;
}

.rank-points small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ranking-awards {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px;
}

.ranking-awards-title {
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 7px;
  font-size: 16px;
}

.award-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px 108px;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 0;
}

.award-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.award-copy {
  min-width: 0;
}

.award-copy h3,
.award-copy p {
  margin: 0;
}

.award-copy h3 {
  font-size: 14px;
  font-weight: 700;
}

.award-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.award-owner {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--owner-color), #fff 45%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--owner-color), #fff 88%);
  color: var(--owner-color);
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
}

.award-value {
  text-align: right;
  font-size: 16px;
  font-weight: 800;
}

.historical-horse-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.historical-horse-context strong {
  font-size: 14px;
}

.historical-horse-context a {
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
}

.horse-filter-panel {
  padding: 14px 0;
}

.horse-filters-desktop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px 172px 232px;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.horse-filters-desktop .chip-row {
  gap: 6px;
  min-width: 0;
}

.horse-filters-desktop .owner-chip {
  min-height: 30px;
  padding: 5px 12px;
  font-size: 12px;
}

.horse-filters-desktop .owner-chip:first-child.is-active {
  border-color: var(--ink);
  background: var(--ink);
}

.horse-filters-desktop select,
.horse-filters-desktop input,
.horse-filters-mobile select,
.horse-filters-mobile input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.horse-filters-desktop input,
.horse-filters-mobile input {
  padding: 0 10px;
  font-weight: 500;
}

.horse-filters-mobile {
  display: none;
}

.horse-table {
  margin-top: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.horse-table-header,
.horse-list-row {
  display: grid;
  grid-template-columns: 230px 116px 48px 58px 122px minmax(0, 1fr) minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.horse-table-header {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 9px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.horse-table-header > span,
.horse-table-header button {
  min-width: 0;
}

.horse-table-header button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
}

.horse-table-header [aria-sort="ascending"] button,
.horse-table-header [aria-sort="descending"] button {
  color: var(--ink);
}

.horse-sort-indicator {
  color: #c3cdc7;
  font-size: 8px;
}

.horse-sort-indicator.is-active {
  color: #3f5148;
  font-size: 9px;
}

.horse-table .horse-list {
  display: block;
  margin: 0;
}

.horse-list-row {
  min-height: 46px;
  border-bottom: 1px solid var(--line-soft);
  padding: 7px 14px;
}

.horse-list-row:last-child {
  border-bottom: 0;
}

.horse-list-primary,
.horse-list-training,
.horse-list-pedigree {
  display: contents;
}

.horse-list-name,
.horse-owner-label,
.horse-list-trainer,
.horse-list-father,
.horse-list-mother {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horse-list-name {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.horse-list-name.is-unnamed {
  color: #8b9a92;
  font-weight: 500;
}

.horse-list-name { grid-column: 1; grid-row: 1; }
.horse-owner-label { grid-column: 2; grid-row: 1; }
.horse-list-sex { grid-column: 3; grid-row: 1; }
.horse-list-affiliation { grid-column: 4; grid-row: 1; }
.horse-list-trainer { grid-column: 5; grid-row: 1; }
.horse-list-father { grid-column: 6; grid-row: 1; }
.horse-list-mother { grid-column: 7; grid-row: 1; }

.horse-owner-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, var(--owner-color), #fff 55%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--owner-color), #fff 90%);
  color: var(--owner-color);
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
}

.horse-list-sex {
  font-size: 13px;
  font-weight: 600;
}

.sex-male { color: #1e4bb8; }
.sex-female { color: #a3316a; }
.sex-gelding,
.sex-none { color: #5b6b62; }

.horse-list-affiliation,
.horse-list-trainer {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.horse-list-father,
.horse-list-mother {
  color: #3f5148;
  font-size: 14px;
  font-weight: 500;
}

.horse-list-father small,
.horse-list-mother small {
  display: none;
}

.horse-list-empty {
  padding: 22px 10px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.library-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  border-radius: 6px;
  padding: 16px 18px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.library-card:hover {
  border-color: var(--green);
}

.library-card-icon {
  display: grid;
  place-items: center;
  color: var(--green);
}

.library-card-icon svg {
  width: 22px;
  height: 22px;
}

.library-card-copy {
  min-width: 0;
}

.library-card-copy strong,
.library-card-copy small {
  display: block;
}

.library-card-copy strong {
  font-size: 18px;
}

.library-card-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.library-card-arrow {
  color: #8b9a92;
  font-size: 14px;
  font-weight: 600;
}

.guestbook-entry,
.guestbook-notice,
.guestbook-comments {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 16px;
}

.guestbook-entry h2,
.guestbook-notice h2,
.guestbook-comments h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.guestbook-entry-label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 500;
}

.guestbook-entry-input {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--band-soft);
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.guestbook-entry-input:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.guestbook-turnstile {
  min-height: 65px;
  margin: 0 0 12px;
  overflow: hidden;
}

.guestbook-entry-submit {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--band-soft);
  padding: 0 20px;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.guestbook-entry-submit:disabled {
  cursor: not-allowed;
}

.guestbook-entry-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.guestbook-entry-note[data-tone="error"] {
  color: var(--accent);
}

.guestbook-entry-note[data-tone="success"] {
  color: var(--green);
}

.guestbook-comment-list {
  border-top: 1px solid var(--line-soft);
}

.guestbook-comment {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.guestbook-comment:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.guestbook-comment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.guestbook-comment-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.guestbook-comment time {
  flex: 0 1 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.guestbook-comment-message {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.guestbook-notice h2 {
  color: var(--muted);
  font-size: 13px;
}

.guestbook-notice-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.guestbook-notice-title {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.draft-legend span,
.draft-pick-heading b {
  color: #e0a11b;
}

.draft-round-list {
  display: grid;
  gap: 14px;
}

.draft-round {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px 22px 24px;
}

.draft-round.is-conflict {
  background: #fffdfc;
  border-color: #e3d3cb;
}

.draft-round-heading {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.draft-round-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.draft-round-title > span {
  color: #9aa8a0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.draft-round-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
}

.draft-round-title h2 small {
  margin-left: 4px;
  color: #3f5148;
  font-size: 13px;
  letter-spacing: .1em;
}

.draft-round-heading::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  margin-bottom: 7px;
  background: var(--line);
}

.draft-round.is-conflict .draft-round-title > span {
  color: #b09189;
}

.draft-round.is-conflict .draft-round-heading::after {
  background: #eadfd9;
}

.draft-round-heading b {
  order: 2;
  flex: 0 0 auto;
  margin-bottom: 4px;
  color: #8a3a28;
  font-size: 11px;
  letter-spacing: .08em;
}

.draft-pick-grid,
.draft-nomination-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.draft-pick,
.draft-nomination {
  min-width: 0;
  border-top: 1px solid var(--owner-color);
  border-left: 4px solid var(--owner-color);
  border-radius: 0 3px 3px 0;
}

.draft-pick {
  background: #f7faf8;
  padding: 11px 12px 13px;
}

.draft-pick-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.draft-pick-heading span,
.draft-nomination > span {
  min-width: 0;
  overflow: hidden;
  color: var(--owner-color);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-pick-heading b {
  margin-left: auto;
  font-size: 17px;
  line-height: 1;
}

.draft-pick > strong,
.draft-nomination > strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.26;
  letter-spacing: -.01em;
}

.draft-pick-sex {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
}

.draft-pick-father {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: #3f5148;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.draft-pick-father small {
  margin-right: 5px;
  color: #9aa8a0;
  font-size: 10px;
  font-weight: 700;
}

.draft-pick-comment {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.draft-flow-section > h3,
.draft-lottery > div > span,
.draft-fallback > span {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.draft-flow-nominations {
  margin-top: 16px;
}

.draft-flow-section > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.draft-flow-section > h3::after,
.draft-flow-final > h3::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: #eadfd9;
}

.draft-nomination-grid {
  margin-top: 8px;
}

.draft-nomination {
  position: relative;
  background: #f8faf8;
  padding: 11px 14px 13px;
}

.draft-nomination.is-conflict {
  border-right: 1px solid #e0cbc3;
  border-bottom: 1px solid #e0cbc3;
  background: #fbf4f1;
}

.draft-nomination b {
  position: absolute;
  top: 11px;
  right: 12px;
  color: #8a3a28;
  font-size: 10px;
  letter-spacing: .06em;
}

.draft-lottery {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 20px;
  border-left: 3px solid #8a3a28;
  border-radius: 3px;
  background: #fbf4f1;
  padding: 18px 24px;
}

.draft-lottery > div:first-child {
  display: grid;
  gap: 6px;
}

.draft-lottery > div > span,
.draft-fallback > span {
  color: #8a3a28;
}

.draft-lottery > div > strong {
  font-size: 24px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.draft-lottery ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.draft-lottery li,
.draft-fallback p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.draft-lottery li > span {
  width: 134px;
  border-top: 1px solid var(--owner-color);
  border-left: 4px solid var(--owner-color);
  background: var(--paper);
  padding: 5px 10px;
  color: var(--owner-color);
  font-size: 12px;
  font-weight: 800;
}

.draft-lottery li b,
.draft-lottery li em {
  border-radius: 2px;
  padding: 3px 9px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.draft-lottery li b {
  background: #17573a;
  color: white;
}

.draft-lottery li em {
  border: 1px solid #a9b8b0;
  color: #3f5148;
}

.draft-fallback {
  grid-column: 2;
  display: grid;
  gap: 8px;
}

.draft-fallback p {
  border-left: 3px solid var(--owner-color);
  padding-left: 9px;
}

.draft-fallback p span {
  color: var(--owner-color);
  font-size: 12px;
  font-weight: 800;
}

.draft-flow-final {
  margin-top: 22px;
}

.draft-flow-final > h3::after {
  background: var(--line);
}

.article-list {
  display: grid;
  gap: 12px;
}

.article-card {
  padding: 16px;
}

.article-card h2 {
  margin: 0 0 10px;
}

.article-card div {
  white-space: pre-wrap;
  line-height: 1.75;
}

.rules-content {
  max-width: 760px;
}

.rules-content > section {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

.rules-content > section:first-child {
  padding-top: 4px;
}

.rules-content > section:last-child {
  border-bottom: 0;
}

.rules-content h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.rules-content h3 {
  margin: 18px 0 7px;
  font-size: 13px;
}

.rules-content p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.8;
}

.rules-content p:last-child {
  margin-bottom: 0;
}

.rules-footnote {
  border-left: 2px solid var(--line);
  margin-top: 16px;
  padding-left: 14px;
}

.rules-footnote p {
  color: var(--muted);
  font-size: 13px;
}

.past-page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid var(--ink);
  margin: 10px 0 0;
  padding: 0 0 10px;
}

.past-page-heading h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.past-season-selector {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}

.past-season-selector select {
  min-width: 116px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 7px 28px 7px 12px;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0;
}

.past-season-caption {
  margin: 22px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.past-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.past-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 16px 20px;
  text-decoration: none;
}

.past-link:hover {
  border-color: var(--green);
}

.past-link strong,
.past-link small {
  display: block;
}

.past-link strong {
  font-size: 17px;
}

.past-link small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.past-link > span:last-child {
  color: #8b9a92;
  font-size: 14px;
  font-weight: 600;
}

.past-link:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.empty-state,
.loading-card {
  text-align: center;
}

@media (max-width: 780px) {
  .update-banner {
    height: 42px;
  }

  .update-banner-inner {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    padding: 0 12px;
  }

  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .app-shell {
    padding: 14px 12px 24px;
  }

  .app-shell.is-top-page {
    padding-top: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .note-strip {
    grid-template-columns: 1fr;
  }

  .top-content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .top-hero {
    height: 132px;
  }

  .top-hero img {
    object-position: 50% 38%;
  }

  .top-summary {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: -22px;
  }

  .photo-masthead {
    height: 112px;
  }

  .photo-masthead-horses {
    margin-top: -14px;
    margin-bottom: 0;
  }

  .photo-masthead-horses .photo-masthead-image {
    position: absolute;
    top: 0;
    left: -22%;
    width: 144%;
    object-position: 52% 68%;
  }

  .photo-masthead-horses .photo-masthead-scrim {
    background: linear-gradient(90deg, rgba(12, 20, 16, .76) 0%, rgba(12, 20, 16, .3) 100%);
  }

  .photo-masthead-horses .photo-masthead-copy {
    left: 12px;
    bottom: 12px;
    width: auto;
    max-width: calc(100% - 24px);
    padding: 0;
    transform: none;
  }

  .photo-masthead-horses .photo-masthead-copy h1 {
    font-size: 20px;
  }

  .photo-masthead-horses .photo-masthead-copy p {
    margin-top: 4px;
    font-size: 12px;
  }

  .summary-stats,
  .horse-list,
  .library-grid,
  .past-links {
    grid-template-columns: 1fr;
  }

  .library-card {
    grid-template-columns: 22px minmax(0, 1fr) 14px;
    gap: 11px;
    min-height: 62px;
    padding: 11px 13px;
  }

  .library-card-icon svg {
    width: 20px;
    height: 20px;
  }

  .library-card-copy strong {
    font-size: 16px;
  }

  .library-card-copy small {
    margin-top: 2px;
    font-size: 11px;
  }

  .library-card-arrow {
    font-size: 13px;
  }

  .about-breadcrumb {
    gap: 8px;
    margin-top: 2px;
    font-size: 11px;
  }

  .about-heading {
    padding-bottom: 8px;
  }

  .about-heading h1 {
    font-size: 21px;
  }

  .about-heading p {
    margin-top: 6px;
    font-size: 11px;
  }

  .about-intro {
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.8;
  }

  .about-link-grid,
  .pet-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .about-link-card {
    grid-template-columns: minmax(0, 1fr) 16px;
    gap: 12px;
    min-height: 66px;
    padding: 12px 14px;
  }

  .about-link-card strong {
    font-size: 15px;
  }

  .about-link-card small {
    margin-top: 3px;
    font-size: 12px;
  }

  .about-link-mark {
    font-size: 13px;
  }

  .pet-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 13px;
  }

  .pet-card img {
    width: 104px;
    max-height: 82px;
  }

  .pet-card-copy > strong {
    font-size: 15px;
  }

  .pet-card-meta {
    gap: 4px 10px;
    margin-top: 4px;
    font-size: 11px;
  }

  .pet-card-summary {
    margin-top: 6px;
    font-size: 12px;
  }

  .pet-card-more {
    margin-top: 7px;
    font-size: 12px;
  }

  .pet-detail,
  .conquest-content {
    margin-top: 22px;
  }

  .pet-detail p,
  .conquest-content > p {
    font-size: 13px;
    line-height: 1.85;
  }

  .pet-detail p + p {
    margin-top: 14px;
  }

  .conquest-content > h2,
  .conquest-regions-title {
    margin-top: 24px;
    font-size: 16px;
  }

  .conquest-summary {
    margin-top: 22px;
    padding: 14px 16px 16px;
  }

  .conquest-summary h2 {
    font-size: 14px;
  }

  .conquest-summary > div > span,
  .conquest-unvisited > span {
    font-size: 11px;
  }

  .conquest-summary > p {
    gap: 14px;
    margin-top: 11px;
    font-size: 13px;
  }

  .conquest-summary > p strong {
    font-size: 25px;
  }

  .conquest-summary > p strong small {
    font-size: 15px;
  }

  .conquest-summary .conquest-unvisited {
    gap: 12px;
    margin-top: 12px;
    padding-top: 11px;
  }

  .conquest-unvisited b {
    font-size: 14px;
  }

  .conquest-regions-title {
    margin-top: 26px;
  }

  .conquest-region {
    margin-top: 18px;
  }

  .conquest-region h3 {
    font-size: 14px;
  }

  .conquest-table {
    border-top: 0;
  }

  .conquest-row,
  .conquest-row-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 11px 0;
    background: transparent;
  }

  .conquest-row-head {
    display: none;
  }

  .conquest-row strong,
  .conquest-row span {
    display: block;
  }

  .conquest-row strong {
    font-size: 13px;
  }

  .conquest-row span {
    font-size: 12px;
  }

  .conquest-row span:last-child:not(:empty)::before {
    content: "初上陸時期：";
    color: #9aa8a0;
    font-size: 11px;
    font-weight: 600;
  }

  .about-back {
    margin-top: 26px;
    padding-top: 14px;
    font-size: 13px;
  }

  .rules-content > section {
    padding: 18px 0;
  }

  .rules-content h2 {
    margin-bottom: 10px;
    font-size: 15px;
  }

  .rules-content h3,
  .rules-content p {
    font-size: 12px;
  }

  .rules-content p {
    line-height: 1.75;
  }

  .rules-footnote {
    margin-top: 14px;
    padding-left: 12px;
  }

  .rules-footnote p {
    font-size: 11px;
  }

  .past-page-heading {
    display: block;
    margin-top: 8px;
    padding-bottom: 8px;
  }

  .past-page-heading h1 {
    font-size: 20px;
  }

  .past-season-selector {
    display: grid;
    gap: 7px;
    margin-top: 16px;
  }

  .past-season-selector select {
    width: 100%;
    min-height: 44px;
  }

  .past-season-caption {
    margin-top: 20px;
    font-size: 11px;
  }

  .past-links {
    gap: 0;
    border-top: 1px solid var(--line);
  }

  .past-link {
    min-height: 62px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 11px 14px;
  }

  .past-link:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .past-link strong {
    font-size: 15px;
  }

  .past-link small {
    margin-top: 3px;
    font-size: 12px;
  }

  .summary-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    border-top: 0;
    padding-top: 0;
  }

  .quick-grid {
    display: none;
  }

  .top-rank-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 44px;
    padding: 7px 8px;
  }

  .top-rank-header {
    display: none;
  }

  .top-rank-ace,
  .top-rank-record {
    display: none;
  }

  .top-rank-points {
    font-size: 13px;
  }

  .top-rank-position b {
    font-size: 20px;
  }

  .top-featured-entry.is-scheduled {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "horse owner";
  }

  .top-featured-entry {
    gap: 10px;
    min-height: 46px;
    padding: 9px 12px;
  }

  .top-entry-name {
    padding-left: 9px;
    font-size: 17px;
  }

  .top-featured-entry.is-result {
    grid-template-columns: minmax(0, 1fr) 52px auto;
    grid-template-areas: "horse result owner";
  }

  .top-entry-sex,
  .top-entry-jockey,
  .top-entry-popularity {
    display: none;
  }

  .top-entry-result {
    font-size: 13px;
  }

  .control-row {
    grid-template-columns: 1fr;
  }

  .timeline-controls {
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .timeline-filter .chip-row { display: none; }

  .timeline-owner-select { display: block; min-width: 0; }

  .timeline-controls input,
  .timeline-controls .check {
    min-width: 0;
    min-height: 38px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .timeline-controls .check { gap: 4px; white-space: nowrap; }

  .week-nav {
    gap: 8px;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    padding: 10px 0;
  }

  .week-nav button {
    min-width: 36px;
    min-height: 36px;
  }

  .week-nav strong { font-size: 16px; }

  .week-nav span { font-size: 11px; }

  .date-section > h2 {
    margin-top: 18px;
    padding-bottom: 6px;
    font-size: 16px;
  }

  .race-group-head { padding-top: 12px; }

  .race-group-head p { font-size: 12px; }

  .race-group-head h3 { gap: 8px; margin-top: 2px; font-size: 16px; }

  .horse-row { padding: 8px 0 2px; }

  .horse-row-grid {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0 8px;
    min-height: 0;
    padding: 8px 0 2px 9px;
    border-left: 3px solid var(--owner-color);
  }

  .horse-row-grid h4 {
    grid-column: 1 / 3;
    grid-row: 1;
    border-left: 0;
    padding-left: 0;
    font-size: 17px;
  }

  .horse-row-grid .owner-badge { grid-column: 3; grid-row: 1; padding: 2px 9px; font-size: 11px; }

  .entry-sex { display: none; }

  .entry-jockey { grid-column: 1 / -1; grid-row: 2; margin-top: 2px; font-size: 13px; }

  .entry-result-meta { grid-column: 1 / -1 !important; grid-row: 3 !important; display: flex !important; align-items: baseline; gap: 7px; margin-top: 5px; min-width: 0; font-size: 13px; }
  .entry-result-meta > .entry-popularity,
  .entry-result-meta > .entry-result,
  .entry-result-meta > .entry-points { margin: 0; font-size: 13px; }
  .entry-result-meta > .entry-result { font-size: 15px; }
  .entry-result-meta > .entry-points { text-align: left; }
  .entry-meta-separator { display: inline; color: var(--line); font-weight: 500; }

  .race-link { margin-top: 8px; font-size: 11px; }

  .week-nav .latest-button-desktop { display: none; }

  .week-nav .latest-button-mobile {
    display: inline;
    min-width: 0;
    min-height: 0;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--muted);
    font: inherit;
    text-decoration: underline;
  }

  .photo-masthead-timeline .photo-masthead-image { object-position: 60% 40%; }

  .ranking-title-row {
    gap: 10px;
    padding: 16px 0 8px;
  }

  .ranking-title-row h1 { font-size: 20px; }

  .rank-table {
    padding: 0 10px;
  }

  .rank-table-header { display: none; }

  .rank-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 0 9px;
    min-height: 0;
    padding: 10px 2px;
  }

  .rank-position { grid-column: 1; grid-row: 1; font-size: 18px; }
  .rank-position small { font-size: 11px; }
  .rank-owner { grid-column: 2; grid-row: 1; padding-left: 9px; font-size: 16px; }
  .rank-points { grid-column: 3; grid-row: 1; white-space: nowrap; }
  .rank-points strong { font-size: 17px; }
  .rank-points small { font-size: 11px; }
  .rank-ace { grid-column: 2; grid-row: 2; margin-top: 3px; padding-left: 12px; color: #3f5148; font-size: 13px; font-weight: 500; }
  .rank-record { grid-column: 3; grid-row: 2; margin-top: 3px; text-align: right; font-size: 12px; font-weight: 500; }

  .ranking-awards {
    margin-top: 20px;
    padding: 12px;
  }

  .ranking-awards-title {
    padding-bottom: 6px;
    font-size: 15px;
  }

  .award-row {
    grid-template-columns: minmax(0, 1fr) 94px 76px;
    gap: 8px;
    padding: 9px 0;
  }

  .award-copy h3 { font-size: 13px; }
  .award-copy p { margin-top: 1px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .award-owner { padding: 2px 8px; font-size: 11px; }
  .award-value { font-size: 14px; }

  .historical-horse-context {
    padding: 10px 0;
  }

  .historical-horse-context strong,
  .historical-horse-context a {
    font-size: 12px;
  }

  .horse-filter-panel {
    padding: 10px 0 0;
    border-bottom: 0;
  }

  .horse-filters-desktop {
    display: none;
  }

  .horse-filters-mobile {
    display: block;
  }

  .horse-mobile-filter-row {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 8px;
  }

  .horse-mobile-filter-row select,
  .horse-mobile-filter-row input {
    height: 38px;
  }

  .horse-mobile-sort {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 8px 0 10px;
  }

  .horse-mobile-sort > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
  }

  .horse-table {
    margin-top: 12px;
    padding: 0 10px;
  }

  .horse-table-header {
    display: none;
  }

  .horse-list-row {
    display: block;
    min-height: 0;
    padding: 9px 0;
  }

  .horse-list-primary,
  .horse-list-pedigree,
  .horse-list-training {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
  }

  .horse-list-primary {
    gap: 7px;
    align-items: center;
  }

  .horse-list-name,
  .horse-owner-label,
  .horse-list-sex,
  .horse-list-affiliation,
  .horse-list-trainer,
  .horse-list-father,
  .horse-list-mother {
    grid-column: auto;
    grid-row: auto;
  }

  .horse-list-name {
    order: 1;
    overflow: visible;
    font-size: 16px;
    line-height: 1.35;
    text-overflow: clip;
    white-space: normal;
  }

  .horse-list-sex {
    order: 2;
    font-size: 13px;
  }

  .horse-owner-label {
    order: 3;
  }

  .horse-list-pedigree {
    gap: 4px 14px;
    margin-top: 3px;
  }

  .horse-list-father,
  .horse-list-mother {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    overflow: visible;
    font-size: 12px;
    text-overflow: clip;
    white-space: normal;
  }

  .horse-list-father small,
  .horse-list-mother small {
    display: inline;
    color: #8b9a92;
    font-size: 10px;
    font-weight: 600;
  }

  .horse-list-training {
    gap: 12px;
    margin-top: 2px;
  }

  .horse-list-affiliation,
  .horse-list-trainer {
    overflow: visible;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    text-overflow: clip;
    white-space: normal;
  }

  .horse-list-empty {
    padding: 20px 0;
    font-size: 13px;
  }

  .draft-round {
    padding: 14px 14px 16px;
  }

  .draft-round-heading {
    gap: 10px;
  }

  .draft-round-title > span {
    font-size: 9px;
    letter-spacing: .16em;
  }

  .draft-round-title h2 {
    font-size: 18px;
  }

  .draft-round-title h2 small {
    font-size: 12px;
    letter-spacing: .08em;
  }

  .draft-round-heading b {
    font-size: 10px;
  }

  .draft-pick-grid,
  .draft-nomination-grid {
    grid-template-columns: 1fr;
    gap: 3px;
    margin-top: 12px;
  }

  .draft-flow-nominations {
    margin-top: 14px;
  }

  .draft-flow-section > h3 {
    gap: 9px;
    font-size: 10px;
    letter-spacing: .12em;
  }

  .draft-pick,
  .draft-nomination {
    padding: 8px 11px 9px;
  }

  .draft-pick {
    display: grid;
    grid-template-columns: minmax(0, 92px) minmax(0, 1fr) auto auto;
    column-gap: 8px;
    align-items: baseline;
  }

  .draft-pick-heading {
    display: contents;
  }

  .draft-pick-heading span {
    max-width: 92px;
  }

  .draft-pick-heading b {
    grid-column: 4;
    grid-row: 1;
    margin-left: 0;
    font-size: 16px;
  }

  .draft-pick > strong {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    margin-top: 0;
    font-size: 17px;
  }

  .draft-pick-sex {
    grid-column: 3;
    grid-row: 1;
    margin-top: 0;
  }

  .draft-pick-father {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 3px;
    font-size: 11px;
  }

  .draft-pick-comment {
    grid-column: 1 / -1;
  }

  .draft-nomination > strong {
    margin-top: 0;
    font-size: 17px;
  }

  .draft-nomination {
    display: flex;
    align-items: baseline;
    gap: 9px;
  }

  .draft-nomination > span {
    flex: 0 0 auto;
    max-width: 92px;
  }

  .draft-nomination b {
    position: static;
    margin-left: auto;
  }

  .draft-lottery {
    display: block;
    margin-top: 18px;
    padding: 12px 13px 13px;
  }

  .draft-lottery > div > strong {
    font-size: 19px;
  }

  .draft-lottery ul {
    margin-top: 11px;
    gap: 8px;
  }

  .draft-lottery li,
  .draft-fallback p {
    gap: 7px;
  }

  .draft-lottery li > span {
    width: 92px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .draft-lottery li b,
  .draft-lottery li em {
    padding: 2px 8px;
    font-size: 10px;
  }

  .draft-fallback {
    margin-top: 12px;
  }

  .draft-fallback p {
    flex-wrap: wrap;
    padding-top: 4px;
  }

  .draft-flow-final {
    margin-top: 18px;
  }

  .bottom-nav {
    display: grid;
  }

  .site-footer {
    gap: 8px;
    padding: 14px 12px;
  }

  .site-footer-updated,
  .site-footer-copyright {
    font-size: 11px;
  }
}

@media (min-width: 781px) and (max-width: 1024px) {
  .horse-row-grid { grid-template-columns: minmax(160px, 1fr) 40px 90px 100px 60px 52px 76px; gap: 8px; }
  .horse-table-header,
  .horse-list-row { grid-template-columns: 196px 108px 44px 52px 104px minmax(0, 1fr) minmax(0, 1fr); gap: 11px; padding-right: 12px; padding-left: 12px; }
}
