#sidebar {
  position: fixed;
  z-index: 20;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (min-width: 641px) {
  #sidebar {
    top: 20px;
    left: 20px;
    bottom: 20px;
    width: 340px;
    border-radius: 14px;
    padding: 24px;
  }
}

@media (max-width: 640px) {
  #sidebar {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-height: 45vh;
    border-radius: 16px;
    padding: 20px;
  }
}

.sidebar-title {
  margin: 0 0 16px;
  font-size: 18px;
}

#sidebar h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

#sidebar p {
  margin: 0 0 8px;
  font-size: 14px;
  color: #444;
  line-height: 1.4;
}

.poi-category {
  margin-bottom: 8px;
}

.poi-category-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 10px 4px;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  text-align: left;
}

.poi-category-chevron {
  transition: transform 0.15s ease;
  color: #999;
}

.poi-category.collapsed .poi-category-chevron {
  transform: rotate(-90deg);
}

.poi-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.2s ease;
}

.poi-category.collapsed .poi-category-list {
  max-height: 0;
}

.poi-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 8px 12px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  border-radius: 8px;
}
.poi-list-item:hover {
  background: #f5f5f5;
}

.poi-list-icon {
  display: flex;
  align-items: center;
}

#sidebar-back {
  border: none;
  background: none;
  color: #555;
  font-size: 14px;
  cursor: pointer;
  padding: 0 0 12px;
  display: block;
}
#sidebar-back:hover {
  color: #111;
}

/* Icon rendering: mask-based, so icons render pure white regardless
   of the source SVG's original fill color, and the circle behind
   them can be any gradient. */

.icon-mask {
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: #ffffff;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.poi-list-icon .icon-mask {
  background-color: #555;
}

.poi-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.poi-marker-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.25);
}

.poi-marker-circle .icon-mask {
  width: 16px;
  height: 16px;
}

.poi-marker-label {
  font-size: 10px;
  font-weight: 600;
  color: #2a2a2a;
  background: rgba(247, 247, 247, 0.92);
  padding: 1px 6px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Applied at low zoom, where nearby featured labels tend to overlap.
   Caps label width and truncates with an ellipsis; removed once the
   user zooms in far enough that crowding stops being an issue. */
.poi-marker-label.truncated {
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}