.kfh-wrap {
  --kfh-navy: #12395f;
  --kfh-lake: #1d5f8f;
  --kfh-sand: #f4a429;
  --kfh-paper: #f8f6ef;
  --kfh-ink: #152234;
  --kfh-border: #cfd9df;
  font-family: "Lato", "Segoe UI", Tahoma, sans-serif;
  color: var(--kfh-ink);
  border: 1px solid var(--kfh-border);
  border-radius: 14px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, var(--kfh-paper) 100%);
}

.kfh-wrap select,
.kfh-wrap button,
.kfh-wrap .button,
.kfh-wrap input,
.kfh-wrap textarea,
.kfh-wrap a[data-kfh-gps-link],
.kfh-wrap .leaflet-control-zoom a {
  border-radius: 10px;
}

.kfh-wrap h3,
.kfh-wrap dt,
.kfh-wrap label {
  font-family: "Merriweather", Georgia, serif;
}

.kfh-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.kfh-controls label {
  color: var(--kfh-navy);
  font-weight: 700;
}

.kfh-controls select {
  min-width: 230px;
  border: 1px solid #b9c5cf;
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 0.96rem;
  background: #fff;
}

.kfh-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
  font-size: 0.92rem;
  justify-content: center;
  text-align: center;
}

.kfh-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kfh-legend-item i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
}

.kfh-map {
  height: 560px;
  border: 2px solid var(--kfh-lake);
  border-radius: 12px;
  overflow: hidden;
}

.kfh-map-note {
  margin: 10px 2px 0;
  font-size: 0.95rem;
  color: #274a69;
  text-align: center;
}

.kfh-index-details {
  margin-top: 12px;
  border: 1px solid #cfd9df;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.kfh-index-details summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-weight: 700;
  color: var(--kfh-navy);
  background: #f2f6fa;
  text-align: center;
}

.kfh-index-details summary::-webkit-details-marker {
  display: none;
}

.kfh-index-list {
  padding: 8px 12px 12px;
  display: grid;
  gap: 10px;
}

.kfh-index-item {
  border-top: 1px solid #e2e8ee;
  padding-top: 10px;
}

.kfh-index-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.kfh-index-item h4 {
  margin: 0 0 8px;
  color: var(--kfh-navy);
}

.kfh-index-item p {
  margin: 4px 0;
  line-height: 1.45;
}

.kfh-marker-wrap {
  background: transparent;
  border: 0;
}

.kfh-marker-dot {
  width: 20px;
  height: 20px;
  display: inline-block;
  border-radius: 999px;
  background: var(--kfh-marker, var(--kfh-sand));
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
}

.kfh-modal[hidden] {
  display: none;
}

.kfh-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.kfh-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 23, 38, 0.62);
}

.kfh-modal-card {
  position: relative;
  max-width: 820px;
  margin: 5vh auto;
  background: #fff;
  border: 3px solid var(--kfh-lake);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  z-index: 2;
}

.kfh-modal-close {
  position: absolute;
  top: 8px;
  right: 11px;
  border: 0;
  background: transparent;
  color: var(--kfh-navy);
  font-size: 1.9rem;
  cursor: pointer;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.kfh-modal-close:hover,
.kfh-modal-close:focus-visible {
  background: rgba(18, 57, 95, 0.12);
  color: #0b2741;
  outline: none;
}

.kfh-modal-card h3 {
  margin: 0 30px 14px 0;
  color: var(--kfh-navy);
  font-size: 1.35rem;
}

.kfh-modal-list {
  margin: 0;
}

.kfh-modal-list dt {
  margin-top: 12px;
  font-weight: 700;
  color: var(--kfh-navy);
}

.kfh-modal-list dd {
  margin: 4px 0 0;
  line-height: 1.55;
}

.kfh-downloads {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d8e0e7;
}

.kfh-downloads p {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--kfh-navy);
}

.kfh-download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kfh-download-links .button {
  text-decoration: none;
}

.kfh-modal-list a[data-kfh-gps-link] {
  color: var(--kfh-lake);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kfh-map-chooser {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #d8e0e7;
}

.kfh-map-chooser p {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--kfh-navy);
}

.kfh-map-chooser-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kfh-map-chooser-actions .button {
  cursor: pointer;
}

body.kfh-modal-open {
  overflow: hidden;
}

@media (max-width: 860px) {
  .kfh-map {
    height: 430px;
  }

  .kfh-modal-card {
    margin: 2vh 10px;
    max-height: 96vh;
    overflow: auto;
    padding: 16px;
  }
}
