.portal-hero-visual.portal-hero-map {
  align-self: start;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
  background: #0e2237;
}

@media (min-width: 761px) {
  .portal-hero-copy {
    align-self: start;
    padding-block-start: clamp(0px, 3.5vw, 51px);
  }
}

.portal-map-stage {
  position: relative;
  aspect-ratio: 8 / 5;
  background: #172d43;
}

.portal-map-stage img,
.portal-map-stage svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.portal-map-kicker,
.portal-map-hover {
  position: absolute;
  pointer-events: none;
}

.portal-map-kicker {
  inset: 10% auto auto 7%;
  color: #f4d6a4;
  font-size: clamp(.63rem, 1.2vw, .82rem);
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.portal-map-hover {
  inset: auto auto 10% 50%;
  transform: translateX(-50%);
  padding: .4em .85em;
  border: 1px solid #efd5aa63;
  border-radius: 99px;
  background: #10233a;
  color: #ffedcf;
  white-space: nowrap;
  font-size: clamp(.68rem, 1.25vw, .84rem);
  font-weight: 650;
}

[data-locality-map]:not([data-map-ready]) [data-map-svg],
[data-locality-map]:not([data-map-ready]) [data-map-hover],
[data-locality-map]:not([data-map-ready]) .portal-map-controls label,
[data-locality-map]:not([data-map-ready]) .portal-map-controls select,
.portal-map-panel[hidden] {
  display: none;
}

.map-area-hit {
  fill: transparent;
  pointer-events: fill;
  cursor: pointer;
}

@media (hover: hover) {
  .map-area-hit:hover {
    fill: #fff6dd50;
  }
}

.map-tile {
  transition: transform 240ms cubic-bezier(.2,.8,.2,1);
}

.map-tile-face {
  fill: transparent;
  stroke: #704828aa;
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.map-tile-sides,
.map-village-stem {
  opacity: 0;
  transition: opacity 160ms ease;
}

.map-tile-sides {
  fill: url(#hero-map-bronze);
}

.map-city-dot {
  fill: #25324b;
  stroke: #fff0cd;
  stroke-width: 1.6;
}

.map-city-label {
  fill: #19263c;
  stroke: #ffebbf;
  stroke-width: 3;
  stroke-linejoin: round;
  paint-order: stroke fill;
  font-size: 22px;
  font-weight: 800;
}

.map-village-dot {
  fill: #8b461e;
  stroke: #fff0cd;
  stroke-width: 2;
}

.map-village-stem {
  stroke: #754529;
  stroke-width: 4;
}

.map-tile.is-raised {
  transform: translateY(calc(-1 * var(--map-lift)));
  filter: drop-shadow(0 5px 4px #29160970);
}

.is-raised .map-tile-face {
  fill: url(#hero-map-gold);
  stroke: #fff1c9;
  stroke-width: 2;
}

.is-raised .map-tile-sides,
.is-raised .map-village-stem {
  opacity: 1;
}

.is-raised .map-village-dot {
  fill: #b16127;
  stroke: #fff1c9;
  stroke-width: 3;
}

.portal-map-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 15px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid #f4d6a440;
}

.portal-map-controls label {
  grid-column: 1 / -1;
  color: #e8d0a8;
  font-size: .77rem;
  font-weight: 700;
}

.portal-map-controls select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #a8b9ca68;
  border-radius: 6px;
  background: #233e56;
  color: white;
  font: inherit;
  font-size: .88rem;
}

@media (max-width: 760px) {
  .portal-map-controls select {
    font-size: 1rem;
  }
}

.portal-map-index,
.portal-map-page {
  color: #ffdeaa;
  font-weight: 700;
  font-size: .83rem;
}

.portal-map-index:hover,
.portal-map-page:hover {
  color: #ffedce;
  text-decoration: underline;
}

.portal-map-panel {
  padding: 12px 16px 16px;
  border-top: 1px solid #f4d6a440;
}

.portal-map-panel-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.portal-map-panel-heading h2 {
  margin: 0;
  color: white;
  font-size: 1.12rem;
}

.portal-map-panel-heading p {
  margin: 0;
  color: #e8d0a8;
  font-size: .8rem;
}

.portal-map-results {
  max-height: 9.25rem;
  margin: 8px 0 12px;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  color-scheme: dark;
}

.portal-map-results li + li {
  border-top: 1px solid #d5e1ec24;
}

.portal-map-results a {
  display: block;
  padding: 6px 4px;
  color: #edf3fb;
  font-size: .88rem;
  line-height: 1.35;
}

.portal-map-results a:hover {
  background: #233e56;
  text-decoration: underline;
}

.portal-hero-visual > .portal-map-credit {
  position: static;
  display: block;
  padding: 0 16px 11px;
  background: none;
  color: #bfcedd;
  font-size: .65rem;
  font-weight: 500;
  line-height: 1.4;
}

.portal-hero-visual > .portal-map-credit a {
  display: inline;
  color: inherit;
  text-decoration: underline;
}

.portal-hero-map :is(a, select):focus-visible {
  outline: 2px solid #ffdc9f;
  outline-offset: 1px;
}

.portal-map-results a:focus-visible {
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .map-tile,
  .map-tile-sides,
  .map-village-stem {
    transition: none;
  }
}
