/**
 * Route show page: meta row, gallery grid, single-column body, map in flow, timeline, comments.
 */
.route-detail { padding-bottom: 48px; }

/* Meta row: same look as place-detail */
.route-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
  /* Above map / Leaflet (≈400–500), below sticky header (620) */
  z-index: 600;
}
.route-detail__author { flex: 1; min-width: 0; }
.route-detail__author-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.route-detail__avatar { border-radius: 50%; object-fit: cover; }
.route-detail__avatar--placeholder {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-soft);
  object-fit: cover;
}
.route-detail__author-text { display: flex; flex-direction: column; gap: 2px; }
.route-detail__author-name { font-weight: 600; font-size: 15px; }
.route-detail__author-date { font-size: 13px; color: var(--muted); }
.route-detail__actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.route-detail__action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: none; background: var(--bg-soft); border-radius: 999px; font-size: 14px; cursor: pointer; color: var(--text); }
.route-detail__action-btn:hover { background: var(--border); }
.route-detail__action-btn--saved .material-symbols-filled {
  font-size: 22px;
  color: var(--text);
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.route-detail__action-btn--muted { cursor: default; opacity: 0.8; }
.route-detail__dropdown-wrap { position: relative; z-index: 610; }
.route-detail__dropdown[hidden] { display: none !important; }
.route-detail__dropdown { position: absolute; top: 100%; right: 0; margin-top: 4px; min-width: 160px; padding: 8px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sx); box-shadow: var(--shadow); z-index: 50; color: var(--text); }
.route-detail__share-dropdown { display: grid; grid-template-columns: repeat(3, auto); gap: 8px; padding: 8px; }
.route-detail__share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.route-detail__share-link svg {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
}
.route-detail__report-btn { display: block; width: 100%; padding: 10px 14px; border: none; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.route-detail__report-btn:hover { background: var(--bg-soft); }

/* Gallery: bento grid (left tall + right top wide + two bottom), click opens overlay */
.route-detail__gallery { position: relative; margin: 0 0 32px; }
.route-detail__gallery-rating-pill {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 6;
}
.route-detail__gallery-grid { display: grid; gap: 8px; height: 480px; max-height: 480px; border-radius: var(--radius-sx); overflow: hidden; }
.route-detail__gallery-grid--bento {
  gap: 10px;
  border-radius: 16px;
}
.route-detail__gallery-grid--bento .route-detail__gallery-cell {
  border-radius: 14px;
}
.route-detail__gallery-grid--bento-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.route-detail__gallery-grid--bento-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.route-detail__gallery-grid--bento-3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.route-detail__gallery-grid--bento-3 .route-detail__gallery-cell:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / -1;
}
.route-detail__gallery-grid--bento-3 .route-detail__gallery-cell:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}
.route-detail__gallery-grid--bento-3 .route-detail__gallery-cell:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.route-detail__gallery-grid--bento-4 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.route-detail__gallery-grid--bento-4 .route-detail__gallery-cell:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / -1;
}
.route-detail__gallery-grid--bento-4 .route-detail__gallery-cell:nth-child(2) {
  grid-column: 2 / -1;
  grid-row: 1;
}
.route-detail__gallery-grid--bento-4 .route-detail__gallery-cell:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.route-detail__gallery-grid--bento-4 .route-detail__gallery-cell:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}
.route-detail__gallery-cell--more {
  position: relative;
}
.route-detail__gallery-cell--more .route-detail__gallery-img {
  filter: brightness(0.55);
}
.route-detail__gallery-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.route-detail__gallery-cell { position: relative; min-height: 0; overflow: hidden; padding: 0; border: none; background: none; cursor: pointer; display: block; text-align: left; width: 100%; height: 100%; }
.route-detail__gallery-cell:focus { outline: 2px solid var(--green); outline-offset: 2px; }
.route-detail__gallery-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.route-detail__gallery-cell--overlay { position: relative; }
/* In-grid “+N” mask only — do NOT reuse class name with JS lightbox (#route-gallery-overlay). */
.route-detail__bento-more-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 700; pointer-events: none; }
.route-detail__gallery-fallback { margin: 0; }
.route-detail__gallery-fallback img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sx); }

/* Count 1: single full width */
.route-detail__gallery-grid--count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
/* Count 2: two halves */
.route-detail__gallery-grid--count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
/* Count 3: 50% + 25% + 25% */
.route-detail__gallery-grid--count-3 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr; }
/* Count 4: 50% left full height, top-right 25%, bottom-right 25%, right 25% full height */
.route-detail__gallery-grid--count-4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.route-detail__gallery-grid--count-4 .route-detail__gallery-cell:nth-child(1) { grid-column: 1; grid-row: 1 / -1; }
.route-detail__gallery-grid--count-4 .route-detail__gallery-cell:nth-child(2) { grid-column: 2; grid-row: 1; }
.route-detail__gallery-grid--count-4 .route-detail__gallery-cell:nth-child(3) { grid-column: 2; grid-row: 2; }
.route-detail__gallery-grid--count-4 .route-detail__gallery-cell:nth-child(4) { grid-column: 3; grid-row: 1 / -1; }
/* Count 5 (and 5+ with overlay): 50% left full height, 4 cells in 2x2 on the right */
.route-detail__gallery-grid--count-5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.route-detail__gallery-grid--count-5 .route-detail__gallery-cell:nth-child(1) { grid-column: 1; grid-row: 1 / -1; }
.route-detail__gallery-grid--count-5 .route-detail__gallery-cell:nth-child(2) { grid-column: 2; grid-row: 1; }
.route-detail__gallery-grid--count-5 .route-detail__gallery-cell:nth-child(3) { grid-column: 2; grid-row: 2; }
.route-detail__gallery-grid--count-5 .route-detail__gallery-cell:nth-child(4) { grid-column: 3; grid-row: 1; }
.route-detail__gallery-grid--count-5 .route-detail__gallery-cell:nth-child(5) { grid-column: 3; grid-row: 2; }

