html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
}

/* Keep the scenery anchored below the menu content at every screen size. */
.sidebar-explorer {
  background-color: var(--brand-tint);
  background-image:
    linear-gradient(to bottom, rgba(255, 248, 247, .98), rgba(255, 248, 247, .82)),
    url('../images/menu-landscape.svg'),
    linear-gradient(165deg, #fff 0%, var(--brand-tint) 65%, var(--brand-tint-strong) 100%);
  background-position: center, center bottom, center;
  background-size: 100% 100%, 100% auto, 100% 100%;
  background-repeat: no-repeat;
  border-color: rgba(226, 232, 240, 0.9);
}

.sidebar-explorer .sidebar-tabs {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: #e8ebef;
}

.sidebar-explorer .sidebar-tab-btn {
  color: #64748b;
}

.sidebar-explorer .sidebar-tab-btn:hover {
  color: var(--primary);
  background: var(--brand-tint);
}

.sidebar-explorer .sidebar-tab-btn.active {
  color: var(--primary-hover);
  background: var(--brand-tint);
}

.sidebar-explorer .sidebar-content-area {
  padding-bottom: 150px;
  scroll-padding-bottom: 20px;
}

.sidebar-explorer .mobile-sheet-drag-handle {
  background: transparent;
}

.sidebar-explorer .sheet-pill {
  background: #cbd5e1;
}


#place-detail-modal [hidden] {
  display: none !important;
}

.top-nav-bar {
  background: rgba(255, 248, 247, .96);
  border-bottom-color: var(--brand-border);
}

.brand-logo-img {
  object-fit: contain;
  border-radius: 0;
  filter: none;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 88px;
  height: 34px;
}

@media (max-width: 768px) {
  .brand-logo-img {
    width: 66px;
    height: 28px;
  }
}

@media (min-width: 769px) {
  .map-app-wrapper { --route-explorer-width: clamp(500px, 47vw, 640px); }
  #sidebar-explorer:has(> .route-panel.show) {
    width: var(--route-explorer-width);
    transition-property: transform;
  }
  #sidebar-explorer.collapsed:has(> .route-panel.show) { transform: translateX(calc(-100% - 30px)); }
  #sidebar-explorer:not(.collapsed):has(> .route-panel.show) + .sidebar-toggle-btn {
    left: calc(var(--route-explorer-width) + 26px);
    transition-property: background-color, color, transform;
  }
}

#sidebar-explorer > .route-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  gap: 14px;
  border: 0;
  border-radius: inherit;
  background: #f4f6f9;
  box-shadow: none;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  transform: none;
  animation: none;
  z-index: 2;
}

#sidebar-explorer > .route-panel.show {
  display: flex;
}

#sidebar-explorer > .route-panel > * {
  flex-shrink: 0;
  min-width: 0;
  margin: 0;
}

.route-panel .route-section {
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #fff;
}

.route-panel .route-overview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.route-overview-card > * { min-width: 0; margin: 0; }
.route-overview-card .route-transport-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.route-overview-card .btn-transport-mode,
.route-overview-card .transport-meta,
.route-overview-card .route-stat-item > div { min-width: 0; }
.route-overview-card .mode-name { overflow-wrap: anywhere; white-space: normal; }
.route-overview-card .route-stats-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); }
.route-overview-card .point-info span,
.route-overview-card .route-stat-item p {
  white-space: normal;
  overflow-wrap: anywhere;
}
.route-overview-card .btn-point-change { flex-shrink: 0; }

.route-panel .route-weather-strip {
  display: grid;
  gap: 12px;
  background: #eff7ff;
  border-color: #cddff4;
  color: #153650;
  container: route-weather / inline-size;
}

.route-weather-strip [hidden] { display: none; }
.route-weather-strip :is(h4, p, dl, dd) { margin: 0; }
.route-weather-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
#route-weather-title { font-size: 14px; font-weight: 800; line-height: 1.35; }
#route-weather-place {
  margin-top: 3px;
  color: #435d75;
  font-size: 12px;
  overflow-wrap: anywhere;
}
#route-weather-icon {
  display: grid;
  flex: 0 0 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #deedfb;
  font-size: 22px;
}
#route-weather-icon[hidden] { display: none; }
.route-weather-current {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-size: 13px;
  line-height: 1.4;
}
#route-weather-temperature {
  font-size: clamp(25px, 6cqi, 32px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.route-weather-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.route-weather-metrics > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #dce8f5;
  border-radius: 9px;
  background: #ffffffc7;
}
.route-weather-metrics dt { color: #435d75; font-size: 11px; font-weight: 600; line-height: 1.35; }
.route-weather-metrics dd { margin-top: 3px; font-size: 13px; font-weight: 800; line-height: 1.35; }
.route-weather-time { color: #435d75; font-size: 11px; line-height: 1.45; }
.route-weather-tip {
  padding: 8px 10px;
  border-radius: 8px;
  background: #deedfb;
  font-size: 12px;
  line-height: 1.45;
}
@container route-weather (max-width: 230px) {
  .route-weather-metrics { grid-template-columns: repeat(auto-fit, minmax(min(72px, 100%), 1fr)); }
}

.tour-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}
.tour-metadata i { color: var(--primary); }
.tour-timeline-info { color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.tour-photo-sources {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}
.tour-photo-sources summary { cursor: pointer; }
.tour-photo-sources ul { display: grid; gap: 8px; margin: 10px 0 0; padding-inline-start: 18px; }
.tour-photo-sources strong { display: block; color: var(--text-main); }
.tour-photo-sources a { color: inherit; text-decoration: underline; }
.tour-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 12px;
  font-size: 12px;
}
.tour-source-links a { color: var(--primary); text-decoration: underline; }

@media (max-width: 768px) {
  .map-app-wrapper { --route-explorer-height: min(72dvh, calc(100dvh - 126px)); }
  #sidebar-explorer:has(> .route-panel.show) {
    height: var(--route-explorer-height);
    transition-property: transform;
  }
  #sidebar-explorer:not(.mobile-collapsed):has(> .route-panel.show) ~ #mobile-map-toggle-btn {
    bottom: calc(var(--route-explorer-height) + 8px);
    transition-property: background-color, color, transform;
  }
  #sidebar-explorer > .route-panel { padding: 10px; gap: 10px; }
  .route-panel .route-section { padding: 10px; }
  .route-overview-card .route-points-box,
  .route-overview-card .route-stats-grid { padding: 10px; }
  .route-overview-card .route-transport-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .route-overview-card .btn-transport-mode {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
  }
  .route-overview-card .route-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-overview-card .route-stat-item:last-child { grid-column: 1 / -1; }
}

