.map-page {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, #faf8f4, #f5f5f4);
}

.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

/* Along route inputs live in #route-sidebar (opened via header “Along route” button). */

.map-route-intro {
  font-size: 0.8125rem;
  color: #57534e;
  line-height: 1.45;
  margin: 0 0 1rem 0;
}

.map-route-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.map-route-field--inline {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.map-route-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #44403c;
}

.map-route-optional {
  font-weight: 500;
  color: #a8a29e;
}

.map-dir-input {
  padding: 0.45rem 0.6rem;
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #1c1917;
  background: #fff;
}

.map-dir-input--block {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.map-dir-input:focus {
  outline: none;
  border-color: #0d9488;
}

.map-dir-radius {
  width: 4.5rem;
  padding: 0.4rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #d6d3d1;
  font-size: 0.8125rem;
}

.map-dir-btn {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #d6d3d1;
  background: #fff;
  color: #44403c;
}

.map-dir-btn:hover {
  background: #f5f5f4;
}

.map-dir-btn--block {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.map-dir-btn-primary {
  background: #292524;
  color: #fff;
  border-color: #292524;
}

.map-dir-btn-primary:hover {
  background: #44403c;
}

.map-dir-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.map-route-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.map-dir-status {
  margin: 0;
  font-size: 0.78rem;
  color: #57534e;
  line-height: 1.4;
}

.map-route-status {
  margin-top: 0.5rem !important;
}

.map-dir-status--error {
  color: #b91c1c;
}

.map-credits-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.map-user-menu-wrap {
  position: relative;
}

.map-user-menu-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #57534e;
  background: #f5f5f4;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  cursor: pointer;
}

.map-user-menu-btn:hover {
  color: #1c1917;
  background: #e7e5e4;
}

.map-user-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.25rem;
  min-width: 160px;
  padding: 0.25rem 0;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.map-user-menu-item,
.map-user-menu-item-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #1c1917;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.map-user-menu-item:hover,
.map-user-menu-item-btn:hover {
  background: #f5f5f4;
}

.map-user-menu-logout {
  border-top: 1px solid #e7e5e4;
  color: #57534e;
}

.map-search-wrap {
  position: relative;
  flex: 1;
  max-width: 280px;
  margin: 0 0.5rem;
}

.map-search-input {
  width: 100%;
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  background: #fff;
  color: #1c1917;
}

.map-search-input:focus {
  outline: none;
  border-color: #4a9eff;
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.map-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 200;
}

.map-search-dropdown[hidden] {
  display: none !important;
}

.map-search-item {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.9rem;
  color: #1c1917;
  background: none;
  border: none;
  border-bottom: 1px solid #f5f5f4;
  cursor: pointer;
}

.map-search-item:last-child {
  border-bottom: none;
}

.map-search-item:hover {
  background: #f5f5f4;
}

.map-search-item-subtext {
  font-size: 0.8rem;
  color: #78716c;
  margin-top: 0.15rem;
}

.map-back {
  color: #4a9eff;
  text-decoration: none;
  font-size: 0.95rem;
}

.map-back:hover {
  text-decoration: underline;
}

.map-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1c1917;
  flex: 1;
  text-align: center;
}

.map-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-verdict-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #57534e;
}

.map-verdict-select,
.map-filter-select {
  padding: 0.35rem 0.6rem;
  font-size: 0.875rem;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  background: #fff;
  color: #1c1917;
}

.map-nav-link {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #57534e;
  background: #fff;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  text-decoration: none;
}
.map-nav-link:hover {
  background: #f5f5f4;
  color: #1c1917;
}

.map-filters-btn,
.map-locate-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #57534e;
  background: #fff;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  cursor: pointer;
}

.map-filters-btn:hover,
.map-locate-btn:hover {
  background: #f5f5f4;
  color: #1c1917;
}

.map-filters-btn.map-filters-btn--active {
  background: #ecfdf5;
  border-color: #0d9488;
  color: #0f766e;
  font-weight: 600;
}

.map-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* Left sidebar - matches gluto-map */
.map-left-sidebar {
  width: 100%;
  max-width: 504px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.6);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  transition: max-width 0.28s ease, opacity 0.22s ease, border-color 0.2s ease;
}

