/* Crumbcast Activity Detail — standalone CSS, no SCSS compilation needed */

/* ---- Immersive Layout ---- */

body.single-activities #page {
  height: calc(100vh - var(--wp-admin-bar-h, 0px));
  height: calc(100dvh - var(--wp-admin-bar-h, 0px));
  overflow: hidden;
}
body.single-activities .cc-footer {
  display: none;
}
body.single-activities .cc-nav,
body.single-events .cc-nav {
  padding-bottom: 0;
}
body.single-activities .cc-nav .nav-toggler {
  margin-right: 0 !important;
  padding-right: 0;
}


/* ---- Header Bar ---- */

.activity-page__header {
  background: var(--ink);
  padding: 20px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.activity-page__nav-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
}
.activity-page__back {
  color: var(--dust);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.activity-page__back:hover { color: white; }
.activity-page__sibling-nav {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
}
.activity-page__sibling-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--dust);
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.activity-page__sibling-btn:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}
.activity-page__sibling-btn.is-disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}
.activity-page__header-center {
  flex: 1;
  min-width: 0;
}
.activity-page__title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--chalk);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.activity-page__header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.activity-page__sport-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: white;
  background: var(--sage);
  border-radius: 2px;
}
.activity-page__date {
  font-size: 12px;
  color: var(--dust);
  padding: 3px 0;
}
.activity-page__gpx-download {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--chalk);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s;
  z-index: 2;
}
.activity-page__gpx-download:hover {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--chalk);
}
/* Shift Flyby button left when GPX button is present (6px gap) */
.activity-page__gpx-download ~ .activity-page__flyby-btn { right: 92px; margin-right:8px; }
.sidebar-tab--map {
  display: none;
}

/* ---- Summary Strip (mobile stats below header) ---- */

.activity-page__summary-strip {
  display: none;
  background: var(--chalk);
  border-top: 1px solid var(--stone);
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  text-align: center;
  flex-shrink: 0;
  width: 100%;
}
.activity-page__summary-stat {
  display: flex;
  flex-direction: column;
  padding: 6px 4px;
  line-height: 1.2;
  white-space: nowrap;
}
.activity-page__summary-stat:nth-child(n+4) {
  display: none;
}
.activity-page__summary-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.activity-page__summary-value small {
  font-size: 10px;
  font-weight: 400;
  color: var(--mist);
}
.activity-page__summary-label {
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mist);
  margin-top: 2px;
}
.activity-page__header-stats {
  display: flex;
  gap: 24px;
}
.activity-page__header-stat {
  text-align: right;
}
.activity-page__header-stat-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--chalk);
  display: block;
}
.activity-page__header-stat-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mist);
}


/* ---- Map Panel ---- */

.single-activities .crumbcast-map-panel {
  display: flex;
  flex-direction: column;
}

.activity-page__map-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}
.activity-page__map {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.activity-page__flyby-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--ink);
  color: var(--chalk);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: 3px;
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s;
  z-index: 2;
}
.activity-page__flyby-btn:hover {
  background: var(--sage);
  border-color: var(--sage);
}

/* ---- Flyby 3D Button (inside flyby controls bar) ---- */
.flyby-3d {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 3px 8px !important;
  border-radius: 3px;
  color: var(--dust, #c4bfb6) !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  background: rgba(255,255,255,0.05) !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.flyby-3d:hover {
  color: var(--chalk, #f5f2ed) !important;
  border-color: rgba(255,255,255,0.2) !important;
}
.flyby-3d.is-active {
  background: rgba(196, 97, 58, 0.25) !important;
  color: var(--rust, #c4613a) !important;
  border-color: rgba(196, 97, 58, 0.4) !important;
}

/* ---- Flyby 3D Tune Button ---- */
.flyby-3d-tune {
  font-size: 0 !important;
  line-height: 1;
  padding: 4px 6px !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 3px !important;
  color: var(--mist, #7a7a72) !important;
  background: rgba(255,255,255,0.05) !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.flyby-3d-tune:hover {
  color: var(--chalk, #f5f2ed) !important;
  border-color: rgba(255,255,255,0.2) !important;
}
.flyby-3d-tune.is-active {
  background: rgba(196, 97, 58, 0.25) !important;
  color: var(--rust, #c4613a) !important;
  border-color: rgba(196, 97, 58, 0.4) !important;
}

/* ---- Anaglyph Stereo Map ---- */
.activity-page__map-wrap.is-anaglyph,
.crumbcast-map-wrap.is-anaglyph {
  background: #000;
}
.anaglyph-stereo-map {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}
/* Color filtering handled by overlay divs with mix-blend-mode: multiply
   (SVG filter url(#id) references don't work on mobile Safari WebGL canvases) */

/* ---- Anaglyph Controls Panel ---- */
.anaglyph-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 3;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  padding: 10px 14px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
}
.anaglyph-ctrl__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.anaglyph-ctrl__label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--dust);
  letter-spacing: 0.5px;
  white-space: nowrap;
  width: 62px;
  flex-shrink: 0;
}
.anaglyph-ctrl__value {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mist);
  width: 26px;
  text-align: right;
  flex-shrink: 0;
}
.anaglyph-ctrl__input {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.anaglyph-ctrl__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rust);
  border: 2px solid var(--chalk);
  cursor: pointer;
}
.anaglyph-ctrl__input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rust);
  border: 2px solid var(--chalk);
  cursor: pointer;
}

