.wia-qk {
  position: relative;
  max-width: 100%;
}
.wia-qk [hidden] { display: none !important; }

.wia-qk__viewport {
  width: 100%;
  border-radius: var(--radius, 8px);
  outline: none;
}
.wia-qk__viewport:focus-visible {
  outline: 3px solid var(--wia-focus, #1a4a8a);
  outline-offset: 2px;
}
.wia-qk__viewport svg {
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
  cursor: grab;
}
.wia-qk.is-zoomed .wia-qk__viewport svg { cursor: move; }
.wia-qk__viewport svg.is-dragging { cursor: grabbing; }

/* Marker */
.wia-qk__marker { cursor: pointer; }
.wia-qk__marker path,
.wia-qk__marker circle {
  transition: transform .13s ease;
  transform-origin: 0 0; /* Pin-Spitze bleibt am Ort */
}
.wia-qk__marker path {
  fill: var(--wia-pin, #2b2b2b);
  stroke: #fff;
  stroke-width: 1.5;
}
.wia-qk__marker:hover path,
.wia-qk__marker:hover circle,
.wia-qk__marker:focus-visible path,
.wia-qk__marker:focus-visible circle {
  transform: scale(1.35);
}
.wia-qk__marker.has-steckbrief path {
  fill: var(--wia-pin-steckbrief, #F29401);
}
.wia-qk__marker-dot { fill: #fff; pointer-events: none; }
.wia-qk__marker:hover path,
.wia-qk__marker:focus path { filter: brightness(1.12); }
.wia-qk__marker:focus { outline: none; }
.wia-qk__marker:focus-visible path {
  stroke: var(--wia-focus, #1a4a8a);
  stroke-width: 3;
}

/* Zoom-Steuerung: gruppierte Pille */
.wia-qk__controls {
  position: absolute;
  top: 14px; right: 14px;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  overflow: hidden;
  z-index: 3;
}
.wia-qk__zoom {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  background: #fff;
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,.1);
  cursor: pointer;
  color: #2b2b2b;
  padding: 0;
}
.wia-qk__zoom:last-child { border-bottom: 0; }
.wia-qk__zoom:hover { background: #f4f1ea; }
.wia-qk__zoom:focus-visible {
  outline: 3px solid var(--wia-focus, #1a4a8a);
  outline-offset: -3px;
}
.wia-qk__zoom[data-zoom="reset"] { font-size: 15px; }

/* Scroll-Hinweis */
.wia-qk__hint {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  background: rgba(43,43,43,.75);
  color: #fff;
  font-size: 1.05rem;
  text-align: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  border-radius: var(--radius, 8px);
  z-index: 2;
}
.wia-qk__hint.is-visible { opacity: 1; }

/* Tooltip */
.wia-qk__tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #2b2b2b; color: #fff;
  padding: 12px 22px;
  border-radius: 9px;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease;
  white-space: nowrap;
  z-index: 4;
}
.wia-qk__tooltip.is-visible { opacity: 1; }

/* Popup */
.wia-qk__popup {
  position: absolute;
  top: 16%; left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  background: var(--wia-popup-bg, #EBDFCC);
  border-radius: 13px;
  box-shadow: 0 10px 34px rgba(0,0,0,.28);
  padding: 22px 35px 35px 40px;
  z-index: 5;
}
.wia-qk__popup-title {
  margin: 0 0 18px;
  padding-right: 40px;
  padding-bottom: 12px;
  font-size: 2.5rem;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
  border-bottom: 2px solid rgba(0,0,0,.14);
}
.wia-qk__row { margin: 0 0 12px; display: flex; flex-direction: column; gap: 2px; }
.wia-qk__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(0,0,0,.55);
}
.wia-qk__value {
  font-size: 17px;
  font-weight: 600;
  color: #000;
}
.wia-qk__nosb { font-size: 16px; color: #000; }
.wia-qk__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: transparent;
  border: 0; cursor: pointer;
  font-size: 17px; line-height: 1;
  color: #2b2b2b;
  border-radius: 6px;
}
.wia-qk__close:hover { background: rgba(0,0,0,.07); }
.wia-qk__close:focus-visible { outline: 3px solid var(--wia-focus, #1a4a8a); }
.wia-qk__download {
  margin-top: 18px;
  display: block;
  width: 100%;
  text-align: center;
  background-color: var(--wia-btn, var(--primary, #A47B1D)) !important;
  color: #fff !important;
  border-radius: var(--radius, 8px) !important;
  padding: 16px 24px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border: 0 !important;
  box-sizing: border-box;
}
.wia-qk__download:hover { filter: brightness(1.06); }
.wia-qk__download:focus-visible { outline: 3px solid var(--wia-focus, #1a4a8a); outline-offset: 2px; }
.wia-qk__nosb { margin: 10px 0 0; }
.wia-qk__stand { margin-top: 10px; }

/* Screenreader-only */
.wia-qk__sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .wia-qk__tooltip, .wia-qk__hint, .wia-qk__marker path { transition: none; }
}

@media only screen and (max-width: 812px) {
  .wia-qk__popup { padding: 16px 20px 22px; }
  .wia-qk__popup-title { font-size: 1.9rem; }
}
@media only screen and (max-width: 500px) {
  .wia-qk__popup { width: min(300px, calc(100% - 24px)); }
  .wia-qk__popup-body p, .wia-qk__nosb { font-size: 14px; }
}

/* Unter der Karte: Legende + Suche */
.wia-qk__below {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 14px;
}
.wia-qk__legend {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; gap: 24px;
  font-size: 15px;
}
.wia-qk__legend li { display: flex; align-items: center; gap: 8px; }
.wia-qk__opt-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--wia-pin, #2b2b2b);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
  flex: 0 0 auto;
}
.wia-qk__opt-dot.has-steckbrief { background: var(--wia-pin-steckbrief, #F29401); }

.wia-qk__search { position: relative; min-width: min(340px, 100%); }
.wia-qk__search-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: rgba(0,0,0,.6);
}
.wia-qk__search-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1.5px solid rgba(0,0,0,.25);
  border-radius: 10px;
  background: #fff;
}
.wia-qk__search-input:focus-visible {
  outline: 3px solid var(--wia-focus, #1a4a8a);
  outline-offset: 1px;
}
.wia-qk__search-list {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% + 44px); /* öffnet nach oben über der Karte? nein: */
  bottom: auto; top: calc(100% + 6px);
  max-height: 280px;
  overflow-y: auto;
  margin: 0; padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(0,0,0,.16);
  z-index: 10;
}
.wia-qk__search-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 15px;
}
.wia-qk__search-list li:hover,
.wia-qk__search-list li[aria-selected="true"] {
  background: var(--wia-popup-bg, #EBDFCC);
}

/* Sprungmarke ueber der Karte: unsichtbar, bis sie den Fokus bekommt.
   Ohne sie muessten Tastaturnutzende gut 140 Marker durchtabben.

   Wichtig: wirklich ausblenden, nicht nur verschieben. Ein blosses
   transform: translateY(-200%) laesst den Link sichtbar, er stand dadurch
   ueber dem Text. Deshalb das uebliche Muster mit clip-path, das den Link
   fuer Sprachausgaben und Tastatur erhaelt, aber nichts anzeigt. */
.wia-qk__skip {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wia-qk__skip:focus {
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 5;
  inline-size: auto;
  block-size: auto;
  margin: 0;
  padding: 10px 16px;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  background: #fff;
  color: var(--wia-focus, #1a4a8a);
  border: 2px solid var(--wia-focus, #1a4a8a);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: underline;
}

/* Ziel der Sprungmarke. Nimmt keinen Platz ein, ist aber anspringbar. */
.wia-qk__nach-karte {
  scroll-margin-block-start: 90px;
}

.wia-qk__nach-karte:focus {
  outline: none;
}
