.mountain-atlas .atlas-layout {
  overflow: clip;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .65fr);
  align-items: start;
}

.mountain-atlas .atlas-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mountain-atlas .atlas-destination {
  margin-bottom: 13px;
}

.mountain-atlas .atlas-routes {
  margin: 6px 0 14px;
}

.atlas-itinerary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 13px 0;
  padding: 0;
  list-style: none;
}

.atlas-itinerary li {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 4px;
  padding: 11px 8px 0 0;
  border-top: 1px solid #83a1ac6e;
}

.atlas-itinerary li::before {
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--resort, #d5ede8);
  background: #122433;
  content: "";
}

.atlas-itinerary li > span {
  font-size: .66rem;
  color: #b6c8d3;
}

.atlas-itinerary li > b {
  font-size: .77rem;
  line-height: 1.25;
  color: #f2f5f6;
  overflow-wrap: anywhere;
}

.atlas-sector-marker {
  fill: #112635;
  stroke: var(--resort, #d5ede8);
  stroke-width: 2;
}

.mountain-atlas .course-photos figcaption {
  left: 7px;
  right: 7px;
  bottom: 7px;
  display: grid;
  grid-template-columns: auto auto 1.35fr auto;
}

.mountain-atlas .course-photos button {
  min-height: 31px;
  padding: 5px 3px;
  font-size: .63rem;
  letter-spacing: .035em;
  white-space: nowrap;
}

@media (min-width: 741px) and (max-width: 1150px) {
  .mountain-atlas .atlas-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr); }
  .mountain-atlas .atlas-detail { padding: 15px; border-top: 0; border-left: 1px solid #4b626c88; }
}