/* ---- Map Toggle Controls ---- */
.map-toggle-group {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 20;
  pointer-events: auto;
}
.map-toggle-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--chalk);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s;
}
.map-toggle-btn:hover {
  background: var(--sage);
  border-color: var(--sage);
}


/* ---- Elevation Profile ---- */

.activity-page__elevation-wrap {
  width: 100%;
  background: var(--stone);
  position: relative;
  flex-shrink: 0;
}
.activity-page__elevation {
  width: 100%;
  height: 120px;
  display: block;
  cursor: crosshair;
}


/* ---- Stats List (sidebar) ---- */

.activity-page__stats-list {
  padding: 8px 0;
}
.activity-page__stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--stone);
}
.activity-page__stat-row:last-child {
  border-bottom: none;
}
.activity-page__stat-row-label {
  font-size: 13px;
  color: var(--mist);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.activity-page__stat-row-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}
.activity-page__stat-row-value small {
  font-size: 12px;
  font-weight: 400;
  color: var(--mist);
  margin-left: 2px;
}


/* ---- Info Stats Grid ---- */

.activity-page__info-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--stone);
  border: 1px solid var(--stone);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}
.activity-page__info-stat {
  background: var(--chalk);
  padding: 12px 14px;
  text-align: center;
}
.activity-page__info-stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  display: block;
  line-height: 1.2;
}
.activity-page__info-stat-value small {
  font-size: 11px;
  font-weight: 400;
  color: var(--mist);
}
.activity-page__info-stat-label {
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mist);
  display: block;
  margin-top: 2px;
}


/* ---- Section Titles ---- */

.activity-page__section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
}


/* ---- Photo Gallery (sidebar) ---- */

.activity-page__gallery {
  columns: 2;
  column-gap: 10px;
  padding: 12px 0;
}
.activity-page__gallery-item {
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}
.activity-page__gallery-item img {
  width: 100%;
  display: block;
}


/* ---- Lightbox ---- */

.activity-page__lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.activity-page__lightbox[hidden] {
  display: none;
}
.activity-page__lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}
.activity-page__lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
  z-index: 1;
}
.activity-page__lightbox-prev,
.activity-page__lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 48px;
  cursor: pointer;
  padding: 16px;
  z-index: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.activity-page__lightbox-prev:hover,
.activity-page__lightbox-next:hover { opacity: 1; }
.activity-page__lightbox-prev { left: 8px; }
.activity-page__lightbox-next { right: 8px; }
.activity-page__lightbox-caption {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  max-width: 600px;
}


/* ---- Description (inside Info tab) ---- */

.single-activities .activity-page__description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  padding-bottom: 16px;
}
.activity-page__description p:last-child { margin-bottom: 0; }


/* ---- Parent Event Card (inside Info tab) ---- */

.single-activities .activity-page__event-card-wrap {
  padding: 16px 0 0;
  border-top: 1px solid var(--dust);
}
.activity-page__event-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--stone);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s;
}
.activity-page__event-card:hover {
  background: var(--dust);
  color: var(--ink);
}
.activity-page__event-card-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.activity-page__event-card-body {
  flex: 1;
  min-width: 0;
}
.activity-page__event-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  display: block;
}
.activity-page__event-card-date {
  font-size: 12px;
  color: var(--mist);
  margin-top: 2px;
  display: block;
}
.activity-page__event-card-arrow {
  font-size: 20px;
  color: var(--mist);
  flex-shrink: 0;
}


/* ---- Flyby Controls ---- */

