@font-face {
  font-family: "deacon-ky25br";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("https://file.squarespace-cdn.com/content/v2/namespaces/fonts/libraries/5e82782be4002e7b492a0f00/assets/b658ab79-6c1d-4d6e-9218-8bb40fb14564/font.woff2") format("woff2");
}

:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #ffffff;
  background: #ff002f;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
}

body {
  background: #ff002f;
  overflow: hidden;
}

.map-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 20px;
}

.map-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 6px;
  font-family: "deacon-ky25br", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: "deacon-ky25br", Arial, Helvetica, sans-serif;
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.chapter-count {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
}

#map {
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 300px;
  border: 3px solid #ffffff;
  border-radius: 10px;
  overflow: hidden;
  background: #e7ecef;
}

.map-status-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  min-height: 22px;
  margin-top: 8px;
}

.map-status {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 700;
}

.retry-map {
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ff002f;
  background: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.retry-map:hover,
.retry-map:focus-visible {
  color: #ffffff;
  background: transparent;
  outline: none;
}

.retry-map:disabled {
  cursor: wait;
  opacity: 0.65;
}

.leaflet-tooltip.chapter-tooltip {
  width: min(300px, calc(100vw - 32px));
  max-width: 300px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.chapter-card {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.chapter-card__name {
  display: block;
  margin-bottom: 3px;
  color: #ff002f;
}

.chapter-card__location {
  display: block;
  color: #1f2933;
}

.leaflet-popup.chapter-popup .leaflet-popup-content-wrapper {
  max-width: calc(100vw - 32px);
}

.leaflet-popup.chapter-popup .leaflet-popup-content {
  width: min(300px, calc(100vw - 96px)) !important;
  min-width: 0;
  max-width: 300px;
  margin: 13px 16px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(255, 255, 255, 0.85);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: #ff002f;
  color: #ffffff;
  font-weight: 800;
}

.marker-cluster div {
  font-family: Arial, Helvetica, sans-serif;
}

@media (max-width: 700px) {
  .map-shell {
    padding: 16px;
  }

  .map-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .chapter-count {
    text-align: left;
  }

  #map {
    height: auto;
    min-height: 280px;
  }
}

@media (max-height: 520px) {
  .map-shell {
    padding: 12px;
  }

  .eyebrow {
    display: none;
  }

  .map-header {
    margin-bottom: 8px;
  }

  #map {
    min-height: 220px;
  }
}
