body {
  padding: 0;
  margin: 0;
}
#map {
  font-family: system-ui, sans-serif;
  width: 100vw;
  height: 100vh;
}

html, body {
  overflow: hidden;
  width: 100vw;
}

.map-controls {
  text-align: right;
  position: absolute;
  bottom: 1em;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  gap: 1em;
  align-items: stretch;
  justify-content: center;
  white-space: nowrap;
}

.here {
  position: absolute;
  left: -100px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #08c;
  border: 5px solid rgba(255, 255, 255, 0.95);
  animation: breathe 2.5s infinite;
  z-index: 9999 !important;
}

.has-geo {
  outline: 3px solid var(--bgactive);
}

[aria-busy="true"] {
  animation: breathe 2.5s infinite;
}

@keyframes breathe {
  0% { opacity: 0.5 }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.leaflet-container .leaflet-popup-content {
  min-width: min(90vw, 280px);
  font-size: 0.95rem;
  line-height: 1.6em !important;
  margin: 0;
}

.leaflet-popup-content pre {
  max-height: 140px;
  border: 0;
  background-color: rgba(0, 0, 0, .05);
  overflow: auto;
  margin: 10px -24px 10px -20px;
  padding: 10px 24px 10px 20px;
}

.map-title {
  line-height: 1.3;
  color: var(--fglv1);
  font-size: max(1.1em, 18px);
  margin: 0;
}

.map-subtitle {
  color: var(--fglv2);
  font-size: max(1.05em, 16px);
  display: inline;
  margin: 0;
}

[data-date] {
  white-space: nowrap;
  color: brown;
  background-color: #f7f3ec;
  border: 0;
  font-weight: normal;
  font-size: 0.9em;
  box-shadow: none;
  padding: 2em 0.9em 1.5em;
  margin-top: -0.5em;
  transition: margin 0.3s;
}

[data-date]:disabled {
  pointer-events: none;
  filter: grayscale();
}

[data-date]:hover,
[data-date]:focus {
  margin-top: 0;
}

[data-date][aria-current="true"] {
  background-color: brown;
  color: #fff;
}

.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-targets-ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 5.4em;
  min-height: 1.5em;
  overflow: auto;
  list-style: none;
  padding: 0;
  margin: 0;
  margin-right: -20px;
}

.target {
  font-weight: bold;
  background-color: var(--bglv3);
  border-radius: 2em;
  padding: 0.2em 0.9em;
}

#map .leaflet-div-icon {
  background-color: transparent;
  border: 0;
}

.marker {
  transform: translateX(-50%) translateY(-100%);
  margin-top: 11px;
  width: 25px;
}

.env {
  transform: rotate(20deg);
  display: block;
}

#map .leaflet-popup-close-button {
  margin: -10px;
  background: var(--bglv1);
  border: 1px solid var(--borderColor);
  border-radius: 50%;
  padding: 4px 5px 6px;
  color: var(--fglv2);
  font-size: 14px;
}

#map .leaflet-popup-content-wrapper {
  border: 1px solid var(--borderColor);
  background-color: var(--bglv1);
  box-shadow: none;
  color: var(--fglv0);
}

.map-dialog {
  overflow: auto;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
}

#map a {
  color: var(--fglink);
}

#map a:after {
  content: none;
}

.leaflet-popup-tip-container {
  display: none;
}

.map-links a:hover {
  background: #049;

}

.map-links a {
  padding: 7px 15px;
  background: #004fb0;
  color: var(--fglv0) !important;
  border-radius: 4px;
  text-decoration: none;
}

*:focus-visible {
  outline-color: var(--bgactive);
}

.map-schedule h3 {
  margin-bottom: 10px;
  cursor: pointer;
}

.map-schedule {
  line-height: 1.6;
}

.map-inner-schedule {
  padding: 10px 20px;
  background: var(--bglv0);
  margin: 10px -20px 0;
  border-top: 1px solid var(--bglv0);
  border-bottom: 1px solid var(--bglv0);
}

.today {
  font-weight: normal;
}

.map-note {
  white-space: pre-wrap;
  min-height: 1.5em;
  max-height: 20vh;
  overflow: auto;
  padding: 10px 20px;
  background: var(--bglv0);
  margin: 0 -20px;
  border-top: 1px solid var(--bglv0);
  border-bottom: 1px solid var(--bglv0);
}

.links {
  gap: 0 10px;
  display: flex;
  flex-wrap: wrap;
}

.country-banner {
  z-index: 10000;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2em;
  padding: 1em 2.5em;
  margin-top: 1em;
  background: var(--bglv0);
  white-space: nowrap;
}

.marker.event::before {
  position: absolute;
  content: '';
  background-image: url('/icons/markers/speaker.svg');
  width: 20px;
  top: 0;
  height: 20px;
  left: 70%;
  background-repeat: no-repeat;
  animation: shake 2s linear infinite;
  animation-delay: var(--delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .marker.event::before {
    animation: none;
  }
}

@keyframes shake {
  3% { transform: rotate(-10deg) }
  6% { transform: rotate(10deg) }
  9% { transform: rotate(-10deg) scale(1.3) }
  12% { transform: rotate(10deg) scale(1.3) }
  15% { transform: rotate(-10deg) }
}

.cluster {
  background: #c43131;
  color: #fff;
  font-size: 12px;
  border-radius: 50%;
  box-sizing: border-box;
  height: 25px;
  width: 25px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .1);
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.cluster.has-events {
  background-color: #ff6700;
}

.map-details summary {
  list-style: none;
  cursor: pointer;
}

.map-details summary:before {
  color: var(--fglv2);
  font-size: 1.1rem;
  content: '⏵ ';
}

.map-details[open] summary:before {
  content: '⏷ ';
}

/* Remove marker added by Chrome */
.map-details > summary::-webkit-details-marker { display: none; }

.map-source {
  display: flex;
  justify-content: space-between;
}

open-heart {
  border-radius: 22px;
  background: var(--bglv0);
  padding: 10px 16px;
  position: absolute;
  bottom: 10px;
  right: 10px;
  cursor: pointer;
}

open-heart[disabled] {
  cursor: default;
  background-color: transparent;
}

open-heart[count]:after {
  content: '× ' attr(count);
}