.map-left-sidebar.map-left-sidebar--collapsed {
  max-width: 0;
  width: 0;
  min-width: 0;
  padding: 0;
  margin: 0;
  border-right-color: transparent;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.map-left-sidebar-open-btn {
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #57534e;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #d6d3d1;
  border-radius: 0 0.5rem 0.5rem 0;
  border-left: none;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  white-space: nowrap;
}

.map-left-sidebar-open-btn:hover {
  color: #1c1917;
  background: #fff;
  border-color: #0f766e;
  color: #0f766e;
}

.map-left-sidebar-open-btn[hidden] {
  display: none !important;
}

/* Map chat: show when panel minimized (mirrors Guide on the right / bottom on small screens) */
.map-chat-open-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  padding: 0.5rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #57534e;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #d6d3d1;
  border-radius: 0.5rem 0 0 0.5rem;
  border-right: none;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  white-space: nowrap;
}

.map-chat-open-btn:hover {
  color: #1c1917;
  background: #fff;
  border-color: #0f766e;
  color: #0f766e;
}

.map-chat-open-btn[hidden] {
  display: none !important;
}

.map-empty-guide-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e7e5e4;
}

.map-empty-toolbar-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #78716c;
}

.map-left-sidebar-icon-close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: #78716c;
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
  border-radius: 0.375rem;
  cursor: pointer;
}

.map-left-sidebar-icon-close:hover {
  color: #1c1917;
  background: #e7e5e4;
}

