:root {
  color-scheme: light;
  --bonten: #f08831;
  --maru: #00a1e1;
  --ink: #263127;
  --muted: #667160;
  --line: #dbe7d2;
  --paper: #fffaf0;
  --leaf: #61b978;
  --sky: #ddf5ff;
  --surface: rgba(255, 255, 255, 0.88);
  --shadow: 0 18px 48px rgba(68, 84, 65, 0.12);
  --sticker: #fffef8;
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "YuGothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6px 6px, rgba(97, 185, 120, 0.12) 2px, transparent 2.5px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.72) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.72) 1px, transparent 1px),
    linear-gradient(180deg, #fff8e8 0%, #eff8ee 48%, #e7f7ff 100%);
  background-size: 54px 54px, 30px 30px, 30px 30px, auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(219, 231, 210, 0.82);
  background: rgba(255, 250, 240, 0.84);
  backdrop-filter: blur(16px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 50%;
  background: white;
  box-shadow: 0 3px 10px rgba(68, 84, 65, 0.16);
  flex: 0 0 auto;
}

.brand-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav {
  gap: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #40503d;
}

.nav-cta {
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--bonten);
}

.hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 76px) 0;
}

.hero-copy {
  max-width: 680px;
}

.hero-label,
.section-kana {
  margin: 0 0 14px;
  color: #3e7951;
  font-size: 15px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 1.04;
}

.hero-lead {
  max-width: 660px;
  margin: 24px 0 0;
  color: #51604f;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.9;
  font-weight: 600;
}

.hero-stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-stickers span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  color: #40503d;
  background: var(--sticker);
  box-shadow: 0 8px 22px rgba(68, 84, 65, 0.10);
  font-size: 13px;
  font-weight: 900;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
}

.primary-button {
  color: white;
  background: var(--ink);
  box-shadow: 0 12px 30px rgba(38, 49, 39, 0.18);
}

.primary-button.disabled {
  cursor: default;
}

.secondary-button {
  border: 2px solid #cfe2c5;
  background: rgba(255, 255, 255, 0.68);
}

.hero-visual {
  display: grid;
  place-items: center;
}

.phone-card {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 0.62;
  padding: 14px;
  border: 9px solid #233026;
  border-radius: 42px;
  background: #233026;
  box-shadow: var(--shadow);
}

.phone-top {
  position: absolute;
  top: 13px;
  left: 50%;
  width: 104px;
  height: 20px;
  border-radius: 0 0 14px 14px;
  transform: translateX(-50%);
  background: #233026;
  z-index: 3;
}

.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
  background:
    linear-gradient(28deg, transparent 0 44%, rgba(255, 225, 157, 0.68) 44% 50%, transparent 50%),
    linear-gradient(132deg, transparent 0 50%, rgba(174, 224, 198, 0.78) 50% 59%, transparent 59%),
    linear-gradient(84deg, transparent 0 66%, rgba(213, 245, 255, 0.88) 66% 73%, transparent 73%),
    #f7f4dc;
}

.phone-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(64, 80, 61, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 80, 61, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
}

.route-line {
  position: absolute;
  inset: 22% 20% 28% 12%;
  border: 8px solid var(--bonten);
  border-left-color: transparent;
  border-bottom-color: var(--maru);
  border-radius: 46% 54% 48% 52%;
  transform: rotate(-16deg);
}

.mascot.together {
  position: absolute;
  left: 17%;
  bottom: 25%;
  width: 68%;
  filter: drop-shadow(0 14px 20px rgba(67, 80, 61, 0.18));
}

.walk-chip,
.mini-panel,
.field-note {
  position: absolute;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 28px rgba(55, 70, 56, 0.14);
}

.walk-chip {
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.chip-orange {
  left: 22px;
  top: 84px;
  background: var(--bonten);
}

.chip-blue {
  right: 20px;
  top: 132px;
  background: var(--maru);
}

.field-note {
  right: 22px;
  bottom: 104px;
  padding: 8px 10px;
  border-radius: 14px;
  color: #40503d;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 900;
}

.mini-panel {
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
}

.mini-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mini-panel strong {
  font-size: 24px;
}

.about,
.stats-section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 68px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.18;
}

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

.feature,
.panel,
.summary-card {
  border: 1px solid rgba(219, 231, 210, 0.9);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature {
  min-height: 240px;
  padding: 26px;
  border-radius: var(--radius);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 54px rgba(68, 84, 65, 0.15);
}

.feature img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.feature h3 {
  margin: 18px 0 8px;
  font-size: 22px;
}

.feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-weight: 600;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 22px;
  border: 2px dashed rgba(97, 185, 120, 0.36);
  border-radius: var(--radius);
  color: #40503d;
  background: rgba(255, 254, 248, 0.76);
}

.privacy-note strong {
  font-size: 17px;
}

.privacy-note span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.stats-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  max-width: none;
}

.stats-heading .section-kana,
.stats-heading h2 {
  grid-column: 1;
}

.updated {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  padding: 20px;
  border-radius: 18px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border-radius: var(--radius);
  padding: 22px;
}

.panel-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel h3 {
  margin: 0;
  font-size: 22px;
}

