/* Karte (/karte) */
.km { display: grid; grid-template-columns: 340px 1fr; gap: 0; margin: 16px 0 28px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); height: min(76vh, 780px); min-height: 520px; }
.km-side { overflow: auto; padding: 18px 18px 22px; background: #fbfcfa; border-right: 1px solid var(--line); }
.km-side > summary { list-style: none; cursor: default; }
.km-side > summary::-webkit-details-marker { display: none; }
.km-side h1 { font-size: 1.35rem; margin: 0 0 4px; line-height: 1.2; }
.km-sub { margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.km-side h2 { font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; margin: 18px 0 8px; color: var(--ink); }
.km-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.km-chip { font: inherit; font-size: .88rem; padding: 7px 13px; border-radius: 999px; border: 1px solid #cfd6cf; background: #fff; color: #33423a; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.km-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.km-chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }
.km-chip:focus-visible, .km-x:focus-visible, .km-btn:focus-visible { outline: 3px solid #F2C230; outline-offset: 2px; }
.km-btn { font: inherit; font-weight: 700; border: 0; border-radius: 999px; background: var(--red); color: #fff; padding: 11px 18px; cursor: pointer; width: 100%; }
.km-mapwrap { position: relative; background: #dde7ee; min-height: 360px; }
#km-svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; }
#km-svg:active { cursor: grabbing; }
.km-kt { fill: #e8eee4; stroke: #fff; stroke-width: var(--sw, 1.4); stroke-linejoin: round; transition: fill .2s; }
.km-kt.dim { fill: #eff2ed; opacity: .7; }
.km-pin, .km-cl { cursor: pointer; outline: none; }
.km-pin path { stroke: #fff; stroke-width: 2; }
.km-pin.sel path { stroke: var(--ink); stroke-width: 2.5; }
.km-pin:focus-visible path, .km-cl:focus-visible .km-disc { stroke: #F2C230; stroke-width: 3.5; }
.km-area { fill: rgba(196, 18, 47, .10); stroke: rgba(196, 18, 47, .45); stroke-dasharray: 5 4; }
.km-halo { fill: #1f3d33; opacity: .18; }
.km-disc { fill: #1f3d33; stroke: #fff; stroke-width: 2.5; }
.km-cl text { fill: #fff; font: 700 17px "Schibsted Grotesk", sans-serif; pointer-events: none; }
.km-zoom { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); overflow: hidden; }
.km-zoom button { font: inherit; font-size: 1.3rem; width: 42px; height: 42px; border: 0; background: #fff; cursor: pointer; color: var(--ink); }
.km-zoom button + button { border-top: 1px solid var(--line); }
.km-legend { position: absolute; left: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; background: #fff; border-radius: 999px; padding: 8px 16px; font-size: .84rem; box-shadow: 0 2px 10px rgba(0, 0, 0, .14); max-width: calc(100% - 28px); }
.km-legend span { display: inline-flex; align-items: center; gap: 6px; }
.km-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.km-pop { position: absolute; z-index: 3; background: #fff; border-radius: 16px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); padding: 12px 14px 10px; max-height: calc(100% - 20px); overflow: auto; }
.km-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); }
.km-card { display: flex; gap: 10px; padding: 9px 22px 9px 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.km-card:hover b { text-decoration: underline; }
.km-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.km-card b { display: block; font-size: 1rem; }
.km-card small { display: block; color: var(--muted); font-size: .84rem; }
.km-meta { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-top: 4px; font-size: .84rem; color: var(--muted); }
.km-meta em { font-style: normal; font-weight: 800; color: var(--red); font-size: 1rem; }
.km-note, .km-more { margin: 8px 0 0; font-size: .78rem; color: var(--muted); }
@media (max-width: 820px) {
  .km { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .km-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: none; }
  .km-side > summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
  .km-side > summary::after { content: "Filter ▾"; font-weight: 700; font-size: .9rem; background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 14px; }
  .km-side[open] > summary::after { content: "Filter ▴"; }
  .km-mapwrap { height: 68vh; }
}
@media (prefers-reduced-motion: reduce) { .km-kt { transition: none; } }
.km-side > summary { display: none; }
.km-h1 { font-size: 1.35rem; margin: 0 0 4px; line-height: 1.2; }
@media (max-width: 820px) { .km-side > summary { display: flex; } .km-h1 { display: none; } .km-title { font-size: 1.05rem; } }
/* Platz für die Filter-Chips freihalten (kommen erst mit den Daten), Filter auf dem Handy von Anfang an eingeklappt (sonst springt die Karte) */
#km-regions { min-height: 127px; } #km-arten { min-height: 83px; } #km-tage { min-height: 38px; }
@media (max-width: 820px) { .km-side:not(.km-ready) > *:not(summary) { display: none; } }

/* ---- Überarbeitung: Schnellfilter über der Karte, Zahl und Listen-Link auf der Karte, Standort, Filter und Objekt als Blatt am Handy */
.km-top { position: absolute; top: 14px; left: 14px; right: 72px; display: flex; gap: 8px; align-items: center; z-index: 2; pointer-events: none; }
.km-top > * { pointer-events: auto; }
.km-fbtn { display: none; flex: none; align-items: center; gap: 7px; font: inherit; font-weight: 700; font-size: .92rem; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .16); }
.km-fbtn b { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: .75rem; display: inline-grid; place-items: center; }
.km-quick { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; margin-bottom: -4px; }
.km-quick::-webkit-scrollbar { display: none; }
.km-quick .km-chip { flex: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .14); border-color: transparent; }
.km-bot { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; justify-content: space-between; gap: 10px; z-index: 2; pointer-events: none; }
.km-pill { pointer-events: auto; background: #fff; border-radius: 999px; padding: 9px 16px; font-size: .9rem; font-weight: 700; color: var(--ink); text-decoration: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .16); }
.km-list { background: var(--ink); color: #fff; }
.km-mapwrap:has(.km-pop:not([hidden])) .km-bot { display: none; }
.km-zoom #km-loc { border-bottom: 1px solid var(--line); display: grid; place-items: center; }
.km-me-halo { fill: rgba(43, 93, 138, .22); } .km-me-dot { fill: #2b6cb0; stroke: #fff; stroke-width: 3; }
.km-legend { display: none; }
.km-grab, .km-done, .km-dim { display: none; }
.km-pop .km-grab { display: none; }
@media (max-width: 820px) {
  .km { border-radius: 14px; }
  .km-mapwrap { height: calc(100dvh - 200px); min-height: 440px; }
  .km-fbtn { display: inline-flex; }
  .km-side:not([open]) { display: none; }
  .km-side[open] { position: fixed; left: 0; right: 0; bottom: 0; z-index: 121; max-height: 88dvh; border: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); padding: 4px 18px calc(16px + env(safe-area-inset-bottom)); overscroll-behavior: contain; animation: kmslide .2s ease-out; }
  .km-side > summary { position: sticky; top: -4px; z-index: 2; margin: 0 -18px 8px; padding: 0 18px 8px; background: #fbfcfa; border: 0; touch-action: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .km-side > summary::after, .km-side[open] > summary::after { content: "✕"; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; background: var(--paper, #eef1ec); color: var(--ink); font-size: 15px; }
  .km-side .km-title { font-size: 1.25rem; }
  .km-grab { display: block; flex: 0 0 100%; position: relative; height: 26px; }
  .km-grab::before { content: ''; position: absolute; left: 50%; top: 10px; width: 42px; height: 4px; margin-left: -21px; border-radius: 2px; background: #cfd6cf; }
  .km-done { display: block; position: sticky; bottom: 0; margin-top: 18px; width: 100%; box-shadow: 0 -8px 16px #fbfcfa; }
  .km-dim { display: block; position: fixed; inset: 0; z-index: 120; background: rgba(21, 26, 28, .45); }
  .km-dim[hidden] { display: none; }
  html.km-lock { overflow: hidden; }
  .km-pop { touch-action: pan-y; padding-top: 4px; }
  .km-pop .km-grab { display: block; flex: none; height: 26px; margin: 0 -14px; touch-action: none; }
  .km-x { top: 24px; }
  .km-top { left: 10px; right: 66px; top: 10px; }
  .km-bot { left: 10px; right: 10px; bottom: 10px; }
}
@keyframes kmslide { from { transform: translateY(24px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .km-side[open] { animation: none; } }

/* Weitere Filter (früher gelber Abo-Kasten): normale Abschnitte; ohne Abo legt sich beim Umstellen Milchglas darüber */
.km-more .row { display: flex; gap: 8px; margin-top: 10px; }
.km-more label:not(.km-tog) { display: block; font-size: .88rem; color: var(--muted); margin: 10px 0 4px; }
.km-more input[type=number] { box-sizing: border-box; width: 100%; font: inherit; font-size: 16px; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; }
.km-more h2:first-child { margin-top: 18px; }
.km-tog { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--ink); cursor: pointer; }
.km-tog input { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 14px; background: #cfd6cf; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.km-tog input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.km-tog input:checked { background: var(--red); }
.km-tog input:checked::after { transform: translateX(18px); }
.km-tog input:focus-visible { outline: 3px solid #F2C230; outline-offset: 2px; }
.km-glass { position: fixed; z-index: 140; display: grid; place-items: center; background: rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); animation: kmslide .18s ease-out; }
.km-glass-cta { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 22px 24px; max-width: 320px; background: rgba(255, 255, 255, .88); border: 1px solid #fff; border-radius: 18px; box-shadow: 0 6px 24px rgba(40, 40, 30, .14); color: var(--ink); }
.km-glass-cta small { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.km-glass-cta .km-btn { width: auto; text-decoration: none; display: inline-block; }
.km-btn { box-sizing: border-box; }

/* Zoom-Knöpfe weiter unten, damit oben die Objekte (Schnellfilter, Pins) gut wählbar sind; kein Doppeltipp-Zoom der Seite */
.km-zoom { top: 64px; }
.km-top { right: 14px; }
body:has(.km) { touch-action: manipulation; }
#km-svg { touch-action: none; }
@media (max-width: 820px) { .km-top { right: 10px; } .km-zoom { top: 62px; right: 10px; } }
