/* ridemap: scoped, so it can sit inside another page (e.g. adventures.html).
   Override the --rm-* variables on #map to match the host page. */
.ridemap {
  --rm-paper: #f4f3ef; --rm-ink: #161616; --rm-muted: #8a877f; --rm-water: #d9e7f4; --rm-coast: #6f9cc9; --rm-accent: #5100ff;
  --rm-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  position: absolute; inset: 0; background: var(--rm-paper);
}
.ridemap .maplibregl-canvas { outline: none; }

.rm-card {
  position: fixed; left: 20px; bottom: 20px; margin: 0; z-index: 30;
  width: 320px; background: var(--rm-paper, #f4f3ef); border: 1px solid var(--rm-ink, #161616);
  font: 12px/1.45 var(--rm-font, sans-serif); color: var(--rm-ink, #161616);
}
.rm-card[hidden] { display: none; }
.rm-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--rm-ink, #161616); }
.rm-card img[hidden] { display: none; }
.rm-card figcaption { padding: 8px 10px 9px; display: grid; gap: 1px; }
.rm-card b { font-weight: 600; font-size: 12px; letter-spacing: .01em; }
.rm-card span { color: var(--rm-muted, #8a877f); font-variant-numeric: tabular-nums; }

.rm-card .rm-links { margin-top: 3px; }
.rm-card .rm-links[hidden] { display: none; }
.rm-card .rm-links a { color: var(--rm-ink, #161616); margin-right: 6px; text-decoration: underline; text-decoration-color: #bbb; text-underline-offset: 2px; }
.rm-card .rm-strava { display: inline-block; width: 11px; height: 11px; margin: 0 6px 0 5px; vertical-align: -1px;
  color: #fc4c02; text-decoration: none; }
.rm-card .rm-strava svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.rm-card a.rm-strava:hover { opacity: .75; }
.rm-card .rm-links .rm-strava { margin-left: 0; }
.rm-card .rm-links a:hover { color: var(--rm-accent, #5100ff); text-decoration-color: currentColor; }

.rm-years { position: fixed; right: 8px; bottom: 24px; z-index: 29; display: flex; flex-wrap: wrap; justify-content: flex-end;
  gap: 2px; max-width: calc(100vw - 360px); font: 11px/1 var(--rm-font, "Helvetica Neue", Helvetica, Arial, sans-serif); }
.rm-years button { font: inherit; font-variant-numeric: tabular-nums; padding: 4px 6px; cursor: pointer;
  color: var(--rm-ink, #161616); background: var(--rm-paper, #f4f3ef); border: 1px solid var(--rm-ink, #161616); border-radius: 0; }
.rm-years button:hover { background: #e8e6e0; }
.rm-years button[aria-pressed="true"] { color: var(--rm-paper, #f4f3ef); background: var(--rm-ink, #161616); }
.rm-credit { position: fixed; right: 8px; bottom: 6px; z-index: 30; font: 9px var(--rm-font, sans-serif); color: #8a877f; opacity: .7; }

@media (max-width: 600px) {
  .rm-card { left: 10px; right: 10px; bottom: 10px; width: auto; }
  .rm-card img { aspect-ratio: 2 / 1; }
  .rm-years { left: 10px; right: 10px; max-width: none; justify-content: flex-start; }
}

/* standalone page (mapa/index.html) */
body.rm-page { margin: 0; height: 100vh; overflow: hidden; }