#sidebar-explorer:has(> .route-panel.show) > :not(.route-panel) {
  visibility: hidden;
  pointer-events: none;
}

.route-endpoint-popup {
  max-width: min(300px, calc(100vw - 32px)) !important;
}

.route-endpoint-popup .mapboxgl-popup-content {
  min-height: 56px;
  padding: 14px 52px 14px 16px !important;
}

.route-endpoint-info {
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.route-endpoint-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.route-endpoint-name {
  display: block;
  font-size: 13px;
  color: var(--text-main);
}

.place-recommendations {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.place-recommendations h4 {
  margin: 0 0 6px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
}

.place-recommendations > p {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.recommendation-list {
  display: grid;
  gap: 10px;
}

.recommendation-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--brand-tint);
}

.recommendation-main {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.recommendation-main img {
  width: 64px;
  height: 58px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 8px;
}

.recommendation-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.recommendation-info strong {
  color: var(--primary);
  font-size: 12px;
  line-height: 1.5;
}

.recommendation-info > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.recommendation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.recommendation-footer small {
  flex-basis: 100%;
  color: var(--text-muted);
  font-size: 11px;
}

.recommendation-footer :is(button, a) {
  border: 1px solid var(--brand-border);
  border-radius: 7px;
  padding: 6px 10px;
  background: var(--brand-tint);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.recommendation-main:hover strong {
  text-decoration: underline;
}

.recommendation-main:focus-visible,
.recommendation-footer :is(button, a):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.smart-place-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.smart-place-actions button,
.smart-place-actions a,
.trip-actions button,
.trip-point-actions button {
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--brand-tint);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.smart-place-actions a[hidden],
.trip-actions a[hidden],
.smart-map-status[hidden] { display: none; }

.recommendation-footer button:disabled,
.smart-place-actions button:disabled {
  opacity: .65;
  cursor: default;
}

.trip-point-added {
  color: #166534 !important;
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
}

.route-trip-update { margin: 14px 0; padding: 18px; border: 1px solid var(--primary); border-radius: 14px; background: linear-gradient(130deg, var(--primary), var(--brand-dark)); color: #fff; box-shadow: 0 8px 20px var(--primary-glow); }
.route-trip-update[hidden] { display: none; }
.route-trip-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.route-trip-icon { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid #ffffff3b; border-radius: 9px; background: #ffffff17; font-size: 14px; }
.route-trip-heading > strong { flex: 1; font-size: 14px; line-height: 1.5; font-weight: 800; }
.route-trip-count { flex-shrink: 0; padding: 4px 8px; border: 1px solid #a8e8d45c; border-radius: 20px; background: #c0fce322; color: #dcfff0; font-size: 10px; font-weight: 800; }
.route-trip-update p { margin: 0 0 14px; color: var(--brand-tint-strong); font-size: 11px; line-height: 1.7; }
.route-trip-stops { display: grid; gap: 9px; padding: 13px 0; margin: 0 0 14px; list-style: none; border-top: 1px solid #ffffff26; border-bottom: 1px solid #ffffff26; }
.route-trip-stops li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.route-trip-stop-number { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px; background: #fff; color: var(--primary); font-size: 11px; font-weight: 800; }
.route-trip-stops strong { color: #fff; font-size: 12px; line-height: 1.6; font-weight: 650; overflow-wrap: anywhere; }
.route-trip-update button { width: 100%; padding: 11px; border: 1px solid #fff; border-radius: 9px; background: #fff; color: var(--primary-hover); font-size: 12px; font-weight: 800; box-shadow: 0 3px 8px var(--primary-glow); transition: background .2s; }
.route-trip-update button:hover { background: var(--brand-tint); }
.route-trip-update button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.route-trip-update button[hidden] { display: none; }

.route-steps-toggle {
  width: 100%;
  gap: 10px;
  margin: 14px 0 12px;
  padding: 14px 12px;
  border: 1.5px solid var(--brand-border);
  border-left: 5px solid var(--primary);
  border-radius: 12px;
  background: linear-gradient(110deg, var(--brand-tint-strong), var(--brand-tint));
  color: var(--primary-hover);
  text-align: left;
  box-shadow: 0 4px 12px var(--primary-light);
}

.route-steps-toggle:hover,
.route-steps-toggle.expanded {
  border-color: var(--brand-border-strong);
  background: var(--brand-tint-strong);
}

.route-steps-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.route-steps-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--primary); color: #fff; font-size: 17px; }
.route-steps-copy { display: grid; gap: 4px; flex: 1; min-width: 0; }
.route-steps-copy strong { font-size: 13px; line-height: 1.5; font-weight: 800; }
.route-steps-copy small { color: var(--text-muted); font-size: 10px; line-height: 1.5; font-weight: 500; }
.route-steps-badge { flex-shrink: 0; padding: 5px 8px; border: 1px solid var(--brand-border); border-radius: 8px; background: #fff; color: var(--primary); font-size: 11px; font-weight: 800; }
.route-steps-toggle .toggle-arrow { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: #ffffffb3; color: var(--primary); font-size: 10px; }
.route-steps-list { max-height: 280px; padding: 10px; border: 1px solid var(--brand-border); border-radius: 10px; background: var(--brand-tint); }

@media (max-width: 380px) {
  .route-steps-toggle { gap: 7px; padding: 12px 8px; }
  .route-steps-copy strong { font-size: 12px; }
  .route-steps-copy small { font-size: 9px; }
  .route-steps-icon { width: 30px; height: 32px; font-size: 14px; }
  .route-steps-badge { padding: 4px 6px; font-size: 10px; }
}

.trip-route-stop-marker {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.place-distance {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.place-card-meta-row { flex-wrap: wrap; }

.trip-planner {
  width: min(920px, calc(100vw - 40px));
  max-height: min(880px, calc(100dvh - 48px));
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  color: var(--text-main);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .27);
}

.trip-planner[open] { display: flex; flex-direction: column; }
.trip-planner::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(5px); }

.trip-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 26px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(110deg, var(--brand-tint), #fff 75%);
}

.trip-heading { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.trip-heading-icon { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; background: var(--primary); color: #fff; font-size: 21px; box-shadow: 0 6px 14px var(--primary-glow); }
.trip-eyebrow { display: block; margin-bottom: 5px; color: var(--primary); font-size: 9px; font-weight: 800; letter-spacing: 1.5px; }
.trip-header h2 { margin: 0 0 5px; font-size: 23px; font-weight: 800; letter-spacing: -.6px; }
.trip-header p { margin: 0; font-size: 11px; line-height: 1.6; color: var(--text-muted); }
.trip-selection-count { flex-shrink: 0; padding: 6px 10px; border: 1px solid var(--brand-border); border-radius: 20px; color: var(--primary); background: var(--brand-tint); font-size: 11px; font-weight: 700; }
.trip-header > button { flex-shrink: 0; width: 34px; height: 34px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #64748b; }
.trip-header > button:hover { color: var(--primary); background: var(--brand-tint); }
.trip-content { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; min-height: 0; padding: 22px 26px; overflow-y: auto; overscroll-behavior: contain; }
.trip-content:has(> .place-recommendations[hidden]) { grid-template-columns: minmax(0, 1fr); }
.trip-plan-main { min-width: 0; }
.trip-overview { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 20px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--brand-tint); }
.trip-overview-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--brand-tint-strong); color: var(--primary); }
.trip-overview > div > span { font-size: 9px; font-weight: 800; letter-spacing: .9px; color: var(--text-muted); }
.trip-overview .trip-summary { margin: 4px 0 0; color: var(--text-main); font-size: 12px; line-height: 1.6; }
.trip-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.trip-list-heading h3 { margin: 0; font-size: 13px; font-weight: 800; }
.trip-list-heading > span { font-size: 9px; color: var(--text-muted); }
.trip-points { display: grid; gap: 9px; padding: 0; margin: 0 0 18px; list-style: none; }
.trip-points li { display: grid; grid-template-columns: 26px minmax(0, 1fr) 56px; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border-color); border-radius: 12px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.trip-points li:hover { border-color: var(--brand-border); box-shadow: 0 3px 12px var(--primary-light); }
.trip-stop-number { display: grid; place-items: center; width: 26px; height: 30px; border-radius: 8px; background: var(--brand-tint); color: var(--primary); font-size: 12px; font-weight: 800; }
.trip-stop-main { display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; padding: 0; background: transparent; text-align: left; cursor: pointer; }
.trip-stop-main img { flex-shrink: 0; width: 52px; height: 56px; object-fit: cover; border-radius: 8px; background: #f1f5f9; }
.trip-stop-info { display: grid; min-width: 0; gap: 5px; }
.trip-points strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.5; color: var(--text-main); font-weight: 700; }
.trip-stop-main:hover strong { color: var(--primary); }
.trip-stop-info > span { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 10px; color: var(--text-muted); }
.trip-point-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0; }
.trip-point-actions button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid var(--border-color); border-radius: 6px; background: #f8fafc; color: var(--text-muted); font-size: 10px; }
.trip-point-actions button:hover:not(:disabled) { border-color: var(--brand-border); color: var(--primary); background: var(--brand-tint); }
.trip-point-actions .trip-remove-point { grid-column: 1 / -1; width: 100%; height: 22px; color: #b57d86; background: #fff; border-color: transparent; }
.trip-point-actions .trip-remove-point:hover { background: #fff1f2 !important; border-color: #fecdd3 !important; color: #be123c !important; }
.trip-transport { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 10px; font-size: 11px; font-weight: 700; }
.trip-transport > span { color: var(--text-muted); }
.trip-transport i { margin-right: 5px; color: var(--primary); }
.trip-transport select { width: auto; min-width: 106px; border: 1px solid var(--border-color); border-radius: 7px; padding: 7px 9px; background: #fff; color: var(--text-main); }
.trip-summary { margin: 12px 0 8px; font-size: 12px; font-weight: 600; color: var(--primary); }
#trip-feedback:empty { display: none; }
.trip-note { margin: 12px 0 0; font-size: 10px; line-height: 1.8; color: var(--text-muted); }
.trip-note i { margin-right: 4px; }
.trip-content > .place-recommendations { min-width: 0; margin: 0; padding: 0 0 0 20px; border-top: 0; border-left: 1px solid var(--border-color); }
.trip-suggestions-label { display: block; margin-bottom: 10px; font-size: 9px; font-weight: 800; letter-spacing: 1.2px; color: var(--primary); }
.trip-content .place-recommendations h4 { font-size: 14px; }
.trip-content .place-recommendations > p { font-size: 10px; }
.trip-content .recommendation-card { background: var(--brand-tint); border-color: var(--border-color); }
.trip-content .recommendation-main img { width: 48px; height: 48px; }
.trip-content .recommendation-info strong { font-size: 11px; }
.trip-content .recommendation-info > span { font-size: 10px; }
.trip-content .recommendation-footer { gap: 6px; }
.trip-content .recommendation-footer :is(button, a) { padding: 5px 7px; font-size: 10px; }
.trip-content .recommendation-footer small { font-size: 10px; }
.trip-actions { display: grid; gap: 12px; flex-shrink: 0; padding: 14px 26px 20px; border-top: 1px solid var(--border-color); background: #fff; box-shadow: 0 -8px 24px rgba(0, 0, 0, .02); }
.trip-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.trip-tools button { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 6px 8px; background: var(--brand-tint); color: var(--text-muted); font-size: 11px; }
.trip-tools #trip-clear { margin-left: auto; background: transparent; color: #b07b85; }
.trip-navigation { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 10px; }
.trip-navigation #trip-show-route { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px; border: 1px solid var(--primary); border-radius: 10px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; box-shadow: 0 4px 10px var(--primary-glow); }
.trip-navigation #trip-show-route > i:last-child { margin-left: auto; }
.trip-navigation #trip-show-route > i:first-child { margin-right: auto; }
.trip-navigation a { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--brand-border); border-radius: 10px; padding: 12px; color: var(--primary); font-size: 12px; font-weight: 700; text-decoration: none; }
.trip-planner button:disabled { opacity: .32; cursor: default; }
.trip-planner .trip-navigation button:disabled { box-shadow: none; }
.trip-empty { padding: 24px 16px; margin-bottom: 16px; border: 1px dashed var(--brand-border); border-radius: 12px; background: var(--brand-tint); text-align: center; }
.trip-empty > i { display: block; margin-bottom: 12px; color: var(--primary); font-size: 30px; }
.trip-empty strong { display: block; font-size: 14px; color: var(--text-main); }
.trip-empty p { margin: 10px auto 16px; max-width: 320px; color: var(--text-muted); font-size: 12px; line-height: 1.8; }
.trip-empty button { padding: 9px 12px; border: 1px solid var(--brand-border); border-radius: 8px; background: var(--brand-tint); color: var(--primary); font-size: 12px; font-weight: 700; }
.trip-empty[hidden], .trip-content > .place-recommendations[hidden] { display: none; }
.trip-plan-main:has(.trip-empty:not([hidden])) .trip-list-heading,
.trip-plan-main:has(.trip-empty:not([hidden])) .trip-overview { display: none; }
.trip-planner :focus-visible, .smart-place-actions :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.smart-map-status {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100001;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--brand-dark);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  line-height: 1.6;
  pointer-events: none;
}

.visitor-location {
  position: absolute;
  right: 60px;
  bottom: 24px;
  z-index: 1220;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  width: min(340px, calc(100% - 32px));
  padding: 13px;
  border: 1px solid var(--brand-border);
  border-radius: 14px;
  background: #fff;
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
}
.visitor-location[hidden],
.map-app-wrapper:has(.route-panel.show, .place-detail-modal.show) .visitor-location { display: none; }
.visitor-location-icon {
  display: grid;
  place-items: center;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-tint);
  color: var(--primary);
}
.visitor-location h2 { margin: 0 0 4px; font-size: 14px; font-weight: 800; }
.visitor-location p { margin: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#visitor-location-coordinates { margin-top: 4px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
#visitor-location-gps {
  margin-top: 8px;
  padding: 6px 11px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
#visitor-location-gps:disabled { opacity: .65; }
.visitor-location-close {
  align-self: start;
  padding: 3px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
}
.visitor-location-close:hover { background: var(--brand-tint); color: var(--primary); }
@media (max-width: 768px) {
  .visitor-location { top: 118px; right: 58px; bottom: auto; left: 12px; width: auto; }
}

/* A wider destination sheet with a clear hierarchy and a fixed action bar. */
#place-detail-modal {
  position: fixed;
  top: 20px;
  right: 24px;
  bottom: 20px;
  left: auto;
  width: min(820px, calc(100vw - 48px));
  max-width: none;
  height: auto;
  max-height: none;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 70px rgba(0, 0, 0, .24);
  z-index: 2200;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(calc(100% + 48px));
  transition: transform .3s ease, visibility .3s;
}

#place-detail-modal.show { visibility: visible; pointer-events: auto; transform: translateX(0); }
#place-detail-modal .btn-close-detail { top: 18px; right: 18px; width: 38px; height: 38px; border: 1px solid #ffffff66; background: rgba(0, 0, 0, .46); backdrop-filter: blur(8px); }
#place-detail-modal .detail-hero-banner { height: 260px; flex-shrink: 0; }
#place-detail-modal .detail-hero-banner img { object-position: center 45%; }
#place-detail-modal .detail-hero-overlay { padding: 26px 30px; background: linear-gradient(180deg, rgba(36, 10, 10, .06) 10%, rgba(36, 10, 10, .33) 45%, rgba(36, 10, 10, .93) 100%); }
#place-detail-modal .detail-category-tag { margin-bottom: 10px; padding: 5px 12px; font-size: 10px; border: 1px solid #ffffff40; }
#place-detail-modal .detail-hero-title { max-width: 680px; margin-bottom: 10px; font-size: 27px; line-height: 1.35; letter-spacing: -.5px; text-wrap: balance; }
#place-detail-modal .detail-hero-rating { flex-wrap: wrap; gap: 6px; font-size: 13px; }
#place-detail-modal .detail-body-scroll { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; min-height: 0; padding: 22px 30px 28px; overscroll-behavior: contain; align-content: start; }
#place-detail-modal .detail-body-scroll > * { min-width: 0; }
#place-detail-modal .smart-place-actions,
#place-detail-modal .detail-info-grid,
#place-detail-modal .detail-narration,
#place-detail-modal .detail-weather-card,
#place-detail-modal .detail-story-section,
#place-detail-modal .detail-sources,
#place-detail-modal .place-recommendations { grid-column: 1 / -1; }
#detail-back-destination {
  grid-column: 1 / -1;
  justify-self: start;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
#place-detail-modal .smart-place-actions { gap: 8px; margin: 0; padding-bottom: 18px; border-bottom: 1px solid var(--border-color); }
#place-detail-modal .smart-place-actions button,
#place-detail-modal .smart-place-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-color: var(--brand-border); border-radius: 9px; font-size: 11px; }
#place-detail-modal .smart-place-actions a[hidden] { display: none; }
#place-detail-modal .detail-info-grid { display: flex; gap: 12px; }
#place-detail-modal .detail-info-row {
  flex: 1;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
}
#place-detail-modal .detail-address-row { flex: 2; }
.detail-info-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-tint-strong);
}
#place-detail-modal .detail-info-row i { margin: 0; color: var(--primary); font-size: 15px; }
.detail-info-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.detail-info-text strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
#detail-address { font-size: 14px; font-weight: 700; }
.detail-copy-address {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  border: 1px solid var(--brand-border);
  border-radius: 9px;
  background: var(--brand-tint);
  cursor: pointer;
}
.detail-copy-address:hover { background: var(--brand-tint-strong); }

#place-detail-modal .detail-sources {
  color: var(--text-muted);
  font-size: 12px;
}
.detail-sources summary { cursor: pointer; }
.detail-data-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 9px;
}
.detail-data-sources a { color: var(--primary); }
.detail-data-sources small { flex-basis: 100%; }
#place-detail-modal .detail-gallery {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}
#detail-desc blockquote { margin: 0; }
#place-detail-modal .detail-story-section {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fff;
}
#place-detail-modal .detail-description-p {
  font-size: 14px;
  line-height: 1.65;
  text-align: start;
}
#place-detail-modal #detail-desc h5 {
  margin: 14px 0 4px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}
#place-detail-modal #detail-desc p { margin: 0 0 9px; }
#place-detail-modal #detail-desc h5:first-child { margin-top: 0; }
.detail-story-lead { color: var(--text-main); font-weight: 600; }
#place-detail-modal #detail-description-source { display: inline-block; margin-top: 6px; }
#place-detail-modal #detail-description-source[hidden] { display: none; }
.detail-gallery-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.detail-gallery-images a { flex: 1 1 140px; min-width: 0; border-radius: 8px; }
.detail-gallery-images a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.detail-gallery-images img { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: 360px; object-fit: cover; border-radius: inherit; }
.detail-gallery-images a:only-child img { aspect-ratio: 16 / 9; }
.place-card-img-wrap[data-place-category="cuisine"]:has(img[src="/images/place-image-unavailable.svg"]) {
  background: var(--brand-tint-strong);
}
[data-place-category="cuisine"] > img[src="/images/place-image-unavailable.svg"] { visibility: hidden; }
.place-card-img-wrap[data-place-category="cuisine"] > img[src="/images/place-image-unavailable.svg"] + .place-card-category-tag {
  inset: 0;
  margin: auto;
  width: 38px;
  height: 38px;
  font-size: 17px;
  box-shadow: none;
}
.detail-hero-banner[data-place-category="cuisine"]:has(img[src="/images/place-image-unavailable.svg"]) {
  background: linear-gradient(145deg, var(--brand-tint-strong), var(--primary));
}
.detail-contact-links > a { display: block; overflow-wrap: anywhere; color: var(--primary); }
.detail-contact-links > a[hidden] { display: none; }
#place-detail-modal .detail-weather-card { margin: 0; padding: 18px 20px; border: 1px solid var(--brand-border); border-radius: 14px; background: linear-gradient(120deg, var(--brand-tint), var(--brand-tint-strong)); box-shadow: none; }
#place-detail-modal .detail-weather-header { flex-wrap: wrap; gap: 8px; }
#place-detail-modal .weather-header-title { font-size: 12px; }
#place-detail-modal .detail-weather-body { gap: 20px; margin: 18px 0; }
#place-detail-modal .detail-weather-temp-wrap { flex: 1; min-width: 0; gap: 14px; }
#place-detail-modal .weather-temp-icon { font-size: 36px; }
#place-detail-modal .weather-temp-num { font-size: 34px; letter-spacing: -1px; }
#place-detail-modal .weather-temp-sub { font-size: 11px; line-height: 1.6; font-weight: 500; }
#place-detail-modal .detail-weather-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; flex: 1; }
#place-detail-modal .weather-metric-item { align-items: flex-start; justify-content: center; min-width: 0; padding: 12px; border-color: var(--brand-border); border-radius: 10px; }
#place-detail-modal .weather-metric-item small { font-size: 10px; }
#place-detail-modal .weather-metric-item strong { font-size: 12px; line-height: 1.5; margin-top: 6px; }
#place-detail-modal .detail-weather-tip { padding: 10px 12px; font-size: 11px; line-height: 1.7; }
#place-detail-modal .detail-section-heading { align-items: flex-start; gap: 8px; margin-bottom: 13px; font-size: 14px; line-height: 1.5; color: var(--text-main); }
#place-detail-modal .detail-section-heading i { margin-top: 3px; }
#place-detail-modal .detail-description-p { text-align: left; font-size: 13px; line-height: 1.9; color: var(--text-muted); }
#place-detail-modal .detail-highlights-list { gap: 10px; }
#place-detail-modal .detail-highlights-list li { align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--brand-tint); font-size: 12px; line-height: 1.8; color: var(--text-muted); }
#place-detail-modal .detail-highlights-list li i { flex-shrink: 0; margin-top: 5px; }
#place-detail-modal .place-recommendations { margin: 0; padding-top: 22px; }
#place-detail-modal .recommendation-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#place-detail-modal .recommendation-card { display: flex; flex-direction: column; padding: 9px; border-radius: 12px; background: #fff; }
#place-detail-modal .recommendation-main { flex-direction: column; align-items: stretch; gap: 10px; }
#place-detail-modal .recommendation-main img { width: 100%; height: 110px; border-radius: 8px; }
#place-detail-modal .recommendation-info { gap: 6px; }
#place-detail-modal .recommendation-info strong { font-size: 11px; }
#place-detail-modal .recommendation-info > span { font-size: 10px; }
#place-detail-modal .recommendation-footer { margin-top: auto; padding-top: 12px; gap: 6px; }
#place-detail-modal .recommendation-footer :is(button, a) { padding: 5px 7px; font-size: 10px; }
#place-detail-modal .detail-actions-bar { flex-shrink: 0; gap: 12px; padding: 16px 30px; border-top: 1px solid var(--border-color); background: #fff; box-shadow: 0 -8px 24px rgba(0, 0, 0, .02); }
#place-detail-modal .btn-detail-action { height: 46px; gap: 9px; border-radius: 10px; font-size: 13px; }
#detail-external-link {
  border: 1px solid var(--brand-border-strong);
  background: var(--brand-tint);
  color: var(--primary);
  padding: 0 8px;
  text-align: center;
  text-decoration: none;
}
#detail-external-link:hover { background: var(--brand-tint-strong); }
#place-detail-modal .btn-detail-action.secondary { border-color: #d3d1ff; background: #f7f6ff; color: #6657cc; }
#place-detail-modal :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.detail-narration { padding: 18px; border: 1px solid var(--brand-border); border-radius: 14px; background: var(--brand-tint); }
.detail-narration[hidden] { display: none; }
.detail-narration-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.detail-narration-icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 11px; background: var(--brand-tint-strong); color: var(--primary); font-size: 18px; }
.detail-narration-heading > div { flex: 1; min-width: 0; }
.detail-narration h3 { margin: 0 0 5px; font-size: 14px; color: var(--text-main); font-weight: 800; }
.detail-narration p { margin: 0; font-size: 11px; color: var(--text-muted); line-height: 1.6; }
.detail-narration-play { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; min-height: 40px; padding: 10px 14px; border: 0; border-radius: 9px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.detail-narration-play:hover { background: var(--primary-hover); }
.detail-narration audio { display: block; width: 100%; height: 40px; }

@media (max-width: 640px) {
  .detail-narration-heading { flex-wrap: wrap; gap: 10px; }
  .detail-narration-play { width: 100%; }
  .detail-narration { padding: 14px; }
  #place-detail-modal { inset: 10px; width: auto; height: auto; border-radius: 18px; }
  #place-detail-modal .detail-hero-banner { height: clamp(200px, 30dvh, 250px); }
  #place-detail-modal .detail-hero-overlay { padding: 20px; }
  #place-detail-modal .detail-hero-title { font-size: 22px; }
  #place-detail-modal .detail-hero-rating { font-size: 12px; }
  #place-detail-modal .detail-hero-rating span { font-size: 11px; }
  #place-detail-modal .detail-body-scroll { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 18px; }
  #place-detail-modal .detail-info-grid { flex-direction: column; gap: 9px; }
  #place-detail-modal .detail-info-row { padding: 12px; font-size: 11px; gap: 8px; }
  #place-detail-modal .detail-info-row i { font-size: 13px; }
  #place-detail-modal .smart-place-actions { gap: 7px; padding-bottom: 16px; }
  #place-detail-modal .smart-place-actions button,
  #place-detail-modal .smart-place-actions a { flex: 1 1 calc(50% - 7px); padding: 9px; font-size: 11px; }
  #place-detail-modal .detail-weather-card { padding: 15px; }
  #place-detail-modal .detail-weather-body { flex-direction: column; align-items: stretch; gap: 14px; }
  #place-detail-modal .weather-temp-num { font-size: 30px; }
  #place-detail-modal .weather-temp-sub { max-width: none; }
  #place-detail-modal .detail-weather-metrics { gap: 8px; }
  #place-detail-modal .weather-metric-item { padding: 10px; }
  #place-detail-modal .recommendation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #place-detail-modal .detail-actions-bar { padding: 12px 18px; gap: 9px; }
  #place-detail-modal .btn-detail-action { font-size: 12px; height: 45px; gap: 6px; }
  #place-detail-modal .btn-close-detail { top: 12px; right: 12px; width: 34px; height: 34px; }
}

@media (max-width: 380px) {
  #place-detail-modal { inset: 6px; }
  #place-detail-modal .detail-hero-title { font-size: 20px; }
  #place-detail-modal .recommendation-list { grid-template-columns: 1fr; }
  #place-detail-modal .recommendation-main { flex-direction: row; align-items: center; }
  #place-detail-modal .recommendation-main img { width: 64px; height: 64px; }
  #place-detail-modal .detail-actions-bar { padding: 10px 12px; }
  #place-detail-modal .btn-detail-action { font-size: 11px; }
}

@media (max-width: 768px) {
  .trip-planner { width: calc(100vw - 20px); max-height: calc(100dvh - 28px); border-radius: 16px; }
  .trip-header { padding: 17px 16px; gap: 10px; }
  .trip-heading { gap: 10px; }
  .trip-heading-icon { width: 38px; height: 38px; border-radius: 11px; font-size: 17px; }
  .trip-header h2 { font-size: 19px; }
  .trip-header p { font-size: 10px; }
  .trip-eyebrow { font-size: 8px; letter-spacing: .8px; }
  .trip-selection-count { padding: 5px 7px; font-size: 10px; }
  .trip-content { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 16px; }
  .trip-content > .place-recommendations { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--border-color); }
  .trip-content .recommendation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trip-content .recommendation-main { flex-direction: column; align-items: flex-start; }
  .trip-content .recommendation-main img { width: 100%; height: 80px; }
  .trip-actions { padding: 12px 16px 16px; gap: 10px; }
  .trip-navigation { grid-template-columns: minmax(0, 1fr) 132px; gap: 8px; }
  .trip-navigation #trip-show-route { font-size: 11px; gap: 5px; }
  .trip-navigation a { font-size: 11px; }
  .smart-map-status { bottom: 82px; }
}

@media (max-width: 440px) {
  .trip-heading-icon { display: none; }
  .trip-header h2 { font-size: 18px; }
  .trip-header p { max-width: 220px; }
  .trip-header > button { width: 30px; height: 30px; }
  .trip-selection-count { align-self: flex-start; margin-top: 8px; }
  .trip-points li { grid-template-columns: 24px minmax(0, 1fr) 26px; gap: 8px; padding: 9px; }
  .trip-stop-main { gap: 8px; }
  .trip-stop-main img { width: 44px; height: 52px; }
  .trip-points strong { font-size: 11px; }
  .trip-point-actions { grid-template-columns: 1fr; gap: 3px; }
  .trip-point-actions button, .trip-point-actions .trip-remove-point { width: 24px; height: 22px; }
  .trip-tools { gap: 3px; }
  .trip-tools button { font-size: 10px; padding: 6px; }
  .trip-navigation { grid-template-columns: 1fr; gap: 6px; }
  .trip-navigation a { padding: 8px; }
}

#place-detail-modal .destination-services {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--brand-tint);
}

