.trail-selector {
  margin-bottom: 25px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.trail-selector select {
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
}

.nearby-essentials h1,
.nearby-essentials h2 {
  margin: 0 0 12px;
}

.essentials-list,
#bizList {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.essentials-list {
  margin: 0 0 12px 0;
}

#bizList {
  margin: 0;
}


.biz-title {
  font-size: 18px;
  line-height: 1.2;
}

.muted {
  opacity: .7;
}

.svc-dir,
.biz-dir {
  white-space: nowrap;
  text-decoration: none;
  font-weight: 600;
}

.svc-card,
.biz-card {
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.lede {
  font-size: 1.15em;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-disclaimer {
  margin: 1rem 0;
}

.details dl {
  display: grid;
  grid-template-columns: 175px auto;
  border: 1px solid black;
  border-bottom: none;
}

.details dt {
  font-weight: 600;
  border-bottom: 1px solid black;
  padding: 10px 0 10px 10px;
  color: var(--text-dim);
}

.details dd {
  border-bottom: 1px solid black;
  padding: 10px 10px 10px 0;
}

.details dd {
  padding-top: 0.6rem;
}

.details dt:nth-of-type(odd),
.details dt:nth-of-type(odd)+dd {
  background: #f5f5f5;
}

.details dt:nth-of-type(even),
.details dt:nth-of-type(even)+dd {
  background: #ffffff;
}

.trail-grid {
  position: relative;
  z-index: 0;
  margin-bottom: 25px;
}

.details {
  margin: 15px 0 0 0;
}

.nearby-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
  align-items: start;
}

.biz-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, .12);
  background: rgba(0, 0, 0, .03);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
}

.biz-btn:hover {
  background: rgba(0, 0, 0, .06);
}

.biz-name {
  font-weight: 700;
  margin-right: 8px;
}

.biz-meta {
  display: block;
  margin-top: 4px;
  font-size: .92rem;
}

.biz-badge {
  margin-left: 8px;
  display: inline-block;
  font-size: .78rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .20);
  vertical-align: middle;
}

.map-gated-overlay {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.map-notice {
  border: 1px solid #e6e6e6;
  background: #fafafa;
  border-radius: 12px;
  padding: 12px 14px;
}

.map-notice__title {
  margin: 0 0 6px;
  font-size: 16px;
}

.map-notice__text {
  margin: 0;
  line-height: 1.4;
}

.trail-warnings,
.trail-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.trail-label,
.trail-warning {
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid #e0e0e0;
  background: #f1f3f4;
  color: #111;
  white-space: nowrap;
  text-transform: uppercase;
}

.trail-warning {
  background: #fde2e2;
  border-color: #f5c2c7;
}

.trail-grade {
  border: 1px solid #e6e6e6;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}

.trail-grade__row {
  display: grid;
  grid-template-columns: 92px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

.trail-grade__name {
  font-size: 14px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.trail-grade__bar {
  height: 10px;
  border-radius: 999px;
  background: #f1f3f4;
  overflow: hidden;
  border: 1px solid #e8e8e8;
}

.trail-grade__fill {
  height: 100%;
  background: #cfd8dc;
  width: 0%;
}

.trail-grade__pct {
  font-size: 12px;
  color: #333;
  text-align: right;
}

.map-wrap {
  position: relative;
}

.trail-label--intensity {
  background: #fff3cd;
  border-color: #ffe69c;
}

.trail-label--hard {
  background: #fde2e2;
  border-color: #f5c2c7;
}

.details-wrapper {
  display: grid;
  grid-row-gap: 20px;
}

.trail-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column-gap: 10px;
  grid-row-gap: 20px;
  padding: 0;
}

.trail-stats__grid>div {
  border: 1px solid #e6e6e6;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}

.trail-stats__grid>div:last-child {
  grid-column: span 2;
  text-align: center;
}

.trail-stats__grid dt {
  margin: 0;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #5f6368;
}

.trail-stats__grid dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
  color: #111;
}

.trail-stats__sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

.trail-chart {
  border: 1px solid #e6e6e6;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}

.trail-chart canvas {
  width: 100% !important;
  height: 220px !important;
  display: block;
}

.trail-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.trail-box__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trail-box__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.trail-box__meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.trail-box__text {
  margin: 10px 0 0;
  color: var(--muted);
}

.trail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.trail-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--accent) 14%, var(--card));
  color: var(--fg);
  font-weight: 800;
  font-size: 0.9rem;
}

.trail-lock {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
}

.trail-box__cta {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.trail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 800;
  text-decoration: none;
  background: color-mix(in oklab, var(--accent) 18%, var(--card));
  color: var(--fg);
}

.trail-cta:hover {
  background: color-mix(in oklab, var(--accent) 24%, var(--card));
  text-decoration: none;
}

.trail-cta--ghost {
  background: transparent;
  color: var(--muted);
}

.trail-cta--ghost:hover {
  background: color-mix(in oklab, var(--fg) 6%, transparent);
}

.trail-intel__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.trail-intel__grid dt {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.trail-intel__grid dd {
  margin: 2px 0 0;
  font-weight: 900;
}

.trail-box__list {
  margin: 10px 0 0 20px;
  color: var(--muted);
}


.trail-videos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 0 12px;
  margin-bottom: 12px;
}

.trail-video__embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #0b0b0b;
}

.trail-video__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-gated::before {
  display: block;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.map-gated {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 320px;
  padding: 2rem;
  border: 1px dashed #d0d0d0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fafafa, #f3f3f3);
  text-align: center;
}

.gated>p:not(:last-child) {
  font-weight: 700;
  text-transform: capitalize;
}

.map-gated__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.map-gated__text {
  max-width: 420px;
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1.25rem;
}

.map-gated__cta {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: #1f6feb;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.map-gated__cta:hover {
  background: #1557c0;
}

#map {
  height: 420px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.gallery {
  max-width: 1100px;
  margin: 0 auto 12px auto;
  padding: 0 1rem;
  display: grid;
  grid-row-gap: 1.25rem;
}

.gallery img {
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.related-trails {
  margin-top: 1.5rem;
  padding: 1.5rem 0 0 0;
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.related-list a {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: block;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}

.related-list a:hover {
  border-color: var(--gold-accent);
  background: rgba(255, 255, 255, 0.5);
}

.related-list .dim {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.gallery {
  display: grid;
  gap: 12px;
}

.img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #eee;
  aspect-ratio: 3 / 2;
}

.trail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-loader {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      #e6e6e6 25%,
      #f2f2f2 37%,
      #e6e6e6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
}

.img-wrap.is-loaded .img-loader {
  display: none;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: 0 0;
  }
}

@media (max-width: 900px) {
  .nearby-grid {
    grid-template-columns: 1fr;
  }

  .biz-map {
    height: 360px;
  }
}


@media (max-width: 860px) {
  .trail-grid {
    grid-template-columns: 1fr;
  }

  .related-trails {
    margin-top: 20px;
    padding: 0;
  }

  .details-wrapper,
  .trail-stats__grid {
    grid-row-gap: 10px;
  }
}

@media (max-width: 720px) {
  .trail-intel__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 635px) {
  .trail-selector {
    display: grid;
    text-align: center;
  }

  .trail-selector select,
  .trail-selector button {
    width: calc(100% - 20px);
    margin: 0 auto;
  }
}


@media (min-width: 720px) {
  .trail-stats__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}