@media (max-width: 768px) {
  .map-left-sidebar {
    max-width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    bottom: auto;
    z-index: 5;
    max-height: 50vh;
    width: min(100vw, 504px) !important;
    transition: transform 0.28s ease, opacity 0.22s ease, box-shadow 0.2s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
  }

  .map-left-sidebar.map-left-sidebar--collapsed {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
    max-width: min(100vw, 504px);
    width: min(100vw, 504px) !important;
  }

  .map-left-sidebar:not(.map-left-sidebar--collapsed) {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .map-left-sidebar-open-btn {
    top: auto;
    bottom: 1rem;
    left: 0.5rem;
    transform: none;
    border-radius: 0.5rem;
    border: 1px solid #d6d3d1;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  }
}

.map-place-empty {
  padding: 2rem 1.5rem;
  text-align: center;
  color: #78716c;
  font-size: 0.95rem;
}

.map-empty-guide {
  max-width: 340px;
  margin: 0 auto;
  text-align: left;
}

.map-empty-icon {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.map-empty-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1c1917;
}

.map-empty-sub {
  margin: 0 0 1.25rem 0;
  font-size: 0.85rem;
  color: #78716c;
  line-height: 1.5;
}

.map-empty-steps {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.map-empty-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: #44403c;
}

.map-empty-step-num {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #14b8a6;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.map-empty-legend {
  padding: 0.75rem 1rem;
  background: #f5f5f4;
  border-radius: 0.625rem;
  border: 1px solid #e7e5e4;
}

.map-empty-legend-title {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #78716c;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.map-empty-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.map-empty-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #44403c;
}

.map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.map-place-detail {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.map-place-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.map-place-card-title {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1c1917;
}

.map-place-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.map-place-header-text {
  flex: 1;
  min-width: 0;
}

.map-place-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1c1917;
  line-height: 1.3;
}

.map-place-verdict-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.map-place-verdict-badge-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.75rem;
  border: 2px solid;
}

.verdict-badge-safe {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.verdict-badge-risky {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #fde68a;
}

.verdict-badge-unsafe {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.verdict-badge-default {
  background: #f5f5f4;
  color: #44403c;
  border-color: #d6d3d1;
}

.map-place-overall-score {
  font-size: 0.875rem;
  font-weight: 500;
  color: #57534e;
}

.map-place-minimize {
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
  color: #57534e;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 0.375rem;
}

.map-place-minimize:hover {
  color: #0f766e;
  border-color: #99f6e4;
  background: #f0fdfa;
}

.map-place-close {
  background: none;
  border: none;
  color: #a8a29e;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.map-place-close:hover {
  color: #1c1917;
  background: #f5f5f4;
  border-radius: 0.5rem;
}

.map-place-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.map-place-flag-btn {
  padding: 0.25rem 0.5rem;
  font-size: 1.1rem;
  background: none;
  border: none;
  color: #78716c;
  cursor: pointer;
  border-radius: 0.375rem;
}

.map-place-flag-btn:hover {
  color: #0d9488;
  background: #f0fdfa;
}

.map-place-flag-btn.map-place-flag-btn-saved {
  color: #dc2626;
}

.map-place-flag-btn.map-place-flag-btn-saved:hover {
  color: #b91c1c;
  background: #fef2f2;
}

.map-place-address,
.map-place-distance,
.map-place-phone {
  margin: 0.35rem 0 0 0;
  font-size: 0.875rem;
  color: #57534e;
}

.map-place-types {
  margin-top: 0.5rem;
}

.map-place-types-label {
  margin: 0 0 0.25rem 0;
  font-size: 0.75rem;
  color: #78716c;
}

.map-place-type-tag {
  display: inline-block;
  margin: 0.25rem 0.25rem 0 0;
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  border-radius: 9999px;
  background: #f5f5f4;
  color: #44403c;
  border: 1px solid #d6d3d1;
}

.map-place-open-now {
  margin-top: 0.5rem;
}

.map-place-open-label {
  font-size: 0.75rem;
  color: #78716c;
}

.map-place-open-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  margin-left: 0.25rem;
}

.map-place-open-badge.open-yes {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.map-place-open-badge.open-no {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.map-place-open-badge.open-unknown {
  background: #f5f5f4;
  color: #57534e;
  border: 1px solid #d6d3d1;
}

.map-place-hours {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #57534e;
}

.map-place-hours-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.map-place-hours-row span:first-child {
  color: #78716c;
}

.map-place-scores {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.map-score-bar {
  margin-bottom: 0;
}

.map-score-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.map-score-bar-label span:first-child {
  color: #57534e;
}

.map-score-bar .score-value {
  font-weight: 600;
}

/* Score-based text colors (emerald 80+, amber 60-79, rose <60) */
.map-score-bar .score-value.score-emerald {
  color: #047857;
}

.map-score-bar .score-value.score-amber {
  color: #0f766e;
}

.map-score-bar .score-value.score-rose {
  color: #be123c;
}

.map-score-bar .bar {
  height: 8px;
  background: #e7e5e4;
  border-radius: 9999px;
  overflow: hidden;
}

.map-score-bar .bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s;
}

/* Score-based gradient bars */
.map-score-bar .bar-fill.gradient-emerald {
  background: linear-gradient(to right, #34d399, #059669);
}

.map-score-bar .bar-fill.gradient-amber {
  background: linear-gradient(to right, #2dd4bf, #0d9488);
}

.map-score-bar .bar-fill.gradient-rose {
  background: linear-gradient(to right, #fb7185, #f43f5e);
}

.map-place-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Verification - matches gluto-map style */
.map-verification-confidence {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.875rem;
  font-weight: 500;
  color: #1c1917;
}

.map-verification-confidence-line {
  margin: 0 0 0.25rem 0;
}

.map-verification-confidence .confidence-high {
  color: #047857;
}

.map-verification-confidence .confidence-medium {
  color: #0f766e;
}

.map-verification-confidence .confidence-low {
  color: #57534e;
}

.map-verification-refs {
  margin: 0.25rem 0 1rem 0;
  font-size: 0.75rem;
  color: #78716c;
}

.map-verification-group {
  margin-bottom: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.02);
}

/* Collapsible verification sections */
.map-verification-group-collapsible .map-verification-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1c1917;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.map-verification-group-collapsible .map-verification-group-toggle:hover {
  background: rgba(0, 0, 0, 0.04);
}

.map-verification-chevron {
  width: 1rem;
  height: 1rem;
  color: #78716c;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.map-verification-group-toggle[aria-expanded="true"] .map-verification-chevron {
  transform: rotate(180deg);
}

.map-verification-badge {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid;
}

.verification-badge-official {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.verification-badge-community {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #fde68a;
}

.verification-badge-thirdparty {
  background: #f5f5f4;
  color: #44403c;
  border-color: #d6d3d1;
}

.map-verification-content {
  padding: 0 1rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.map-verification-content[aria-hidden="true"] {
  display: none;
}

.map-verification-content .map-verification-link {
  margin-top: 0.5rem;
}

.map-verification-group-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1c1917;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Platform icons in verification links */
.map-verification-link-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f4;
  border-radius: 0.5rem;
  color: #57534e;
}

.platform-icon {
  width: 1rem;
  height: 1rem;
}

.platform-icon-link {
  font-size: 0.875rem;
}

.map-verification-link-text {
  flex: 1;
  min-width: 0;
}

.map-verification-link-arrow {
  font-size: 0.75rem;
  font-weight: 500;
  color: #0d9488;
  flex-shrink: 0;
}

.map-verification-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #1c1917;
  text-decoration: none;
  padding: 0.75rem 1rem;
  margin: 0.25rem;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.map-verification-link:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.1);
}

/* Place photos */
.map-place-photos-loading {
  font-size: 0.875rem;
  color: #78716c;
  align-items: center;
  gap: 0.5rem;
}

.map-place-photos-loading:not([hidden]) {
  display: flex;
}

.map-place-photos-error {
  font-size: 0.875rem;
  color: #b91c1c;
}

.map-place-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.map-photo-thumb {
  aspect-ratio: 1;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  padding: 0;
  background: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.map-photo-thumb:hover {
  border-color: #14b8a6;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.map-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-place-photos-empty {
  font-size: 0.875rem;
  color: #78716c;
}

.map-place-photos-attribution {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #a8a29e;
  line-height: 1.4;
}

.map-place-photos-attribution a {
  color: #78716c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.map-place-photos-attribution a:hover {
  color: #57534e;
}

/* ===== Map Chat Panel (Gluto.ai map smart search) ===== */
.map-chat-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

/* Docked: permanent right rail beside map */
.map-chat-panel--docked {
  position: relative;
  flex-shrink: 0;
  width: min(380px, 34vw);
  min-width: 280px;
  max-width: 400px;
  height: 100%;
  min-height: 0;
  border-left: 1px solid #e7e5e4;
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.06);
  z-index: 2;
  transition: max-width 0.28s ease, min-width 0.28s ease, opacity 0.22s ease, border-color 0.2s ease;
}

.map-chat-panel--docked.map-chat-panel--collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  flex: 0 0 0;
  padding: 0;
  margin: 0;
  border-left-color: transparent;
  box-shadow: none;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.map-chat-panel-header {
  padding: 0.7rem 1rem;
  background: #292524;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.map-chat-panel-title {
  flex: 1;
  min-width: 0;
}

.map-chat-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.map-chat-new-btn,
.map-chat-close-btn,
.map-chat-minimize-btn {
  background: none;
  border: none;
  color: #a8a29e;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}

.map-chat-new-btn:hover,
.map-chat-close-btn:hover,
.map-chat-minimize-btn:hover {
  color: #fff;
}

.map-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #292524;
  background: #fafaf9;
}

.map-chat-welcome {
  text-align: left;
  color: #57534e;
  padding: 0.5rem 0.25rem 0.75rem;
}

.map-chat-greeting {
  margin: 0 0 0.85rem 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #44403c;
}

.map-chat-greeting strong {
  color: #0f766e;
  font-weight: 700;
}

.map-chat-welcome p {
  margin: 0 0 0.75rem 0;
  font-size: 0.85rem;
}

.map-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-start;
}

.map-chat-suggestion {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  color: #44403c;
  transition: background 0.15s, border-color 0.15s;
}

.map-chat-suggestion:hover {
  background: #f5f5f4;
  border-color: #a8a29e;
}

.map-chat-msg {
  margin-bottom: 0.6rem;
}

.map-chat-msg.user {
  text-align: right;
}

.map-chat-msg .bubble {
  display: inline-block;
  max-width: 88%;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  text-align: left;
  line-height: 1.45;
  word-break: break-word;
}

.map-chat-msg.user .bubble {
  background: #292524;
  color: #fff;
}

.map-chat-msg.assistant .bubble {
  background: #fff;
  color: #292524;
  border: 1px solid #e7e5e4;
}

.map-chat-msg.assistant .bubble a {
  color: #0f766e;
  text-decoration: underline;
}

.map-chat-status {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  color: #78716c;
  background: #f5f5f4;
  border-top: 1px solid #e7e5e4;
  flex-shrink: 0;
  animation: map-chat-pulse 1.5s ease-in-out infinite;
}

@keyframes map-chat-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.map-chat-status[hidden] {
  display: none;
}

.map-chat-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid #e7e5e4;
  background: #fff;
  flex-shrink: 0;
}

.map-chat-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 2px solid #d6d3d1;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #1c1917;
  background: #fff;
}

.map-chat-input::placeholder {
  color: #a8a29e;
}

.map-chat-input:focus {
  outline: none;
  border-color: #292524;
}

.map-chat-send-btn {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: #292524;
  color: #fff;
}

.map-chat-send-btn:hover {
  background: #44403c;
}

.map-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.map-chat-error {
  font-size: 0.75rem;
  color: #b91c1c;
  padding: 0 0.75rem 0.4rem;
  margin: 0;
}

@media (max-width: 900px) {
  .map-chat-panel--docked {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: min(42vh, 380px);
    min-height: 260px;
    border-left: none;
    border-top: 2px solid #e7e5e4;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    z-index: 50;
  }

  .map-chat-panel--docked.map-chat-panel--collapsed {
    width: 100% !important;
    max-width: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    border-top: none;
    box-shadow: none;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
  }

  body.map-page:not(.map-chat-collapsed) .map-body {
    padding-bottom: min(42vh, 380px);
  }

  body.map-page.map-chat-collapsed .map-body {
    padding-bottom: 0;
  }

  body.map-page:not(.map-chat-collapsed) .map-center {
    min-height: calc(100vh - 8rem - min(42vh, 380px));
  }

  body.map-page.map-chat-collapsed .map-center {
    min-height: calc(100vh - 8rem);
  }

  .map-chat-open-btn {
    top: auto;
    bottom: 0.75rem;
    transform: none;
    border-radius: 0.5rem;
    border: 1px solid #d6d3d1;
    border-right: 1px solid #d6d3d1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 51;
  }
}

.map-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
}

.map-photo-lightbox[hidden] {
  display: none !important;
}

.map-photo-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  z-index: 10000;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  pointer-events: auto;
}

