:root {
  --navy: #091c36;
  --navy-soft: #15345a;
  --ice: #dff8ff;
  --cyan: #47d8ef;
  --pink: #ff3f8e;
  --pink-dark: #dd1766;
  --gold: #ffd76a;
  --paper: #f7fbfd;
  --ink: #10213a;
  --muted: #65758a;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--paper); font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 14px; color: white; background: var(--navy); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.race-wrap { width: min(calc(100% - 48px), var(--max)); margin-inline: auto; }

.race-nav { position: relative; z-index: 20; color: white; background: rgba(9, 28, 54, .96); }
.race-nav-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.race-brand { display: flex; align-items: center; gap: 12px; }
.race-brand img { border-radius: 13px; box-shadow: 0 5px 18px rgba(0, 0, 0, .25); }
.race-brand span, .race-brand b, .race-brand small { display: block; }
.race-brand b { color: var(--cyan); font-size: 15px; letter-spacing: -.02em; }
.race-brand small { margin-top: 2px; color: rgba(255,255,255,.62); font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.race-nav-links { display: flex; align-items: center; gap: 23px; font-size: 13px; font-weight: 750; }
.race-nav-links a:hover { color: var(--cyan); }
.race-nav-cta { padding: 11px 16px; border-radius: 10px; color: white !important; background: var(--pink); }

.race-hero { position: relative; overflow: hidden; min-height: 650px; padding: 82px 0 104px; color: white; background: linear-gradient(140deg, #08182f 0%, #123a65 55%, #146e89 100%); }
.race-aurora { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 0, rgba(71,216,239,.35), transparent 46%); filter: blur(6px); }
.race-hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, .9fr) minmax(430px, 1.1fr); align-items: center; gap: 64px; }
.race-eyebrow { margin: 0 0 17px; color: var(--cyan); font-size: 12px; font-weight: 950; letter-spacing: .16em; }
.race-hero h1 { max-width: 600px; margin: 0; font-size: clamp(60px, 7.6vw, 104px); line-height: .88; letter-spacing: -.075em; word-break: keep-all; }
.race-hero h1 em { color: var(--pink); font-style: normal; }
.race-summary { max-width: 510px; margin: 30px 0; color: rgba(255,255,255,.77); font-size: 17px; line-height: 1.75; word-break: keep-all; }
.race-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.race-button { min-height: 54px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 13px; cursor: pointer; font-size: 15px; font-weight: 850; transition: transform .2s, box-shadow .2s, background .2s; }
.race-button:hover { transform: translateY(-2px); }
.race-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.race-button-primary { color: white; background: var(--pink); box-shadow: 0 12px 30px rgba(255,63,142,.28); }
.race-button-secondary { color: white; background: rgba(255,255,255,.1); outline: 1px solid rgba(255,255,255,.25); }
.race-hero-art { position: relative; }
.race-hero-art > img { display: block; width: 100%; height: auto; border: 9px solid rgba(255,255,255,.09); border-radius: 28px; box-shadow: 0 32px 80px rgba(0,0,0,.36); transform: rotate(2deg); }
.race-stamp { position: absolute; bottom: -18px; left: 28px; display: flex; align-items: center; gap: 8px; padding: 12px 16px; color: var(--navy); background: white; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.24); font-size: 11px; font-weight: 950; letter-spacing: .08em; }
.race-stamp i, .activity-pulse { width: 8px; height: 8px; border-radius: 50%; background: #35cc79; animation: pulse 1.5s infinite; }

.race-stats { position: relative; z-index: 5; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: -42px; background: white; box-shadow: 0 16px 50px rgba(18,52,90,.09); }
.race-stats article { padding: 30px 38px; border-right: 1px solid #e4edf3; }
.race-stats article:last-child { border-right: 0; }
.race-stats span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 750; }
.race-stats strong { color: var(--navy); font-size: clamp(28px, 4vw, 43px); letter-spacing: -.04em; }
.race-stats small { color: var(--pink); font-size: .43em; letter-spacing: 0; }

.race-section, .race-community { padding-top: 112px; }
.race-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.race-heading h2 { margin: 0; color: var(--navy); font-size: clamp(38px, 5vw, 63px); line-height: 1.04; letter-spacing: -.055em; }
.race-heading h2 em { color: var(--pink); font-style: normal; }
.race-heading > p { margin: 0; color: var(--muted); font-size: 12px; }
.race-eyebrow-dark { color: #2c8fad; }
.route-card { position: relative; overflow: hidden; min-height: 400px; padding: 0 54px; border-radius: 28px; background: linear-gradient(#6ad3eb 0 44%, #dff8ff 44% 100%); box-shadow: 0 26px 70px rgba(22,91,124,.16); }
.route-card::before, .route-card::after { position: absolute; top: 138px; width: 520px; height: 210px; content: ""; border-radius: 50%; background: rgba(255,255,255,.82); transform: rotate(-7deg); }
.route-card::before { left: -100px; }
.route-card::after { top: 172px; right: -150px; transform: rotate(8deg); }
.route-stars { position: absolute; inset: 0; }
.route-stars i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: white; }
.route-stars i:nth-child(1) { top: 17%; left: 16%; }.route-stars i:nth-child(2) { top: 10%; left: 52%; }.route-stars i:nth-child(3) { top: 24%; right: 17%; }
.route-progress { position: relative; z-index: 3; height: 8px; margin-top: 212px; border-radius: 999px; background: rgba(9,28,54,.2); }
.route-fill { width: 68.3%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--gold)); }
.route-runner { position: absolute; top: -78px; left: 68.3%; filter: drop-shadow(0 8px 13px rgba(7,28,52,.25)); transform: translateX(-50%); }
.route-runner img { border: 5px solid white; border-radius: 18px; }
.route-point { position: absolute; top: 21px; color: var(--navy-soft); text-align: center; white-space: nowrap; transform: translateX(-50%); }
.route-point-0 { left: 0; }.route-point-25 { left: 25%; }.route-point-50 { left: 50%; }.route-point-75 { left: 75%; }.route-point-100 { left: 100%; }
.route-point i { display: block; width: 18px; height: 18px; margin: -34px auto 11px; border: 3px solid white; border-radius: 50%; background: #a8cad4; box-shadow: 0 4px 12px rgba(9,28,54,.2); }
.route-point.passed i { background: var(--pink); }
.route-point b, .route-point span { display: block; }
.route-point b { font-size: 12px; }.route-point span { color: #7592a2; font-size: 10px; font-weight: 850; }
.route-message { position: absolute; z-index: 3; right: 0; bottom: 24px; left: 0; display: flex; flex-direction: column; align-items: center; }
.route-message span { color: var(--muted); font-size: 11px; font-weight: 750; }
.route-message strong { margin-top: 3px; color: var(--navy); font-size: 17px; }

.race-community { padding-bottom: 112px; }
.race-heading.compact { margin-bottom: 28px; }
.race-community-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(320px,.7fr); gap: 22px; }
.race-card { overflow: hidden; border: 1px solid #e5edf2; border-radius: 24px; background: white; box-shadow: 0 20px 50px rgba(29,69,101,.08); }
.race-card-title { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; border-bottom: 1px solid #edf2f5; }
.race-card-title span { color: var(--navy); font-size: 15px; font-weight: 850; }
.race-card-title small { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.leaderboard { margin: 0; padding: 0 24px 12px; list-style: none; }
.leaderboard li { min-height: 76px; display: grid; grid-template-columns: 28px 44px minmax(0,1fr) auto; align-items: center; gap: 13px; border-bottom: 1px solid #edf2f5; }
.leaderboard li:last-child { border-bottom: 0; }
.rank { color: #9aa9b8; text-align: center; }.leaderboard li:first-child .rank { color: var(--pink); font-size: 19px; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 14px; background: var(--ice); font-size: 22px; }
.runner-name b, .runner-name small { display: block; }.runner-name b { color: var(--navy); font-size: 14px; }.runner-name small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.distance { color: var(--navy); font-size: 14px; }
.activity-card > ul { margin: 0; padding: 10px 24px 4px; list-style: none; }
.activity-card > ul li { display: grid; grid-template-columns: 1fr auto; padding: 15px 0; border-bottom: 1px solid #edf2f5; }
.activity-card > ul span { color: var(--muted); font-size: 11px; }.activity-card > ul b { color: var(--navy); }.activity-card > ul strong { color: var(--pink); font-size: 13px; }.activity-card > ul small { margin-top: 5px; color: #9aa9b8; font-size: 9px; }
.impact-card { margin: 18px; padding: 24px; color: white; background: var(--navy); }
.impact-card > span { color: var(--cyan); font-size: 10px; font-weight: 950; letter-spacing: .12em; }
.impact-card b { display: block; margin: 10px 0; font-size: 25px; line-height: 1.1; letter-spacing: -.04em; }
.impact-card p { margin: 0; color: rgba(255,255,255,.64); font-size: 11px; line-height: 1.6; }

.race-final { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 36px; margin-bottom: 82px; padding: 48px 56px; color: white; background: linear-gradient(130deg, var(--pink-dark), var(--pink)); }
.race-final > img { border: 6px solid rgba(255,255,255,.25); border-radius: 26px; }
.race-final .race-eyebrow { margin-bottom: 8px; color: var(--gold); }
.race-final h2 { margin: 0; font-size: clamp(36px,5vw,56px); line-height: .95; letter-spacing: -.06em; }.race-final h2 em { color: var(--gold); font-style: normal; }
.race-final > div > p:last-child { margin-bottom: 0; color: rgba(255,255,255,.76); }
.race-button-light { min-width: 170px; color: var(--pink-dark); background: white; }
.race-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 28px; padding: 0 24px 42px; color: #7a8998; font-size: 10px; text-align: center; }
.race-footer a { color: var(--navy); font-weight: 750; text-decoration: underline; }

@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(53,204,121,.45); } 50% { box-shadow: 0 0 0 7px rgba(53,204,121,0); } }

@media (max-width: 900px) {
  .race-hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .race-hero-art { max-width: 680px; }
  .race-community-grid { grid-template-columns: 1fr; }
  .race-final { margin-inline: 24px; }
}

@media (max-width: 640px) {
  .race-wrap { width: min(calc(100% - 36px), var(--max)); }
  .race-nav-inner { min-height: 66px; }.race-brand img { width: 38px; height: 38px; }.race-brand b { font-size: 13px; }.race-brand small { font-size: 7px; }
  .race-nav-links > a:first-child { display: none; }.race-nav-cta { padding: 10px 12px; font-size: 11px; }
  .race-hero { min-height: auto; padding: 60px 0 86px; }
  .race-hero h1 { font-size: clamp(56px, 19vw, 76px); line-height: .9; }
  .race-summary { margin: 24px 0; font-size: 15px; }
  .race-actions { display: grid; grid-template-columns: 1fr; }
  .race-hero-art > img { border-width: 6px; border-radius: 19px; }
  .race-stats { grid-template-columns: 1fr; margin-top: -34px; }
  .race-stats article { display: flex; justify-content: space-between; padding: 18px 22px; border-right: 0; border-bottom: 1px solid #e4edf3; }.race-stats article:last-child { border-bottom: 0; }.race-stats span { align-self: center; margin: 0; }.race-stats strong { font-size: 28px; }
  .race-section, .race-community { padding-top: 82px; }
  .race-heading { flex-direction: column; align-items: flex-start; }.race-heading h2 { font-size: 42px; }.race-heading > p { margin-top: -12px; }
  .route-card { min-height: 360px; padding: 0 20px; }.route-progress { margin-top: 190px; }.route-runner { top: -68px; }.route-runner img { width: 54px; height: 54px; }
  .route-point b { max-width: 56px; font-size: 9px; white-space: normal; }.route-point span { display: none; }.route-message strong { font-size: 14px; }
  .leaderboard { padding-inline: 14px; }.leaderboard li { grid-template-columns: 24px 38px minmax(0,1fr) auto; gap: 8px; }.avatar { width: 34px; height: 34px; }.distance { font-size: 12px; }
  .race-final { grid-template-columns: 1fr; margin: 0 18px 60px; padding: 38px 28px; text-align: center; }.race-final > img { margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
