/* Your rides: an editorial intro with the drop zone, then the rider's own
   map, pace, our rides in each region and their climbs. */
.yours main { padding-block: 40px 48px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.intro h1 { font-size: clamp(2.5rem, 6vw, 4.75rem); margin: 12px 0 16px; max-width: 16ch; }
.intro .lede { max-width: 56ch; }
.yours.has-rides .intro h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
.yours.has-rides .intro .lede, .yours.has-rides .howto { display: none; }

.secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border-radius: 8px; border: 1.5px solid var(--text); background: transparent; color: var(--text); font: 600 1rem var(--body); cursor: pointer; }
.secondary:hover, .pick:hover { text-decoration: underline; }
.danger { border-color: var(--clay); color: var(--clay); }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pick:focus-within { outline: 3px solid var(--focus); outline-offset: 4px; }

.drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 36px 24px 28px; border: 2px dashed var(--rule); border-radius: 18px; background: var(--paper); transition: border-color .16s, background .16s, transform .16s; }
.drop.over { border-color: var(--text); background: var(--surface); transform: scale(1.01); }
.drop-wheel { width: 48px; height: 48px; color: var(--clay); margin-bottom: 6px; }
.drop.busy .drop-wheel { animation: roll 1.2s linear infinite; }
@keyframes roll { to { transform: rotate(360deg); } }
.drop-h { font: 600 1.5rem/1.2 var(--display); margin: 0; max-width: none; }
.drop-sub { color: var(--muted); margin: 0 0 12px; max-width: 48ch; }
.drop-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.promise { margin: 18px 0 0; font-size: .9375rem; color: var(--muted); max-width: 60ch; }
.promise strong { color: var(--text); }
.yours.has-rides .drop { flex-direction: row; flex-wrap: wrap; padding: 16px 20px; text-align: left; gap: 12px 20px; }
.yours.has-rides .drop-wheel { width: 32px; height: 32px; margin: 0; }
.yours.has-rides .drop-h { font-size: 1.125rem; }
.yours.has-rides .drop-sub, .yours.has-rides .promise { display: none; }

.howto { margin-top: 20px; border-top: 1px solid var(--rule); padding-top: 12px; }
.howto summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 8px 32px; }
.howto h3 { font: 600 1.125rem var(--display); margin: 12px 0 6px; }
.howto p { font-size: .9375rem; }

.progress { margin-top: 20px; }
.bar { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--clay); transition: width .2s; }
.progress p { margin: 8px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; max-width: none; }

.results { margin-top: 32px; }
.results > section { margin-top: 56px; }
.results-top { display: flex; justify-content: flex-end; }
.units, .map-modes, .sorts { display: flex; gap: 6px; flex-wrap: wrap; }
.units button, .map-modes button, .sorts button, .region-tabs button { font: 600 .9375rem var(--body); min-height: 44px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--muted); background: var(--surface); color: var(--text); cursor: pointer; }
.units button[aria-pressed="true"], .map-modes button[aria-pressed="true"], .sorts button[aria-pressed="true"], .region-tabs button[aria-selected="true"] { background: var(--action); color: var(--onAction); border-color: var(--action-border); text-decoration: underline; text-underline-offset: .25em; }

.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; margin: 16px 0 0; }
.totals div { background: var(--paper); border: 1.5px solid var(--rule); border-radius: 12px; padding: 16px 18px; }
.totals dt { font-size: .8125rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.totals dd { margin: 4px 0 0; font: 700 clamp(1.75rem, 4vw, 2.5rem)/1.05 var(--display); font-variant-numeric: tabular-nums; }
.totals dd small { display: block; font: 400 .875rem/1.4 var(--body); color: var(--muted); margin-top: 4px; }
.fun { margin: 16px 0 0; font: 600 1.25rem/1.4 var(--display); max-width: 60ch; }

.mapbox { border: 1.5px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--surface); margin-top: 28px !important; }
.map-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.map-key { font-size: .8125rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.map-key i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; }
.map-key .k-mine { background: var(--clay); }
.map-key .k-ours { background: var(--link); margin-left: 10px; }
.map-canvas { height: min(70vh, 680px); min-height: 380px; }
.map-note { margin: 0; max-width: none; padding: 10px 14px; font-size: .875rem; color: var(--muted); background: var(--paper); border-top: 1px solid var(--rule); }
.mapbox .maplibregl-popup-content { background: var(--paper); color: var(--text); border-radius: 10px; padding: 10px 12px; font: 400 .875rem/1.4 var(--body); }
.mapbox .maplibregl-popup-content b { display: block; font: 600 1rem var(--display); }
.mapbox .maplibregl-popup-tip { border-top-color: var(--paper); border-bottom-color: var(--paper); }
.no-map .map-canvas, .no-map .map-bar { display: none; }

.pace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 0 0 12px; }
.pace-grid div { border-left: 4px solid var(--clay); padding: 4px 0 4px 14px; }
.pace-grid dt { font-size: .875rem; color: var(--muted); }
.pace-grid dd { margin: 0; font: 700 1.75rem/1.2 var(--display); font-variant-numeric: tabular-nums; }
.pace p { color: var(--muted); }