.map-photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.map-photo-lightbox-img {
  position: relative;
  z-index: 0;
  max-width: calc(100% - 120px);
  max-height: calc(100% - 80px);
  object-fit: contain;
  pointer-events: none;
  border-radius: 6px;
}

.map-photo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10000;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
  padding: 0;
}

.map-photo-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.map-photo-lightbox-nav[hidden] {
  display: none !important;
}

.map-photo-lightbox-prev {
  left: 1rem;
}

.map-photo-lightbox-next {
  right: 1rem;
}

.map-photo-lightbox-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.3rem 0.85rem;
  border-radius: 1rem;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Modals (add to collection, my collections) */
.map-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.map-modal[hidden] {
  display: none !important;
}

.map-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.map-modal-box {
  position: relative;
  width: 100%;
  max-width: 22rem;
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.map-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e7e5e4;
}

.map-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1c1917;
}

.map-modal-close {
  padding: 0.25rem;
  font-size: 1.5rem;
  line-height: 1;
  color: #78716c;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0.375rem;
}

.map-modal-close:hover {
  color: #1c1917;
  background: #f5f5f4;
}

.map-modal-body {
  padding: 1rem 1.25rem;
}

.map-modal-place-name {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  color: #57534e;
}

.map-add-to-collection-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  max-height: 12rem;
  overflow-y: auto;
}

