:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #64707d;
  --line: #d9e1e8;
  --blue: #dff4ff;
  --blue-strong: #0f7ea8;
  --pink: #ffe8f8;
  --green: #0d7b68;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  line-height: 1.7;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(510px, 0.9fr) minmax(420px, 1.1fr);
  gap: 52px;
  align-items: center;
  padding: 56px 0;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 0.98rem;
  font-weight: 700;
}

h1,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 28px;
  font-size: clamp(3.2rem, 6.2vw, 5.4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.lead {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero-visual {
  position: relative;
  min-height: 420px;
}

.app-icon {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 132px;
  height: 132px;
  border-radius: 28px;
  box-shadow: 0 18px 42px rgb(15 126 168 / 18%);
}

.window-preview {
  margin: 72px 0 0 64px;
  border: 1px solid #b9c5ce;
  background: var(--white);
  box-shadow: 0 24px 60px rgb(31 41 51 / 14%);
}

.window-bar {
  height: 32px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #f6fbfd, #fff5fb);
}

.window-body {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 20px;
}

.side-panel,
.pedigree-panel {
  min-height: 300px;
}

.side-panel {
  border-right: 1px solid var(--line);
  padding-right: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-bottom: 22px;
}

.calendar-grid span {
  aspect-ratio: 1;
  border-radius: 3px;
  background: #edf3f7;
}

.calendar-grid .active {
  background: var(--blue-strong);
}

.race-row,
.horse-table span,
.horse-name {
  height: 14px;
  border-radius: 3px;
  background: #dce6ee;
}

.race-row {
  width: 92%;
  margin-bottom: 10px;
}

.race-row.short {
  width: 68%;
}

.horse-table {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.horse-table span:nth-child(2) {
  width: 82%;
}

.horse-table span:nth-child(3) {
  width: 74%;
}

.horse-table span:nth-child(4) {
  width: 88%;
}

.pedigree-panel {
  padding: 8px 0 0;
}

.horse-name {
  width: 48%;
  height: 20px;
  margin-bottom: 18px;
  background: #cfdbe5;
}

.pedigree-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  grid-template-rows: repeat(2, 112px);
  border: 1px solid #aeb8c2;
}

.pedigree-grid span {
  border-right: 1px solid #aeb8c2;
  border-bottom: 1px solid #aeb8c2;
}

.pedigree-grid span:nth-child(3),
.pedigree-grid span:nth-child(6) {
  border-right: 0;
}

.pedigree-grid span:nth-child(n+4) {
  border-bottom: 0;
}

.pedigree-grid .father {
  background: var(--blue);
}

.pedigree-grid .mother {
  background: var(--pink);
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 0;
  }

  h1 {
    font-size: clamp(2.8rem, 9vw, 4.8rem);
  }

  .hero-visual {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  main {
    width: min(100% - 24px, 1160px);
  }

  h1 {
    font-size: clamp(2rem, 9.8vw, 3.1rem);
  }

  .lead {
    font-size: 1rem;
  }

  .app-icon {
    width: 96px;
    height: 96px;
    border-radius: 20px;
  }

  .window-preview {
    margin: 52px 0 0 28px;
  }

  .window-body {
    grid-template-columns: 120px 1fr;
    gap: 14px;
    padding: 14px;
  }

  .pedigree-grid {
    grid-template-rows: repeat(2, 86px);
  }
}
