/* CoasterCounter. design/design-system.md is the rule book for everything here. */

@font-face { font-family: "League Gothic"; font-weight: 400; font-display: swap; src: url("/assets/league-gothic-vietnamese-400-4f266569.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "League Gothic"; font-weight: 400; font-display: swap; src: url("/assets/league-gothic-latin-ext-400-d2637611.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "League Gothic"; font-weight: 400; font-display: swap; src: url("/assets/league-gothic-latin-400-51fbf15d.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-display: swap; src: url("/assets/hanken-grotesk-vietnamese-400-d0c884b3.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-display: swap; src: url("/assets/hanken-grotesk-latin-ext-400-f824bc32.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-display: swap; src: url("/assets/hanken-grotesk-latin-400-e1668b1e.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500; font-display: swap; src: url("/assets/hanken-grotesk-vietnamese-500-07ca1cdd.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500; font-display: swap; src: url("/assets/hanken-grotesk-latin-ext-500-cffa5067.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500; font-display: swap; src: url("/assets/hanken-grotesk-latin-500-ea6a2b50.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 700; font-display: swap; src: url("/assets/hanken-grotesk-vietnamese-700-a2cf52c1.woff2") format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 700; font-display: swap; src: url("/assets/hanken-grotesk-latin-ext-700-8be372a9.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-weight: 700; font-display: swap; src: url("/assets/hanken-grotesk-latin-700-e8365c92.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: light dark;
  --page: #FFFFFF;
  --ink: #1A1523;
  --mute: #5B5666;
  --quiet: #8F8A99;
  --block: #1A1523;
  --sand: #EBD3A8;
  --card: #FFFFFF;
  --peach: #FFE3CC;
  --line: #E2DFE8;
  --orange: #F58A4B;
  --yellow: #FFC93C;
  --track: #3A3147;
  --counted: #7FD99A;
  --rust: #B8400F;
  --display: "League Gothic", Impact, sans-serif;
  --home-size: clamp(84px, 13vw, 170px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #120E1A;
    --ink: #F5F1EA;
    --mute: #B8B3C2;
    --block: #231B30;
    --card: #1C1626;
    --peach: #FFD9BC;
    --line: #3A3147;
  }
}

:root[data-theme="light"] { color-scheme: light; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #120E1A;
  --ink: #F5F1EA;
  --mute: #B8B3C2;
  --block: #231B30;
  --card: #1C1626;
  --peach: #FFD9BC;
  --line: #3A3147;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
}

a { color: inherit; }
a:hover { opacity: .8; }

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Header */

.site-header { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }

.logo {
  margin-right: auto;
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: .5px;
  text-decoration: none;
}

.site-nav {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
  text-decoration: none;
}

/* Drop-down menus in the header. A plain <details>, so they open without JavaScript. */
.menu { position: relative; }
.menu summary { cursor: pointer; list-style: none; gap: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: "\25BE"; font-size: 12px; }
.menu-list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  min-width: 180px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.menu--end .menu-list { left: auto; right: 0; }
.menu-list a, .menu-list button:not(.pill) {
  min-height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.menu-list a:hover, .menu-list button:not(.pill):hover { opacity: 1; background: var(--block); }

.menu-list .menu-signup { margin-bottom: 6px; justify-content: center; border-radius: 22px; background: var(--yellow); color: #1A1523; }
.menu-list .menu-signup:hover { background: var(--yellow); opacity: .85; }
/* The hamburger splits into sections: each starts with a line and a small label. */
.menu-section { margin-top: 6px; padding-top: 10px; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.menu-list > .menu-section:first-child { margin-top: 0; padding-top: 4px; border-top: 0; }
.menu-label { padding: 0 12px 4px; color: var(--mute); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; overflow-wrap: anywhere; }
.menu-label--name { text-transform: none; letter-spacing: 0; font-size: 14px; }
.menu-switch { padding: 10px 6px 4px; gap: 6px; }
.menu-switch .menu-label { padding: 0 6px; }
.menu-switch > button:not(.pill) { padding: 0 6px; }
.menu-switch .pill { flex: 1; }
.burger {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 22px;
}
.menu[open] .burger { background: var(--block); }
.menu summary.burger::after { content: none; }

/* Phones get the logo, Parks, the ride count (a link to My list) and the hamburger on one line. */
.phone-only { display: none; }
@media (max-width: 760px) {
  .wide-only { display: none; }
  .phone-only { display: block; }
  .site-header { gap: 6px 12px; }
  .logo { font-size: 26px; }
  .site-total { font-size: 14px; }
  .menu-list { max-height: calc(100vh - 90px); overflow-y: auto; }
}
@media (max-width: 380px) {
  .logo { font-size: 22px; }
}

/* The ride switch: two choices joined in one rounded bar. */
.switch { display: flex; gap: 0; padding: 3px; border: 1px solid var(--line); border-radius: 22px; }
.switch .pill { min-height: 38px; border: 0; }
.switch-form { display: contents; }

.pill {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.share-pill { font-weight: 500; }
.quote-line { color: var(--mute); }
.hero .share-pill { border-color: var(--track); color: #FFFFFF; }

.pill--on { border-color: var(--yellow); background: var(--yellow); color: #1A1523; font-weight: 700; }

.search { flex: 1 1 100%; min-width: 0; display: flex; }

.search input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.visually-hidden { position: absolute; left: -9999px; }

.page-title { margin: 8px 0 0; font-family: var(--display); font-size: clamp(40px, 7vw, 72px); font-weight: 400; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.page-title span { color: var(--quiet); }

/* Forms */

.form { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.form label { font-size: 14px; font-weight: 700; }

.form input:not([type="checkbox"]):not([type="submit"]),
.form select {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.form textarea {
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.form--wide { max-width: 720px; }
.form-hint { margin: 0; color: var(--mute); font-size: 14px; }
.edit-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 1em 0; }
/* Links and buttons in one row look the same: one height, with room around the words. */
.edit-links .pill-link, .edit-links .pill { min-height: 44px; margin: 0; padding: 0 18px; font-size: 15px; font-weight: 500; }
.edit-links .pill--on { font-weight: 700; }

.edit-row { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.edit-what { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }
.edit-what p { margin: 4px 0 0; }

.form .check { display: flex; gap: 8px; align-items: center; min-height: 44px; font-weight: 400; }
.form .check input { width: 20px; height: 20px; }

.button {
  min-height: 48px;
  margin-top: 8px;
  padding: 0 22px;
  border: 0;
  border-radius: 24px;
  background: var(--yellow);
  color: #1A1523;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button[hidden] { display: none; }
.button--danger { background: var(--rust); color: #FFFFFF; }
.form-errors { margin: 0; padding: 12px 12px 12px 30px; border: 1px solid var(--rust); border-radius: 10px; }
.flash { margin: 0; padding: 12px 16px; border-radius: 10px; background: var(--peach); color: #1A1523; }

/* Location path */

.path {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: center;
  font-size: 14px;
  color: var(--mute);
}

.path a { min-height: 24px; display: inline-flex; align-items: center; }

/* Hero panel: the headline lays over the left of the photo. */

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  row-gap: 20px;
  padding: clamp(20px, 3vw, 36px);
  border-radius: 20px;
  background: var(--block);
  color: #FFFFFF;
}

.hero-text {
  grid-row: 1;
  grid-column: 1 / 10;
  align-self: center;
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  container-type: inline-size;
}

.hero-name {
  --hero-size: clamp(82px, 12vw, 150px);
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: min(calc(var(--hero-size) * var(--scale, 1)), calc(100cqi / (var(--word, 8) * .46)));
  line-height: .9;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sand);
  text-shadow: 0 3px 22px rgba(26, 21, 35, .8);
}

.hero-name--ride { --hero-size: clamp(130px, 22vw, 270px); line-height: .84; }

.hero-below {
  grid-row: 2;
  grid-column: 1 / 13;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  font-size: 18px;
}

.hero-photo {
  grid-row: 1;
  grid-column: 5 / 13;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
}

.no-photo {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px;
  background: var(--track);
  color: var(--sand);
  font-family: var(--display);
  font-size: 46px;
  line-height: 1;
  text-align: right;
}

.hero--plain .hero-text { grid-column: 1 / 13; }
.hero--with-stats { padding-bottom: 78px; }

.hero-number {
  font-family: var(--display);
  font-size: 58px;
  line-height: 1;
  color: var(--sand);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .hero-text { grid-column: 1 / 13; align-self: start; margin-top: 48vw; }
  .hero-photo { grid-column: 1 / 13; align-self: start; }
  .hero--plain .hero-text { margin-top: 0; }
}

/* Stat boxes */

.stat-boxes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: -78px;
  padding: 0 clamp(10px, 3vw, 36px);
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 14px;
}

.stat-box strong { font-size: 16px; }
.stat-box--link { text-decoration: none; }

.stat-box--first { border-color: var(--peach); background: var(--peach); color: #1A1523; }

.stat-number { font-family: var(--display); font-size: 44px; line-height: 1; }

.stat-box--first .stat-number { color: var(--rust); }

/* Headlines */

.section-title {
  margin: 14px 0 8px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 72px);
  line-height: 1;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.section-title span { color: var(--quiet); }

.group-title {
  margin: 0 0 4px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  text-transform: uppercase;
}

.status-title { margin: 14px 0 4px; font-size: 14px; font-weight: 700; }

/* Lists */

.long-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  column-gap: 32px;
}

.city-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 28px 32px;
  align-items: start;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: center;
  min-height: 52px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.row-name {
  flex: 1 1 170px;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.row-name--big {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.row-note { color: var(--mute); font-size: 14px; font-variant-numeric: tabular-nums; }

.empty { color: var(--mute); }

/* Ride and park facts */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 0 24px;
  margin: 0;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.fact dt { color: var(--mute); font-size: 13px; }
.fact dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.former-names { margin: 0; padding-left: 18px; }
.notes { max-width: 70ch; overflow-wrap: anywhere; }


.pill-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  font-weight: 500;
  text-decoration: none;
}

/* Status: always a lamp and a word. Yellow stays for counted rides. */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.lamp {
  width: 12px;
  height: 12px;
  flex: none;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: .7;
}

.status--operating .lamp { border-color: var(--counted); background: var(--counted); opacity: 1; }
.status--under-construction .lamp { border-color: var(--orange); background: var(--orange); opacity: 1; }

/* Counting */

.site-total { min-height: 44px; display: flex; align-items: center; font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; }

.count-panel { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.count-form { flex: 0 1 320px; }

.count-button {
  width: 100%;
  min-height: 60px;
  padding: 0 32px;
  border: 0;
  border-radius: 30px;
  background: var(--yellow);
  color: #1A1523;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.count-button--on { background: var(--counted); }

.credit-form { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.credit-field { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.credit-field > :first-child { color: var(--sand); }
.credit-row { display: flex; gap: 6px; align-items: center; }

.credit-form input {
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--track);
  border-radius: 10px;
  background: #FFFFFF;
  color: #1A1523;
  font: inherit;
  font-size: 16px;
}

.credit-form input[type="number"] { width: 84px; text-align: center; font-variant-numeric: tabular-nums; }

.step {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--sand);
  border-radius: 22px;
  background: transparent;
  color: var(--sand);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.credit-clear { border-color: var(--sand); color: var(--sand); }

.credit-note { min-height: 20px; color: var(--sand); font-size: 14px; }

.count-lamp-form { margin-left: auto; flex: none; }

.count-lamp {
  width: 44px;
  height: 44px;
  display: block;
  padding: 0;
  border: 2px solid var(--mute);
  border-radius: 50%;
  background: transparent;
  color: #1A1523;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.count-lamp--on { border-color: var(--yellow); background: var(--yellow); }

:root[data-theme="dark"] .count-lamp--on { box-shadow: 0 0 12px rgba(255, 201, 60, .55); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .count-lamp--on { box-shadow: 0 0 12px rgba(255, 201, 60, .55); }
}

@media (max-width: 760px) {
  .count-form { flex: 1 1 100%; }
}

/* Rider pages */

.rider-stats { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.rider-stat { display: flex; flex-direction: column; font-size: 14px; }
.rider-stat .hero-number { color: var(--yellow); }
/* The badge sits just after the name and is as tall as it, but never under 96px. A long name fits the
   width left once the gap and the badge are counted: .9 of the name's size, or 96px when that is more. */
.rider-name-row {
  --hero-size: clamp(82px, 12vw, 150px);
  --badge-share: 0;
  --badge-gap: 0px;
  --badge-least: 0px;
  --name-size: min(
    calc(var(--hero-size) * var(--scale, 1)),
    calc((100cqi - var(--badge-gap)) / (var(--word, 8) * .46 + var(--badge-share))),
    calc((100cqi - var(--badge-gap) - var(--badge-least)) / (var(--word, 8) * .46))
  );
  display: flex;
  align-items: center;
  gap: var(--badge-gap);
  max-width: 100%;
}
.rider-name-row--badge { --badge-share: .9; --badge-gap: 24px; --badge-least: 96px; }
.rider-name-row .hero-name { min-width: 0; font-size: var(--name-size); }
.rider-name-row .club-badge { width: max(96px, var(--name-size) * .9); height: max(96px, var(--name-size) * .9); }
.rider-stats-block { display: flex; flex-direction: column; gap: 10px; }
.rider-tracks { display: flex; flex-wrap: wrap; gap: 8px; }
.rider-track {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 12px 4px 10px;
  border: 1px solid var(--track);
  border-left: 4px solid var(--track-color);
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 14px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.rider-track strong { color: var(--track-color); font-family: var(--display); font-size: 20px; font-weight: 400; letter-spacing: 0; }
.rider-track:hover { background: var(--track); }
.rider-track--on { border-color: var(--track-color); background: var(--track-color); color: var(--block); }
.rider-track--on strong { color: var(--block); }
.rider-track--on:hover { background: var(--track-color); }
.rider-track[aria-disabled="true"] { cursor: default; }
.rider-track--steel { --track-color: #9CC3E6; }
.rider-track--wood { --track-color: var(--orange); }
.rider-track--rides { --track-color: var(--counted); }

.rider-shows { display: flex; flex-wrap: wrap; gap: 8px; }
.rider-shows .pill { display: inline-flex; align-items: center; font-weight: 500; text-decoration: none; }

.rider-follow { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: #FFFFFF; }
.rider-follow .pill:not(.pill--on) { border-color: var(--track); color: #FFFFFF; }

/* Friends */

.friend-label { padding: 2px 10px; border: 1px solid currentColor; border-radius: 12px; font-size: 13px; font-weight: 700; }
.panel .pill:not(.pill--on) { border-color: var(--track); color: #FFFFFF; }
.rider-search { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; font-size: 14px; color: var(--mute); }
.rider-search-box { display: flex; flex-wrap: wrap; gap: 8px; }
.rider-search-box input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

/* The sort box and the Filter button share a row, sort first. The filter panel drops below them. */
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filter-box:not([open]) ~ .rider-filters { display: none; }
.list-tools > .rider-filters { flex: 1 1 100%; }
/* The arrow after the sort box turns the sort round. It points down for the usual way and up when turned. */
.rider-reverse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: -6px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
}
.rider-reverse svg { width: 18px; height: 18px; transition: transform 0.15s; }
.rider-reverse--on svg { transform: rotate(180deg); }
.rider-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); }
.rider-sort select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.filter-box > summary { display: inline-flex; align-items: center; gap: 8px; list-style: none; }
.filter-box > summary::-webkit-details-marker { display: none; }
.filter-box > summary::after { content: "\25BE"; font-size: 12px; }
.filter-box[open] > summary::after { content: "\25B4"; }
.filter-box-count { min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--yellow); color: #1A1523; font-size: 13px; font-weight: 700; }
.rider-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.rider-filter { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--mute); }

.rider-filter select,
.rider-filter input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.rider-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rider-actions .button { margin-top: 0; min-height: 44px; }
.rider-actions .pill { display: inline-flex; align-items: center; text-decoration: none; }

turbo-frame { display: block; }

/* The list's wrapper adds no box, so its parts keep the page's spacing. Its rows, count and foot hide on their own. */
.rider-list { display: contents; }
/* Stronger than each part's own display rule, which would otherwise keep a hidden row on screen. */
.rider-list [hidden] { display: none !important; }

.rider-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  align-items: baseline;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.rider-row > * { min-width: 0; overflow-wrap: anywhere; }
.rider-row a { min-height: 24px; text-decoration: none; }
.rider-row-number { width: 44px; color: var(--mute); font-variant-numeric: tabular-nums; }
.rider-row-name { flex: 2 1 170px; font-weight: 700; }
.rider-row-park { flex: 2 1 170px; color: var(--mute); }
.rider-row-note { flex: 1 1 110px; color: var(--mute); font-size: 14px; }
.rider-row-date { width: 96px; color: var(--mute); font-size: 14px; font-variant-numeric: tabular-nums; }
.rider-row-laps { width: 76px; text-align: right; font-variant-numeric: tabular-nums; }

/* A ride on someone's list. Phones: name and park on the left, date and laps on the right,
   type and status on a small line below. Wide screens: type and status get a column. */
.rider-row.list-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-template-areas:
    "num name date"
    "num place laps"
    "num meta meta";
  gap: 2px 12px;
  align-items: baseline;
  padding: 12px 0;
}
.list-row-number { grid-area: num; width: auto; }
.list-row-name { grid-area: name; }
.list-row-place { grid-area: place; min-width: 0; color: var(--mute); font-size: 14px; }
.list-row-country::before { content: " \00B7 "; }
.list-row-meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; margin-top: 4px; color: var(--mute); font-size: 13px; }
.list-row-meta .status { gap: 6px; font-size: 13px; }
.list-row-meta .lamp { width: 10px; height: 10px; }
.list-row-date { grid-area: date; width: auto; text-align: right; font-size: 13px; }
.list-row-laps { grid-area: laps; width: auto; color: var(--mute); font-size: 14px; }

.rider-row.list-row--no-laps {
  grid-template-areas:
    "num name date"
    "num place place"
    "num meta meta";
}

/* The number column shows only when the list is sorted by the rider's ranking. */
.rider-rows:not(.rider-rows--ranked) .list-row-number { display: none; }
.rider-rows:not(.rider-rows--ranked) .rider-row.list-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name date"
    "place laps"
    "meta meta";
}
.rider-rows:not(.rider-rows--ranked) .rider-row.list-row--no-laps {
  grid-template-areas:
    "name date"
    "place place"
    "meta meta";
}

@media (min-width: 761px) {
  .rider-row.list-row {
    grid-template-columns: 44px minmax(0, 3fr) minmax(0, 2fr) 96px 64px;
    grid-template-areas:
      "num name meta date laps"
      "num place meta date laps";
  }
  .rider-row.list-row--no-laps {
    grid-template-columns: 44px minmax(0, 3fr) minmax(0, 2fr) 96px;
    grid-template-areas:
      "num name meta date"
      "num place meta date";
  }
  .rider-rows:not(.rider-rows--ranked) .rider-row.list-row {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) 96px 64px;
    grid-template-areas:
      "name meta date laps"
      "place meta date laps";
  }
  .rider-rows:not(.rider-rows--ranked) .rider-row.list-row--no-laps {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) 96px;
    grid-template-areas:
      "name meta date"
      "place meta date";
  }
  .list-row-meta { margin-top: 0; flex-direction: column; align-items: flex-start; align-self: center; font-size: 14px; }
  .list-row-meta .status { font-size: 14px; }
  .list-row-date, .list-row-laps { align-self: center; font-size: 14px; }
}

/* On a park, country, type or status sort, each group is its own table under a heading. */
.rider-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin: 36px 0 8px;
}
.rider-group:first-child { margin-top: 8px; }
/* The arrow left of a heading closes and opens its table. */
.rider-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 32px;
  height: 32px;
  margin-left: -6px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--mute);
  cursor: pointer;
}
.rider-group-toggle:hover { color: var(--ink); }
.rider-group-toggle svg { width: 20px; height: 20px; transition: transform 0.15s; }
.rider-group--collapsed .rider-group-toggle svg { transform: rotate(-90deg); }
.rider-row--collapsed { display: none !important; }
/* In a park's table the heading names the park and where it is, so each row leaves that line out. */
.rider-rows--park .list-row-place { display: none; }
/* In a country's table the heading names the country, so each row shows only the park. */
.rider-rows--country .list-row-country { display: none; }
.rider-group-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  text-transform: uppercase;
}
.rider-group-where { color: var(--mute); font-size: 15px; font-weight: 400; }
.rider-group-count { margin-left: auto; color: var(--mute); font-size: 14px; font-weight: 400; font-variant-numeric: tabular-nums; }

.rider-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--mute);
}

.rider-foot .pill-link { margin-top: 0; min-height: 44px; padding: 0 18px; color: var(--ink); }

/* Ratings */

.rating-panel { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.rating-average { font-size: 16px; }
.rating-average strong { color: var(--sand); font-family: var(--display); font-size: 32px; font-weight: 400; line-height: 1; }
.stars { display: flex; }

.star {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--track);
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  -webkit-text-stroke: 1px var(--sand);
}

.star--on { color: var(--yellow); -webkit-text-stroke: 0; }
.rating-note { color: var(--sand); font-size: 14px; }
.rating-remove { border-color: var(--sand); color: var(--sand); }

/* Ranking */

.rank-help { margin: 0 0 12px; color: var(--mute); }
.rank-note { color: var(--ink); font-weight: 500; }
.rank-list { min-height: 52px; margin: 0 0 20px; padding: 0; list-style: none; }

.rank-row {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
  background: var(--page);
  font-size: 15px;
}

.rank-handle {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mute);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.rank-position {
  width: 76px;
  min-height: 44px;
  flex: none;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rank-name { min-width: 0; overflow-wrap: anywhere; }
.rank-name span { display: block; color: var(--mute); font-size: 14px; }
.rank-row.sortable-ghost { opacity: .4; }

/* Photos, comments and moves. Photos are straight, and fill their space. */
.hero-photo--real { display: block; object-fit: cover; }
.no-photo { flex-direction: column; align-items: flex-end; gap: 12px; }
.no-photo-add { font-family: var(--body, inherit); font-size: 15px; color: var(--sand); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.photo-card { margin: 0; }
.photo-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.photo-card figcaption { margin-top: 4px; color: var(--mute); font-size: 14px; }
.upload-form, .comment-form { margin-top: 16px; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.comment p { margin: 0 0 4px; }
.report-link { display: inline-block; padding: 8px 4px; color: var(--mute); font-size: 14px; }
.comment .report-link { margin-left: 8px; }
.moved-list { margin: 16px 0 0; padding: 0; list-style: none; }
.moved-list li { padding: 4px 0; }
.move-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* Park Finder and maps */
.map { position: relative; z-index: 0; isolation: isolate; width: 100%; border-radius: 16px; background: var(--line); }
.map--finder { height: clamp(300px, 55vh, 520px); margin: 12px 0; }
.map--park { height: 240px; margin: 16px 0 8px; }
.finder { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.finder-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.finder-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.finder-field--place { flex: 1 1 240px; }
.finder-field label { font-size: 14px; font-weight: 700; }
.finder-field input, .finder-field select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); color: var(--ink); font: inherit; }
.finder-heading { margin: 8px 0 0; font-size: 20px; overflow-wrap: anywhere; }
.finder-row { flex-wrap: wrap; }
.finder-row-text { display: flex; flex-direction: column; flex: 1 1 240px; min-width: 0; }
.finder-distance { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Home, news and site pages */
.site-footer { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; color: var(--mute); }
.home-search { flex: 1 1 220px; min-width: 0; display: flex; }
.home-search input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 26px;
  background: #FFFFFF;
  color: #1A1523;
  font: inherit;
}
.home-start { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 26px; background: var(--yellow); color: #1A1523; font-weight: 700; text-decoration: none; }
.home-split { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.home-split--lists { margin-top: 0; }
.panel { flex: 1 1 280px; min-width: 0; padding: clamp(20px, 3vw, 36px); border-radius: 20px; background: var(--block); color: #FFFFFF; }
.panel--wide { flex: 2 1 480px; }
.panel-title { margin: 0 0 8px; font-family: var(--display); font-size: clamp(40px, 4vw, 54px); font-weight: 400; line-height: 1; text-transform: uppercase; color: var(--sand); }
.panel a { color: inherit; }
.panel .row { border-color: var(--track); }
.panel .row-note { color: #FFFFFF; }
.panel-link { display: inline-flex; align-items: center; min-height: 44px; }
.day-photo { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 20px; background: var(--block); color: #FFFFFF; }
.day-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.day-photo-caption { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; justify-content: space-between; padding: 0 10px 8px; }
.day-photo-text { display: flex; flex-direction: column; min-width: 0; }
.day-photo-label { color: var(--yellow); font-size: 14px; font-weight: 700; }
.day-photo-name { font-family: var(--display); font-size: 46px; line-height: 1.05; text-decoration: none; text-transform: uppercase; color: var(--sand); overflow-wrap: anywhere; }
.day-photo-by { font-size: 14px; }
.day-photo .pill { color: #FFFFFF; }
.dial-panel { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border-radius: 20px; background: var(--block); color: #FFFFFF; }
.dial-label { align-self: flex-start; font-weight: 500; }
.dial { position: relative; width: 280px; max-width: 100%; aspect-ratio: 1 / 1; }
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dial line { stroke: var(--track); stroke-width: 2.5; stroke-linecap: round; }
.dial line.lit { stroke: var(--yellow); }
.dial-middle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; }
.dial-number { font-family: var(--display); font-size: 112px; line-height: 1; color: var(--sand); }
.bar-row { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; font-size: 15px; }
.bar-row-text { display: flex; justify-content: space-between; gap: 12px; }
.bar-row-text a { min-width: 0; min-height: 24px; overflow-wrap: anywhere; }
.bar { height: 7px; border-radius: 4px; background: var(--track); }
.bar span { display: block; height: 7px; border-radius: 4px; background: var(--yellow); box-shadow: 0 0 12px rgba(255, 201, 60, .55); }
.news-row { flex-direction: column; align-items: flex-start; gap: 2px; }
.news-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin: 20px clamp(10px, 3vw, 36px) 0;
  padding: 6px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.news-strip-label { font-family: var(--display); font-size: 22px; line-height: 1; text-transform: uppercase; color: var(--orange); }
.news-strip-title { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.news-strip-date { color: var(--mute); font-size: 14px; }
.news-card { margin-bottom: 16px; }
.news-card .panel-title { font-size: clamp(32px, 3.4vw, 46px); }
.news-card .panel-title a { text-decoration: none; }
.news-card-date { margin: 0 0 12px; opacity: 0.75; }
.news-card-body > :first-child { margin-top: 0; }
.news-card-body--long {
  max-height: 22em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
/* The shared row-name basis is a width. In this stacked row it would turn into a 170px height. */
.news-row .row-name { flex: none; }
.news-post + .news-post { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--track); }
.news-post h2 { margin-bottom: 4px; }
.news-body, .site-text { max-width: 70ch; overflow-wrap: anywhere; }
.news-body img { display: block; max-width: 100%; height: auto; margin: 12px 0; border-radius: 12px; }
.news-video { display: block; width: 100%; aspect-ratio: 16 / 9; margin: 12px 0; border: 0; border-radius: 12px; }
.news-video--tall { max-width: 360px; aspect-ratio: 9 / 16; }
.site-text h2 { margin: 24px 0 4px; font-size: 20px; }
.plate { max-width: 70ch; }
.notice-line { margin: 0; color: var(--mute); }

/* Admin */
.admin-table-wrap { max-width: 100%; overflow-x: auto; }
.admin-table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.admin-table th, .admin-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.admin-table th:first-child, .admin-table td:first-child { text-align: left; }
.admin-table thead th { color: var(--mute); font-weight: 500; }
.admin-table td.zero { color: var(--quiet); }

/* My numbers */

.number-options { margin-top: 8px; }
.number-lists { margin-top: 16px; row-gap: 28px; }
.number-note { color: var(--mute); font-size: 14px; }
.number-big { margin: 0 0 4px; font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.number-passed { margin: 0; padding-left: 20px; }
.number-passed li { padding: 2px 0; }
.number-year .row-name { flex: 0 0 64px; font-variant-numeric: tabular-nums; }
.number-bar { flex: 0 1 auto; max-width: 40%; height: 12px; border-radius: 6px; background: var(--yellow); }

/* Club badges and the certificate */

.club-badge { display: block; width: 96px; height: 96px; flex: none; }
.club-badge-disc { fill: var(--block); stroke: var(--track); stroke-width: 2; }
.club-badge-ticks line { stroke: var(--sand); stroke-width: 2; opacity: .5; }
.club-badge text { text-anchor: middle; fill: var(--sand); }
.club-badge text.club-badge-level { fill: var(--yellow); }
.club-badge-small { font-family: "Hanken Grotesk", sans-serif; font-size: 11px; font-weight: 700; }
.club-badge-level { font-family: var(--display); font-size: 68px; }
.club-badge-word { font-family: var(--display); font-size: 26px; }

.certificate { display: flex; flex-wrap: wrap; gap: 16px 48px; margin-top: 16px; }
.certificate-club { flex: 0 1 280px; }
.certificate-club .club-badge { width: 180px; height: 180px; }
.certificate-form { flex: 1 1 320px; }
.certificate-form fieldset { margin: 0 0 8px; padding: 0; border: 0; display: flex; flex-direction: column; gap: 4px; }
.certificate-form legend { margin-bottom: 4px; font-size: 14px; font-weight: 700; }
.certificate-form:has(#design_basic:checked) .certificate-formal { display: none; }

/* Compare lists */

.compare-form { margin: 16px 0; }
.compare-stats { margin: 20px 0 8px; }
.compare-stats .hero-number { color: var(--ink); }
.compare-stats .rider-stat span:last-child { max-width: 16ch; overflow-wrap: anywhere; }

.compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(var(--riders), minmax(44px, 88px));
  gap: 0 8px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.compare-head { position: sticky; top: 0; z-index: 1; margin-top: 16px; background: var(--page); color: var(--mute); font-size: 13px; }
.compare-rider { text-align: center; overflow-wrap: anywhere; }
.compare-ride { display: flex; flex-wrap: wrap; gap: 2px 14px; min-width: 0; overflow-wrap: anywhere; }
.compare-ride a { text-decoration: none; }
.compare-ride .rider-row-name, .compare-ride .rider-row-park { flex: 1 1 160px; }
.compare-mark { text-align: center; color: var(--quiet); }
.compare-mark--yes { color: var(--ink); font-weight: 700; }
.compare-mark--own .count-lamp-form { margin: 0 auto; width: max-content; }
.compare-mark--own .count-lamp { width: 36px; height: 36px; }

@media (max-width: 520px) {
  .compare-row { gap: 0 4px; grid-template-columns: minmax(0, 1fr) repeat(var(--riders), 44px); }
  .compare-rider { font-size: 12px; }
}
.rider-own { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.rider-own .pill { border-color: var(--track); color: #FFFFFF; }
.rider-follow a.pill, .rider-own a.pill { display: inline-flex; align-items: center; font-weight: 500; text-decoration: none; }

/* Leaderboards */

.board-note { color: var(--mute); }
.board-country { margin: 12px 0; max-width: 520px; }
.board-total { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-you { background: var(--peach); color: #1A1523; }
.board-you a { color: inherit; }

/* The photo popover. It fills the window on a dark backdrop in both themes, as a photo reads best on dark. */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0; background: transparent; cursor: zoom-out; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgb(10 8 14 / 0.92); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox-close { position: fixed; top: 12px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.12); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox-actions { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; cursor: default; }
.lightbox-actions:empty { display: none; }