.map-add-to-collection-item {
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.9rem;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  background: #fafaf9;
  color: #44403c;
  cursor: pointer;
}

.map-add-to-collection-item:hover {
  background: #f5f5f4;
  border-color: #d6d3d1;
}

.map-add-to-collection-empty {
  margin: 0;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: #78716c;
}

.map-btn-create-in-modal {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  border: 1px dashed #d6d3d1;
  border-radius: 8px;
  background: #fafaf9;
  color: #57534e;
  cursor: pointer;
}

.map-btn-create-in-modal:hover {
  border-color: #0d9488;
  color: #115e59;
  background: #f0fdfa;
}

.map-collections-modal-list {
  list-style: none;
  margin: 0.75rem 0 0 0;
  padding: 0;
  max-height: 14rem;
  overflow-y: auto;
}

.map-collections-modal-list .map-my-collection-item {
  padding: 0.4rem 0;
  border-bottom: 1px solid #f5f5f4;
}

.map-collections-modal-list .map-my-collection-item:last-child {
  border-bottom: none;
}

.map-collection-row-wrap {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #f5f5f4;
}

.map-collection-row-wrap:last-child {
  border-bottom: none;
}

.map-collection-row-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 0;
  text-align: left;
  font-size: 0.9rem;
  color: #1c1917;
  background: none;
  border: none;
  cursor: pointer;
}

.map-collection-row-btn:hover {
  background: #f5f5f4;
}

.map-collection-places {
  padding: 0 0 0.5rem 1rem;
  margin-bottom: 0.25rem;
}

.map-collection-places-loading,
.map-collection-places-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: #78716c;
}

.map-collection-places-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.map-collection-place-item {
  font-size: 0.8125rem;
  padding: 0.25rem 0;
  color: #44403c;
}

.map-collection-place-name {
  font-weight: 500;
}

.map-collection-place-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: #1d4ed8;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.map-collection-place-link:hover {
  color: #1e40af;
}

.map-collection-place-id {
  color: #78716c;
  font-size: 0.75rem;
  margin-left: 0.35rem;
}

