@charset "utf-8";

.new-fireworks-map-wrap {
  margin-bottom: 24px;
}

.new-fireworks-map-desc {
  margin: 0 0 14px 0;
  line-height: 1.8;
}

.hanabi-map-wrap {
  position: relative;
}

#newFireworksMap {
  height: 560px;
  border: 1px solid #d8d8d8;
  background: #f8f8f8;
  overflow: hidden;
}

#newFireworksMap .leaflet-container {
  background: #f8f8f8;
}

#newFireworksMap .leaflet-tile,
#newFireworksMap .leaflet-marker-icon,
#newFireworksMap .leaflet-marker-shadow,
#newFireworksMap .leaflet-pane > img,
#newFireworksMap .leaflet-pane > canvas {
  max-width: none !important;
  max-height: none !important;
}

.new-fireworks-list {
  margin-top: 24px;
}

.new-fireworks-list h2 {
  margin-bottom: 14px;
}

.new-fireworks-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.new-fireworks-list li {
  margin: 0;
  padding: 0;
}

.new-fireworks-list .nf-card {
  display: block;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.new-fireworks-list .nf-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  border-color: #c7d3e0;
}

.new-fireworks-list .nf-card:focus-visible {
  outline: 3px solid rgba(180, 0, 46, 0.9);
  outline-offset: 2px;
}

.new-fireworks-list .nf-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.new-fireworks-list .nf-row:last-child {
  margin-bottom: 0;
}

.new-fireworks-list .nf-label {
  flex: 0 0 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 8px;
  background: #f3f4f6;
  color: #5b6573;
  border-radius: 7px;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.4;
  text-align: center;
  box-sizing: border-box;
}

.new-fireworks-list .nf-value {
  flex: 1;
  min-width: 0;
  display: block;
  line-height: 1.6;
  word-break: break-word;
}

.new-fireworks-list .nf-date {
  color: #4b5563;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.new-fireworks-list .nf-name {
  color: #1f2937;
  font-size: 15px;
  font-weight: bold;
}

.new-fireworks-list .nf-locality {
  color: #556070;
  font-size: 13px;
}

.map-label-toggle-btn {
  position: static;
  display: none;
  margin: 0;
  padding: 14px 18px;
  background: #ffffff;
  color: #334155;
  text-decoration: none;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.4;
  border-radius: 22px;
  border: 1px solid #cfd8e3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  cursor: pointer;
}

.map-label-toggle-btn:hover {
  opacity: 0.92;
}

.map-label-toggle-btn:focus-visible {
  outline: 3px solid rgba(180, 0, 46, 0.9);
  outline-offset: 2px;
}


.map-top-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.map-bottom-controls {
  position: absolute;
  right: 14px;
  bottom: 34px;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.map-filter-btns {
  display: none;
  grid-template-columns: repeat(2, auto);
  gap: 6px;
  justify-content: end;
}

.map-filter-btn {
  margin: 0;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #334155;
  border: 1px solid #cfd8e3;
  border-radius: 14px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  font-size: 12px;
  font-weight: bold;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.map-filter-btn:hover {
  opacity: 0.92;
}

.map-filter-btn.is-active {
  background: #df6a6a;
  color: #fff;
  border-color: #d86464;
}

.map-filter-btn:focus-visible {
  outline: 3px solid rgba(180, 0, 46, 0.9);
  outline-offset: 2px;
}

.custom-marker {
  position: relative;
  width: 84px;
  height: 62px;
}

.marker-label {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 16px;
  text-align: center;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.marker-label.level-1 {
  background: rgba(45, 87, 184, 0.82);
}

.marker-label.level-2 {
  background: rgba(240, 106, 36, 0.82);
}

.marker-label.level-3 {
  background: rgba(25, 168, 91, 0.82);
}

.marker-label.level-4 {
  background: rgba(227, 27, 35, 0.82);
}

.marker-date {
  margin: 0;
}

.marker-icon {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  display: block;
}

#newFireworksMap.labels-hidden .marker-label {
  display: none;
}


#newFireworksMap.filter-level-1 .marker-level-2,
#newFireworksMap.filter-level-1 .marker-level-3,
#newFireworksMap.filter-level-1 .marker-level-4,
#newFireworksMap.filter-level-2 .marker-level-1,
#newFireworksMap.filter-level-2 .marker-level-3,
#newFireworksMap.filter-level-2 .marker-level-4,
#newFireworksMap.filter-level-3 .marker-level-1,
#newFireworksMap.filter-level-3 .marker-level-2,
#newFireworksMap.filter-level-3 .marker-level-4,
#newFireworksMap.filter-level-4 .marker-level-1,
#newFireworksMap.filter-level-4 .marker-level-2,
#newFireworksMap.filter-level-4 .marker-level-3 {
  display: none;
}

.leaflet-popup-content {
  line-height: 1.7;
}

.leaflet-popup-content .popup-date {
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  margin: 0 0 6px 0;
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
}

.leaflet-popup-content .popup-date.level-1 {
  background: #2d57b8;
}

.leaflet-popup-content .popup-date.level-2 {
  background: #f06a24;
}

.leaflet-popup-content .popup-date.level-3 {
  background: #19a85b;
}

.leaflet-popup-content .popup-date.level-4 {
  background: #e31b23;
}

.leaflet-popup-content .popup-link {
  margin-top: 6px;
}

.map-tap-note {
  margin: 12px 0 0 0;
}

.map-legend {
  margin-top: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.map-legend-title {
  margin: 0 0 10px 0;
  font-size: 1rem;
  font-weight: bold;
  color: #2f3a4a;
}

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

.map-legend-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px 0;
}

.map-legend-list li:last-child {
  margin-bottom: 0;
}

.map-legend-list img {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.map-legend-note {
  margin: 12px 0 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #555;
}

@media screen and (max-width: 900px) {
  #newFireworksMap {
    height: 460px;
  }

  .new-fireworks-list ul {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .new-fireworks-list .nf-card {
    padding: 13px 14px;
  }

  .new-fireworks-list .nf-label {
    flex-basis: 64px;
    font-size: 11px;
  }

  .new-fireworks-list .nf-date,
  .new-fireworks-list .nf-locality {
    font-size: 12px;
  }

  .new-fireworks-list .nf-name {
    font-size: 14px;
  }
}

@media screen and (max-width: 640px) {
  .map-top-controls {
    top: 12px;
    right: 12px;
    gap: 6px;
  }

  .map-label-toggle-btn {
    padding: 11px 13px;
    font-size: 0.9rem;
    border-radius: 18px;
  }

  .map-filter-btns {
    gap: 5px;
  }

  .map-filter-btn {
    padding: 6px 8px;
    font-size: 11px;
    border-radius: 12px;
  }

  .map-legend {
    padding: 12px 12px;
  }

  .map-legend-title {
    font-size: 0.95rem;
  }

  .map-legend-note {
    font-size: 0.88rem;
  }
}