@media (max-width: 768px) {
  .route-detail__gallery-grid { height: 420px; max-height: 420px; }
  .route-detail__gallery-grid--count-3 { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr 1fr; }
  .route-detail__gallery-grid--count-3 .route-detail__gallery-cell:nth-child(n) { grid-column: auto; grid-row: auto; }
  .route-detail__gallery-grid--count-4 .route-detail__gallery-cell:nth-child(n) { grid-column: auto; grid-row: auto; }
  .route-detail__gallery-grid--count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
  .route-detail__gallery-grid--count-5 .route-detail__gallery-cell:nth-child(n) { grid-column: auto; grid-row: auto; }
  .route-detail__gallery-grid--count-5 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
}

/* Inline gallery slider for mobile: single photo + arrows + thumbnails */
.route-detail__gallery-slider { display: none; }
.route-detail__gallery-main { position: relative; border-radius: var(--radius-sx); overflow: hidden; height: 420px; max-height: 420px; background: var(--bg-soft); }
.route-detail__gallery-main-img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.route-detail__gallery-main-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,0.9); display: grid; place-items: center; cursor: pointer; color: #111; box-shadow: 0 1px 6px rgba(0,0,0,0.18); }
.route-detail__gallery-main-arrow--prev { left: 12px; }
.route-detail__gallery-main-arrow--next { right: 12px; }
.route-detail__gallery-main-arrow:hover { background: #fff; }
.route-detail__gallery-main-arrow .material-symbols-outlined { font-size: 24px; }
.route-detail__gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.route-detail__gallery-thumb { position: relative; flex: 1; min-width: 0; height: 64px; border-radius: 8px; overflow: hidden; padding: 0; border: none; background: none; cursor: pointer; }
.route-detail__gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.route-detail__gallery-thumb--more::after { content: attr(data-more-label); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.55); color: #fff; font-size: 14px; font-weight: 600; }
.route-detail__gallery-thumb.is-active { outline: 2px solid #fff; outline-offset: -2px; }

@media (max-width: 768px) {
  /* Legacy count-* grids only (route show uses --bento now) */
  .route-detail__gallery-grid:not(.route-detail__gallery-grid--bento) {
    display: none;
  }
  .route-detail__gallery-slider {
    display: none;
  }
  .route-detail__gallery-grid--bento-4 .route-detail__gallery-cell:nth-child(n),
  .route-detail__gallery-grid--bento-3 .route-detail__gallery-cell:nth-child(n) {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .route-detail__gallery-grid--bento-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    height: 420px;
    max-height: 420px;
  }
  .route-detail__gallery-grid--bento-3 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    height: 360px;
    max-height: 360px;
  }
}
@media (min-width: 769px) {
  .route-detail__gallery-slider { display: none; }
}

/* Single column body (no sidebar) */
.route-detail__body { }
.route-detail__main { min-width: 0; }

/* Visual cluster: desktop hero strip = zdjęcie | mapa | zdjęcie (proporcje 2:1:1). */
.route-detail__visual-cluster {
  margin-bottom: 8px;
}

/* Mobile-only hero (single 420px image + lightbox-style thumbs); hidden on desktop */
.route-detail__mobile-hero {
  display: none;
}
.route-detail__mobile-hero-inner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 420px;
  max-height: 420px;
  background: var(--bg-soft);
}
.route-detail__mobile-hero-main {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  display: block;
  text-align: left;
}
.route-detail__mobile-hero-main--static {
  cursor: default;
  pointer-events: none;
}
.route-detail__mobile-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.route-detail__mobile-hero-back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 6;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.route-detail__mobile-hero-back--light {
  background: #fff;
  color: #111;
  border: none;
}
.route-detail__mobile-hero-back--light:hover {
  background: #f0f0f0;
  color: #111;
}
.route-detail__mobile-hero-back .material-symbols-outlined {
  font-size: 24px;
}
.route-detail__mobile-hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
}
.route-detail__mobile-hero-dot {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
.route-detail__mobile-hero-dot.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}
.route-detail__mobile-hero-dot-face {
  display: block;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
.route-detail__mobile-hero-dot-face--empty {
  background: var(--bg-soft);
}

@media (max-width: 980px) {
  .route-detail__visual-cluster {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .route-detail__mobile-hero {
    display: block;
    order: 1;
    margin: 0 0 12px;
  }
  .route-detail__title-row {
    order: 2;
  }
  .route-detail__hero {
    order: 3;
  }
  .route-detail__meta-line {
    order: 4;
  }
  .route-detail__description-wrap--cluster {
    order: 5;
  }
  .route-detail__stats-row {
    order: 6;
  }
  .route-detail__hero-strip {
    order: 7;
  }
  .route-detail__stops-carousel-wrap {
    order: 8;
  }

  /* Środkowy kafelek to mapa (B); zdjęcia A i C ukryte na wąskim ekranie — mapa z mobile-hero powyżej. */
  .route-detail__hero-strip-cell--a,
  .route-detail__hero-strip-cell--c {
    display: none !important;
  }
  .route-detail__hero-strip {
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
    margin: 12px 0 20px;
    gap: 0;
  }
  .route-detail__hero-strip-cell--map {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
  }
  .route-detail__hero-strip-cell .route-detail__map-stack--strip {
    flex: 1 1 auto;
    min-height: 0 !important;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
  }
  .route-detail__hero-strip-cell .route-detail__map-fullwidth--strip {
    position: absolute;
    inset: 0;
    min-height: 0 !important;
    height: auto;
    max-height: none;
    cursor: pointer;
  }
  .route-detail__hero-strip-cell .route-detail__map-fullwidth-inner {
    min-height: 0 !important;
    position: absolute;
    inset: 0;
    height: 100%;
  }
}

.route-detail__hero-strip {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  --hero-strip-gap: 12px;
  gap: var(--hero-strip-gap);
  margin: 0 0 28px;
  min-height: 384px;
}
@media (min-width: 981px) {
  /* Jak w DevTools: visual-cluster + max-height (nie min-height). Bez min-height:340 na zdjęciach — nie rozpycha > 484px. */
  .route-detail__visual-cluster:not(.route-detail__visual-cluster--map-expanded) .route-detail__hero-strip,
  .route-detail .route-detail__hero-strip {
    box-sizing: border-box;
    max-height: 484px;
    height: 484px;
    min-height: 0 !important;
    overflow: hidden;
    align-items: stretch;
  }
  .route-detail__visual-cluster:not(.route-detail__visual-cluster--map-expanded) .route-detail__hero-strip-cell,
  .route-detail .route-detail__hero-strip-cell {
    min-height: 0;
    max-height: 100%;
  }
  .route-detail__visual-cluster:not(.route-detail__visual-cluster--map-expanded) .route-detail__hero-strip-photo,
  .route-detail__visual-cluster:not(.route-detail__visual-cluster--map-expanded) .route-detail__hero-strip-photo--fill,
  .route-detail__visual-cluster:not(.route-detail__visual-cluster--map-expanded) .route-detail__hero-strip .route-detail__hero-strip-img {
    min-height: 0 !important;
    max-height: 100%;
  }
  .route-detail__visual-cluster:not(.route-detail__visual-cluster--map-expanded) .route-detail__hero-strip-cell .route-detail__map-stack--strip,
  .route-detail__visual-cluster:not(.route-detail__visual-cluster--map-expanded) .route-detail__hero-strip-cell .route-detail__map-fullwidth--strip,
  .route-detail__visual-cluster:not(.route-detail__visual-cluster--map-expanded) .route-detail__hero-strip-cell .route-detail__map-fullwidth-inner {
    min-height: 0 !important;
    max-height: 100%;
  }
}
.route-detail__hero-strip-cell {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: transparent;
}
/* 50% | 25% | 25% — lewy kafel / mapa / prawa kolumna (2:1:1) */
.route-detail__hero-strip-cell--a {
  flex: 2 1 0;
}
.route-detail__hero-strip-cell--b,
.route-detail__hero-strip-cell--c {
  flex: 1 1 0;
}
.route-detail__hero-strip-cell--map {
  flex-shrink: 0;
  position: relative;
}
.route-detail__hero-strip-photo--more .route-detail__hero-strip-img,
.route-detail__hero-strip-tile--more .route-detail__hero-strip-tile-img {
  filter: brightness(0.55);
}
.route-detail__hero-strip-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.route-detail__hero-strip-photo {
  display: block;
  width: 100%;
  flex: 1;
  min-height: 240px;
  padding: 0;
  margin: 0;
  border: none;
  background: var(--bg-soft);
  cursor: pointer;
  text-align: left;
  position: relative;
}
.route-detail__hero-strip-photo--static {
  cursor: default;
}
.route-detail__hero-strip-photo--fill {
  flex: 1;
  min-height: 240px;
}
.route-detail__hero-strip-img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Prawa kolumna (>2 zdjęć): divy .hero-strip-tile + gap (jak między kolumnami), zaokrąglenie per kafel. */
.route-detail .route-detail__hero-strip-cell--split .route-detail__hero-strip-split {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: var(--hero-strip-gap, 12px);
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  align-self: stretch;
  box-sizing: border-box;
}
.route-detail .route-detail__hero-strip-tile {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-soft);
  cursor: pointer;
  isolation: isolate;
}
.route-detail .route-detail__hero-strip-tile:focus {
  outline: none;
}
.route-detail .route-detail__hero-strip-tile:focus-visible {
  outline: 2px solid var(--green, #096);
  outline-offset: 2px;
}
.route-detail .route-detail__hero-strip-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

.route-detail__hero-strip-cell .route-detail__map-stack--strip {
  flex: 1;
  min-height: 264px;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  background: transparent;
}
.route-detail__hero-strip-cell .route-detail__map-fullwidth--strip {
  flex: 1;
  min-height: 264px;
  height: 100%;
  position: relative;
  background: transparent;
}
.route-detail__hero-strip-cell .route-detail__map-fullwidth-inner {
  width: 100%;
  height: 100%;
  min-height: 264px;
}
@media (max-width: 980px) {
  /* Mobile layout for strip is driven by the earlier visual-cluster block (map-only 1:1). */
  .route-detail__hero-strip-cell--a,
  .route-detail__hero-strip-cell--b,
  .route-detail__hero-strip-cell--c {
    flex-grow: 1;
  }
  .route-detail__hero-strip-photo,
  .route-detail__hero-strip-img {
    min-height: 220px;
  }
  .route-detail__map-strip-expand {
    top: 12px;
    right: 12px;
  }
}

/* Stops carousel (3 tiles desktop): card layout + flag badge on hover */
.route-detail__stops-carousel-wrap {
  margin: 8px 0 40px;
}
.route-detail__stop-slide {
  height: auto;
  align-self: stretch;
}
.route-detail__stop-slide-inner {
  --stop-slide-pad: 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 24px;
  overflow: hidden;
  padding: var(--stop-slide-pad);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.route-detail__stop-slide:hover .route-detail__stop-slide-inner,
.route-detail__stop-slide:focus-within .route-detail__stop-slide-inner {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 153, 102, 0.35);
}
.route-detail__stop-slide-head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}
.route-detail__stop-slide-photo {
  position: relative;
  flex: 0 0 68%;
  width: 68%;
  max-width: 68%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-soft, #f3f3f3);
}
.route-detail__stop-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.route-detail__map-strip-expand {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 600;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.14);
  padding: 0;
}
.route-detail__map-strip-expand:hover {
  background: #ffffff;
  color: #111111;
}
.route-detail__map-strip-expand-icon.material-symbols-outlined {
  font-size: 24px !important;
  width: 24px;
  height: 24px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
/* Map expanded (scroll / pin): keep white circle + dark icon — do not invert like a toggle */
.route-detail__map-strip-expand.is-active {
  background: #ffffff;
  color: #111111;
}
.route-detail__map-strip-expand.is-active .route-detail__map-strip-expand-icon {
  color: #111111;
}
.route-detail__stop-slide-counter {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 2px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.15;
  color: #111;
  text-align: right;
  white-space: nowrap;
}
.route-detail__stop-slide-flag {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green, #009966);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.route-detail__stop-slide-flag .material-symbols-outlined {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: #111;
}
.route-detail__stops-carousel-wrap:hover .route-detail__stop-slide:hover .route-detail__stop-slide-flag,
.route-detail__stop-slide:focus-within .route-detail__stop-slide-flag {
  opacity: 1;
  transform: scale(1);
}
.route-detail__stop-slide-body {
  margin-top: 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}
.route-detail__stop-slide-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  color: #111;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.route-detail__stop-slide-title a {
  color: inherit;
  text-decoration: none;
}
.route-detail__stop-slide-title a:hover {
  text-decoration: underline;
}
.route-detail__stop-slide-not-in-path {
  margin-left: 4px;
  font-size: 12px;
  color: var(--muted);
  vertical-align: middle;
}
.route-detail__stop-slide-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #333;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.route-detail__stop-slide-start {
  margin-top: auto;
  padding-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green, #009966);
  text-decoration: none;
  visibility: hidden;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.2s ease, max-height 0.2s ease, visibility 0.2s ease;
}
.route-detail__stops-carousel-wrap:hover .route-detail__stop-slide:hover .route-detail__stop-slide-start,
.route-detail__stop-slide:focus-within .route-detail__stop-slide-start {
  visibility: visible;
  opacity: 1;
  max-height: 4em;
}
@media (hover: none) {
  .route-detail__stop-slide-flag {
    opacity: 1;
    transform: none;
  }
  .route-detail__stop-slide-start {
    visibility: visible;
    opacity: 1;
    max-height: none;
  }
}