.map-collection-place-remove {
  margin-left: 0.5rem;
  padding: 0.1rem 0.35rem;
  font-size: 1rem;
  line-height: 1;
  color: #78716c;
  background: none;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
}

.map-collection-place-remove:hover {
  color: #b91c1c;
  background: #fef2f2;
}

.map-filter-collection-select {
  width: 100%;
  max-width: 100%;
}

.map-modal-box-wide {
  max-width: 28rem;
}

.map-profile-loading,
.map-profile-error,
.map-profile-empty {
  margin: 0;
  font-size: 0.9rem;
  color: #57534e;
}

.map-profile-error {
  color: #b91c1c;
}

.map-profile-section {
  margin-bottom: 1rem;
}

.map-profile-section:last-child {
  margin-bottom: 0;
}

.map-profile-section-title {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #44403c;
}

.map-profile-dl {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.map-profile-dl div {
  display: flex;
  gap: 0.5rem;
}

.map-profile-dl dt {
  margin: 0;
  font-size: 0.8rem;
  color: #78716c;
  min-width: 5rem;
}

.map-profile-dl dd {
  margin: 0;
  font-size: 0.9rem;
  color: #1c1917;
}

.map-profile-text {
  margin: 0;
  font-size: 0.9rem;
  color: #44403c;
}

.map-profile-pre {
  margin: 0;
  font-size: 0.75rem;
  color: #57534e;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 12rem;
  overflow-y: auto;
}

.map-profile-questionnaire-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #0d9488;
  text-decoration: none;
}

.map-profile-questionnaire-link:hover {
  text-decoration: underline;
}

/* Report - prose style matching gluto-map */
.map-place-report-content {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #44403c;
  max-width: none;
}

.map-place-report-content h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem 0;
  color: #1c1917;
}

.map-place-report-content h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 1rem 0 0.35rem 0;
  color: #1c1917;
}

.map-place-report-content h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.75rem 0 0.25rem 0;
  color: #1c1917;
}

.map-place-report-content p {
  margin: 0.5rem 0;
}

.map-place-report-content strong {
  font-weight: 600;
  color: #1c1917;
}

.map-place-report-content ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.map-place-report-content li {
  margin-bottom: 0.35rem;
}

.map-place-report-content br {
  display: block;
  content: "";
  margin-top: 0.25rem;
}

.map-place-report-loading {
  font-size: 0.875rem;
  color: #78716c;
}

.map-place-report-error {
  font-size: 0.875rem;
  color: #b91c1c;
}

.map-place-report-empty {
  font-size: 0.875rem;
  color: #78716c;
}

/* Community reviews */
.map-place-reviews-loading {
  font-size: 0.875rem;
  color: #78716c;
}

.map-place-reviews-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.map-review-item {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.map-review-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.map-review-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  color: #78716c;
}

.map-review-author {
  font-weight: 500;
  color: #44403c;
}

.map-review-stars-inline {
  color: #0d9488;
}

.map-review-date {
  margin-left: auto;
}

.map-place-collection-actions {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.map-place-collection-label {
  font-size: 0.8125rem;
  color: #57534e;
}

.map-place-collection-dropdown {
  position: relative;
}

.map-btn-collection,
.map-btn-collection-secondary {
  font-size: 0.8125rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.375rem;
  cursor: pointer;
  border: 1px solid #d6d3d1;
  background: #fafaf9;
  color: #44403c;
}

.map-btn-collection:hover,
.map-btn-collection-secondary:hover {
  border-color: #0d9488;
  background: #f0fdfa;
  color: #115e59;
}

.map-collection-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 12rem;
  max-height: 14rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d6d3d1;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10;
  padding: 0.25rem 0;
}

.map-collection-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.4rem 0.75rem;
  text-align: left;
  font-size: 0.8125rem;
  border: none;
  background: none;
  cursor: pointer;
  color: #44403c;
}

.map-collection-dropdown-item:hover {
  background: #f5f5f4;
}

.map-collection-dropdown-empty {
  margin: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: #78716c;
}

.map-my-collections-card {
  margin-bottom: 1rem;
}

.map-btn-create-collection {
  font-size: 0.8125rem;
  padding: 0.35rem 0.6rem;
  margin-bottom: 0.5rem;
  border: 1px dashed #d6d3d1;
  background: #fafaf9;
  border-radius: 0.375rem;
  cursor: pointer;
  color: #57534e;
}