.destination-services h3 {
  margin: 0 0 6px;
  color: var(--primary-hover);
  font-size: 16px;
  font-weight: 800;
}

.destination-services p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.destination-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 10px;
}

.destination-service-grid:not(:empty) {
  margin-top: 12px;
}

.destination-service-group {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--brand-border);
  border-radius: 9px;
  background: #fff;
}

.destination-service-group h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 6px;
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 800;
}

.destination-place-link {
  border-top: 1px solid var(--border-color);
  padding: 7px 0;
  font-size: 12px;
}

.destination-place-link {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border-width: 1px 0 0;
  border-style: solid;
  background: #fff;
  text-align: left;
  color: var(--text-main);
}

.destination-place-link small {
  flex-shrink: 0;
  color: var(--text-muted);
}

.destination-service-group button:hover {
  color: var(--primary);
  background: var(--brand-tint);
}

.detail-image-credit {
  color: var(--text-muted);
  font-size: 11px;
}

.support-filter-chip:not(.active) {
  border-color: var(--brand-border);
}

.has-destination-map {
  --destination-sheet-height: 54dvh;
}

.has-destination-map #sidebar-explorer,
.has-destination-map #sidebar-toggle-btn,
.has-destination-map #mobile-map-toggle-btn,
.has-destination-map .custom-map-marker,
.has-destination-map .mapboxgl-popup:has(.popup-card) {
  visibility: hidden;
}