.panel-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.team-race,
.ranking-panel {
  grid-column: 1;
}

.map-panel {
  grid-column: 2;
  grid-row: span 2;
}

.chart-panel {
  grid-column: 1 / -1;
}

.team-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 4px 0 18px;
}

.team-icons img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(68, 84, 65, 0.12));
}

.race-bar {
  display: flex;
  height: 84px;
  overflow: hidden;
  border: 3px solid white;
  border-radius: 999px;
  background: #edf2e8;
  box-shadow: inset 0 0 0 1px rgba(38, 49, 39, 0.08);
}

.race-segment {
  min-width: 0;
  transition: width 320ms ease;
}

.race-segment.bonten {
  background: var(--bonten);
}

.race-segment.maru {
  background: var(--maru);
}

.team-totals {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.team-total {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.team-total em {
  color: var(--muted);
  font-style: normal;
}

.team-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.japan-map {
  position: relative;
  min-height: 0;
  aspect-ratio: 422 / 425;
  height: auto;
}

.japan-map svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.japan-map.real-map {
  width: 100%;
  height: auto !important;
}

.japan-map .prefecture-map path {
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 1.2;
  cursor: default;
  transition: none;
}

.japan-map .prefecture-map.has-steps path {
  stroke: rgba(36, 86, 50, 0.36);
}

.japan-map .prefecture-map:focus {
  outline: none;
}

.japan-map .okinawa-inset-divider {
  stroke: rgba(70, 86, 69, 0.46);
  stroke-linecap: round;
  stroke-width: 1.3;
  pointer-events: none;
}

.map-inspector {
  position: absolute;
  right: 8px;
  bottom: 6px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid rgba(93, 74, 46, 0.12);
  border-radius: 16px;
  background: rgba(255, 253, 246, 0.86);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.map-inspector strong {
  color: var(--ink);
  font-size: 0.98rem;
  text-align: right;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  background: var(--leaf);
  font-weight: 900;
}

.prefecture,
.ranking-item strong {
  font-weight: 900;
}

.ranking-item small {
  color: var(--muted);
  font-weight: 800;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.chart-row {
  display: grid;
  grid-template-columns: 92px 1fr 86px;
  gap: 12px;
  align-items: center;
}

.chart-row span,
.chart-row strong {
  font-weight: 900;
}

.chart-row strong {
  text-align: right;
}

.chart-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2e8;
}

.chart-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #96dd9f, #36a968);
}

.empty-row {
  color: var(--muted);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 34px clamp(18px, 4vw, 52px);
  color: #53614f;
  border-top: 1px solid rgba(219, 231, 210, 0.92);
  background: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 700;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.policy-main {
  width: min(100% - 36px, 960px);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) 0;
}

.policy-article {
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid rgba(219, 231, 210, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.policy-hero {
  margin-bottom: clamp(28px, 5vw, 48px);
}

.policy-hero h1 {
  font-size: clamp(34px, 7vw, 64px);
  text-wrap: balance;
}

.policy-updated {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.policy-article section {
  margin-top: clamp(30px, 5vw, 46px);
}

.policy-article h2 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(219, 231, 210, 0.92);
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.35;
  text-wrap: balance;
}

.policy-article h3 {
  margin: 24px 0 8px;
  color: var(--ink);
  font-size: clamp(18px, 3vw, 23px);
  line-height: 1.45;
  text-wrap: balance;
}

.policy-article p,
.policy-article li {
  color: #43523f;
  font-size: 16px;
  line-height: 1.95;
  text-wrap: pretty;
}

.policy-article p {
  margin: 14px 0 0;
  max-width: 78ch;
}

.policy-article ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 1.4em;
}

.policy-contact {
  color: #125f80;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

@media (max-width: 880px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero,
  .dashboard,
  .feature-grid,
  .stats-overview {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .hero-visual {
    order: -1;
  }

  .phone-card {
    width: min(100%, 300px);
  }

  .team-race,
  .ranking-panel,
  .map-panel,
  .chart-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .stats-heading {
    display: block;
  }

  .updated {
    margin-top: 12px;
  }

  .japan-map {
    min-height: 0;
  }

  .chart-row {
    grid-template-columns: 74px 1fr 70px;
    gap: 8px;
    font-size: 14px;
  }

  .site-footer {
    flex-direction: column;
  }

  .privacy-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .policy-main {
    width: min(100% - 28px, 960px);
  }
}

@media (max-width: 520px) {
  .brand span:last-child {
    max-width: 250px;
    line-height: 1.35;
  }

  .nav {
    gap: 8px;
    font-size: 13px;
  }

  .hero,
  .about,
  .stats-section {
    width: min(100% - 24px, 1120px);
  }

  .hero-actions {
    display: grid;
  }

  .feature,
  .panel {
    padding: 18px;
  }

  .map-panel {
    padding: 20px;
  }

  .map-panel .panel-title-row {
    padding-inline: 0;
  }

  .japan-map.real-map {
    width: calc(100% + 40px);
    margin-inline: -20px;
  }

  .policy-article {
    padding: 22px;
  }

  .ranking-item {
    grid-template-columns: 30px 1fr auto;
  }

  .ranking-item small {
    display: none;
  }
}