.map-btn-create-collection:hover {
  border-color: #0d9488;
  color: #115e59;
}

.map-my-collections-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.map-my-collection-item {
  font-size: 0.875rem;
  padding: 0.25rem 0;
  color: #44403c;
}

.map-my-collection-name {
  font-weight: 500;
}

.map-my-collection-count {
  color: #78716c;
  font-size: 0.8125rem;
}

.map-my-collection-empty {
  font-size: 0.8125rem;
  color: #78716c;
  margin: 0;
  padding: 0.25rem 0;
}

.map-review-actions {
  margin-left: 0.5rem;
}

.map-review-delete-btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  color: #b91c1c;
  background: transparent;
  border: 1px solid #fca5a5;
  border-radius: 0.25rem;
  cursor: pointer;
}

.map-review-delete-btn:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #b91c1c;
}

.map-review-delete-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.map-review-text {
  margin: 0;
  font-size: 0.875rem;
  color: #44403c;
  line-height: 1.5;
  white-space: pre-wrap;
}

.map-review-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.map-review-thumb {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.map-place-reviews-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.map-review-field {
  display: block;
  margin-bottom: 0.75rem;
}

.map-review-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #57534e;
  margin-bottom: 0.25rem;
}

.map-review-field textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #d6d3d1;
  border-radius: 0.5rem;
  resize: vertical;
  min-height: 4rem;
}

.map-review-field textarea:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

.map-review-photos {
  margin-bottom: 0.75rem;
}

.map-review-photos-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.map-review-photo-preview {
  position: relative;
}

.map-review-photo-preview img {
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #d6d3d1;
}

.map-review-photo-remove {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1;
  border-radius: 50%;
  background: #b91c1c;
  color: #fff;
  border: none;
  cursor: pointer;
}

.map-review-photos-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin-top: 0.25rem;
  border: 2px dashed #d6d3d1;
  border-radius: 0.5rem;
  background: #fafaf9;
  color: #78716c;
  font-size: 0.75rem;
  cursor: pointer;
}

.map-review-photos-add:hover {
  border-color: #0d9488;
  background: #f0fdfa;
  color: #115e59;
}

.map-review-rating {
  margin-bottom: 0.75rem;
}

.map-review-scores {
  margin-bottom: 0.75rem;
}

.map-review-score-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.map-review-score-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.map-review-score-label {
  font-size: 0.8125rem;
  color: #57534e;
  min-width: 8rem;
}

.map-review-score-stars .map-review-star-btn {
  font-size: 1rem;
}

.map-review-scores-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 0.25rem 0;
}

.map-review-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #f5f5f4;
}

.map-review-score-pill-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #57534e;
}

.map-review-score-pill-stars {
  font-size: 0.75rem;
  color: #44403c;
}

.map-review-stars {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.map-review-star-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 1.25rem;
  color: #99f6e4;
  cursor: pointer;
}

.map-review-star-btn:hover {
  color: #eab308;
}

.map-review-error {
  font-size: 0.875rem;
  color: #b91c1c;
  margin: 0.5rem 0 0 0;
}

.map-review-submit {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #0d9488;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.map-review-submit:hover:not(:disabled) {
  background: #0f766e;
}

.map-review-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.map-place-reviews-signin {
  font-size: 0.75rem;
  color: #78716c;
  margin-top: 0.5rem;
}

.map-place-actions a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s;
}

.map-place-actions .btn-website {
  background: #ccfbf1;
  color: #115e59;
  border: 1px solid #99f6e4;
}

.map-place-actions .btn-website:hover {
  background: #fde68a;
}

.map-place-actions .btn-maps {
  background: #f5f5f4;
  color: #44403c;
  border: 1px solid #d6d3d1;
}

.map-place-actions .btn-maps:hover {
  background: #e7e5e4;
}

.map-place-actions .btn-share {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.map-place-actions .btn-share:hover {
  background: #dbeafe;
}

/* Center: map */
.map-center {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  width: 100%;
  height: 100%;
}

.map-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 300px;
  background: #e7e5e4;
}

.map-container .maplibregl-map {
  background: #e7e5e4;
}

.map-container .maplibregl-canvas-container {
  background: #e7e5e4;
}

.map-container .maplibregl-canvas {
  background: #e7e5e4 !important;
}

/* Skeleton loading state — visible before map JS initializes */
.map-skeleton {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #e7e5e4;
  transition: opacity 0.4s ease;
}

.map-skeleton.map-skeleton--hidden {
  opacity: 0;
  pointer-events: none;
}