.has-destination-map #place-detail-modal {
  top: 118px;
  right: 12px;
  bottom: 12px;
  width: min(52vw, 760px);
}

.has-destination-map .map-floating-controls {
  left: 12px;
  right: auto;
  top: 146px;
}

.has-destination-map .mapboxgl-ctrl-bottom-right {
  right: auto;
  left: 12px;
  bottom: 64px;
}

[data-service="destination"] { --destination-pin-color: var(--primary); }
[data-service="hotel"] { --destination-pin-color: #235a9d; }
[data-service="restaurant"],
[data-service="cuisine"] { --destination-pin-color: #a44b0d; }

.destination-map-pin {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  padding: 0;
  color: #fff;
  background: var(--destination-pin-color);
  box-shadow: 0 2px 7px #0005;
  font-size: 15px;
  cursor: pointer;
}

.destination-map-pin[data-service="destination"] {
  width: 42px;
  height: 42px;
  z-index: 2;
  font-size: 20px;
}

.destination-map-pin:hover,
.destination-map-pin:focus-visible {
  z-index: 3;
  outline: 2px solid var(--destination-pin-color);
  outline-offset: 2px;
}

#destination-map-legend {
  position: absolute;
  z-index: 4;
  left: 12px;
  bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  max-width: min(396px, 44vw);
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 11px;
  font-weight: 700;
}

#destination-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#destination-map-legend[hidden],
#destination-map-legend [hidden] {
  display: none;
}