.flyby-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink, #1a1a18);
  border-top: 1px solid rgba(245, 242, 237, 0.08);
  backdrop-filter: blur(12px);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  font-family: var(--font-mono);
  color: var(--dust, #c4bfb6);
  font-size: 11px;
}
/* Activity + event pages: controls sit in page flow above stats strip */
body.single-activities .flyby-controls,
body.single-events .flyby-controls {
  position: static;
  flex-shrink: 0;
  border-top: none;
}
.flyby-controls button {
  background: none;
  border: none;
  color: var(--chalk, #f5f2ed);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.flyby-controls button:hover { color: var(--sage, #6b7c5e); }
.flyby-controls button.is-active {
  color: var(--sage, #6b7c5e);
}
.flyby-play-pause {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(245, 242, 237, 0.1) !important;
  border: 1px solid rgba(245, 242, 237, 0.15) !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.flyby-play-pause:hover {
  background: rgba(107, 124, 94, 0.25) !important;
  border-color: rgba(107, 124, 94, 0.4) !important;
}
.flyby-play-pause svg {
  width: 14px;
  height: 14px;
}
.flyby-speed-group {
  display: flex;
  gap: 2px;
}
.flyby-speed {
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  letter-spacing: 0.3px;
  padding: 3px 6px !important;
  border-radius: 3px;
  color: var(--dust, #c4bfb6) !important;
}
.flyby-speed:hover { color: var(--chalk, #f5f2ed) !important; }
.flyby-speed.is-active {
  background: rgba(107, 124, 94, 0.25) !important;
  color: var(--sage, #6b7c5e) !important;
}
.flyby-progress-wrap {
  flex: 1;
  height: 3px;
  background: rgba(245, 242, 237, 0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.flyby-progress-fill {
  height: 100%;
  background: var(--sage, #6b7c5e);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}
.flyby-distance {
  white-space: nowrap;
  min-width: 100px;
  text-align: right;
  color: var(--dust, #c4bfb6);
  font-size: 10px;
}
.flyby-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(245, 242, 237, 0.06) !important;
  border: 1px solid rgba(245, 242, 237, 0.1) !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  margin-left: 2px;
}
.flyby-close:hover {
  background: rgba(196, 97, 58, 0.2) !important;
  border-color: rgba(196, 97, 58, 0.35) !important;
  color: var(--rust, #c4613a) !important;
}
.flyby-close svg {
  width: 12px;
  height: 12px;
}


/* ---- Flyby Photo Card ---- */

.flyby-photo-card {
  position: absolute;
  top: 90px;
  right: 12px;
  width: 240px;
  background: rgba(26, 26, 24, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  overflow: hidden;
  z-index: 10;
  cursor: pointer;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}
.flyby-photo-card.is-visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.flyby-photo-card img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}
.flyby-photo-card__caption {
  padding: 8px 12px;
  font-size: 11px;
  color: var(--dust);
}


/* ---- Map Photo Markers (lollipop) ---- */

.activity-map-photo {
  width: 30px;
  height: 48px;
  cursor: pointer;
  position: absolute;
  bottom: 0;
  left: 0;
  transform: translateX(-50%);
  z-index: 1;
}
.activity-map-photo:hover {
  z-index: 5;
}
.activity-map-photo__ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25), 0 0 0 0.5px rgba(0,0,0,0.06);
  overflow: hidden;
  background: var(--stone);
}
.activity-map-photo:hover .activity-map-photo__ring {
  border-color: var(--sage);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1.5px var(--sage);
}
.activity-map-photo__ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.activity-map-photo__stick {
  width: 1.5px;
  height: 18px;
  background: white;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
  margin: 0 auto;
}
.activity-map-photo__tip {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--chalk);
  font-size: 11px;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
}
.activity-map-photo:hover .activity-map-photo__tip {
  opacity: 1;
}


/* ---- Map Marker (hover dot synced with elevation) ---- */

.activity-map-dot {
  width: 10px;
  height: 10px;
  background: white;
  border: 2px solid var(--rust);
  border-radius: 50%;
  pointer-events: none;
}


/* ---- Responsive: override shared maps.css for all non-mobile widths ---- */
/* The shared crumbcast-maps.css sets display:contents on .crumbcast-sidebar at
   ≤992px, which dissolves the sidebar box.  For activity pages we always want
   a visible sidebar panel, so we override at ALL widths ≥ 768px (Bootstrap md). */

@media (min-width: 768px) {
  .single-activities .crumbcast-map-layout {
    flex-direction: row !important;
  }
  .single-activities .crumbcast-sidebar {
    display: flex !important;
    flex-direction: column !important;
    width: 360px !important;
    min-width: 360px !important;
    flex-shrink: 0 !important;
    background: white !important;
    border-left: 1px solid var(--dust, rgba(212,206,196,0.5)) !important;
  }
  .single-activities .crumbcast-sidebar-header {
    order: unset !important;
    padding: 0 24px !important;
  }
  .single-activities .crumbcast-sidebar-scroll,
  .single-activities .crumbcast-sidebar-scroll.has-visible-panel {
    order: unset !important;
    padding: 0 24px 24px !important;
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
  }
  .single-activities .crumbcast-map-panel,
  .single-activities .crumbcast-map-panel.is-hidden-mobile {
    display: flex !important;
    flex: 1 !important;
    order: unset !important;
    width: auto !important;
    min-width: 0 !important;
  }
  .single-activities .sidebar-tab--map {
    display: none !important;
  }
  .single-activities .activity-page__elevation-wrap {
    display: block;
    position: static;
  }
  .single-activities .activity-page__summary-strip {
    display: none !important;
  }
}

/* ---- Responsive: mobile (< 768px) ---- */

@media (max-width: 767.98px) {
  .activity-page__header {
    padding: 4px 16px 12px;
    gap: 4px;
    flex-shrink: 0;
  }
  .activity-page__header-stats {
    display: none;
  }
  .activity-page__summary-strip {
    display: grid;
  }
  .single-activities .sidebar-tab--map {
    display: inline-block;
  }
  .single-activities .sidebar-tab--no-mobile-content {
    display: none;
  }
  .single-activities .sidebar-header--map-only {
    display: none;
  }
  .single-activities .activity-page__info-stats {
    display: none;
  }
  .activity-page__title { font-size: 18px; }

  /* Map panel: fill available space on mobile */
  .single-activities .crumbcast-map-panel {
    flex: 1 !important;
    width: 100%;
    min-height: 0;
  }
  .single-activities .crumbcast-map-panel.is-hidden-mobile {
    display: none;
  }
  .single-activities .activity-page__map-wrap {
    flex: 1;
    min-height: 0;
  }
  .single-activities .activity-page__map {
    height: 100%;
  }
  .single-activities .activity-page__elevation-wrap {
    flex-shrink: 0;
    background: var(--chalk);
    height: 85px;
  }

  .single-activities .crumbcast-sidebar-scroll {
    flex: 0;
    overflow: hidden;
    padding: 0 16px;
    min-height: 0;
  }
  .single-activities .crumbcast-sidebar-scroll.has-visible-panel {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px 24px;
  }

  /* Gallery: still 2 cols in sidebar on tablet */
  .activity-page__gallery {
    columns: 2;
  }

  .activity-page__flyby-btn {
    bottom: 12px;
    right: 12px;
    padding: 8px 14px;
    font-size: 12px;
  }
  .activity-page__gpx-download {
    bottom: 12px;
    right: 12px;
    padding: 8px 12px;
    font-size: 12px;
  }
  .activity-page__gpx-download ~ .activity-page__flyby-btn { right: 80px; }
  .anaglyph-controls {
    bottom: 12px;
    left: 12px;
  }
}


/* ---- Responsive: mobile (< 576px) ---- */

@media (max-width: 576px) {
  .activity-page__header {
    padding: 14px 16px;
    gap: 8px;
  }
  .activity-page__title { font-size: 18px; }
  .activity-page__nav-row { gap: 8px; }
  .activity-page__sibling-btn { width: 26px; height: 26px; font-size: 16px; }

  /* Gallery: single column on mobile */
  .activity-page__gallery {
    columns: 1;
  }

  /* Flyby: compact on mobile */
  .flyby-controls { padding: 10px 12px; gap: 8px; }
  .flyby-controls button { padding: 6px 10px; }
  .flyby-distance { min-width: 80px; font-size: 11px; }

  .flyby-photo-card {
    width: 180px;
    top: 12px;
    right: 12px;
  }
  .flyby-photo-card img { max-height: 200px; }

  /* Anaglyph controls: compact on mobile */
  .anaglyph-controls {
    bottom: 8px;
    left: 8px;
    padding: 8px 10px;
    min-width: 170px;
    gap: 4px;
  }
  .anaglyph-ctrl__label { font-size: 9px; width: 54px; }
  .anaglyph-ctrl__value { font-size: 9px; }

  /* Photo markers: smaller on mobile */
  .activity-map-photo { width: 22px; height: 34px; }
  .activity-map-photo__ring {
    width: 22px;
    height: 22px;
    border-width: 1px;
  }
  .activity-map-photo__stick { height: 12px; }
  .activity-map-photo__tip { display: none; }

  /* Lightbox: touch-friendly */
  .activity-page__lightbox-prev,
  .activity-page__lightbox-next {
    font-size: 36px;
    padding: 12px;
  }
  .activity-page__lightbox-close { font-size: 30px; }
}
