*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

#map {
  width: 100%;
  aspect-ratio: 1.7777;
  position: relative;
  max-width: 100%;
}

.leaflet-container img {
  max-width: none;
}

#sidebar {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 360px;
  background: #fff;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1100;
  overflow-y: auto;
  padding: 24px;
}

#sidebar.sidebar--open {
  transform: translateX(0);
}

#sidebar-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #666;
  padding: 4px 8px;
  border-radius: 4px;
}

#sidebar-close:hover {
  background: #f0f0f0;
}

#sidebar-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  margin-top: 8px;
  padding-right: 32px;
  line-height: 1.3;
}

#sidebar-category {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 12px;
}

#sidebar-date {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}

#sidebar-description {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}

#filter-panel {
  position: absolute;
  top: 12px;
  left: 60px;
  z-index: 1100;
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

#filter-panel h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  margin-bottom: 8px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.filter-item label {
  cursor: pointer;
  font-size: 14px;
  color: #333;
  user-select: none;
}

.filter-item:hover label {
  color: #111;
}

#empty-state {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1050;
  color: #999;
  font-size: 16px;
  pointer-events: none;
}

.marker-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  animation: marker-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--pop-delay, 0ms);
  transform-origin: center;
}

.marker-cluster-pop {
  animation: marker-pop 480ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: var(--pop-delay, 0ms);
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes marker-pop {
  0%   { opacity: 0; transform: scale(0.2); }
  60%  { opacity: 1; transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .marker-icon,
  .marker-cluster-pop {
    animation: none;
  }
}

.leaflet-tooltip {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: #333;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  #map {
    aspect-ratio: auto;
    width: 100vw;
    height: 100dvh;
  }
}
