/* KF Netzwerk 2 – Skin. Farben und Rundungen oben als Variablen anpassen. */
.kfn {
  --kfn-brand: #3B8961;
  --kfn-petrol: #006679;
  --kfn-ink: #2A2A2A;
  --kfn-grey: #484848;
  --kfn-soft: #6A6A6A;
  --kfn-line: #DADADA;
  --kfn-accent: #E3F0E8;
  --kfn-r: 28px;
  --kfn-small: 8px;
  --kfn-shadow: 0 10px 40px rgba(20, 40, 30, .18), 0 2px 8px rgba(20, 40, 30, .08);
  font-family: inherit;
  color: var(--kfn-ink);
  box-sizing: border-box;
}
.kfn *, .kfn *::before, .kfn *::after { box-sizing: border-box; }
.kfn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ Karte */
.kfn-map {
  position: relative;
  width: 100%;
  height: var(--kfn-h, clamp(560px, 82vh, 900px));
  background: #E4ECE7;
  overflow: hidden;
}
.kfn-canvas { position: absolute; inset: 0; z-index: 0; isolation: isolate; background: #E4ECE7; outline: none; }
.kfn-canvas .leaflet-tile-pane { filter: grayscale(1) sepia(.3) hue-rotate(78deg) saturate(.9) brightness(1.12) contrast(.78); }
.kfn-canvas .leaflet-control-attribution { background: rgba(255, 255, 255, .82); font-size: 11px; border-radius: 10px 0 0 0; padding: 2px 8px; }
.kfn-canvas .leaflet-control-zoom { border: 0; box-shadow: var(--kfn-shadow); border-radius: 999px; overflow: hidden; }
.kfn-canvas .leaflet-control-zoom a { width: 40px; height: 40px; line-height: 40px; font-size: 20px; color: var(--kfn-grey); border: 0; }
.kfn-canvas .leaflet-control-zoom a:hover { background: var(--kfn-accent); color: var(--kfn-ink); }
.kfn-canvas .leaflet-bottom.leaflet-left { margin-bottom: 8px; margin-left: 6px; }

.kfn-top {
  position: absolute; z-index: 5; top: 18px; left: 18px;
  right: 18px; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; transition: right .35s cubic-bezier(.2, .8, .2, 1);
}
.kfn-top > * { pointer-events: auto; }
.kfn-open .kfn-top { right: calc(min(420px, 40%) + 36px); }
.kfn-search { display: block; width: min(380px, 100%); }
.kfn-search input {
  width: 100%; height: 46px; border: 0; border-radius: 999px; padding: 0 20px 0 46px;
  font: inherit; font-size: .95rem; color: var(--kfn-ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23484848' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 16px 50% no-repeat;
  box-shadow: var(--kfn-shadow);
}
.kfn-search input:focus-visible { outline: 3px solid var(--kfn-brand); outline-offset: 2px; }
.kfn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kfn-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .96); color: var(--kfn-ink); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 10px rgba(20, 40, 30, .14); transition: background .2s, color .2s, transform .2s;
}
.kfn-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.kfn-chip:hover { background: var(--kfn-accent); }
.kfn-chip.is-on { background: var(--kfn-grey); color: #fff; }
.kfn-chip.is-on i { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.kfn-chip:focus-visible, .kfn-btn:focus-visible, .kfn-close:focus-visible, .kfn-link:focus-visible { outline: 3px solid var(--kfn-brand); outline-offset: 2px; }

.kfn-meta {
  position: absolute; z-index: 5; left: 62px; bottom: 16px; display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .94); border-radius: 999px; padding: 8px 16px; font-size: .8rem; font-weight: 600; box-shadow: 0 2px 10px rgba(20, 40, 30, .14);
}
.kfn-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--kfn-petrol); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Pins */
.kfn-pin-wrap { background: none; border: 0; }
.kfn-pin {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--c, #3B8961);
  border: 3px solid #fff; box-shadow: 0 3px 12px rgba(20, 40, 30, .35); transition: transform .2s ease, box-shadow .2s ease;
}
.kfn-pin i { width: 9px; height: 9px; border-radius: 50%; background: #fff; display: block; }
.kfn-pin-partner { box-shadow: 0 0 0 5px rgba(0, 102, 121, .22), 0 3px 12px rgba(20, 40, 30, .35); }
.kfn-pin-partner i { width: 12px; height: 12px; border-radius: 3px; }
.kfn-pin-wrap:hover .kfn-pin { transform: scale(1.14); }
.kfn-pin.is-sel { transform: scale(1.22); box-shadow: 0 0 0 7px rgba(59, 137, 97, .25), 0 4px 14px rgba(20, 40, 30, .4); }
.kfn-pin-partner.is-sel { box-shadow: 0 0 0 8px rgba(0, 102, 121, .28), 0 4px 14px rgba(20, 40, 30, .4); }
.kfn-pin-wrap:focus-visible { outline: 3px solid var(--kfn-ink); outline-offset: 2px; border-radius: 50%; }

/* Detailschublade */
.kfn-drawer {
  position: absolute; z-index: 6; top: 18px; right: 18px; bottom: 18px; width: min(420px, 40%);
  background: #fff; border-radius: var(--kfn-r) var(--kfn-r) var(--kfn-small) var(--kfn-r); box-shadow: var(--kfn-shadow);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(calc(100% + 40px)); visibility: hidden;
  transition: transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .38s;
}
.kfn-open .kfn-drawer { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.kfn-drawer:focus { outline: none; }
.kfn-d-body { padding: 2.2rem 2rem 2rem; }
.kfn-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: #F1F4F2; color: var(--kfn-ink); cursor: pointer; z-index: 2; transition: background .2s;
}
.kfn-close:hover { background: var(--kfn-accent); }
.kfn-d-kick { display: flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--kfn-petrol); padding-right: 40px; }
.kfn-d-kick i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.kfn-d-title { margin: .7rem 0 .9rem; font-size: 1.55rem; line-height: 1.2; font-weight: 600; color: var(--kfn-ink); }
.kfn-tags { margin-bottom: 1rem; }
.kfn-tags span { display: inline-block; background: var(--kfn-accent); color: #1f5a3d; font-size: .75rem; font-weight: 700; padding: .3rem .8rem; border-radius: 999px; }
.kfn-d-text { margin: 0 0 1.4rem; font-size: 1rem; line-height: 1.6; color: var(--kfn-ink); overflow-wrap: anywhere; }
.kfn-d-list { margin: 0 0 1.6rem; border-top: 1px solid var(--kfn-line); }
.kfn-d-row { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: .8rem 0; border-bottom: 1px solid var(--kfn-line); font-size: .92rem; line-height: 1.45; }
.kfn-d-row dt { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--kfn-soft); padding-top: .15rem; }
.kfn-d-row dd { margin: 0; overflow-wrap: anywhere; }
.kfn-d-row a { color: var(--kfn-petrol); text-decoration: underline; text-underline-offset: 3px; }
.kfn-d-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Buttons */
.kfn-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.6rem; border: 2px solid var(--kfn-brand); border-radius: 999px;
  background: var(--kfn-brand); color: #fff !important; font: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none !important; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.kfn-btn:hover { background: var(--kfn-petrol); border-color: var(--kfn-petrol); }