#destination-map-legend i {
  color: var(--destination-pin-color);
}

@media (max-width: 768px) {
  .has-destination-map #place-detail-modal {
    inset: auto 0 0;
    width: 100%;
    height: var(--destination-sheet-height);
    border-radius: 18px 18px 0 0;
  }

  .has-destination-map #place-detail-modal .detail-hero-banner {
    height: clamp(105px, 16dvh, 155px);
  }

  .has-destination-map .map-floating-controls {
    visibility: hidden;
  }

  .has-destination-map .mapboxgl-ctrl-bottom-right {
    left: 4px;
    bottom: calc(var(--destination-sheet-height) + 52px);
  }

  #destination-map-legend {
    bottom: calc(var(--destination-sheet-height) + 8px);
    max-width: calc(100vw - 24px);
  }

  .destination-map-pin {
    width: 31px;
    height: 31px;
    font-size: 13px;
  }

  .destination-map-pin[data-service="destination"] {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }
}

.route-guidance { display: grid; gap: 10px; }
.route-guidance[hidden], .route-guidance [hidden], #route-suggestions[hidden] { display: none; }
.route-address-only > :not(.route-panel-header, #route-address-fallback, #route-suggestions, .route-nearby-section),
.route-address-only .route-header-actions .btn-route-action { display: none; }
#route-address-fallback p { margin: 0; color: var(--text-muted); font-size: 13px; }
.route-guidance details {
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--brand-tint);
}
.route-guidance summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--primary-hover);
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}
.route-guidance summary::-webkit-details-marker { display: none; }
.route-guidance summary .fa-signs-post {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #fff;
}
.route-guidance details[open] .fa-chevron-down { transform: rotate(180deg); }
.route-guidance summary small {
  padding: 3px 7px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  background: #fff;
  white-space: nowrap;
}
#route-step-list {
  margin: 0;
  padding: 6px 12px 10px;
  border-top: 1px solid var(--brand-border);
  border-radius: 0 0 11px 11px;
  background: #fff;
  list-style: none;
  color: var(--text-main);
  font-size: 12px;
}
#route-step-list li {
  display: grid;
  grid-template-columns: 19px 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 5px;
}
#route-step-list li + li { border-top: 1px solid var(--border-color); }
.route-step-number {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.route-step-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f4f6f9;
  color: var(--primary-hover);
  font-size: 13px;
}
.route-step-bearing-left { transform: rotate(-45deg); }
.route-step-bearing-right { transform: rotate(45deg); }
.route-step-instruction {
  min-width: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#route-step-list small {
  justify-self: end;
  padding: 3px 6px;
  border-radius: 6px;
  background: #f4f6f9;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#route-step-list .route-step-departure .route-step-icon { background: var(--brand-tint); }
#route-step-list .route-step-arrival {
  margin-top: 3px;
  border-top-color: transparent;
  border-radius: 8px;
  background: var(--brand-tint);
}
#route-step-list .route-step-arrival .route-step-icon {
  background: var(--primary);
  color: #fff;
}
.route-step-arrival .route-step-instruction,
.route-step-departure .route-step-instruction {
  color: var(--primary-hover);
  font-weight: 800;
}
#route-google-maps, #route-address-google-maps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
#route-google-maps:hover, #route-address-google-maps:hover { background: var(--primary-hover); }

