/* Red Line Rush: shared brand and semantic colors. */
:root {
  --red: #e82635;
  --red-dark: #bf1826;
  --red-soft: #fff0f1;
  --red-line: #f3bac0;
  --ink: #1d1d1f;
  --paper: #f2f3f3;
  --surface: #ffffff;
  --muted: #656970;
  --line: #d9dcdf;
  --track: #e6e8eb;
  --success: #17643c;
  --success-soft: #e7f3ec;
  --success-line: #97c9ac;
  --focus: #1d75a3;
  --shadow: 0 12px 30px rgb(29 29 31 / 5%);
  --radius: 6px;
  --mono: 'IBM Plex Mono', monospace;
  --display: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'DM Sans', Arial, sans-serif; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
p { line-height: 1.6; }
.masthead { height: 90px; margin: 0 5%; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { text-decoration: none; display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: var(--surface); font: 800 23px var(--display); }
.edition { font: 12px var(--mono); letter-spacing: 1px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 16px; margin-left: 10px; }
.city-stars { color: var(--red); font-size: 29px; letter-spacing: 7px; }
.text-button { border: 0; background: transparent; font-size: 14px; font-weight: 600; padding: 12px 0; color: var(--ink); }
.text-button span { margin-left: 15px; }
main { max-width: 1320px; margin: auto; padding: 45px 5% 48px; }
.eyebrow, .section-label { display: block; font: 500 12px/1.5 var(--mono); letter-spacing: 1.2px; text-transform: uppercase; }
.home { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.03fr); grid-template-areas: "copy ticket" "leaders leaders"; gap: 32px 6%; align-items: center; }
.home-copy { grid-area: copy; }.home-ticket { grid-area: ticket; align-self: center; min-width: 0; }
.home-leaderboard.global-board { grid-area: leaders; min-width: 0; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.home-leaderboard h2 { font-size: 25px; margin: 0; letter-spacing: 0; }.home-leaderboard .section-heading { gap: 10px; }.home-leaderboard .your-place { font-size: 30px; }
.live-tag { display: flex; align-items: center; gap: 9px; }
.live-tag::before { content: ''; width: 7px; height: 7px; background: var(--red); border-radius: 50%; flex-shrink: 0; }
h1 { font: 800 clamp(92px, 10.6vw, 150px)/.84 var(--display); letter-spacing: -2px; margin: 20px 0 24px; }
h1 span { color: var(--red); }
h1 .rush-word { color: var(--ink); }
h2 { font: 700 43px/.98 var(--display); letter-spacing: -.5px; margin: 23px 0 13px; }
.intro { font-size: 18px; line-height: 1.65; max-width: 360px; color: var(--muted); }
.intro b { color: var(--ink); font-weight: 600; }
.numbers { display: flex; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); max-width: 385px; }
.numbers > div { flex: 1; border-right: 1px solid var(--line); padding-left: 22px; }
.numbers > div:first-child { padding-left: 0; }
.numbers > div:last-child { border: 0; }
.numbers strong { display: block; font: 700 42px/1 var(--display); }
.numbers span { display: block; font: 12px var(--mono); color: var(--muted); margin-top: 8px; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ticket-top { background: var(--red); color: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 25px; }
.ticket-top span { font: 500 12px/1.5 var(--mono); letter-spacing: 1.2px; }
.route-dot { height: 26px; width: 26px; border: 2px solid var(--surface); border-radius: 50%; position: relative; flex-shrink: 0; }
.route-dot::before, .route-dot::after { content: ''; position: absolute; width: 2px; height: 19px; background: var(--surface); left: 10px; }
.route-dot::before { top: -20px; }.route-dot::after { bottom: -20px; }
.ticket-body { padding: 30px; }
.date-row { display: flex; justify-content: space-between; color: var(--muted); font: 12px var(--mono); }
.ticket-body > p { font-size: 16px; color: var(--muted); margin: 0 0 25px; }
.ticket-rule { display: flex; gap: 12px; align-items: center; font-size: 14px; padding: 10px 0; }
.ticket-rule > span { font: 500 12px var(--mono); color: var(--red); }
.ticket-rule b { font-weight: 500; }
.primary, .secondary { width: 100%; border: 0; border-radius: var(--radius); padding: 17px 20px; text-align: left; font-weight: 700; font-size: 14px; letter-spacing: .5px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.primary { background: var(--red); color: var(--surface); margin-top: 24px; }.primary:hover { background: var(--red-dark); }
.primary span { font-size: 22px; line-height: 1; }
.secondary { background: var(--paper); color: var(--ink); margin-top: 10px; }.secondary:hover { background: var(--track); }
.ticket-bottom { border-top: 1px dashed var(--line); padding: 19px 30px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font: 12px/1.5 var(--mono); color: var(--muted); }
.ticket-bottom strong { color: var(--ink); font-weight: 600; white-space: nowrap; }
.tiny-note { text-align: center; font: 12px/1.5 var(--mono); color: var(--muted); margin-top: 19px; }
.route-strip { display: flex; align-items: center; gap: 14px; font: 12px var(--mono); margin-top: 24px; }
.route-track { height: 3px; flex: 1; background: var(--red); position: relative; }
.route-track::before, .route-track::after { content: ''; position: absolute; top: -3px; width: 9px; height: 9px; border: 2px solid var(--red); border-radius: 50%; background: var(--paper); }
.route-track > span { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: var(--paper); color: var(--red); padding: 0 6px; font: 18px var(--mono); }.route-track::before { left: 0; }.route-track::after { right: 0; }
footer { border-top: 1px solid var(--line); margin: 0 5%; padding: 24px 0; display: flex; justify-content: space-between; gap: 18px; font: 12px/1.6 var(--mono); color: var(--muted); }
footer a { margin-left: 12px; text-decoration: none; }

/* Active play: brand red for progress, green only for correct answers. */
.play { max-width: 1100px; margin: auto; }
.play-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 21px; }
.play-heading h2 { margin: 8px 0 0; font-size: 35px; }
.play-controls { display: flex; align-items: center; gap: 22px; }
.sound-toggle { background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font: 500 12px var(--mono); white-space: nowrap; }
.sound-toggle[aria-pressed='true'] { border-color: var(--ink); color: var(--ink); }
.run-status { position: sticky; top: 0; z-index: 2; background: var(--paper); padding-bottom: 14px; }
.scoreboard { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 12px 0 15px; border-top: 1px solid var(--line); }
.scoreboard strong { font: 600 46px var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -3px; }
.scoreboard small { font: 13px var(--mono); color: var(--muted); letter-spacing: 0; }
.timer { color: var(--red); }
.time-track { height: 4px; background: var(--track); margin-bottom: 14px; overflow: hidden; }
.time-track div { height: 100%; background: var(--ink); width: 100%; }
.progress-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; font: 500 14px var(--mono); margin-bottom: 9px; }
.progress-summary strong { color: var(--red-dark); }
.completion { appearance: none; -webkit-appearance: none; display: block; border: 0; width: 100%; height: 11px; border-radius: 6px; overflow: hidden; background: var(--track); color: var(--red); accent-color: var(--red); }
.completion::-webkit-progress-bar { background: var(--track); border-radius: 6px; }
.completion::-webkit-progress-value { background: var(--red); border-radius: 6px; transition: width .18s ease-out; }
.completion::-moz-progress-bar { background: var(--red); border-radius: 6px; }
.momentum { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-top: 14px; }
.momentum > div:not(.power-up-tray) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
#level-label { font: 600 13px var(--mono); color: var(--ink); }
#combo-status { flex-basis: 100%; font: 12px/1.4 var(--mono); color: var(--muted); }
.combo-pips { display: flex; gap: 4px; }.combo-pip { width: 9px; height: 9px; border-radius: 50%; background: var(--track); transition: background .15s; }.combo-pip.lit { background: var(--red); }
.power-up-tray button { flex-shrink: 0; min-height: 43px; padding: 10px 14px; border: 1px solid var(--red); border-radius: var(--radius); background: var(--red); color: var(--surface); font: 600 12px var(--mono); }
.power-up-tray button:disabled { background: var(--paper); color: var(--muted); border-color: var(--line); }
.power-up-tray button:not(:disabled):hover { background: var(--red-dark); border-color: var(--red-dark); }
.progress-feedback { font: 500 12px/1.5 var(--mono); color: var(--ink); margin: 10px 0 0; min-height: 18px; }
.play[data-level='3'] .momentum, .play[data-level='4'] .momentum { border-color: var(--red-line); background: var(--red-soft); }
.play[data-level='4'] #level-label { color: var(--red-dark); }
.last-seconds .timer { animation: clock-urgency 1s ease-in-out infinite; }.last-seconds .time-track div { background: var(--red); }
.board { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.station { min-height: 54px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius); font: 600 17px/1.05 var(--display); text-transform: uppercase; letter-spacing: .35px; padding: 10px 5px; touch-action: manipulation; transition: background .12s; overflow-wrap: anywhere; }
.station:not(:disabled):hover { border-color: var(--ink); background: var(--track); }
.station.removed { background: var(--track); color: var(--muted); border: 1px solid var(--line); opacity: .42; pointer-events: none; animation: decoy-dissolve .55s ease-out; }
.station.removed small { display: block; margin-top: 5px; font: 500 9px var(--mono); letter-spacing: .5px; }
.board-note { font: 12px var(--mono); color: var(--muted); text-align: center; margin: 22px 0; }
.playing .city-stars, .playing #profile-open { display: none; }.playing main { padding-top: 20px; }.playing #how { visibility: hidden; }

/* Result scorecard. Rank targets are separate from real-player comparisons. */
.result { max-width: 730px; margin: 10px auto 20px; }
.result .ticket-body { padding: 32px; }
.result-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.result-heading .eyebrow { color: var(--muted); }
.rank-stamp { border: 1px solid var(--red-line); border-radius: var(--radius); padding: 8px 10px; color: var(--red-dark); background: var(--red-soft); font: 600 13px var(--mono); white-space: nowrap; }
.result h2 { font-size: clamp(42px, 6vw, 64px); line-height: 1; margin: 14px 0 10px; }
.result .rank-description { font-size: 16px; margin-bottom: 24px; max-width: 570px; }
.performance { display: grid; grid-template-columns: 132px 1fr; gap: 22px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.score-ring { width: 132px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--red) var(--completion), var(--track) 0); }
.score-ring > div { width: 110px; aspect-ratio: 1; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring strong { font: 700 48px/1 var(--display); }.score-ring strong small { font-size: 26px; color: var(--muted); margin-left: 4px; }
.score-ring > div > span { font: 500 11px var(--mono); letter-spacing: .7px; margin-top: 8px; color: var(--muted); }
.performance-copy > strong { display: block; font: 700 48px/1 var(--display); color: var(--red); }
.performance-copy > strong > span { font-size: 30px; }
.performance-copy .section-label { font-size: 11px; color: var(--muted); margin-top: 6px; letter-spacing: .6px; }
.performance-copy p { font-size: 14px; margin: 10px 0 0; }
.stop-segments { display: grid; grid-template-columns: repeat(33, minmax(0,1fr)); gap: 3px; margin-top: 18px; }
.stop-segments i { height: 16px; border-radius: 2px; background: var(--track); }.stop-segments .filled { background: var(--red); }
.reason { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; background: var(--red-soft); color: var(--red-dark); border: 1px solid var(--red-line); padding: 13px 15px; font-size: 14px; border-radius: var(--radius); margin: 18px 0 24px; }
.reason b { font: 600 12px/1.6 var(--mono); }
.victory .reason { background: var(--success-soft); border-color: var(--success-line); color: var(--success); }
.data-note { display: block; color: var(--muted); font-size: 12px; line-height: 1.6; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-heading > span:last-child { white-space: nowrap; font: 12px var(--mono); color: var(--muted); }
.rank-panel { margin: 26px 0; }
.rank-ladder { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; list-style: none; padding: 0; margin: 0; }
.rank-ladder li { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.rank-ladder li.current { border-color: var(--red); background: var(--red-soft); }.rank-ladder li.earned { background: var(--paper); }
.tier-number { font: 500 13px var(--mono); color: var(--muted); }.current .tier-number { color: var(--red-dark); }
.rank-ladder b { display: block; font-size: 14px; font-weight: 600; }.rank-ladder small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.you-label { margin-left: auto; color: var(--red-dark); font: 600 10px var(--mono); }
.next-rank { padding-left: 12px; border-left: 3px solid var(--red); font-size: 14px; margin: 16px 0 0; }
.rider-profile { margin: 20px 0 16px; }
.rider-profile label { display: block; font: 600 11px var(--mono); letter-spacing: .5px; margin-bottom: 8px; }
.rider-profile input { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: 500 16px 'DM Sans', Arial, sans-serif; }
.rider-profile input[aria-invalid='true'] { border-color: var(--red); }
.rider-profile #name-status { margin: 8px 0 0; min-height: 18px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.result-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result-metrics dt { color: var(--muted); font: 500 10px/1.4 var(--mono); text-transform: uppercase; }
.result-metrics dd { margin: 4px 0 0; font: 600 22px var(--mono); font-variant-numeric: tabular-nums; }
.result-metrics small { font-size: 13px; }
.rider-avatar { position: relative; display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; overflow: hidden; border-radius: 50%; background: var(--red-soft); color: var(--red-dark); border: 1px solid var(--red-line); font: 700 16px var(--mono); }
.rider-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }.rider-avatar img[hidden] { display: none; }
.rider-cell { display: flex; gap: 9px; align-items: center; }.rider-cell > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.photo-profile { display: flex; align-items: center; gap: 14px; }.photo-profile .rider-avatar { width: 58px; height: 58px; flex-basis: 58px; font-size: 24px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 0 14px; }.photo-actions .text-button { position: relative; display: inline-block; padding: 7px 0; margin: 0; font: 600 12px 'DM Sans',Arial,sans-serif; text-transform: none; letter-spacing: 0; cursor: pointer; }
.photo-actions label:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }.photo-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
#photo-status { margin: 8px 0 16px; min-height: 18px; }.result-identity { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; font: 600 18px var(--mono); overflow-wrap: anywhere; }.result-identity .rider-avatar { width: 62px; height: 62px; flex-basis: 62px; font-size: 26px; }
.result-rider { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 13px; color: var(--muted); margin-top: 20px; }
.result-rider b { color: var(--ink); overflow-wrap: anywhere; }.result-rider button { margin-left: auto; font-size: 12px; }
.rank-guide { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin: 24px 0; }
.rank-guide summary { cursor: pointer; color: var(--muted); font: 500 11px/1.5 var(--mono); }
.result .primary { margin-top: 16px; }.result .home-link { display: block; margin: 20px auto 0; }
.leaderboard { margin: 20px 0; border-top: 1px solid var(--line); }
.leader-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.leader-row span:last-child { text-align: right; color: var(--muted); font: 12px/1.5 var(--mono); }
.challenge { border-left: 3px solid var(--red); background: var(--paper); padding: 13px 15px; margin-bottom: 20px; font-size: 14px; line-height: 1.5; }.challenge strong { display: block; }
.share-fallback { width: 100%; height: 120px; font: 12px var(--mono); margin-top: 14px; padding: 10px; border: 1px solid var(--line); }
dialog { max-width: 520px; width: calc(100% - 32px); padding: 38px; border: 0; border-top: 6px solid var(--red); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgb(29 29 31 / 65%); backdrop-filter: blur(4px); }dialog p { font-size: 16px; color: var(--muted); }
.close { position: absolute; right: 15px; top: 12px; background: transparent; color: var(--ink); border: 0; font-size: 26px; }
#notice { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; background: var(--ink); color: var(--surface); border-radius: var(--radius); padding: 12px 20px; font-size: 14px; z-index: 5; display: none; }
.defeat { animation: loss-shake .5s ease-out; }.victory { animation: victory-arrive .55s ease-out; }
@keyframes loss-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes victory-arrive { 0% { transform: scale(.96); } 60% { transform: scale(1.015); } 100% { transform: scale(1); } }
@keyframes clock-urgency { 50% { opacity: .6; } }

/* Earned tools and the ordered, fill-in Red Line diagram. */
.power-up-tray { display: flex; gap: 8px; flex-shrink: 0; }
.power-up-tray #slow-time:not(:disabled) { background: var(--ink); border-color: var(--ink); }
.slow-active .timer { color: var(--ink); }
.slow-active .time-track div { background: var(--ink); }
.slow-active #slow-time:disabled { background: var(--ink); color: var(--surface); border-color: var(--ink); box-shadow: inset 0 -3px 0 var(--red); }
.slow-active .scoreboard { border-top-color: var(--red); }
.route-map { margin: 6px 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.route-map summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; font: 600 12px var(--mono); list-style: none; }
.route-map summary::-webkit-details-marker { display: none; }
.route-map summary::after { content: '+'; font-size: 18px; color: var(--red); }
.route-map[open] summary::after { content: '−'; }
.route-map summary > span:first-child { margin-right: auto; }.route-map summary > span:last-child { color: var(--red-dark); }
.route-map summary:focus-visible { outline: 3px solid var(--focus); outline-offset: -4px; }
.route-caption { display: flex; justify-content: space-between; gap: 12px; padding: 0 16px 9px; font: 11px/1.4 var(--mono); color: var(--muted); }
.route-viewport { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--red-line) var(--paper); padding: 4px 10px 12px; }
.route-diagram { min-width: 880px; padding: 0 6px; }
.route-row { position: relative; display: grid; grid-template-columns: repeat(11,minmax(0,1fr)); list-style: none; padding: 0; margin: 0; min-height: 64px; }
.route-row::before { content: ''; position: absolute; top: 12px; left: calc(100% / 22); right: calc(100% / 22); height: 3px; background: var(--red-line); }
.route-row:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 12px; width: calc(100% / 22); height: 64px; border: 3px solid var(--red-line); border-left: 0; border-radius: 0 14px 14px 0; }
.route-row.reverse::after { right: auto; left: 0; border: 3px solid var(--red-line); border-right: 0; border-radius: 14px 0 0 14px; }
.route-stop { grid-row: 1; position: relative; z-index: 1; min-width: 0; text-align: center; padding: 0 3px; }
.route-dot-marker { display: grid; place-items: center; position: relative; width: 26px; height: 26px; margin: 0 auto 5px; border-radius: 50%; border: 2px solid var(--red-line); background: var(--surface); color: var(--muted); font: 500 10px var(--mono); }
.route-name { display: block; font: 600 12px/1.15 var(--display); text-transform: uppercase; overflow-wrap: anywhere; color: var(--muted); }
.route-stop.found .route-dot-marker { color: var(--surface); background: var(--red); border-color: var(--red); }
.route-stop.found .route-name { color: var(--ink); }
.route-stop.missed .route-name { color: var(--muted); }.route-stop.missed .route-dot-marker { border-style: dashed; }
.station-flight { position: fixed; display: grid; place-items: center; z-index: 10; border-radius: var(--radius); background: var(--red); color: var(--surface); pointer-events: none; text-align: center; text-transform: uppercase; font: 600 16px var(--display); }
.power-recap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font: 12px/1.6 var(--mono); margin: 0 0 20px; }
@keyframes decoy-dissolve { 0% { transform: scale(1); opacity: 1; } 45% { transform: scale(.94); filter: blur(2px); } 100% { transform: scale(1); opacity: .42; filter: blur(0); } }

