.area-map:has(.location-map) { background: var(--surface); }
.area-map:has(.location-map) .map-status,
.area-map:has(.location-map) figcaption { color: var(--ink); border-color: var(--line); }
.area-map:has(.location-map) figcaption span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.location-map { position: relative; background: var(--soft); }
.location-map-viewport { position: relative; height: clamp(300px, 30vw, 390px); overflow: hidden; isolation: isolate; cursor: grab; }
.location-map-viewport:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
.location-map-viewport.location-map-dragging { cursor: grabbing; }
.location-map-scene { position: absolute; inset: 0; transform-origin: 0 0; pointer-events: none; }
.location-map-tiles,
.location-map-tile-layer { position: absolute; inset: 0; }
.location-map-tiles { opacity: 0; transition: opacity .2s ease; }
.area-map .location-map-tile { position: absolute; display: block; width: 256px; height: 256px; max-width: none; user-select: none; }
.location-map-area { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 2px solid #276b52; border-radius: 50%; background: rgb(74 129 97 / 17%); box-shadow: 0 0 0 7px rgb(74 129 97 / 6%); opacity: 0; pointer-events: none; }
.location-map-legend { position: absolute; z-index: 2; top: 16px; left: 16px; display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 600; box-shadow: 0 2px 8px rgb(0 0 0 / 4%); opacity: 0; }
.location-map-legend span { width: 12px; height: 12px; border: 1.5px solid #276b52; border-radius: 50%; background: rgb(74 129 97 / 17%); }
.location-map-state { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; gap: 9px; text-align: center; color: var(--muted); }
.location-map-state strong { color: var(--ink); font-family: var(--font-display); font-size: 24px; font-weight: 500; }
.location-map-state span { max-width: 290px; font-size: 14px; line-height: 1.55; }
.location-map-controls { position: absolute; z-index: 3; top: 16px; right: 16px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: 0 2px 8px rgb(0 0 0 / 8%); cursor: default; }
.location-map-controls button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font: 24px/1 var(--font-body, sans-serif); cursor: pointer; }
.location-map-controls button + button { border-top: 1px solid var(--line); }
.location-map-controls button:first-child { border-radius: 5px 5px 0 0; }
.location-map-controls button:last-child { border-radius: 0 0 5px 5px; }
.location-map-controls button:hover:not(:disabled) { background: var(--soft); }
.location-map-controls button:disabled { color: var(--muted); opacity: .4; cursor: default; }
.location-map-controls button:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
.location-map-controls svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.location-map-hint { position: absolute; z-index: 2; top: 59px; left: 16px; max-width: calc(100% - 88px); margin: 0; padding: 4px 7px; border-radius: 4px; background: var(--surface); color: var(--muted); font-size: 11px; line-height: 1.4; pointer-events: none; }
.location-map-touch-hint { display: none; }
.location-map-instructions { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.location-map-retry { position: absolute; z-index: 3; left: 50%; bottom: 76px; transform: translateX(-50%); padding: 8px 16px; min-height: 40px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); font-size: 14px; }
.location-map-retry:hover { border-color: var(--green); }
.location-map[data-map-state="ready"] .location-map-tiles,
.location-map[data-map-state="ready"] .location-map-area,
.location-map[data-map-state="ready"] .location-map-legend { opacity: 1; }
.location-map[data-map-state="ready"] .location-map-state { display: none; }
.location-map-credits { position: absolute; z-index: 3; right: 0; bottom: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; max-width: 100%; padding: 3px 7px; border-radius: 4px 0 0 0; background: rgb(255 255 255 / 94%); color: #32453e; }
.location-map-provider { display: block; }
.area-map .location-map-provider img { display: block; width: 72px; height: auto; }
.location-map-credits > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 7px; min-width: 0; font-size: 10px; line-height: 1.5; text-align: right; }
.location-map-credits > div a { white-space: nowrap; }
.location-map-credits a { color: #32453e; text-decoration: none; text-underline-offset: 2px; }
.location-map-credits a:hover { text-decoration: underline; }
.location-map-credits a:focus-visible { outline: 2px solid #276b52; outline-offset: 2px; border-radius: 2px; }
[data-theme="night"] .location-map-area { border-color: #b4dbc1; background: rgb(141 198 162 / 18%); box-shadow: 0 0 0 7px rgb(141 198 162 / 6%); }
[data-theme="night"] .location-map-legend span { border-color: #b4dbc1; background: rgb(141 198 162 / 18%); }
@media (max-width: 620px) {
  .location-map-viewport { height: 300px; }
  .location-map-legend { top: 12px; left: 12px; }
  .location-map-controls { top: 12px; right: 12px; }
  .location-map-hint { top: 55px; left: 12px; }
  .location-map-credits { gap: 7px; }
}
@media (pointer: coarse) {
  .location-map-mouse-hint { display: none; }
  .location-map-touch-hint { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .location-map-tiles { transition: none; }
}
