/* Homepage map — Agronod */
.home-map {
  --hm-farm: #2f6b3a;
  --hm-claimed: #285784;
  --hm-unclaimed: #5a7a4a;
  --hm-unclear: #9aa0a8;
  --hm-local: #0e7c7b;
  margin: 0 0 1.25rem;
}
.home-map__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  margin-bottom: .85rem;
}
.home-map__title {
  font-size: 1.25rem;
  font-weight: 650;
  margin: 0 0 .2rem;
  color: #14301f;
}
.home-map__lead {
  margin: 0;
  font-size: .9rem;
  color: #5a6578;
  max-width: 36rem;
}
.home-map__links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.home-map__frame {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(16, 35, 63, .1);
  background: linear-gradient(165deg, #e8eef5 0%, #f4f7fa 55%, #eef3ea 100%);
  min-height: 22rem;
  box-shadow: 0 10px 28px rgba(16, 35, 63, .06);
}
.home-map__canvas {
  width: 100%;
  height: min(62vh, 28rem);
  min-height: 20rem;
}
.home-map__canvas.maplibregl-map {
  font: inherit;
}
.home-map__legend {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .75rem;
  padding: .65rem .85rem;
  background: rgba(255, 255, 255, .92);
  border-top: 1px solid rgba(16, 35, 63, .08);
  backdrop-filter: blur(6px);
}
.home-map__toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: #2a3344;
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.home-map__toggle input {
  accent-color: var(--ag-primary, #285784);
  margin: 0;
}
.home-map__swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: .3rem;
  font-size: .7rem;
  line-height: 1;
  color: #fff;
  font-weight: 700;
}
.home-map__swatch.is-farm { background: var(--hm-farm); }
.home-map__swatch.is-claimed { background: var(--hm-claimed); }
.home-map__swatch.is-unclaimed {
  background: #fff;
  color: var(--hm-unclaimed);
  border: 2px solid var(--hm-unclaimed);
}
.home-map__swatch.is-unclear {
  background: #fff;
  color: var(--hm-unclear);
  border: 2px dashed var(--hm-unclear);
}
.home-map__swatch.is-local { background: var(--hm-local); }
.home-map__meta {
  font-size: .75rem;
  color: #6b7385;
  padding: .45rem .85rem .65rem;
  background: #fff;
}
.home-map__status {
  position: absolute;
  left: .75rem;
  top: .75rem;
  z-index: 2;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(16, 35, 63, .1);
  border-radius: .65rem;
  padding: .4rem .65rem;
  font-size: .78rem;
  color: #3a4658;
  max-width: min(18rem, 70%);
  box-shadow: 0 4px 14px rgba(16, 35, 63, .08);
}
.home-map__popup {
  max-width: 16rem;
}
.home-map__popup h3 {
  font-size: .95rem;
  margin: 0 0 .25rem;
  font-weight: 650;
}
.home-map__popup p {
  margin: 0 0 .35rem;
  font-size: .8rem;
  color: #5a6578;
}
.home-map__popup .badge-soft {
  display: inline-block;
  font-size: .7rem;
  padding: .15rem .4rem;
  border-radius: .35rem;
  background: #eef2f6;
  color: #334;
  margin: 0 .25rem .35rem 0;
}
.home-map__popup a {
  font-size: .85rem;
  font-weight: 600;
}
.home-map-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  cursor: pointer;
}
.home-map-marker.is-cluster {
  border-radius: 999px;
  min-width: 34px;
  padding: 0 6px;
  font-size: 11px;
}
.home-map-marker.is-claimed-ring {
  box-shadow: 0 0 0 3px #f0c14b, 0 2px 8px rgba(0, 0, 0, .25);
}
.home-map-marker.is-unclaimed {
  background: #fff !important;
  color: #5a7a4a;
  border-color: #5a7a4a;
}
.home-map-marker.is-unclear {
  background: #fff !important;
  color: #9aa0a8;
  border-color: #9aa0a8;
  border-style: dashed;
}
.home-map-marker.is-unknown {
  border-style: dashed;
  opacity: .92;
}
.home-map__panel {
  position: absolute;
  right: .65rem;
  top: .65rem;
  bottom: 4.5rem;
  width: min(20rem, calc(100% - 1.3rem));
  z-index: 3;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(16, 35, 63, .12);
  border-radius: .75rem;
  box-shadow: 0 8px 24px rgba(16, 35, 63, .12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.home-map__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .55rem .7rem;
  border-bottom: 1px solid rgba(16, 35, 63, .08);
}
.home-map__panel-title {
  margin: 0;
  font-size: .9rem;
  font-weight: 650;
}
.home-map__panel-close {
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #556;
}
.home-map__panel-body {
  padding: .55rem .7rem;
  overflow: auto;
  font-size: .82rem;
}
.home-map__org-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.home-map__org-list li {
  padding: .4rem 0;
  border-bottom: 1px solid rgba(16, 35, 63, .06);
}
.home-map__org-list a {
  font-weight: 600;
  color: #1e3a5f;
  text-decoration: none;
}
.home-map__org-meta {
  display: block;
  font-size: .72rem;
  color: #6b7385;
  margin-top: .1rem;
}
.home-map__pager {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .65rem;
  align-items: center;
  margin-top: .65rem;
  font-size: .75rem;
}
.home-map__pager button {
  border: 1px solid rgba(16, 35, 63, .15);
  background: #fff;
  border-radius: .4rem;
  padding: .2rem .45rem;
  cursor: pointer;
  font-size: .75rem;
}
.home-map__list-btn {
  border: 0;
  background: #285784;
  color: #fff;
  border-radius: .45rem;
  padding: .35rem .65rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.home-map__hint {
  font-size: .72rem !important;
  color: #7a8494 !important;
  margin-top: .35rem !important;
}
@media (max-width: 575.98px) {
  .home-map__canvas {
    height: 18rem;
    min-height: 16rem;
  }
  .home-map__legend {
    gap: .55rem;
  }
  .home-map__panel {
    bottom: auto;
    max-height: 55%;
  }
}
