:root {
  --yellow: #FFD319;
  --teal: #33A2B4;
  --navy: #014864;
  --ink: #0C1C21;
  --gray: #E6ECEE;
  --gray-blue: #96A5B5;
  --slate: #33424C;
  --muted: #4A5A68;
  --mist: #C9D5DA;
  --just-in: #FFFBE6;
  --num: Antonio, "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--gray);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
}
img { max-width: 100%; }
a { color: var(--navy); }
a:hover { color: var(--ink); }
button { font-family: inherit; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.show-sm { display: none; }
.yellow { color: var(--yellow); }
.muted { font-size: 14px; color: var(--muted); }

/* Focus: navy ring on light surfaces, yellow ring on dark ones. */
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.hero :focus-visible, .stats :focus-visible, .map-section :focus-visible,
.submit-card :focus-visible { outline-color: var(--yellow); }
.submit-card input:focus-visible { outline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: 6px; border: 2px solid transparent;
  font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: 0.03em;
  text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2;
}
.btn-yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #FFE15C; color: var(--ink); }
.btn-outline-light { background: transparent; border-color: #FFFFFF; color: #FFFFFF; font-weight: 700; }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: #FFFFFF; }
.btn-outline-navy { background: #FFFFFF; border-color: var(--navy); color: var(--navy); font-size: 14px; letter-spacing: 0.04em; }
.btn-outline-navy:hover { background: var(--gray); color: var(--navy); }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #FFFFFF; font-size: 14px; }
.btn-navy:hover { background: var(--ink); color: #FFFFFF; }
.btn-block { display: flex; width: 100%; }
.btn-big { min-height: 54px; font-weight: 900; font-size: 17px; }
.btn[disabled] { opacity: 0.7; cursor: progress; }

/* Hero */
.hero {
  background-color: var(--navy); color: #FFFFFF; padding-bottom: 150px;
  background-image: url(assets/waves-fish.png);
  background-size: max(100%, 1100px) auto; background-position: center bottom; background-repeat: no-repeat;
}
.hero-inner {
  padding-top: 64px; padding-bottom: 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px;
}
.hero-copy { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 8px; background: var(--yellow); color: var(--ink);
  font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); display: block; }
.eyebrow {
  font-family: var(--num); font-weight: 700; font-size: 20px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gray);
}
.hero h1 {
  margin: 0; font-weight: 900; font-size: 84px; line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase;
}
.hero-text { margin: 0; max-width: 600px; font-size: 20px; line-height: 1.5; color: var(--gray); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-actions .btn { min-height: 54px; padding: 0 28px; }
.hero-badge { flex: 0 0 auto; width: 280px; height: 280px; display: block; transform: rotate(-6deg); }

/* Stats */
.stats { background: var(--ink); color: #FFFFFF; }
.stats-grid {
  padding-top: 32px; padding-bottom: 32px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px;
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-family: var(--num); font-weight: 700; font-size: 64px; line-height: 1; color: var(--yellow); }
.stat-label { font-weight: 700; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); }

/* Map band */
.map-section { position: relative; overflow: hidden; overflow: clip; background: var(--navy); color: #FFFFFF; }
.map-watermark {
  position: absolute; left: 50%; bottom: -70px; transform: translateX(-50%);
  width: 3400px; max-width: none; height: auto; opacity: 0.09; pointer-events: none;
}
.map-section.is-open .map-watermark { width: max(3400px, 260%); bottom: -40px; }
.band {
  position: relative; display: block; width: 100%; border: 0; background: transparent; color: #FFFFFF;
  cursor: pointer; padding: 0; text-align: left; font: inherit;
}
.band:focus-visible { outline-offset: -6px; }
.band-inner { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.band-mini { position: relative; width: 150px; height: 81px; flex: 0 0 auto; display: block; }
.band-mini img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; }
.mini-dot {
  position: absolute; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--yellow); border: 1px solid var(--navy); display: block;
}
.band-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.band-eyebrow { font-family: var(--num); font-weight: 700; font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mist); }
.band-title { font-weight: 900; font-size: 34px; line-height: 1.05; text-transform: uppercase; }
.band-sub { display: block; color: var(--yellow); }
.band-cta {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid #FFFFFF;
  font-weight: 800; font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em;
}
.band-cta svg { transition: transform 0.2s; }
.band[aria-expanded="true"] .band-cta svg { transform: rotate(180deg); }
.band:hover .band-cta { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

.map-panel {
  position: relative; max-width: 1400px; margin: 0 auto; padding: 8px 24px 48px;
  display: flex; flex-wrap: wrap; gap: 32px; align-items: center;
}
.map-figure { flex: 1 1 960px; min-width: 0; }
.map-canvas { position: relative; width: 100%; aspect-ratio: 800 / 433; --dot-scale: 1; }
.map-canvas > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.start-ring {
  position: absolute; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid #FFFFFF; background: var(--navy); z-index: 3; pointer-events: none;
}
.start-label {
  position: absolute; transform: translate(-106%, 16px); white-space: nowrap;
  font-size: 13px; font-weight: 700; color: #FFFFFF; z-index: 3; pointer-events: none;
  text-shadow: 0 1px 3px rgba(1, 72, 100, 0.9);
}
.town-dot {
  position: absolute; transform: translate(-50%, -50%); padding: 0; border: 0; background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; z-index: 2; border-radius: 50%;
}
.town-dot span {
  display: block; border-radius: 50%; background: var(--yellow); border: 2px solid var(--navy);
  box-shadow: 0 2px 6px rgba(12, 28, 33, 0.35);
}
.town-dot[aria-pressed="true"] { z-index: 4; }
.town-dot[aria-pressed="true"] span { border: 3px solid #FFFFFF; }
.town-dot:focus-visible { outline-offset: 0; }
.map-tip {
  position: absolute; background: #FFFFFF; color: var(--ink); border-radius: 8px; padding: 10px 14px;
  box-shadow: 0 6px 20px rgba(12, 28, 33, 0.35); pointer-events: none;
  display: flex; flex-direction: column; gap: 2px; z-index: 5; max-width: calc(100% - 8px);
}
.map-tip:empty { display: none; }
.map-tip strong { font-weight: 900; font-size: 16px; }
.map-tip span { font-size: 13px; font-weight: 600; color: var(--slate); }
.map-note { flex: 1 1 280px; min-width: 0; margin: 0; font-size: 16px; line-height: 1.5; color: var(--gray); }

/* Main */
.main { padding-top: 56px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.main:focus { outline: none; }
.board { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.board-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.board-title { display: flex; flex-direction: column; gap: 6px; }
.board-title h2 { margin: 0; font-weight: 900; font-size: 40px; line-height: 1; text-transform: uppercase; color: var(--navy); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--gray-blue);
  background: #FFFFFF; color: var(--navy); font-weight: 700; font-size: 15px; cursor: pointer;
}
.pill[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #FFFFFF; }

/* Podium */
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.podium:empty { display: none; }
.pod {
  background: #FFFFFF; color: var(--ink); border-radius: 12px; padding: 24px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 0 rgba(12, 28, 33, 0.08);
}
.pod.first { background: var(--yellow); }
.pod-top { display: flex; align-items: center; justify-content: space-between; }
.pod-place { font-family: var(--num); font-weight: 700; font-size: 18px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); }
.pod-rank { font-family: var(--num); font-weight: 700; font-size: 48px; line-height: 1; color: var(--navy); }
.pod-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pod-name { font-weight: 800; font-size: 22px; overflow-wrap: anywhere; }
.pod-loc { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--slate); }
.pod-loc svg { flex: 0 0 auto; }
.pod-time-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  border-top: 2px solid rgba(1, 72, 100, 0.15); padding-top: 12px;
}
.pod-time { font-family: var(--num); font-weight: 700; font-size: 40px; line-height: 1; }
.pod-pace { font-size: 14px; font-weight: 600; color: var(--slate); }

/* Search */
.search-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.search-box {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px; background: #FFFFFF;
  border: 2px solid var(--gray-blue); border-radius: 8px; padding: 0 14px; min-height: 48px;
}
.search-box:focus-within { border-color: var(--navy); outline: 3px solid var(--navy); outline-offset: 2px; }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit;
  font-size: 16px; color: var(--ink); min-height: 44px;
}
.search-box input::placeholder { color: #5E6E7C; }
.count { font-size: 14px; font-weight: 600; color: var(--muted); }

/* Table */
.table-card { background: #FFFFFF; border-radius: 12px; overflow-x: auto; box-shadow: 0 1px 0 rgba(12, 28, 33, 0.08); }
.results-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.results-table th {
  background: var(--navy); color: #FFFFFF; font-weight: 700; font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; text-align: left; padding: 14px 12px;
}
.results-table th:first-child, .results-table td:first-child { padding-left: 20px; }
.results-table th:last-child, .results-table td:last-child { padding-right: 20px; }
.results-table td { padding: 14px 12px; border-top: 1px solid var(--gray); vertical-align: middle; }
.results-table .r { text-align: right; }
.results-table tr { scroll-margin-top: 24px; }
.results-table tr.is-new td { background: var(--just-in); }
.results-table tr.is-me td { background: #FFF1A8; }
.results-table tr.flash td { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 40% { background: var(--yellow); } 100% { background: #FFF1A8; } }
.c-rank { font-family: var(--num); font-weight: 700; font-size: 24px; color: var(--navy); width: 64px; }
.c-name { font-weight: 700; font-size: 16px; }
.name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.just-in {
  background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 11px; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.c-loc { font-size: 15px; color: var(--slate); }
.loc-line { display: flex; align-items: center; gap: 6px; }
.loc-line svg { flex: 0 0 auto; }
.tag { display: inline-block; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 6px; }
.tag-run { background: #D6EEF2; color: var(--navy); }
.tag-walk { background: #FFF4C2; color: var(--ink); }
.c-time { font-family: var(--num); font-weight: 700; font-size: 24px; text-align: right; white-space: nowrap; }
.c-pace { font-size: 14px; font-weight: 600; text-align: right; color: var(--slate); white-space: nowrap; }
.c-ago { font-size: 13px; text-align: right; color: var(--muted); white-space: nowrap; }
.m-meta, .m-pace { display: none; }
.empty { margin: 0; padding: 28px 20px; text-align: center; color: var(--muted); font-weight: 600; }
.table-foot { padding: 16px 20px; border-top: 1px solid var(--gray); display: flex; justify-content: center; }

/* Sidebar */
.side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.submit-card { background: var(--navy); color: #FFFFFF; border-radius: 12px; padding: 28px; scroll-margin-top: 16px; }
.submit-card:focus { outline: none; }
.stage { display: flex; flex-direction: column; gap: 14px; }
.stage h3 { margin: 0; font-weight: 900; font-size: 30px; line-height: 1.05; text-transform: uppercase; }
.stage p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--gray); }
.card-eyebrow { font-family: var(--num); font-weight: 700; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--yellow); }
.card-eyebrow.navy { color: var(--navy); }
.card-eyebrow:focus { outline: none; }
.small { font-size: 13px; line-height: 1.4; color: var(--mist); }
.btn-block.btn-yellow { min-height: 52px; }

/* Form */
.form { gap: 16px; margin: 0; }
.form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-head h3 { font-size: 24px; }
.icon-btn {
  width: 44px; height: 44px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 50%; background: transparent; color: #FFFFFF; cursor: pointer;
}
.icon-btn:hover { border-color: #FFFFFF; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend {
  padding: 0; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gray);
}
.field legend { margin-bottom: 6px; }
.label-note { text-transform: none; font-weight: 500; letter-spacing: 0; }
.field input {
  width: 100%; min-height: 48px; padding: 0 12px; border: 2px solid #FFFFFF; border-radius: 6px;
  background: #FFFFFF; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600;
}
.field input[aria-invalid="true"] { border-color: var(--yellow); box-shadow: 0 0 0 2px var(--yellow); }
.upper { text-transform: uppercase; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg-btn {
  min-height: 48px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, 0.5); background: transparent;
  color: #FFFFFF; font-weight: 700; font-size: 15px; cursor: pointer;
}
.seg-btn[aria-pressed="true"] { border-color: var(--yellow); background: var(--yellow); color: var(--ink); font-weight: 800; }
.time-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.time-cell { display: flex; flex-direction: column; gap: 4px; }
.time-cell input {
  width: 100%; min-height: 54px; padding: 0 6px; border: 2px solid #FFFFFF; border-radius: 6px; background: #FFFFFF;
  color: var(--ink); font-family: var(--num); font-size: 26px; font-weight: 700; text-align: center;
  -moz-appearance: textfield; appearance: textfield;
}
.time-cell input::-webkit-outer-spin-button, .time-cell input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.time-cell input[aria-invalid="true"] { border-color: var(--yellow); box-shadow: 0 0 0 2px var(--yellow); }
.time-cell span { font-size: 12px; text-align: center; color: var(--mist); }
.consent { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.4; color: #FFFFFF; cursor: pointer; padding: 4px 0; }
.consent input { width: 24px; height: 24px; margin: 0; flex: 0 0 auto; accent-color: var(--yellow); }
.form-error { background: #FFF4C2; color: var(--ink); border-radius: 6px; padding: 12px 14px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.decoy { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Town autocomplete */
.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: -106px; top: calc(100% + 4px); z-index: 20; margin: 0; padding: 6px 0;
  list-style: none; background: #FFFFFF; color: var(--ink); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(12, 28, 33, 0.4); max-height: 290px; overflow-y: auto;
}
.combo-list li { padding: 0 14px; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; font-weight: 600; }
.combo-list li .alt { font-size: 13px; font-weight: 500; color: var(--muted); }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: #D6EEF2; }
.combo-list li.none { cursor: default; color: var(--muted); font-weight: 500; line-height: 1.4; padding: 10px 14px; }
.combo-list li.none:hover { background: transparent; }

/* Done */
.done-head { display: flex; align-items: center; gap: 12px; }
.done-head .card-eyebrow { font-size: 18px; }
.check-circle {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; background: var(--yellow); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.done-rank { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.big-rank { font-family: var(--num); font-weight: 700; font-size: 88px; line-height: 0.9; }
.done-rank > span:last-child { font-size: 16px; font-weight: 600; color: var(--gray); }
.done-detail { display: flex; flex-direction: column; gap: 4px; border-top: 2px solid rgba(255, 255, 255, 0.2); padding-top: 14px; font-size: 15px; color: var(--gray); }
.done-name { font-weight: 800; font-size: 20px; color: #FFFFFF; overflow-wrap: anywhere; }
.done-time { font-family: var(--num); font-weight: 700; font-size: 26px; color: var(--yellow); }
.share-status:empty { display: none; }
.link-btn {
  align-self: center; min-height: 44px; padding: 0 12px; background: transparent; border: 0; color: #FFFFFF;
  text-decoration: underline; font-size: 14px; font-weight: 600; cursor: pointer;
}

.north-card { background: var(--yellow); color: var(--ink); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.north-town { font-weight: 900; font-size: 26px; line-height: 1.1; }
.north-text { font-size: 15px; line-height: 1.4; }
.kincaid-card { border: 2px dashed var(--gray-blue); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.kincaid-title { font-weight: 800; font-size: 15px; color: var(--navy); }
.kincaid-text { font-size: 14px; line-height: 1.5; color: var(--slate); }
.kincaid-text a { font-weight: 700; display: inline-block; padding: 6px 0; }

/* Footer */
.footer { background: #FFFFFF; border-top: 6px solid var(--teal); }
.footer-inner { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-inner img { width: 180px; height: auto; display: block; }
.footer-right { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; text-align: right; }
.disclaimer { border: 1px solid var(--ink); padding: 6px 10px; font-size: 12px; color: var(--ink); }

/* Share card section (confirmation card) */
.teaser { font-size: 14px; line-height: 1.4; font-weight: 700; color: var(--yellow); }
.test-banner { background: var(--yellow); color: var(--ink); border-radius: 6px; padding: 10px 12px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.share-box { display: flex; flex-direction: column; gap: 14px; border-top: 2px solid rgba(255,255,255,0.2); padding-top: 18px; margin-top: 4px; }
.share-box h4 { margin: 0; font-weight: 900; font-size: 22px; line-height: 1.1; text-transform: uppercase; }
.share-box p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--gray); }
.fmt .seg-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 6px; }
.fmt .seg-btn small { font-size: 12px; font-weight: 600; opacity: 0.9; }
.tag-pick { display: flex; flex-direction: column; gap: 8px; }
.tag-pick-label { font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gray); }
.tag-pick .seg-btn { min-height: 48px; padding: 8px 14px; text-align: left; line-height: 1.3; }
.preview { display: flex; justify-content: center; background: rgba(12,28,33,0.35); border-radius: 10px; padding: 12px; min-height: 120px; }
.preview img { display: block; max-width: 100%; max-height: 330px; height: auto; border-radius: 6px; box-shadow: 0 8px 24px rgba(12,28,33,0.45); -webkit-touch-callout: default; }
.photo-row { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-row .btn, .nudge .btn, .copy-row .btn { min-height: 46px; font-size: 14px; padding: 0 12px; }
.photo-row .btn { flex: 1 1 auto; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.file-btn:focus-within { outline: 3px solid var(--yellow); outline-offset: 3px; }
.nudge { display: flex; gap: 8px; }
.nudge .btn { flex: 1; }
.hint { font-size: 14px; line-height: 1.45; color: var(--gray); background: rgba(12,28,33,0.35); border-radius: 8px; padding: 10px 12px; }
.hint strong { color: var(--yellow); }
.copy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.copy-row .btn { font-size: 13px; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 10px; background: #FFFFFF; color: var(--ink); border-radius: 10px; padding: 16px; text-align: center; font-size: 14px; line-height: 1.4; }
.qr svg { width: 180px; height: 180px; display: block; }
.share-box .tag-line { font-size: 18px; font-weight: 800; color: #FFFFFF; text-align: center; }
.share-box .tag-line strong { color: var(--yellow); }
.card-status { color: var(--yellow); }
.card-status:empty { display: none; }

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .hero h1 { font-size: 64px; }
  .hero-badge { width: 200px; height: 200px; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .show-sm { display: inline; }
  .wrap { padding-left: 16px; padding-right: 16px; }

  .hero { background-size: auto 110px; background-position: right bottom; padding-bottom: 120px; }
  .hero-inner { padding-top: 28px; padding-bottom: 0; gap: 14px; }
  .hero-copy { gap: 14px; flex-basis: 100%; }
  .hero-eyebrow { gap: 10px; }
  .live-pill { font-size: 11px; padding: 5px 10px; gap: 6px; }
  .live-dot { width: 7px; height: 7px; }
  .eyebrow { font-size: 16px; }
  .hero h1 { font-size: clamp(34px, 12vw, 48px); }
  .hero-text { font-size: 16px; }
  .hero-actions { margin-top: 0; }
  .hero-actions .btn { width: 100%; min-height: 50px; font-size: 15px; }
  .hero-badge { display: none; }

  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 20px; padding-bottom: 20px; }
  .stat { gap: 2px; }
  .stat-num { font-size: 40px; }
  .stat-label { font-size: 12px; }

  .map-watermark { width: 1100px; bottom: -20px; }
  .map-section.is-open .map-watermark { width: 1400px; bottom: -10px; }
  .band-inner { padding-top: 22px; padding-bottom: 22px; gap: 14px; display: grid; grid-template-columns: 96px minmax(0, 1fr); }
  .band-mini { width: 96px; height: 52px; }
  .band-text { gap: 4px; }
  .band-eyebrow { font-size: 14px; }
  .band-title { font-size: 20px; line-height: 1.1; }
  .band-cta { grid-column: 1 / -1; min-height: 46px; font-size: 14px; }
  .map-panel { padding: 0 8px 28px; gap: 16px; }
  .map-note { padding: 0 8px; font-size: 15px; }
  .start-label { font-size: 11px; }
  .map-tip { padding: 8px 10px; }
  .map-tip strong { font-size: 14px; }
  .map-tip span { font-size: 12px; }

  .main { padding-top: 24px; padding-bottom: 32px; gap: 20px; }
  .board { gap: 16px; }
  .board-head { align-items: baseline; gap: 12px; }
  .board-title { flex-direction: row; align-items: baseline; justify-content: space-between; width: 100%; gap: 12px; }
  .board-title h2 { font-size: 28px; }
  .board-title .muted { font-size: 12px; text-align: right; }
  .pills { width: 100%; flex-wrap: nowrap; }
  .pill { flex: 1; padding: 0 8px; font-size: 14px; }

  .podium { grid-template-columns: 1fr; gap: 10px; }
  .pod { flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; }
  .pod-top { order: 0; }
  .pod-place { display: none; }
  .pod-rank { font-size: 40px; width: 28px; }
  .pod-who { flex: 1; gap: 2px; }
  .pod-name { font-size: 18px; }
  .pod-loc { font-size: 14px; }
  .pod-loc svg { display: none; }
  .pod-time-row { flex-direction: column; align-items: flex-end; border-top: 0; padding-top: 0; gap: 2px; }
  .pod-time { font-size: 30px; }
  .pod-pace { font-size: 12px; }
  .pod:not(.first) { padding: 12px 18px; }
  .pod:not(.first) .pod-rank { font-size: 32px; }
  .pod:not(.first) .pod-time { font-size: 24px; }

  .search-box { flex-basis: 100%; }

  /* Table becomes a stacked list */
  .table-card { overflow: hidden; }
  .results-table { min-width: 0; }
  .results-table thead { display: none; }
  .results-table, .results-table tbody { display: block; }
  .results-table tr {
    display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
    padding: 12px 16px; border-top: 1px solid var(--gray);
  }
  .results-table tr:first-child { border-top: 0; }
  .results-table tr.is-new { background: var(--just-in); }
  .results-table tr.is-me { background: #FFF1A8; }
  .results-table tr.flash { animation: flash 2.4s ease-out; }
  .results-table td, .results-table tr.is-new td, .results-table tr.is-me td { padding: 0 !important; border: 0; background: transparent; animation: none; }
  .c-rank { grid-row: 1 / span 2; font-size: 22px; width: auto; }
  .c-name { grid-column: 2; font-size: 15px; }
  .just-in { font-size: 10px; letter-spacing: 0.06em; padding: 2px 6px; }
  .c-loc { display: none; }
  .c-div { display: none; }
  .m-meta { display: block; grid-column: 2; font-size: 13px; color: var(--muted); }
  .c-time { grid-column: 3; grid-row: 1; font-size: 22px; line-height: 1.1; }
  .c-pace { grid-column: 3; grid-row: 2; font-size: 12px; font-weight: 500; color: var(--muted); }
  .c-ago { display: none; }
  .table-foot { padding: 12px 16px; }
  .table-foot .btn { width: 100%; font-size: 13px; }

  .side { gap: 16px; }
  .submit-card { padding: 22px 16px; }
  .stage h3 { font-size: 26px; }
  .form-head h3 { font-size: 24px; }
  .time-cell input { min-height: 56px; font-size: 28px; }
  .combo-list { right: -106px; }
  .big-rank { font-size: 64px; }
  .north-card { background: var(--navy); color: #FFFFFF; padding: 20px; gap: 6px; }
  .north-card .card-eyebrow.navy { color: var(--yellow); font-size: 14px; }
  .north-town { font-size: 22px; }
  .north-text { font-size: 14px; color: var(--gray); }

  .footer-inner { flex-direction: column; justify-content: center; padding-top: 20px; padding-bottom: 20px; gap: 12px; }
  .footer-inner img { width: 140px; }
  .footer-right { align-items: center; text-align: center; }
  .disclaimer { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
