.mt-farm-map {
  --map-ink: #173f34;
  --map-accent: #bb421b;
  --map-line: #d3ddce;
  width: min(1120px, calc(100% - 40px));
  margin: clamp(24px, 5vw, 64px) auto;
  color: var(--map-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  scroll-margin-top: 85px;
}
.mt-farm-map *, .mt-farm-map *::before, .mt-farm-map *::after { box-sizing: border-box; }
.mt-farm-map [hidden] { display: none !important; }
.mt-farm-map__head { margin-bottom: 20px; }
.mt-farm-map__head h2 {
  margin: 0 0 8px;
  color: var(--map-ink);
  font: 760 clamp(1.7rem, 3.6vw, 2.7rem)/1.12 Inter, system-ui, sans-serif;
  letter-spacing: -.035em;
}
.mt-farm-map__head p { margin: 0; color: #485e51; }
.mt-farm-map__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 18px;
  border: 1px solid var(--map-line);
  border-radius: 14px 14px 0 0;
  background: #f9f8f2;
  color: var(--map-ink);
}
.mt-farm-map__controls label, .mt-farm-map__status { font-size: .9rem; font-weight: 650; }
.mt-farm-map__region, .mt-farm-map__reset {
  min-height: 42px;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid #aebdae;
  border-radius: 8px;
  color: var(--map-ink);
  background-color: white;
  font: 650 .9rem/1.3 Inter, system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.mt-farm-map__region { padding-inline-end: 30px; }
.mt-farm-map__reset { cursor: pointer; }
.mt-farm-map__reset:hover, .mt-farm-map__reset:focus-visible { background: #e7efe4; color: var(--map-ink); }
.mt-farm-map__status { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: #44634d; }
.mt-farm-map__frame {
  overflow: hidden;
  border: 1px solid var(--map-line);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: #e5efeb;
}
.mt-farm-map__canvas {
  isolation: isolate;
  width: 100%;
  height: clamp(330px, 48vw, 520px);
  background-color: #e5efeb;
  font-family: inherit;
}
.mt-farm-map__credit { margin: 0; padding: 6px 12px; color: #4b5c53; font-size: .73rem; }
.mt-farm-map__directory { margin-top: 14px; }
.mt-farm-map__directory summary { cursor: pointer; color: var(--map-ink); font-weight: 720; }
.mt-farm-map__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
  gap: 5px 20px;
  padding: 0;
  margin: 12px 0;
  list-style: none;
}
.mt-farm-map__list [data-farm-id] { min-width: 0; }
.mt-farm-map__list [data-farm-id] > span { display: block; color: #536559; font-size: .83rem; }
.mt-farm-map__list a { color: #20573e; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.mt-farm-map__list a:hover { color: var(--map-accent); }
.mt-farm-map :focus-visible { outline: 3px solid #b44118; outline-offset: 3px; }
.mt-farm-map .leaflet-control-zoom { overflow: hidden; border: 1px solid #8a9e90; border-radius: 9px; box-shadow: 0 2px 6px #173f341c; }
.mt-farm-map .leaflet-control-zoom a { width: 38px; height: 38px; line-height: 38px; color: var(--map-ink); background: #fffef9; }
.mt-farm-map .leaflet-control-zoom a:hover { background: #f0f3e7; }
.mt-farm-map .leaflet-control-zoom a:focus-visible { outline-offset: -3px; }
.mt-farm-map .mt-farm-icon { display: grid; place-items: center; border: 0; background: transparent; border-radius: 50%; }
.mt-farm-map .mt-farm-pin {
  position: relative;
  display: block;
  width: 25px;
  height: 25px;
  transform: rotate(-45deg);
  border: 2px solid #fffaf0;
  border-radius: 50% 50% 50% 4px;
  background: #c94d25;
  box-shadow: -2px 2px 4px #173f3433;
}
.mt-farm-map .mt-farm-pin::after {
  position: absolute;
  content: "";
  width: 7px;
  height: 7px;
  top: 7px;
  left: 7px;
  border-radius: 50%;
  background: #fff9ee;
}
.mt-farm-map .mt-farm-cluster {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 2px solid #fffdf6;
  border-radius: 50%;
  background: #285d43;
  color: white;
  box-shadow: 0 0 0 3px #285d4336, 0 2px 6px #173f3436;
  font: 750 15px/1 Inter, system-ui, sans-serif;
}
.mt-farm-map .mt-farm-icon:hover .mt-farm-pin, .mt-farm-map .mt-farm-icon:focus .mt-farm-pin { background: #933610; }
.mt-farm-map .mt-farm-icon:hover .mt-farm-cluster, .mt-farm-map .mt-farm-icon:focus .mt-farm-cluster { background: #143b2b; }
.mt-farm-map .mt-farm-tooltip { border: 0; color: var(--map-ink); font: 650 12px/1.4 Inter, system-ui, sans-serif; }
.mt-farm-map .mt-farm-map-popup .leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: 12px; }
.mt-farm-map .mt-farm-map-popup .leaflet-popup-content { margin: 0; }
.mt-farm-map .mt-farm-map-popup .leaflet-popup-close-button {
  top: 4px;
  right: 4px;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: var(--map-ink);
  background: #fffdf6;
  line-height: 29px;
}
.mt-farm-map .mt-farm-popup { display: grid; gap: 5px; padding: 13px 15px; color: var(--map-ink); }
.mt-farm-map .mt-farm-popup__photo { display: block; width: calc(100% + 30px); max-width: none; height: 86px; margin: -13px -15px 3px; object-fit: cover; }
.mt-farm-map .mt-farm-popup__title { padding-inline-end: 18px; font: 750 16px/1.18 Inter, system-ui, sans-serif; }
.mt-farm-map .mt-farm-popup__place, .mt-farm-map .mt-farm-popup__episodes { color: #526357; font-size: .83rem; line-height: 1.35; }
.mt-farm-map .mt-farm-popup__link, .mt-farm-map .mt-farm-popup__group-link {
  display: inline-flex;
  width: fit-content;
  padding: 5px 0;
  color: #983712;
  font: 700 13px/1.4 Inter, system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: .2em;
}
@media (max-width: 600px) {
  .mt-farm-map { width: calc(100% - 24px); }
  .mt-farm-map__controls { gap: 8px; padding: 10px; }
  .mt-farm-map__canvas { height: clamp(340px, 58svh, 460px); }
  .mt-farm-map__status { margin-inline-start: 0; }
}