.route-panel #route-suggestions {
  border-color: var(--brand-border);
  background: var(--brand-tint);
}

.route-suggestions-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.route-suggestions-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #fff;
  background: var(--primary);
}

.route-suggestions-heading h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.route-suggestions-heading small,
.route-suggestion-filters small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
}

.route-suggestions-range {
  display: grid;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.route-suggestions-range select {
  min-width: 74px;
  min-height: 32px;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  padding: 3px 6px;
  background: #fff;
  color: var(--text-main);
  font-size: 11px;
}

.route-suggestion-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 8px;
}

.route-suggestion-filters button[hidden] { display: none; }

.route-suggestion-filters button {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  min-height: 38px;
  border: 1px solid var(--brand-border);
  border-radius: 7px;
  padding: 5px 8px;
  background: #fff;
  color: var(--text-main);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

#route-suggestions :is(select, button):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.route-suggestion-filters button[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

#route-suggestions-status {
  margin: 7px 0;
  color: var(--text-muted);
  font-size: 10px;
}

#route-suggestions-source {
  display: inline-block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 10px;
}

#route-suggestions-source[hidden], #route-nearby-status[hidden] { display: none; }

.route-suggestion-list {
  display: grid;
  gap: 5px;
  max-height: clamp(210px, 37dvh, 360px);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
}