.map-skeleton-pulse {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(74, 158, 255, 0.15);
  animation: map-skeleton-ping 1.4s ease-in-out infinite;
}

.map-skeleton-label {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #78716c;
  letter-spacing: 0.01em;
}

@keyframes map-skeleton-ping {
  0%, 100% { transform: scale(0.85); opacity: 0.5; }
  50%       { transform: scale(1.15); opacity: 1; }
}

.map-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  color: #4a9eff;
  font-size: 0.95rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.map-locate-error {
  position: absolute;
  top: 1rem;
  right: 4rem;
  max-width: 320px;
  padding: 0.75rem 1rem;
  background: #ccfbf1;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #115e59;
  z-index: 10;
}

.map-locate-retry-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #115e59;
  background: #ccfbf1;
  border: 1px solid #0d9488;
  border-radius: 6px;
  cursor: pointer;
}

.map-locate-retry-btn:hover {
  background: #fde68a;
  border-color: #0f766e;
}

/* "You are here" — same idea as browser / Google Maps blue dot */
.map-user-location-pin {
  position: relative;
  width: 44px;
  height: 44px;
  pointer-events: none;
}

.map-user-location-accuracy {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.22);
  z-index: 1;
}

.map-user-location-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

/* Above place pins; MapLibre GeolocateControl uses its own marker + accuracy ring */
.maplibregl-marker.map-user-location-marker-wrap {
  z-index: 1300 !important;
}

.maplibregl-marker .maplibregl-user-location-dot,
.maplibregl-marker .maplibregl-user-location-heading,
.maplibregl-marker .maplibregl-user-location-accuracy-circle {
  z-index: 1300 !important;
}

/* Right sidebar */
.map-right-sidebar {
  width: 280px;
  max-width: 280px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.95);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  overflow-y: auto;
}

.map-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.map-filters-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1c1917;
}

.map-filters-close {
  background: none;
  border: none;
  color: #78716c;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.25rem;
}

.map-filters-close:hover {
  color: #1c1917;
}

.map-filters-body {
  padding: 1rem;
}

.map-filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #57534e;
}

.map-filter-section {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.map-filter-section:last-of-type {
  border-bottom: none;
}

.map-filter-section-title {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1c1917;
}

.map-filter-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.map-filter-section-header .map-filter-section-title {
  margin: 0;
}

.map-filter-clear-btn {
  font-size: 0.75rem;
  font-weight: 500;
  color: #0f766e;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
}

.map-filter-clear-btn:hover {
  color: #115e59;
  text-decoration: underline;
}

.map-filter-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.map-filter-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #44403c;
  cursor: pointer;
}

.map-filter-checkbox input {
  margin-top: 0.2rem;
  accent-color: #0d9488;
}

.map-filter-count {
  color: #78716c;
  font-size: 0.75rem;
}

.map-filter-hint {
  margin: 0.25rem 0 0 0;
  font-size: 0.6875rem;
  color: #78716c;
}

.map-filter-score-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.map-filter-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #57534e;
}

.map-filter-score-row input {
  width: 4rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  text-align: right;
}

.map-filter-score-row input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

.map-filter-extension-sections {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.map-filter-extension-details {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  background: rgba(254, 243, 199, 0.2);
  overflow: hidden;
}

.map-filter-extension-details:hover {
  background: rgba(254, 243, 199, 0.35);
}

.map-filter-extension-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #44403c;
  cursor: pointer;
  list-style: none;
}

.map-filter-extension-summary::-webkit-details-marker {
  display: none;
}

.map-filter-extension-meta {
  font-size: 0.6875rem;
  font-weight: 400;
  color: #78716c;
}

.map-filter-extension-options {
  padding: 0 0.75rem 0.75rem;
  max-height: 12rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Popup styles */
.maplibregl-popup-content {
  padding: 1rem;
  min-width: 200px;
  max-width: 320px;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #e8e8e8;
}

.maplibregl-popup-content h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: #fff;
}

.maplibregl-popup-content p {
  margin: 0.25rem 0;
  font-size: 0.875rem;
  color: #b0b0b0;
}

.maplibregl-popup-content .verdict {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.maplibregl-popup-content .verdict.safe {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.maplibregl-popup-content .verdict.risky {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
}

.maplibregl-popup-content .verdict.unsafe {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
}

.maplibregl-popup-close-button {
  color: #888;
  font-size: 1.25rem;
}

.maplibregl-popup-close-button:hover {
  color: #fff;
}