/* Carousel arrows: vertical center of slide row (override .carousel.routes arrow math from cards.css) */
.carousel-wrap.carousel-wrap--route-detail-stops {
  --gap: var(--space-4);
  container-type: inline-size;
  --carousel-stop-slide-width: calc((100cqw - (2 * var(--gap))) / 3);
}
.carousel-wrap.carousel-wrap--route-detail-stops:has(> .route-detail-stops-carousel) > .arrows {
  top: 0;
  bottom: 0;
  height: auto;
}
.carousel-wrap.carousel-wrap--route-detail-stops:has(> .route-detail-stops-carousel) > .arrows .arrow {
  top: 50%;
  transform: translateY(-50%);
}
@media (max-width: 980px) {
  .carousel-wrap.carousel-wrap--route-detail-stops {
    /* ~one card + peek (same as home / listing carousels: 82vw) */
    --carousel-stop-slide-width: 82vw;
  }
  .carousel-wrap.carousel-wrap--route-detail-stops .route-detail-stops-carousel .route-detail__stop-slide.card {
    flex: 0 0 82vw;
    min-width: 82vw;
    max-width: 82vw;
  }
}

/* Hero row under title: city link(s) + stats (transport, distance, time, points) */
.route-detail__hero { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: -8px; margin-bottom: 24px; font-size: 14px; color: var(--muted); }
@media (max-width: 980px) {
  .route-detail__hero {
    margin-top: 4px;
  }
}
.route-detail__hero-cities { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.route-detail__hero-location-icon { font-size: 18px !important; width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.route-detail__hero-city-link { color: var(--muted); text-decoration: none; }
.route-detail__hero-city-link:hover { color: var(--muted); text-decoration: none; }
.route-detail__hero-city { color: var(--text); }
.route-detail__hero-city-sep { margin: 0 2px; color: var(--muted); }
.route-detail__hero-sep-v { display: inline-block; width: 1px; height: 24px; background: var(--border, #ddd); flex-shrink: 0; margin: 0 4px; vertical-align: middle; }
.route-detail__hero-stats { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.route-detail__hero-stat { display: inline-flex; align-items: center; gap: 6px; }
.route-detail__hero-stat-icon { font-size: 18px !important; width: 18px; height: 18px; flex-shrink: 0; }

/* Two columns: 60% main, 40% sidebar – removed, keep .route-detail__main only */
.route-detail__cols { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }

/* Title & location (badge reuses .place-detail__translation-* from place-detail.css) */
.route-detail__title-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.route-detail__title-wrap {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.route-detail__title { margin: 0; font-size: 34px; font-weight: 700; line-height: 1.25; flex: 0 1 auto; max-width: 100%; }
@media (min-width: 981px) {
  .route-detail__title {
    max-width: 60%;
  }
}

/* Other routes: after comments */
.route-detail__other-routes { margin: 40px 0 40px; }
.route-detail__other-routes .place-detail__carousel-title { margin-top: 0; }
.route-detail__title-cta { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; }
.route-detail__title-cta-icon { font-size: 20px !important; width: 20px; height: 20px; }
/* Match place “Add to plan” CTA (place-detail__plan-cta-btn) */
.route-detail__title-cta--plan.route-detail__title-cta {
  gap: 10px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
}
.route-detail__title-cta--plan .route-detail__title-cta-icon {
  font-size: 22px !important;
  width: 22px;
  height: 22px;
}
.route-detail__start-floating.route-detail__title-cta--plan {
  gap: 10px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
}
.route-detail__meta-line { margin: 0 0 16px; font-size: 14px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.route-detail__meta-label { font-weight: 500; }
.route-detail__meta-sep { display: inline-block; width: 1px; height: 24px; background: var(--border, #ddd); flex-shrink: 0; margin: 0 4px; vertical-align: middle; }
.route-detail__pill { display: inline-flex; align-items: center; padding: 2px 10px; background: var(--bg-soft); border-radius: 999px; font-size: 12px; color: var(--text); text-decoration: none; }
a.route-detail__pill:hover { background: var(--border); }
.route-detail__pill-icon { font-size: 14px !important; width: 14px; height: 14px; margin-right: 4px; flex-shrink: 0; }
.route-detail__location { margin: 0 0 16px; font-size: 14px; color: var(--muted); }

@media (max-width: 980px) {
  .route-detail__title-cta { display: none; }
}

/* Map block directly under title / tags / stats */
.route-detail__map-section { margin: 0 0 28px; }
.route-detail__map-stack {
  border-radius: var(--radius-sx);
  overflow: hidden;
  background: var(--bg-soft);
}
.route-detail__map-fullwidth { position: relative; height: 480px; overflow: hidden; background: var(--bg-soft); }
.route-detail__map-fullwidth-inner { width: 100%; height: 100%; min-height: 480px; }

/* Rating pill on map (larger type, 36px inset from map edges) */
.route-detail__map-rating-pill {
  position: absolute;
  top: 36px;
  left: 36px;
  z-index: 500;
  padding: 14px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  cursor: pointer;
  max-width: calc(100% - 72px);
}
.route-detail__map-rating-stars {
  font-size: 20px;
  letter-spacing: 2px;
  color: #eab308;
  line-height: 1;
}
.route-detail__map-rating-text {
  font-size: 15px;
  line-height: 1.35;
  color: #111;
}
.route-detail__map-rating-strong { font-weight: 700; }

/* Photo thumbnails: horizontal carousel under map, 96×96 tiles */
.route-detail__map-gallery-strip {
  padding: 16px 0 18px;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.route-detail__map-gallery-carousel {
  --gap: 12px;
  gap: 12px;
  padding: 4px 48px 8px;
  scroll-padding-inline: 48px;
}
.route-detail__map-gallery-thumb {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  background: var(--bg-soft);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.route-detail__map-gallery-thumb:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.route-detail__map-gallery-thumb:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.route-detail__map-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-wrap.route-detail__map-gallery-carousel-wrap {
  container-type: inline-size;
}
.carousel-wrap.route-detail__map-gallery-carousel-wrap > .arrows {
  top: 0;
}
.carousel-wrap.route-detail__map-gallery-carousel-wrap > .arrows .arrow {
  top: 52px;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .route-detail__map-rating-pill {
    top: 20px;
    left: 20px;
    max-width: calc(100% - 40px);
    padding: 12px 16px;
  }
  .route-detail__map-rating-stars {
    font-size: 17px;
    letter-spacing: 1px;
  }
  .route-detail__map-rating-text {
    font-size: 14px;
  }
  .route-detail__map-gallery-carousel {
    padding-inline: 44px;
    scroll-padding-inline: 44px;
  }
}

/* Stats row (description is above) */
.route-detail__stats-row { margin-top: 20px; margin-bottom: 24px; }

/* Stop cards (replaces timeline): white tiles, map pin highlight on hover/focus */
.route-detail__stop-cards { margin-bottom: 48px; }
.route-detail__stop-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.route-detail__stop-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border, #e8e8e8);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.route-detail__stop-card:hover,
.route-detail__stop-card:focus-within {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 153, 102, 0.35);
}
.route-detail__stop-card-media {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft, #f3f3f3);
  overflow: hidden;
}
.route-detail__stop-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.route-detail__stop-card-body {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
}
.route-detail__stop-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}
.route-detail__stop-card-title a {
  color: inherit;
  text-decoration: none;
}
.route-detail__stop-card-title a:hover {
  text-decoration: underline;
}
.route-detail__stop-card-not-in-path {
  margin-left: 4px;
  font-size: 12px;
  color: var(--muted);
  vertical-align: middle;
}
.route-detail__stop-card-loc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
.route-detail__stop-card-loc-link {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.route-detail__stop-card-loc-link:hover {
  color: var(--text);
}
.route-detail__stop-card-loc-icon {
  font-size: 16px !important;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.route-detail__stop-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.route-detail__stop-card-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: #333;
}
.route-detail__stop-card-pill-icon {
  font-size: 14px !important;
  width: 14px;
  height: 14px;
}
.route-detail__stop-card-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #333;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}
.route-detail__stop-card-start {
  margin-top: auto;
  padding-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green, #009966);
  text-decoration: none;
}
.route-detail__stop-card-start:hover {
  text-decoration: underline;
}
.route-detail__stop-card-start-icon {
  font-size: 18px !important;
  width: 18px;
  height: 18px;
}

@media (max-width: 1200px) {
  .route-detail__stop-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .route-detail__stop-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
@media (max-width: 520px) {
  .route-detail__stop-cards-grid {
    grid-template-columns: 1fr;
  }
}
.route-detail__map-stats { display: flex; align-items: stretch; justify-content: flex-start; gap: 0; }
.route-detail__map-stat { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 24px; color: #111; text-align: left; }
.route-detail__map-stat::after { content: ''; position: absolute; top: 50%; right: 0; transform: translateY(-50%); width: 1px; height: 40px; background: var(--border, #ddd); }
.route-detail__map-stat:last-child::after { display: none; }
.route-detail__map-stat-icon { font-size: 24px !important; width: 24px; height: 24px; color: #111; margin-bottom: 4px; }
.route-detail__map-stat-label { font-size: 14px; font-weight: 400; color: #111; text-align: left; white-space: nowrap; }
.route-detail__map-stat-label--duration {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.route-paid-ticket-hours {
  color: var(--green, #009966);
  font-weight: 700;
  cursor: help;
  white-space: nowrap;
}
.route-stop-paid-time-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  vertical-align: middle;
  flex-shrink: 0;
  cursor: help;
}
.route-stop-paid-time-hint__clock {
  font-size: 20px !important;
  width: 20px;
  height: 20px;
  color: var(--muted, #666);
}
.route-stop-paid-time-hint__alert {
  position: absolute;
  right: -3px;
  top: -2px;
  font-size: 12px !important;
  width: 12px;
  height: 12px;
  color: #d97706;
  background: #fff;
  border-radius: 999px;
}

@media (min-width: 769px) {
  .route-detail__map-stat { padding: 0 36px; }
  .route-detail__map-stat:first-child { padding-left: 0; }
}
/* Pineska markers in fullwidth map (same as sidebar) */
.route-detail__map-fullwidth .route-builder-marker--pineska { display: block; width: 44px; height: 52px; position: relative; }
.route-detail__map-fullwidth .route-builder-marker__pineska { display: block; width: 44px; height: 52px; position: relative; box-sizing: border-box; }
/* drop-shadow on SVG can paint over the photo in the pin; shadow lives on the teardrop in routes.css */
.route-detail__map-fullwidth .route-builder-marker__pineska-svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; fill: #fff; filter: none; pointer-events: none; z-index: 0; }
.route-detail__map-fullwidth .route-builder-marker__pineska-svg path { fill: #fff; }
.route-detail__map-fullwidth .route-builder-marker--pineska.is-highlight .route-builder-marker__pineska-svg path { fill: var(--green, #009966); }
.route-detail__map-fullwidth .route-builder-marker__pineska-photo { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background-color: var(--bg-soft, #e8e8e8); border: 1px solid rgba(0,0,0,0.08); box-sizing: border-box; z-index: 1; }
.route-detail__map-fullwidth .route-builder-marker__pineska-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.route-detail__map-fullwidth .route-detail-marker-pill { position: absolute; left: 50%; transform: translateX(-50%); bottom: 100%; margin-bottom: 2px; padding: 2px 8px; font-size: 10px; font-weight: 700; border-radius: 999px; background: var(--green, #009966); color: #111; white-space: nowrap; }
.route-detail__map-fullwidth .route-detail-marker-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }

/* Leaflet divIcon default background hides pineska photos */
.route-detail__map-fullwidth .leaflet-marker-icon.route-builder-marker,
.route-detail__sidebar-map .leaflet-marker-icon.route-builder-marker {
  background: transparent !important;
  border: none !important;
}

/* Popular places carousel below comments */
.route-detail__places-popular { margin-top: 142px; }
.route-detail__places-popular .place-detail__carousel-title { margin-top: 0; }
.route-detail__places-popular .carousel-wrap:last-child { margin-bottom: 0; }

/* Description: expandable like place */
.route-detail__description-wrap { margin-bottom: 14px; }
.route-detail__description-inner { padding: 0; background: transparent; }
.route-detail__description-text { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.route-detail__description-text:last-of-type { margin-bottom: 0; }
.route-detail__description-toggle { margin-top: 4px; padding: 0; border: none; background: none; font-size: 14px; color: var(--green); cursor: pointer; }
.route-detail__description-toggle:hover { text-decoration: underline; }

/* Timeline: dashed line, numbered circles, name + optional pill + description */
.route-detail__timeline { margin-bottom: 24px; padding-top: 32px; padding-bottom: 48px; }
.route-detail__timeline-title { margin: 0 0 24px; font-size: 18px; font-weight: 700; }
.route-detail__timeline-list { list-style: none; padding: 0; margin: 0; }
.route-detail__timeline-item { display: flex; align-items: flex-start; gap: 14px; position: relative; padding-bottom: 36px; }
.route-detail__timeline-item:last-child { padding-bottom: 0; }
.route-detail__timeline-item:last-child::before { display: none; }
.route-detail__timeline-item::before { content: ''; position: absolute; left: 16px; top: 32px; bottom: 0; width: 0; border-left: 2px dashed var(--border, #ddd); pointer-events: none; }
.route-detail__timeline-marker { flex-shrink: 0; width: 32px; position: relative; z-index: 1; }
.route-detail__timeline-dot { display: block; width: 32px; height: 32px; background: #111;  border-radius: 50%; }
.route-detail__timeline-position { position: absolute; left: 0; top: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 13px; font-weight: 700; color: #fff; }
.route-detail__timeline-content { flex: 1; min-width: 0; padding-left: 12px; padding-top: 2px; }
.route-detail__timeline-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 2px; }
.route-detail__timeline-label { font-size: 16px; font-weight: 500; color: var(--text); text-decoration: none; }
.route-detail__timeline-label:hover { text-decoration: underline; }
.route-detail__timeline-not-in-path { font-size: 12px; color: var(--muted); }
.route-detail__timeline-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.route-detail__timeline-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--bg-soft); border-radius: 999px; font-size: 12px; color: var(--muted); }
.route-detail__timeline-pill-icon { font-size: 10px !important; width: 10px; height: 10px; }
.route-detail__timeline-city { margin: 0 0 4px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.route-detail__timeline-city-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; text-decoration: none; }
.route-detail__timeline-city-link:hover { color: var(--muted); text-decoration: none; }
.route-detail__timeline-city-icon { font-size: 16px !important; width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }
.route-detail__timeline-desc { margin: 4px 0 0; font-size: 14px; color: var(--text); line-height: 1.5; }
.route-detail__timeline-desc:last-child { margin-bottom: 0; }
/* Start from this stop: visible on hover, right side */
.route-detail__timeline-start-from { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 8px 14px; margin-left: auto; font-size: 13px; font-weight: 500; color: #111; background: #fff; border: 1px solid var(--border, #ddd); border-radius: var(--radius-sx); text-decoration: none; box-shadow: 0 1px 4px rgba(0,0,0,0.08); opacity: 0; transition: opacity 0.2s ease; }
.route-detail__timeline-item:hover .route-detail__timeline-start-from { opacity: 1; }
@media (max-width: 768px) {
  .route-detail__timeline-start-from { opacity: 1; }
  .route-detail__timeline-start-from-text { display: none; }
}
.route-detail__timeline-start-from:hover { background: var(--bg-soft); color: #111; }
.route-detail__timeline-start-from-icon { font-size: 20px !important; width: 20px; height: 20px; }

@media (max-width: 768px) {
  .route-detail__map-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0; row-gap: 0; justify-items: stretch; border-radius: var(--radius-sx); overflow: hidden; }
  .route-detail__map-stat { padding: 24px 24px; align-items: center; text-align: center; gap: 14px; }
  .route-detail__map-stat::after { display: none; }
  .route-detail__map-stat-label { white-space: normal; text-align: center; }
  .route-detail__map-stat:nth-child(odd) { border-right: 1px solid var(--border, #ddd); }
  .route-detail__map-stat:nth-child(-n+2) { border-bottom: 1px solid var(--border, #ddd); }
}

/* Comments: reuse place-detail comment styles (class names match) */
.route-detail__comments-title { margin: 0 0 16px; font-size: 18px; font-weight: 700; }

/* Rating: two columns – left vote + average, right breakdown; mobile stack; divider */
.route-detail__rating-wrap { margin-bottom: 48px; padding: 36px; border: 1px solid var(--border); border-radius: var(--radius-sx); background: transparent; }
@media (min-width: 981px) {
  .route-detail__rating-wrap { padding: 72px; }
}
@media (max-width: 980px) {
  .route-detail__rating-wrap {
    padding: 20px 18px;
    margin-bottom: 32px;
  }
  .route-detail__rating-big {
    font-size: 26px;
  }
}
.route-detail__rating-title { margin: 0 0 16px; font-size: 26px; font-weight: 700; }
@media (max-width: 980px) {
  .route-detail__rating-title {
    font-size: 22px;
    margin-bottom: 12px;
  }
}
.route-detail__rating-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.route-detail__rating-left { display: flex; flex-direction: column; gap: 12px; }
.route-detail__rating-right { display: flex; flex-direction: column; gap: 8px; padding-left: 24px; border-left: 1px solid var(--border); }
.route-detail__rating-inner { display: flex; flex-direction: column; gap: 4px; }
.route-detail__rating-big { font-size: 32px; font-weight: 700; line-height: 1; }
.route-detail__rating-stars { font-size: 18px; }
.route-detail__rating-total { font-size: 14px; color: var(--muted); }
.route-detail__rating-inner [data-route-rating-avg] { font-weight: 700; }
.route-detail__rating-vote { display: flex; gap: 4px; align-items: center; }
.route-detail__rating-gated { margin: 0; }
.route-detail__rating-wrap .route-detail__star-btn { padding: 4px 4px 4px 0; border: none; background: none; line-height: 1; cursor: pointer; color: var(--muted); transition: color 0.15s ease; display: inline-flex; align-items: center; justify-content: center; }
.route-detail__rating-wrap .route-detail__star-btn-icon { font-size: 28px !important; width: 28px; height: 28px; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.route-detail__rating-wrap .route-detail__star-btn:hover .route-detail__star-btn-icon,
.route-detail__rating-wrap .route-detail__star-btn.is-active .route-detail__star-btn-icon { color: #eab308; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.route-detail__rating-wrap .route-detail__star { color: var(--muted); font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
.route-detail__rating-wrap .route-detail__star.is-active { color: #eab308; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20; }
.route-detail__rating-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.route-detail__rating-row-stars { display: inline-flex; gap: 2px; align-items: center; }
.route-detail__rating-row-stars .route-detail__star--row { font-size: 15px !important; width: 15px; height: 15px; }
.route-detail__rating-row-count { color: var(--muted); min-width: 2.5em; }
.route-detail__rating-bar { flex: 1; height: 8px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.route-detail__rating-bar-fill { height: 100%; background: var(--text); border-radius: 4px; transition: width 0.2s ease; }
@media (max-width: 640px) {
  .route-detail__rating-cols { grid-template-columns: 1fr; }
  .route-detail__rating-right { padding-left: 0; border-left: none; border-top: 1px solid var(--border); padding-top: 16px; }
}

/* Floating Start Now button on mobile */
.route-detail__start-floating-wrap { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 3000; pointer-events: none; }
.route-detail__start-floating { width: 100%; justify-content: center; pointer-events: auto; box-shadow: 0 -2px 12px rgba(0,0,0,0.2); }

@media (min-width: 981px) {
  .route-detail__start-floating-wrap { display: none; }
}

/* Sidebar: only map, no border/background, fills aside */
.route-detail__sidebar { position: sticky; top: 24px; display: flex; flex-direction: column; min-height: 648px; }
.route-detail__sidebar-inner { flex: 1; display: flex; flex-direction: column; padding: 0; background: transparent; border: none; border-radius: 0; }
.route-detail__sidebar-map { flex: 1; min-height: 648px; border: none; background: transparent; border-radius: var(--radius-sx); overflow: hidden; }
.route-detail__sidebar-map-inner { width: 100%; height: 100%; min-height: 648px; }
.route-detail__sidebar-actions { display: flex; flex-direction: column; gap: 10px; }
.route-detail__sidebar-cta { width: 100%; justify-content: center; }
.route-detail__sidebar-map-link { font-size: 14px; color: var(--green); text-decoration: none; }
.route-detail__sidebar-map-link:hover { text-decoration: underline; }

/* Sidebar map: pineska markers (same as route builder) */
.route-detail__sidebar-map .route-builder-marker--pineska { display: block; width: 44px; height: 52px; position: relative; }
.route-detail__sidebar-map .route-builder-marker__pineska { display: block; width: 44px; height: 52px; position: relative; box-sizing: border-box; }
.route-detail__sidebar-map .route-builder-marker__pineska-svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; fill: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35)); pointer-events: none; z-index: 0; }
.route-detail__sidebar-map .route-builder-marker__pineska-svg path { fill: #fff; }
.route-detail__sidebar-map .route-builder-marker--pineska.is-highlight .route-builder-marker__pineska-svg path { fill: var(--green, #009966); }
.route-detail__sidebar-map .route-builder-marker__pineska-photo { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background-color: var(--bg-soft, #e8e8e8); border: 1px solid rgba(0,0,0,0.08); box-sizing: border-box; z-index: 1; }
.route-detail__sidebar-map .route-builder-marker__pineska-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.route-detail__sidebar-map .route-detail-marker-pill { position: absolute; left: 50%; transform: translateX(-50%); bottom: 100%; margin-bottom: 2px; padding: 2px 8px; font-size: 10px; font-weight: 700; border-radius: 999px; background: var(--green, #009966); color: #111; white-space: nowrap; }
.route-detail__sidebar-map .route-detail-marker-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }

@media (max-width: 980px) {
  .route-detail__cols { grid-template-columns: 1fr; }
}

/* Map fullscreen: above gallery lightbox; clip stacking; close top-right, zoom top-left */
.route-detail__map-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  isolation: isolate;
}
.route-detail__map-fullscreen.is-open { display: flex; }
.route-detail__map-frame-wrap { position: relative; flex: 1; min-height: 0; width: 100%; max-width: 100vw; overflow: hidden; }
.route-detail__map-leaflet-fs { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.route-detail__map-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.route-detail__map-close { position: absolute; top: 16px; right: 16px; z-index: 10060; width: 44px; height: 44px; border-radius: 50%; background: #fff; border: none; cursor: pointer; display: grid; place-items: center; color: #111; box-shadow: 0 2px 12px rgba(0,0,0,0.2); pointer-events: auto; }
.route-detail__map-close:hover { background: #f0f0f0; }
.route-detail__map-close .material-symbols-outlined { font-size: 26px !important; }
.route-detail__map-fullscreen .leaflet-top.leaflet-left { top: 16px; left: 16px; }

/* Fullscreen overlay: markers live under .route-detail__map-fullscreen, not .route-detail__map-fullwidth — reuse pineska layout */
.route-detail__map-fullscreen .route-builder-marker--pineska { display: block; width: 44px; height: 52px; position: relative; }
.route-detail__map-fullscreen .route-builder-marker__pineska { display: block; width: 44px; height: 52px; position: relative; box-sizing: border-box; }
.route-detail__map-fullscreen .route-builder-marker__pineska-svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; fill: #fff; filter: none; pointer-events: none; z-index: 0; }
.route-detail__map-fullscreen .route-builder-marker__pineska-svg path { fill: #fff; }
.route-detail__map-fullscreen .route-builder-marker--pineska.is-highlight .route-builder-marker__pineska-svg path { fill: var(--green, #009966); }
.route-detail__map-fullscreen .route-builder-marker__pineska-photo { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background-color: var(--bg-soft, #e8e8e8); border: 1px solid rgba(0,0,0,0.08); box-sizing: border-box; z-index: 1; }
.route-detail__map-fullscreen .route-builder-marker__pineska-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.route-detail__map-fullscreen .route-detail-marker-pill { position: absolute; left: 50%; transform: translateX(-50%); bottom: 100%; margin-bottom: 2px; padding: 2px 8px; font-size: 10px; font-weight: 700; border-radius: 999px; background: var(--green, #009966); color: #111; white-space: nowrap; }
.route-detail__map-fullscreen .route-detail-marker-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.route-detail__map-fullscreen .leaflet-marker-icon.route-builder-marker {
  background: transparent !important;
  border: none !important;
}

/* Start options modal (Open in Google Maps / Export GPX) */
.route-detail__start-modal { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.55); display: none; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.route-detail__start-modal.is-open { display: flex; }
.route-detail__start-modal-dialog { width: 100%; max-width: 420px; background: #fff; border-radius: var(--radius-sx); box-shadow: 0 10px 40px rgba(0,0,0,0.35); padding: 20px 20px 16px; position: relative; }
.route-detail__start-modal-title { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.route-detail__start-modal-text { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.route-detail__start-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.route-detail__start-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
}
.route-detail__start-modal-btn .route-detail__start-modal-btn-icon {
  font-size: 22px !important;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.route-detail__start-modal-close { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.route-detail__start-modal-close:hover { background: var(--bg-soft); color: var(--text); }

/* Gallery lightbox (#route-gallery-overlay): must receive clicks (not pointer-events: none from legacy grid rule). */
.route-detail__gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 56px 100px;
  box-sizing: border-box;
  pointer-events: auto;
  overflow: hidden;
  isolation: isolate;
}
.route-detail__gallery-overlay.is-open { display: flex; flex-direction: column; }
.route-detail__gallery-overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10060;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #111;
  pointer-events: auto;
}
.route-detail__gallery-overlay-close:hover { background: #fff; }
.route-detail__gallery-overlay-prev,
.route-detail__gallery-overlay-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10060;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #111;
  pointer-events: auto;
}
.route-detail__gallery-overlay-prev { left: 16px; }
.route-detail__gallery-overlay-next { right: 16px; }
.route-detail__gallery-overlay-prev:hover, .route-detail__gallery-overlay-next:hover { background: #fff; }
.route-detail__gallery-overlay-prev .material-symbols-outlined, .route-detail__gallery-overlay-next .material-symbols-outlined { font-size: 28px; }
.route-detail__gallery-overlay-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  pointer-events: auto;
}
.route-detail__gallery-overlay-main img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; pointer-events: auto; }
.route-detail__gallery-overlay-thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px 0 0;
  max-height: 80px;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
.route-detail__gallery-overlay-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  pointer-events: auto;
}
.route-detail__gallery-overlay-thumb.is-active { border-color: #fff; }
.route-detail__gallery-overlay-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