[data-route-service] { --route-pin-color: var(--primary); }
[data-route-service="hotel"] { --route-pin-color: #235a9d; }
[data-route-service="restaurant"],
[data-route-service="cuisine"] { --route-pin-color: #a44b0d; }

.route-suggestion-row {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: 6px;
  text-align: left;
  background: #fff;
  color: var(--text-main);
  font-size: 11px;
  cursor: pointer;
}

.route-suggestion-row:hover,
.route-suggestion-row.is-focused {
  border-color: var(--route-pin-color);
}

.route-suggestion-number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--route-pin-color);
  color: #fff;
  font-weight: 800;
}

.route-suggestion-row-info {
  display: grid;
  gap: 2px;
  flex: 1;
  line-height: 1.35;
}

.route-suggestion-row-info small {
  color: var(--text-muted);
  font-size: 10px;
}

.route-suggestion-pin {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  z-index: 3;
  border: 2px solid #fff;
  border-radius: 50%;
  padding: 0;
  background: var(--route-pin-color);
  color: #fff;
  box-shadow: 0 2px 7px #0006;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.route-suggestion-pin i {
  position: absolute;
  top: -5px;
  right: -6px;
  border: 1px solid var(--route-pin-color);
  border-radius: 50%;
  padding: 2px;
  background: #fff;
  color: var(--route-pin-color);
  font-size: 8px;
}

