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;
}


.exploring-transit .sidebar-controls {
  display: none;
}

.transit-catalog {
  display: block;
  padding: 16px 18px;
  color: var(--text-main);
  font-size: 13px;
}

.transit-catalog[hidden] {
  display: none;
}

#place-detail-modal [hidden] {
  display: none !important;
}

.transit-catalog label {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

.transit-catalog select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--brand-border);
  border-radius: 9px;
  padding: 7px 10px;
  color: var(--text-main);
  background: #fff;
}

#transit-status {
  margin: 7px 0 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.transit-catalog details {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  background: #fff;
}

.transit-catalog summary {
  color: var(--primary-hover);
  cursor: pointer;
  font-weight: 750;
}

#transit-stop-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

#transit-stop-list button {
  width: 100%;
  padding: 7px 3px;
  border: 0;
  border-top: 1px solid var(--border-color);
  background: transparent;
  text-align: left;
  color: var(--text-main);
}

#transit-stop-list button:hover {
  color: var(--primary-hover);
  background: var(--brand-tint);
}

.transit-sources {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.6;
}

.transit-sources a {
  color: var(--primary-hover);
}

#transit-operator {
  font-size: 12px;
  font-weight: 750;
}

.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: 48px;
  height: 48px;
}

@media (max-width: 768px) {
  .brand-logo-img {
    width: 38px;
    height: 38px;
  }
}

/* Directions occupy the existing explorer instead of covering another map area. */
#sidebar-explorer > .route-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: inherit;
  background: #fff;
  box-shadow: none;
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: none;
  animation: none;
  z-index: 2;
}

#sidebar-explorer > .route-panel.show {
  display: flex;
}

#sidebar-explorer > .route-panel > * {
  flex-shrink: 0;
}

#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 button {
  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;
}

.recommendation-main:hover strong {
  text-decoration: underline;
}

.recommendation-main:focus-visible,
.recommendation-footer button: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; }

.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 button { 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;
}

/* 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 .place-recommendations { grid-column: 1 / -1; }
#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 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#place-detail-modal .detail-info-row { gap: 10px; padding: 16px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--brand-tint); font-size: 12px; line-height: 1.7; }
#place-detail-modal .detail-info-row > div { min-width: 0; }
#place-detail-modal .detail-info-row strong { display: block; margin-bottom: 3px; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); }
#place-detail-modal .detail-info-row i { margin-top: 3px; font-size: 16px; }
#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 button { 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; }
#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 { 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 .detail-info-grid { grid-template-columns: 1fr; }
  #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-stop,
.destination-place-link {
  border-top: 1px solid var(--border-color);
  padding: 7px 0;
  font-size: 12px;
}

#transit-return-destination {
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--brand-tint);
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 700;
}

.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);
}

#transit-destination-context {
  margin: 0 0 12px;
}

.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="cuisine"] { --destination-pin-color: #a44b0d; }
[data-service="bus"] { --destination-pin-color: #186862; }
[data-service="metro"] { --destination-pin-color: #6b4697; }

.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);
}

.destination-route-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.destination-route-options button {
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--brand-tint);
  color: var(--primary-hover);
  font-size: 12px;
  font-weight: 700;
}

@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-suggestions[hidden] { display: none; }

#route-suggestions {
  padding: 12px;
  border: 1px solid var(--brand-border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: var(--brand-tint);
}

.route-suggestions-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.route-suggestions-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--primary);
}

.route-suggestions-heading h4 {
  flex: 1;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.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;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 10px;
}

.route-suggestions-range select {
  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: 5px;
  margin: 11px 0 6px;
}

.route-suggestion-filters button {
  flex: 1 0 auto;
  min-height: 37px;
  border: 1px solid var(--brand-border);
  border-radius: 7px;
  padding: 4px 6px;
  background: #fff;
  color: var(--text-main);
  font-size: 10px;
  font-weight: 700;
}

.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-suggestion-list {
  display: grid;
  gap: 5px;
  max-height: 295px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
}

[data-route-service="hotel"] { --route-pin-color: #235a9d; }
[data-route-service="restaurant"],
[data-route-service="cuisine"] { --route-pin-color: #a44b0d; }
[data-route-service="bus"] { --route-pin-color: #186862; }
[data-route-service="metro"] { --route-pin-color: #6b4697; }

.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-popup {
  padding-right: 10px;
}

.route-suggestion-popup p {
  margin: 4px 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.route-suggestion-popup button,
.route-suggestion-popup a {
  display: inline-block;
  border: 1px solid var(--brand-border);
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--brand-tint);
  color: var(--primary-hover);
  font-weight: 700;
}

@media (max-width: 768px) {
  .route-suggestion-list { max-height: 235px; }
  .route-suggestion-pin { width: 32px; height: 32px; }
}

.destination-stop-label {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.destination-stop-label:hover,
.destination-place-link:hover {
  text-decoration: underline;
}

.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;
}


.transit-stop-pin {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 2px solid #fff;
  border-radius: 7px;
  padding: 0;
  background: var(--transit-stop-color);
  color: #fff;
  box-shadow: 0 1px 5px #0005;
  font-size: 13px;
  cursor: pointer;
}

.transit-stop-pin.is-emphasized {
  outline: 2px solid var(--transit-stop-color);
  outline-offset: 2px;
  z-index: 2;
}

.transit-stop-pin:hover,
.transit-stop-pin:focus-visible {
  z-index: 4;
  outline: 2px solid var(--transit-stop-color);
  outline-offset: 2px;
}

.transit-stop-name {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  width: max-content;
  max-width: min(170px, 42vw);
  transform: translateX(-50%);
  border: 1px solid var(--transit-stop-color);
  border-radius: 5px;
  padding: 2px 5px;
  background: #fff;
  color: var(--text-main);
  font: 700 10px/1.3 var(--font-sans);
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-sm);
}

.transit-stop-pin.label-below .transit-stop-name {
  top: calc(100% + 4px);
  bottom: auto;
}

@media (max-width: 768px) {
  .transit-stop-pin {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }
}
.map-language-button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  min-width: 38px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.map-language-button img {
  object-fit: cover;
  border-radius: 2px;
}

.map-language-button:hover {
  border-color: var(--brand-border-strong);
  background: var(--brand-tint);
}

.map-language-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
