@font-face {
  font-family: "Quintessential";
  src: url("./fonts/quintessential/Quintessential-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Shared by every book map, including dynamically rebuilt chapter labels.
   Keep the existing responsive sizes and positions. */
.map .map-region,
.map .map-marker > span {
  font-family: "Quintessential", Georgia, serif;
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  color: #fff8e7;
  text-shadow: 0 1px 2px rgba(7, 12, 25, 0.8),
    0 0 3px rgba(255, 248, 231, 0.45),
    0 0 6px rgba(255, 248, 231, 0.22);
}

/* Preserve reveal fades; every displayed label settles at full opacity. */
.map .map-region.revealed,
.map .map-marker > span { opacity: 1; }

/* Dim only the inactive pin, rather than compositing its label at 58% too. */
.map .map-marker.revealed:not(.active-location) { opacity: 1; }
.map .map-marker.revealed:not(.active-location) > .pin { opacity: 0.58; }

/* One responsive hierarchy for the shared geography overlay in every book. */
.map .map-region {
  font-size: clamp(12px, 1.05vw, 17px);
  line-height: 1.12;
}
.map .map-region:is([data-region="montesere"], [data-region="vallahan"], [data-region="rask"], [data-region="eastern-wall"]) {
  font-size: clamp(16px, 1.3vw, 22px);
  line-height: 1.12;
}
.map .map-region[data-region="scythia"] {
  font-size: clamp(13px, 1.1vw, 19px);
  line-height: 1.12;
  width: max-content;
  max-width: 32%;
  white-space: normal;
}
@media (max-width: 760px), (max-width: 1024px) and (orientation: portrait) {
  .map .map-region { font-size: clamp(11px, 2.8vw, 14px); }
  .map .map-region:is([data-region="montesere"], [data-region="vallahan"], [data-region="rask"], [data-region="eastern-wall"]) {
    font-size: clamp(14px, 3.5vw, 17px);
  }
  .map .map-region[data-region="scythia"] { font-size: clamp(12px, 3vw, 15px); }
}


/* Pins sit above their map anchor. Their text appears below the pin. */
.map .map-marker > span { top: calc(50% + 34px); }
.map .map-marker.is-current { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.map .map-marker.is-current .pin { box-shadow: 0 0 0 4px rgba(7,14,29,.82), 0 0 0 8px rgba(118,235,222,.35), 0 0 20px rgba(92,222,213,.58); }
.map .map-marker > .map-pin-caption { display: block; top: calc(50% + 22px); background: none; padding: 0; border: 0; box-shadow: none; pointer-events: none; }
.map .map-marker > .map-place-detail { display: none; top: calc(50% + 46px); }
.map .map-marker.active-location > .map-place-detail { display: block; }
.map .map-marker > span[hidden] { display: none !important; }

/* Restore the original map heading. Only geography labels use Quintessential. */
.map .map-title h2 {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-style: normal;
  color: #fff;
  font-size: clamp(48px, 5.5vw, 88px);
  letter-spacing: -0.06em;
  line-height: 0.9;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}
@media (max-width: 760px) { .map .map-title h2 { font-size: clamp(32px, 10vw, 40px); } }