.route-suggestion-pin:hover,
.route-suggestion-pin.is-focused,
.route-suggestion-pin:focus-visible {
  z-index: 4;
  outline: 2px solid var(--route-pin-color);
  outline-offset: 2px;
}

.has-route-suggestions .nav-marker-pulse,
.has-route-suggestions .nav-marker-dest,
.has-route-suggestions .trip-route-stop-marker {
  z-index: 5;
}

.has-route-suggestions .custom-map-marker {
  opacity: .3;
}

.has-destination-map .route-suggestion-pin {
  visibility: hidden;
}

.route-suggestion-map-popup .mapboxgl-popup-content {
  border-radius: 16px !important;
}

.route-suggestion-popup {
  width: min(308px, calc(100vw - 32px));
  max-height: min(440px, 62dvh);
  overflow-y: auto;
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.5;
}

.route-suggestion-popup-photo {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
}

.route-suggestion-popup-body { padding: 13px 15px 15px; }

.route-suggestion-popup-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 9px;
  margin-bottom: 7px;
}

.route-suggestion-popup-body:first-child .route-suggestion-popup-meta {
  min-height: 27px;
  padding-right: 29px;
}

.route-suggestion-popup-category {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand-tint-strong);
  color: var(--primary-hover);
  font-size: 11px;
  font-weight: 700;
}

.route-suggestion-popup-distance { color: var(--text-muted); font-size: 11px; }

.route-suggestion-popup h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.route-suggestion-popup-address {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.route-suggestion-popup-address i { color: var(--primary); }

.route-suggestion-popup-summary {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
}

.route-suggestion-popup-facts {
  margin: 8px 0 0;
  padding: 6px 9px;
  list-style: none;
  border-radius: 7px;
  background: var(--brand-tint);
  overflow-wrap: anywhere;
}

.route-suggestion-popup-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border-color);
}

.route-suggestion-popup-actions :is(button, a) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 5px;
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  background: #fff;
  color: var(--primary-hover);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.route-suggestion-popup-actions a { background: var(--primary); border-color: var(--primary); color: #fff; }
.route-suggestion-popup-actions button:hover { background: var(--brand-tint); }
.route-suggestion-popup-actions a:hover { background: var(--primary-hover); color: #fff; }
.route-suggestion-map-popup :is(button, a):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@media (max-width: 768px) {
  .route-suggestion-list { max-height: none; overflow: visible; }
  .route-suggestion-pin { width: 32px; height: 32px; }
}

.destination-service-popup .route-endpoint-info p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.destination-service-popup .route-endpoint-info a {
  display: inline-block;
  margin-top: 6px;
  color: var(--primary-hover);
  font-weight: 700;
}