/* Shared daily standings: compact, named, one best ride per browser. */
.history-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.history-panel > p { font-size: 14px; }
.global-board { margin: 26px 0 20px; }
.global-board .section-heading { margin-bottom: 12px; }
.global-board .section-heading p { font: 11px/1.5 var(--mono); color: var(--muted); margin: 6px 0 0; }
.your-place { font: 700 36px/1 var(--display); color: var(--red); text-align: right; }
.your-place small { display: block; font: 500 9px var(--mono); margin-top: 5px; white-space: nowrap; }
.standing-note { font-size: 13px; color: var(--muted); margin: 8px 0 16px; }
.global-table { border-collapse: collapse; table-layout: fixed; width: 100%; font-size: 14px; }
.global-table th, .global-table td { padding: 12px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.global-table thead th { font: 500 10px/1.4 var(--mono); text-transform: uppercase; color: var(--muted); }
.global-table th:first-child { width: 13%; }.global-table th:nth-child(2) { width: 45%; }.global-table th:nth-child(3) { width: 20%; }
.global-table th:nth-child(n+3), .global-table td:nth-child(n+3) { text-align: right; }
.global-table tbody th { overflow-wrap: anywhere; font-weight: 600; }.global-table td { font: 500 12px var(--mono); }
.global-table td span { color: var(--muted); font-size: 10px; }.global-table .is-you { background: var(--red-soft); }
.global-table small { display: inline-block; font: 600 9px var(--mono); color: var(--red-dark); margin-left: 6px; }
.personal-summary { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 12px; padding-top: 16px; }
.personal-summary b { color: var(--ink); margin-left: 5px; }.global-board .data-note { margin: 12px 0 0; }
/* Compact entry point and one persistent rider profile surface. */
.header-actions { display: flex; align-items: center; gap: 20px; }
.home-ticket .ticket-body { text-align: center; }
.home-ticket h2 { margin: 0 0 12px; font-size: 38px; }
.home-ticket .start-prompt { font-size: 14px; margin-bottom: 22px; }
.home-ticket #start { max-width: 270px; margin: 22px auto 0; }
#start-status:empty, #board-status:empty { display: none; }
.rider-summary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; text-align: left; }
.rider-summary > div { min-width: 0; }.rider-summary strong { display: block; overflow-wrap: anywhere; font: 600 15px 'DM Sans',Arial,sans-serif; }
.rider-summary .rider-avatar { width: 46px; height: 46px; flex-basis: 46px; }
.rider-summary .data-note { font-size: 11px; margin-top: 3px; }
.rider-summary .edit-profile { white-space: nowrap; font-size: 12px; }
.result .result-identity { margin-bottom: 0; }.result #result-personal { margin-bottom: 22px; padding-top: 10px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.result-actions .primary, .result-actions .secondary { margin: 0; font-size: 12px; letter-spacing: 0; }
#expand-riders { color: var(--red-dark); }#more-riders { margin-left: 22px; }
#profile-dialog { max-width: 560px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px; }
.profile-identity { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.profile-identity .rider-avatar { width: 60px; height: 60px; flex-basis: 60px; font-size: 26px; }
.profile-identity > div { min-width: 0; }.profile-identity strong { display: block; overflow-wrap: anywhere; font-size: 20px; }
.profile-identity > div > span { display: block; font: 600 23px var(--display); margin-top: 3px; }
#profile-dialog h3 { font: 600 12px var(--mono); letter-spacing: 1px; margin: 25px 0 10px; }
.recent-rides { list-style: none; padding: 0; margin: 0; max-height: 220px; overflow-y: auto; }
.recent-rides li { display: grid; grid-template-columns: 75px 1fr 1.3fr; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.recent-rides li span:last-child { text-align: right; }.recent-rides li span:first-child { color: var(--muted); }
.profile-editor { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; }
.profile-editor summary { font-weight: 600; cursor: pointer; font-size: 14px; }
.profile-editor .rider-profile { margin: 12px 0 0; }.profile-editor .photo-profile > .rider-avatar, .profile-editor .photo-profile .section-label { display: none; }
.profile-editor #photo-status { min-height: 0; margin: 4px 0 14px; font-size: 12px; }
.handle-edit { display: flex; gap: 10px; }.handle-edit .primary { width: auto; margin: 0; padding: 12px 18px; }
#profile-dialog .profile-note { margin-bottom: 0; font-size: 11px; }
/* A short, unmistakable earned-power cue, then back to the sticky controls. */
.power-up-tray { position: relative; }
#power-alert { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); visibility: hidden; white-space: nowrap; padding: 8px 12px; background: var(--ink); color: var(--surface); border-radius: var(--radius); font: 600 12px var(--mono); box-shadow: var(--shadow); pointer-events: none; }
.power-ready #power-alert { visibility: visible; }
.power-ready button:not(:disabled) { animation: power-ready-pulse .6s ease-out 3; outline: 3px solid var(--red-line); outline-offset: 3px; }
@keyframes power-ready-pulse { 50% { transform: translateY(-3px) scale(1.04); box-shadow: 0 0 0 6px var(--red-soft); } }
/* Community totals and each rider's full-history record. */
.community-stats { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 8px 0 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.community-stats b { color: var(--ink); font: 600 20px var(--mono); margin-right: 4px; }
.rider-record { display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 3px; }
@media (min-width: 1500px) { main { padding-left: 30px; padding-right: 30px; } }
@media (max-width: 900px) {
  .edition { display: none; }.home { gap: 28px 4%; }h1 { font-size: 100px; }.ticket-body { padding: 24px; }
  .board { grid-template-columns: repeat(5, minmax(0,1fr)); }.play-controls > .eyebrow { display: none; }
}
@media (max-width: 650px) {
  .result-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 20px; }.result-metrics dd { font-size: 20px; }.global-table th, .global-table td { padding: 11px 4px; }.global-table { font-size: 12px; }.global-table td { font-size: 11px; }
  .masthead { height: 70px; margin: 0 6%; }.brand { font-size: 15px; gap: 8px; }.brand-mark { width: 28px; height: 28px; font-size: 20px; }.city-stars { display: none; }
  .text-button { font-size: 12px; }.text-button span { margin-left: 5px; }main { padding: 28px 6% 35px; }
  .home { display: block; min-height: 0; }.home-leaderboard.global-board { margin-top: 24px; padding: 18px; }.home-copy { margin-bottom: 20px; }.home-copy > .eyebrow { font-size: 12px; }
  h1 { font-size: clamp(44px, 12.5vw, 76px); line-height: 1; margin: 12px 0; letter-spacing: -1px; }h1 br { display: none; }h1 .rush-word { display: inline; }
  .intro { font-size: 16px; margin: 0; max-width: 100%; }.numbers { margin-top: 12px; padding-top: 12px; max-width: none; }.numbers strong { font-size: 34px; }.numbers span { font-size: 11px; }
  .route-strip { display: flex; font-size: 10px; margin-top: 18px; gap: 10px; }.ticket-body { padding: 20px; }.ticket-top, .ticket-bottom { padding: 13px 20px; }.home-ticket h2 { font-size: 30px; }.home-ticket .start-prompt { font-size: 13px; margin-bottom: 16px; }.home-ticket #start { margin-top: 18px; }.header-actions { gap: 14px; }.community-stats { gap: 8px 16px; }.community-stats b { font-size: 17px; }.rider-summary { gap: 9px; }.rider-summary .data-note { display: none; }.ticket-top span { font-size: 11px; }.ticket-top span:last-child { text-align: right; }
  .tiny-note { font-size: 11px; }h2 { font-size: 39px; }
  .board { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }.station { font-size: 14px; min-height: 48px; padding: 8px 3px; letter-spacing: 0; }
  .playing main { padding: 14px 4% 25px; }.playing .masthead { height: 54px; }.play-heading { margin-bottom: 10px; gap: 10px; }.play-heading h2 { font-size: 24px; }.play-heading .eyebrow { font-size: 11px; }
  .play-controls { gap: 8px; }.sound-toggle { padding: 9px; font-size: 11px; }.scoreboard strong { font-size: 34px; letter-spacing: -2px; }.scoreboard { padding: 9px 0; }.scoreboard small { font-size: 11px; }
  .run-status { padding-bottom: 11px; }.time-track { margin-bottom: 10px; }.progress-summary { font-size: 12px; }.progress-feedback { font-size: 11px; }
  .momentum { flex-wrap: wrap; gap: 10px; padding: 10px; margin-top: 10px; }.power-up-tray { width: 100%; }.power-up-tray button { flex: 1; }.route-caption { flex-direction: column; gap: 4px; }.route-row { min-height: 60px; }.route-row:not(:last-child)::after { height: 60px; }.route-name { font-size: 13px; }#level-label { font-size: 11px; }#combo-status { font-size: 11px; }.power-up-tray button { font-size: 11px; padding: 8px; }.combo-pip { width: 7px; height: 7px; }
  .history-panel { padding: 16px; }.result { margin: 0 auto; }.result .ticket-body { padding: 22px; }.result h2 { font-size: 46px; }.result-heading { gap: 8px; }.result-heading .eyebrow { font-size: 11px; }
  .performance { grid-template-columns: 132px 1fr; gap: 18px; }.score-ring { width: 132px; }.score-ring > div { width: 110px; }.score-ring strong { font-size: 46px; }.score-ring strong small { font-size: 22px; }.score-ring > div > span { font-size: 9px; }.performance-copy > strong { font-size: 44px; }
  .performance-copy .section-label { font-size: 10px; }.performance-copy p { font-size: 13px; }.stop-segments { gap: 2px; }.stop-segments i { height: 18px; }

  .section-heading { align-items: flex-start; }.section-label { font-size: 11px; }
  .rank-ladder { grid-template-columns: 1fr; }.rank-ladder li { padding: 10px 12px; }.rank-ladder small { display: inline; margin-left: 8px; }.rank-ladder b { display: inline; }
  footer { flex-direction: column; font-size: 11px; gap: 6px; margin: 0 6%; }.playing footer { display: none; }
}
@media (max-width: 380px) {
  .performance { grid-template-columns: 112px 1fr; gap: 12px; }.score-ring { width: 112px; }.score-ring > div { width: 92px; }.score-ring strong { font-size: 39px; }.performance-copy > strong { font-size: 38px; }.result .ticket-body { padding: 16px; }.result-actions { grid-template-columns: 1fr; }#profile-dialog { padding: 22px; }
  .rank-ladder small { display: block; margin-left: 0; }.progress-summary { font-size: 11px; }.scoreboard strong { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }.completion::-webkit-progress-value { transition: none; }
}