@media (max-width: 740px) {
  .mountain-atlas .atlas-layout { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .mountain-atlas .course-photos button { min-height: 40px; }
}

@media (max-height: 640px) {
  .mountain-browser .top-rated { margin-block: 7px 10px; }
  .mountain-browser .top-rated-results:empty { display: none; }
  .mountain-atlas .atlas-heading { margin-bottom: 11px; }
  .mountain-atlas .atlas-heading h3 { font-size: 26px; }
}

/* Each pass pairs a route preview with a separately reachable ride button. */
.mountain-browser .finder-choice {
  flex: 0 0 min(295px, 93%);
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px 3px 0;
  scroll-snap-align: start;
  border: 1px solid #ffffff21;
  border-left: 3px solid var(--resort);
  border-radius: 11px;
  background: linear-gradient(115deg, #1a3342, #112330 75%);
}
.mountain-browser .finder-choice:has(.selected) { border-color: var(--resort); }
.mountain-browser .finder-choice .finder-card {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  min-height: 54px;
  padding: 4px 5px 4px 9px;
  border: 0;
  box-shadow: none;
  background: transparent;
  animation: none;
  translate: none;
  transform: none;
}
.mountain-browser .finder-ride {
  flex: none;
  min-height: 44px;
  min-width: 54px;
  padding: 0 8px;
  border: 1px solid var(--brand-blue);
  border-radius: 7px;
  background: var(--brand-blue);
  color: var(--brand-navy);
  font: 750 .78rem/1 var(--body);
  cursor: pointer;
}
.mountain-browser .finder-ride:hover { background: var(--brand-blue-hi); }
.mountain-browser :is(.finder-ride,.finder-card,.atlas-boarding button):focus-visible {
  outline: 2px solid var(--brand-focus);
  outline-offset: 1px;
}
.mountain-atlas .atlas-boarding {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #91b8c344;
  border-radius: 10px;
  background: #112a36;
  scroll-margin-block: 12px;
}
.mountain-atlas .atlas-boarding h4 {
  margin: 3px 0 8px;
  font-size: 1.18rem;
  line-height: 1.15;
}
.mountain-atlas .atlas-boarding .atlas-actions {
  grid-template-columns: 1.12fr 1fr;
  align-items: stretch;
  margin: 0;
  padding: 0;
}
.mountain-atlas .atlas-boarding .atlas-actions button {
  min-height: 44px;
  height: auto;
  min-width: 0;
  padding: 7px;
}
.mountain-atlas .atlas-terrain-detail { margin-top: 8px; }
@media (max-width: 740px) {
  .mountain-browser .route-finder-search,
  .mountain-browser .route-finder-chips button { min-height: 44px; }
  .mountain-browser .route-finder-search input { font-size: 16px; }
  .mountain-browser .route-finder-results.short-list {
    display: grid;
    gap: 5px;
    overflow: visible;
  }
}

.mountain-atlas .atlas-overview {
  align-self: start;
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: clamp(10px, 2vw, 23px);
}
.atlas-mountains {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(126px, 100%), 1fr));
  gap: 6px;
  margin-bottom: 10px;
  padding: 3px;
}
.atlas-mountains button {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  min-width: 0;
  padding: 6px 8px;
  text-align: left;
  color: #e8f1f6;
  background: #101e2b;
  border: 1px solid #324957;
  border-radius: 5px;
  cursor: pointer;
}
.atlas-mountains button[aria-pressed="true"],
.atlas-mountains button:hover {
  border-color: var(--resort);
  background: #203440;
}
.atlas-mountains button:focus-visible { outline: 2px solid #bfefff; outline-offset: 2px; }
.atlas-mountains button > i {
  align-self: stretch;
  background: var(--resort);
  border-radius: 2px;
}
.atlas-mountains button span { display: grid; gap: 2px; }
.atlas-mountains button b { font-size: .7rem; overflow-wrap: anywhere; }
.atlas-mountains button small { color: #afc7d1; font-size: .66rem; }
.atlas-mountains button s-icon { font-size: .76rem; color: #c3dbe5; }
.trail-map {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #375461;
  border-radius: 7px;
  background: #101f2b;
  color: #eff9fc;
}
.trail-map figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid #34515f;
}
.trail-map figcaption h4 { margin: 3px 0 0; font-size: clamp(1rem, 2vw, 1.4rem); }
.trail-map figcaption > span { color: #b7d2dc; font-size: .72rem; line-height: 1.4; text-align: right; white-space: nowrap; }
.trail-map svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 370px;
  background: #142937;
  font: 13px system-ui, sans-serif;
}
.trail-grid { stroke: #3f5b69; stroke-width: 1; stroke-dasharray: 3 5; }
.trail-distance { fill: #b0cbd3; font-size: 13px; }
.trail-edge, .trail-line { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.trail-edge { stroke: #426878; stroke-width: 10; }
.trail-line { stroke: #bce5ef; stroke-width: 2; }
.trail-jump circle { fill: #83daf5; stroke: #142937; stroke-width: 1.5; }
.trail-jump.xxl circle { fill: #ffba71; r: 6; }
.trail-sector circle { fill: #e3f7ff; stroke: #142937; stroke-width: 2; }
.trail-sector text { fill: #142937; font-weight: 800; }
.trail-map-legend, .trail-sectors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 15px;
  padding: 8px 15px;
  color: #c5dbe4;
  font-size: .74rem;
}
.trail-sectors { margin: 0; border-top: 1px solid #34515f; list-style: none; }
.trail-map-legend span, .trail-sectors li { display: inline-flex; align-items: center; gap: 5px; }
.trail-map-legend i { width: 7px; height: 7px; border-radius: 50%; background: #83daf5; }
.trail-map-legend span:nth-child(2) i { width: 10px; height: 10px; background: #ffba71; }
.trail-map-legend b, .trail-sectors b {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  color: #142937;
  background: #e3f7ff;
  border-radius: 100%;
}
.route-finder-count { color: #b2cbda; font-size: .76rem; }
@media (max-width: 740px) {
  .atlas-mountains {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: inline proximity;
  }
  .atlas-mountains button { flex: 0 0 112px; scroll-snap-align: start; }
  .mountain-atlas .atlas-detail { grid-row: 1; }
  .mountain-atlas .atlas-overview { grid-row: 2; }
  .trail-map svg { max-height: 300px; }
}

@media (max-width: 620px) {
  .mountain-browser .route-finder-bar {
    display: grid;
    align-items: stretch;
  }
  .mountain-browser .route-finder-chips { padding-bottom: 4px; }
}

.mountain-browser .finder-card > .finder-photo {
  grid-column: 1 / -1;
  width: 100%;
  height: 72px;
  aspect-ratio: auto;
  margin-bottom: 4px;
  border-radius: 5px;
}

@media (min-width: 741px) {
  .mountain-browser .route-finder-results.short-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 8px;
    overflow: visible;
  }
}
