.places-main {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding-block: clamp(1.15rem, 3.2vw, 2.5rem) clamp(2rem, 5vw, 4rem);
  display: grid;
  gap: clamp(1.1rem, 2.7vw, 1.8rem);
}

.places-hero h1 {
  text-wrap: balance;
}

.places-main :is(.places-map, .places-section) {
  padding: clamp(1rem, 3.5vw, 2.45rem);
  scroll-margin-top: 7rem;
  min-width: 0;
}

.places-main :is(h2, h3) {
  text-wrap: balance;
  line-height: 1.12;
}

.places-main h2 {
  margin: 0 0 .65rem;
  font-size: clamp(1.75rem, 4vw, 2.7rem);
}

.places-main p {
  margin: 0 0 .85rem;
  line-height: 1.62;
}

.places-jump {
  display: flex;
  gap: .45rem .65rem;
  flex-wrap: wrap;
}

.places-jump a,
.places-chapters a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .4rem .8rem;
  border: 1px solid #bed0e8;
  border-radius: 8px;
  background: #ecf2fc;
  color: #122e64;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.places-jump a:hover,
.places-chapters a:hover,
.places-actions a:hover {
  text-decoration: underline;
  text-underline-offset: .15em;
}

.places-main :is(a, select):focus-visible {
  outline: 3px solid #1760aa;
  outline-offset: 3px;
}

.places-map-controls {
  display: flex;
  margin: 0 0 1rem;
  gap: .45rem .8rem;
  align-items: center;
  flex-wrap: wrap;
}

.places-map-controls[hidden] {
  display: none;
}

.places-map-controls label {
  font-weight: 700;
}

.places-map-controls select {
  max-width: 100%;
  min-height: 2.75rem;
  padding-inline: .6rem;
  border: 1px solid #8da6ca;
  border-radius: 8px;
  background: #f8faff;
  color: #132b57;
  font: inherit;
}

.places-map-instruction {
  color: #344c71;
  font-size: .95rem;
}

.places-map-region + .places-map-region {
  margin-top: 1.5rem;
}

.places-map-region[hidden] {
  display: none;
}

.places-map-region h3 {
  margin: 0 0 .55rem;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}

.places-map-plot {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 2 / 1;
  border: 1px solid #bdd0e7;
  border-radius: 12px;
  background-color: #edf4fb;
  background-image:
    linear-gradient(#b8c9df80 1px, transparent 1px),
    linear-gradient(90deg, #b8c9df80 1px, transparent 1px);
  background-size: 10% 20%;
}

.places-map-tiles {
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.places-map-tiles.is-loaded {
  visibility: visible;
}

.places-map-tile-layer {
  position: absolute;
  inset: 0;
}

.places-map-tile-layer[hidden] {
  display: none;
}

.places-map-tiles img {
  position: absolute;
  display: block;
  max-width: none;
  user-select: none;
}

.places-map-plot .places-map-pin {
  position: absolute;
  top: var(--pin-y);
  left: var(--pin-x);
  display: grid;
  place-items: center;
  width: clamp(1.9rem, 4vw, 2.55rem);
  aspect-ratio: 1;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #153776;
  color: #fff;
  box-shadow: 0 2px 6px #08204d4d;
  font-size: clamp(.9rem, 2vw, 1.15rem);
  font-weight: 800;
  text-decoration: none;
}

.places-map-plot .places-map-pin:hover,
.places-map-plot .places-map-pin[aria-current="location"] {
  z-index: 1;
  border-color: #153776;
  background: #ffd166;
  color: #132b57;
}

.places-map p:is(.places-map-simple, .places-map-attribution) {
  margin: .3rem 0 0;
  color: #344c71;
  font-size: .78rem;
  text-align: right;
}

.places-map-legend {
  margin: .8rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem .9rem;
  list-style: none;
}

.places-map-legend a {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.5rem;
  padding: .2rem .35rem;
  border-radius: 7px;
  color: #153776;
  font-weight: 700;
  line-height: 1.3;
  text-underline-offset: .15em;
}

.places-map-legend a[aria-current="location"] {
  background: #ffefc6;
}

.places-map-legend a span {
  flex: 0 0 1.3rem;
  border-radius: 50%;
  background: #153776;
  color: #fff;
  font-size: .84rem;
  line-height: 1.3rem;
  text-align: center;
}

.places-card {
  scroll-margin-top: 7rem;
}

@media (max-width: 490px) {
  .places-map-legend {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.places-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.3rem;
}

.places-card {
  display: flex;
  flex-direction: column;
  padding: clamp(.95rem, 2.5vw, 1.55rem);
  border: 1px solid #d4e0ef;
  border-radius: 14px;
  background: #f4f7fc;
}

.places-card h3 {
  margin: 0 0 .4rem;
  font-size: clamp(1.3rem, 2.7vw, 1.85rem);
}

.places-card .places-address {
  color: #3e5476;
  font-size: .93rem;
  font-weight: 700;
}

.places-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .8rem;
  margin-top: auto;
  font-size: .94rem;
}

.places-actions a {
  color: #123d7d;
  text-underline-offset: .15em;
}

.places-actions .places-route {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .4rem .7rem;
  border-radius: 8px;
  background: #153776;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.places-actions .places-route:hover {
  background: #0e295b;
}

.places-video-player {
  max-width: 800px;
  aspect-ratio: 16 / 9;
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 12px;
  background: #0a1b37;
}

.places-video-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.places-chapters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

@media (max-width: 680px) {
  .places-grid {
    grid-template-columns: 1fr;
  }
}