.region-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.region-tabs button .n { display: inline-block; min-width: 1.6em; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--paper); color: var(--text); font-size: .8125rem; }
.progress-ring { display: flex; align-items: center; gap: 18px; margin: 0 0 20px; }
.progress-ring svg { width: 76px; height: 76px; flex-shrink: 0; }
.progress-ring p { margin: 0; font: 600 1.25rem/1.35 var(--display); }
.progress-ring p small { display: block; font: 400 .9375rem var(--body); color: var(--muted); }
.ours h3, .climbs h3 { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 28px 0 12px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.card { background: var(--paper); border: 1.5px solid var(--rule); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card.stretch { border-color: var(--clay); }
.card .tag { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--clay); }
.card h4 { margin: 0; font: 600 1.15rem/1.25 var(--display); overflow-wrap: anywhere; }
.card h4 a { color: inherit; text-decoration: none; }
.card h4 a:hover { text-decoration: underline; }
.card .time { font: 700 1.5rem/1.1 var(--body); font-variant-numeric: tabular-nums; }
.card .time small { font: 400 .875rem var(--body); color: var(--muted); }
.card .facts { margin: 0; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.card .why { margin: 0; font-size: .9375rem; }
.card .shape { width: 100%; height: 64px; color: var(--clay); }
.done-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 6px 20px; }
.done-list li { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.done-list li::before { content: "✓"; color: var(--g0); font-weight: 700; }
.done-list li.inside::before { content: "✓"; color: var(--muted); }
.done-list li.part::before { content: "◐"; color: var(--muted); }
.done-list li.todo::before { content: "▲"; color: var(--clay); font-size: .75em; }
.done-list span { color: var(--muted); font-size: .875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.alike { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.alike li { padding: 12px 14px; border-radius: 10px; background: var(--surface); }

.climb-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; counter-reset: climb; }
.climb { position: relative; background: var(--paper); border: 1.5px solid var(--rule); border-radius: 12px; padding: 16px 16px 14px 56px; display: flex; flex-direction: column; gap: 6px; min-width: 0; counter-increment: climb; }
.climb::before { content: counter(climb); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--text); color: var(--background); display: grid; place-items: center; font: 700 .9375rem var(--body); }
.climb.on { border-color: var(--text); box-shadow: inset 4px 0 var(--action); }
.climb h4 { margin: 0; font: 600 1.15rem/1.25 var(--display); overflow-wrap: anywhere; }
.climb dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 0; }
.climb dt { font-size: .75rem; color: var(--muted); }
.climb dd { margin: 0; font: 600 1rem/1.25 var(--body); font-variant-numeric: tabular-nums; }
.climb .best { margin: 0; font-size: .875rem; color: var(--muted); }
.climb button { align-self: flex-start; font: 600 .875rem var(--body); min-height: 40px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--muted); background: var(--surface); color: var(--text); cursor: pointer; }

#ride-list { columns: 2 320px; padding-left: 1.4em; font-variant-numeric: tabular-nums; }
#ride-list li { break-inside: avoid; margin-bottom: 4px; }
#ride-list span { color: var(--muted); font-size: .875rem; }
.rides-list summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.keep { border-top: 1px solid var(--rule); padding-top: 28px; }
.keep h2 { font-size: 1.5rem; }
.keep-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.foot { margin-top: 40px; }

@media (max-width: 560px) {
  .site-header, main { width: calc(100% - 32px); }
  .drop { padding: 28px 16px 22px; }
  .climb dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-canvas { height: 440px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .drop.busy .drop-wheel { animation: none; } .drop { transition: none; } }
.bar.indeterminate i { width: 30% !important; animation: slide 1.1s ease-in-out infinite alternate; }
@keyframes slide { from { margin-left: 0; } to { margin-left: 70%; } }
@media (prefers-reduced-motion: reduce) { .bar.indeterminate i { animation: none; width: 100% !important; opacity: .5; } }
.inside-list { margin-top: 24px; }
.inside-list summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; margin-bottom: 8px; }

/* Stamps: one per ride of ours one of the rider's own was, start to finish. */
.stamps { --stamp: #C7346F; background: var(--paper); border: 1.5px solid var(--rule); border-radius: 12px; padding: 18px; display: grid; gap: 14px; }
.stamp-row { list-style: none; margin: 0; padding: 4px 2px; display: flex; flex-wrap: wrap; gap: 14px; }
.stamp { width: 104px; height: 104px; box-sizing: border-box; border-radius: 50%; border: 2.5px solid var(--stamp); color: var(--stamp); display: grid; place-items: center; text-align: center; position: relative; transform: rotate(var(--r, -6deg)); text-decoration: none; }
.stamp::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px dashed var(--stamp); pointer-events: none; }
.stamp:hover .stamp-name { text-decoration: underline; }
.stamp:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.stamp > span { display: grid; gap: 3px; padding: 0 12px; min-width: 0; }
.stamp b { font: 800 .6rem/1 var(--body); letter-spacing: .14em; }
.stamp .stamp-name { font: 650 .8rem/1.05 var(--display); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stamp small { font: 600 .55rem/1 var(--body); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.stamp-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.stamp-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); display: block; }
.stamp-dots i.on { background: var(--stamp); }
.stamp-line { margin: 0; font-size: .9375rem; max-width: none; }
@media (prefers-color-scheme: dark) { .stamps { --stamp: #FF9EC0; } }