.kfn-btn-ghost { background: transparent; color: var(--kfn-brand) !important; }
.kfn-btn-ghost:hover { background: var(--kfn-brand); color: #fff !important; border-color: var(--kfn-brand); }
.kfn-btn[disabled] { opacity: .55; cursor: wait; }

.kfn-hintbar { display: none; }
.kfn-noscript { list-style: none; margin: 0; padding: 1rem; position: relative; z-index: 6; background: #fff; }

/* ------------------------------------------------------------ Formular */
.kfn-form { background: #fff; border-radius: var(--kfn-r) var(--kfn-r) var(--kfn-small) var(--kfn-r); padding: 2.4rem; box-shadow: 0 6px 30px rgba(20, 40, 30, .08); max-width: 1100px; margin: 0 auto; }
.kfn-f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; }
.kfn-f label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 1rem; }
.kfn-f input[type=text], .kfn-f input[type=url], .kfn-f input[type=email], .kfn-f input[type=tel], .kfn-f select, .kfn-f textarea {
  display: block; width: 100%; margin-top: .35rem; border: 1px solid var(--kfn-line); border-radius: 14px; padding: .75rem 1rem; font: inherit; font-weight: 400; font-size: .95rem; color: var(--kfn-ink); background: #fff;
}
.kfn-f textarea { resize: vertical; min-height: 7rem; }
.kfn-f input:focus-visible, .kfn-f select:focus-visible, .kfn-f textarea:focus-visible { outline: 3px solid var(--kfn-accent); border-color: var(--kfn-brand); }
.kfn-f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.kfn-count { display: block; text-align: right; font-weight: 400; color: var(--kfn-soft); margin-top: .2rem; }
.kfn-find { display: flex; gap: 10px; align-items: flex-start; }
.kfn-find input { flex: 1; }
.kfn-find .kfn-btn { margin-top: .35rem; min-height: 46px; white-space: nowrap; padding: 0 1.1rem; }
.kfn-pickmap { height: 380px; border-radius: 22px 22px 22px 6px; overflow: hidden; background: #E4ECE7; border: 1px solid var(--kfn-line); isolation: isolate; cursor: crosshair; }
.kfn-pickmap .leaflet-tile-pane { filter: grayscale(1) sepia(.3) hue-rotate(78deg) saturate(.9) brightness(1.12) contrast(.78); }
.kfn-hint { display: block; margin-top: .6rem; font-size: .8rem; font-weight: 400; color: var(--kfn-soft); line-height: 1.45; }
.kfn-hint.is-err { color: #9a2d1f; }
.kfn-hp { position: absolute !important; left: -9999px; height: 0; overflow: hidden; }
.kfn-f .kfn-check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: .88rem; line-height: 1.5; margin: 1.2rem 0 0; }
.kfn-check input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--kfn-brand); flex: none; }
.kfn-f-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.6rem; }
.kfn-status { font-size: .9rem; font-weight: 600; color: var(--kfn-soft); }
.kfn-status.is-err { color: #9a2d1f; }
.kfn-done { text-align: left; padding: 1rem 0; }
.kfn-done h3 { font-size: 1.6rem; margin: 0 0 .6rem; }
.kfn-done a:not(.kfn-btn) { color: var(--kfn-petrol); overflow-wrap: anywhere; }

/* ------------------------------------------------------------ QR */
.kfn-qr { margin: 0; text-align: center; }
.kfn-qr-img { width: 168px; margin: 0 auto; padding: 12px; background: #fff; border-radius: 20px 20px 20px 6px; box-shadow: 0 6px 24px rgba(20, 40, 30, .12); }
.kfn-qr-img svg { display: block; width: 100%; height: auto; }
.kfn-qr figcaption { margin-top: .8rem; font-size: .85rem; font-weight: 600; color: var(--kfn-soft); }

/* ------------------------------------------------------------ Mobil */
@media (max-width: 760px) {
  .kfn-map { height: var(--kfn-h-m, clamp(520px, 78vh, 720px)); }
  .kfn-top { top: 12px; left: 12px; right: 12px; }
  .kfn-open .kfn-top { right: 12px; }
  .kfn-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 2px 12px 6px; scrollbar-width: none; }
  .kfn-chips::-webkit-scrollbar { display: none; }
  .kfn-chip { flex: none; }
  .kfn-search { width: 100%; }
  .kfn-meta { left: 58px; bottom: 12px; }
  .kfn-drawer { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 64%; border-radius: 26px 26px 8px 26px; transform: translateY(calc(100% + 24px)); }
  .kfn-d-body { padding: 1.7rem 1.4rem 1.5rem; }
  .kfn-d-title { font-size: 1.3rem; }
  .kfn-form { padding: 1.5rem 1.2rem; border-radius: 22px 22px 6px 22px; }
  .kfn-f-grid, .kfn-f-row { grid-template-columns: 1fr; gap: 1rem; }
  .kfn-find { flex-direction: column; }
  .kfn-find .kfn-btn { margin-top: 0; width: 100%; }
  .kfn-pickmap { height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  .kfn *, .kfn *::before, .kfn *::after { transition: none !important; animation: none !important; }
}
