html {
  --kf-header-h: 72px;
  --kf-hud-h: 0px;
}

[hidden] { display: none !important; }

body.kf-page {
  height: 100dvh;
  overflow: hidden;
}

body.kf-page footer { display: none; }

.nav-links a[aria-current="page"] { color: var(--yellow); }

.kf {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: calc(100dvh - var(--kf-header-h));
  background: var(--charcoal);
}

.kf-modal-panel .kf-site label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kf-modal {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
}

.kf-modal-panel {
  width: min(28rem, 100%);
  padding: 1.25rem 1.25rem 1.5rem;
  background: #1a1a1a;
  border: 1px solid var(--slate);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.kf-modal-panel h2 {
  margin: 0 0 0.35rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
  color: var(--white);
}

.kf-modal-lead {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

.kf-modal-panel .kf-site input {
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  border: 1px solid #2a2a2a;
  border-radius: 0.75rem;
  background: #0a0a0a;
  font-size: 1rem;
  font-weight: 500;
}

.kf-modal-panel .kf-site input:focus,
.kf-modal-panel .kf-site input:focus-visible {
  border: 1px solid var(--yellow);
  box-shadow: 0 0 0 2px rgba(253, 202, 49, 0.2);
  color: var(--white);
}

.kf-modal-panel .kf-suggest {
  margin-top: 0.25rem;
  max-height: 14rem;
  padding: 0.25rem 0;
  border: 1px solid var(--slate);
  border-radius: 0.75rem;
  background: var(--charcoal);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.kf-modal-panel .kf-suggest button {
  padding: 0.5rem 0.75rem;
}

@media (min-width: 600px) {
  .kf-modal {
    align-items: center;
    padding: 1rem;
  }
  .kf-modal-panel {
    border-bottom: 1px solid var(--slate);
    border-radius: 16px;
  }
}

.kf-hud {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.5rem 1rem 0.65rem;
  background: var(--black);
}

.kf-catalog-error {
  color: var(--yellow);
  font-weight: 600;
  font-size: 0.88rem;
}

.kf-site {
  position: relative;
}

.kf-site label,
.kf-param-label {
  display: block;
  font-family: Oswald, Inter, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
}

.kf-site input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.15rem 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border-width: 0;
  border-style: none;
  outline-width: 0;
  outline-style: none;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: 1.12rem;
  font-weight: 600;
  caret-color: var(--yellow);
}

.kf-site input::placeholder {
  color: var(--muted);
  font-weight: 500;
}

.kf-site input:focus,
.kf-site input:focus-visible {
  color: var(--white);
  caret-color: var(--yellow);
  background: transparent;
  border-width: 0;
  border-style: none;
  outline-width: 0;
  outline-style: none;
  box-shadow: none;
}

.kf.is-compact .kf-hud {
  gap: 0.25rem;
  padding-block: 0.3rem 0.35rem;
}

.kf.is-compact .kf-site label { display: none; }
.kf.is-compact .kf-site input {
  min-height: 44px;
  font-size: 0.95rem;
}

.kf-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 30;
  display: flex;
  flex-direction: column;
  max-height: 12rem;
  overflow: auto;
  background: var(--black);
}

.kf-suggest button {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  min-height: 44px;
  padding: 0.4rem 0;
  border-width: 0;
  border-style: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.kf-suggest button small {
  color: var(--muted);
  font-size: 0.78rem;
}

.kf-suggest button.is-active,
.kf-suggest button:hover {
  color: var(--yellow);
}

.kf-params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.1rem;
  align-items: end;
}

.kf-params #kfSearch {
  grid-column: 1 / -1;
  min-height: 44px;
  width: 100%;
}

.kf-go {
  appearance: none;
  min-height: 44px;
  padding: 0;
  border-width: 0;
  border-style: none;
  background: transparent;
  color: var(--yellow);
  font-family: Oswald, Inter, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.kf-stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: stretch;
  min-height: 44px;
}

.kf-stepper button {
  appearance: none;
  border-width: 0;
  border-style: none;
  background: transparent;
  color: var(--yellow);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}

.kf-stepper-value {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.kf-reach-row {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.kf-reach-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  appearance: none;
  -webkit-appearance: none;
  border-width: 0;
  border-style: none;
  outline-width: 0;
  outline-style: none;
  box-shadow: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 0;
  caret-color: var(--yellow);
}

.kf-reach-row input:focus,
.kf-reach-row input:focus-visible {
  outline-width: 0;
  outline-style: none;
  box-shadow: none;
}

.kf-reach-row span {
  color: var(--muted);
  font-weight: 700;
}

.kf-loading {
  color: var(--yellow);
  font-weight: 700;
}

.kf-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.kf-map-wrap {
  position: relative;
  grid-row: 1;
  grid-column: 1;
  min-height: 0;
  overflow: hidden;
  background: #1a1a1a;
  border: 1px solid var(--slate);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

#kf-map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  width: 100%;
  height: 100%;
  background: #0d1410;
}

.kf-map-wrap.is-picking,
.kf-map-wrap.is-picking .leaflet-container,
.kf-map-wrap.is-picking .leaflet-interactive {
  cursor: none !important;
}

.kf-map-wrap.is-picking .leaflet-control {
  cursor: pointer !important;
}

.kf-crosshair {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.kf-crosshair.is-on {
  opacity: 1;
}

.kf-crosshair-h,
.kf-crosshair-v {
  position: absolute;
  background: var(--yellow);
}

.kf-crosshair-h {
  left: 0;
  width: 16px;
  top: 50%;
  height: 2px;
  transform: translateY(-1px);
}

.kf-crosshair-h::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 0;
  width: 16px;
  height: 2px;
  background: var(--yellow);
}

.kf-crosshair-v {
  top: 0;
  height: 16px;
  left: 50%;
  width: 2px;
  transform: translateX(-1px);
}

.kf-crosshair-v::after {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  width: 2px;
  height: 16px;
  background: var(--yellow);
}

.kf-map-cue {
  display: none;
}

.kf-labels {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: min(16rem, 52%);
  list-style: none;
  pointer-events: none;
}

.kf-labels li {
  padding: 0.15rem 0.4rem;
  background: var(--black);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  border-left: 3px solid var(--yellow);
}

.kf-pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--black);
}

.kf-radius-handle {
  background: none !important;
  border: 0 !important;
}

.kf-radius-knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--black);
  border: 2px solid var(--yellow);
}

.kf-radius-label {
  display: block;
  margin-left: 1.4rem;
  margin-top: -1.15rem;
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 800;
  text-shadow: 0 0 4px #000;
}

.kf-map-wrap .leaflet-control-zoom {
  border: 1px solid var(--slate) !important;
  border-radius: 12px !important;
  overflow: hidden;
  margin: 0 0 14px 12px !important;
  background: #1a1a1a !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}
.kf-map-wrap .leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  background: #1a1a1a !important;
  color: var(--text) !important;
  border: 0 !important;
  font-size: 18px !important;
}
.kf-map-wrap .leaflet-control-zoom a:first-child {
  border-bottom: 1px solid var(--slate) !important;
}
.kf-map-wrap .leaflet-control-zoom a:hover {
  background: #2a2a2e !important;
  color: var(--yellow) !important;
}
.kf-map-wrap .leaflet-control-attribution {
  background: rgba(10, 10, 10, 0.85) !important;
  color: var(--muted) !important;
}
.kf-map-wrap .leaflet-control-attribution a { color: var(--yellow) !important; }

.kf-results,
.kf-extras,
.kf-inquiry {
  min-height: 0;
  overflow: auto;
  background: var(--black);
  padding: 0.75rem 0.8rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

.kf-rail-params:empty { display: none; }
.kf-rail-params { margin: 0.35rem 0 0.55rem; }

.kf-kicker {
  color: var(--yellow);
  font-family: Oswald, Inter, sans-serif;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.kf-results h2,
.kf-extras h2,
.kf-inquiry h2 {
  font-family: Oswald, Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.35rem;
  margin: 0.15rem 0 0.35rem;
}

.kf-recap,
.kf-help,
.kf-disclaimer,
.kf-inquiry-address,
.kf-inquiry-vehicles {
  color: var(--muted);
  font-size: 0.88rem;
}

.kf-count {
  color: var(--yellow);
  font-weight: 700;
  margin: 0.25rem 0 0.4rem;
}

.kf-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.55rem 0 0.75rem;
}

.kf-card {
  appearance: none;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.65rem;
  width: 100%;
  min-height: 44px;
  padding: 0.45rem;
  border: 2px solid var(--slate);
  background: var(--steel);
  color: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.kf-card:hover { border-color: var(--yellow); }
.kf-card.is-on {
  border-color: var(--yellow);
  box-shadow: inset 3px 0 0 var(--yellow);
}

.kf-card-thumb {
  min-height: 64px;
  background: var(--slate);
  overflow: hidden;
}

.kf-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kf-card-thumb.is-empty { background: var(--black); }

.kf-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.kf-card-name {
  font-size: 0.95rem;
  line-height: 1.2;
}

.kf-card-spec {
  color: var(--muted);
  font-size: 0.75rem;
}

.kf-card-pick {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kf-card.is-on .kf-card-pick { color: var(--yellow); }

.kf-empty {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 0.6rem 0;
}

.kf-continue,
.kf-extras-actions,
.kf-inquiry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.kf-extras-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.7rem 0;
}

.kf-extra {
  appearance: none;
  display: flex;
  flex-direction: column;
  min-height: 44px;
  padding: 0;
  border: 2px solid var(--slate);
  background: var(--steel);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.kf-extra.is-on { border-color: var(--yellow); }

.kf-extra-photo {
  aspect-ratio: 4 / 3;
  background: var(--black);
  overflow: hidden;
}

.kf-extra-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kf-extra-name,
.kf-extra-hint {
  padding: 0.35rem 0.45rem 0.45rem;
  font-weight: 700;
  font-size: 0.82rem;
}

.kf-extra-hint {
  padding-top: 0;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.72rem;
}

.kf-inquiry-extras {
  list-style: none;
  margin: 0.5rem 0;
}

.kf-inquiry-extras li { font-weight: 600; }

.kf-rail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.kf-job {
  flex: 0 0 auto;
  min-height: 0;
  padding: 1.1rem 1.15rem 1.2rem;
  background: #1a1a1a;
  border: 1px solid var(--slate);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.kf-job-head h2 {
  margin: 0 0 0.85rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
}

.kf-job .kf-site {
  margin-bottom: 0.85rem;
}

.kf-job .kf-params {
  gap: 0.75rem;
}

.kf-job .kf-param-label {
  margin: 0 0 0.35rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.kf-job .kf-stepper {
  min-height: 48px;
  border: 1px solid #2a2a2a;
  border-radius: 0.75rem;
  background: #0a0a0a;
}

.kf-job .kf-stepper button {
  color: var(--muted);
}

.kf-job .kf-stepper button:hover {
  color: var(--yellow);
}

.kf-job .kf-stepper-value {
  color: var(--white);
  font-weight: 600;
}

.kf-job .kf-go {
  margin-top: 0.35rem;
  min-height: 48px;
  border-radius: 0.75rem;
  background: var(--yellow);
  color: var(--black);
  font-family: Inter, system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
}

.kf-job .kf-site label {
  margin-bottom: 0.35rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.kf-job .kf-site input {
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  border: 1px solid #2a2a2a;
  border-radius: 0.75rem;
  background: #0a0a0a;
  font-size: 1rem;
  font-weight: 500;
}

.kf-job .kf-site input:focus,
.kf-job .kf-site input:focus-visible {
  border: 1px solid var(--yellow);
  box-shadow: 0 0 0 2px rgba(253, 202, 49, 0.2);
}

.kf.is-job .kf-body,
.kf.is-address .kf-body,
.kf.is-searched .kf-body,
.kf.is-extras .kf-body,
.kf.is-anfrage .kf-body {
  gap: 0.75rem;
  padding: 0.75rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, max-content) minmax(12rem, 1fr);
}

.kf.is-job .kf-rail,
.kf.is-address .kf-rail,
.kf.is-searched .kf-rail,
.kf.is-extras .kf-rail,
.kf.is-anfrage .kf-rail {
  grid-row: 1;
  grid-column: 1;
  align-self: stretch;
}

.kf.is-address .kf-job {
  flex: 1 1 auto;
}

.kf.is-job .kf-map-wrap,
.kf.is-address .kf-map-wrap,
.kf.is-searched .kf-map-wrap,
.kf.is-extras .kf-map-wrap,
.kf.is-anfrage .kf-map-wrap {
  grid-row: 2;
  grid-column: 1;
}

.kf.is-extras .kf-extras,
.kf.is-anfrage .kf-inquiry {
  position: relative;
  z-index: 2;
}

.kf.is-map-collapsed .kf-map-wrap {
  display: none;
}

.kf.is-map-collapsed.is-searched .kf-results,
.kf.is-map-collapsed.is-extras .kf-extras,
.kf.is-map-collapsed.is-anfrage .kf-inquiry {
  grid-row: 1;
  grid-column: 1;
}

@media (min-width: 900px) {
  .kf.is-job .kf-body,
  .kf.is-address .kf-body,
  .kf.is-searched .kf-body,
  .kf.is-extras .kf-body,
  .kf.is-anfrage .kf-body {
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: minmax(288px, min(36%, 448px)) minmax(0, 1fr);
  }
  .kf.is-job .kf-rail,
  .kf.is-address .kf-rail,
  .kf.is-searched .kf-rail,
  .kf.is-extras .kf-rail,
  .kf.is-anfrage .kf-rail {
    grid-row: 1;
    grid-column: 1;
  }
  .kf.is-job .kf-map-wrap,
  .kf.is-address .kf-map-wrap,
  .kf.is-searched .kf-map-wrap,
  .kf.is-extras .kf-map-wrap,
  .kf.is-anfrage .kf-map-wrap {
    grid-row: 1;
    grid-column: 2;
  }
  .kf-extras-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kf-card-thumb { min-height: 88px; }
}

@media (max-width: 899px) {
  .kf-map-wrap .leaflet-control-zoom {
    display: none;
  }
}

@media (max-height: 700px) {
  .kf-kicker { display: none; }
  .kf-results-head h2 {
    font-size: 1.05rem;
    margin: 0 0 0.15rem;
  }
  .kf-results-head .kf-recap,
  .kf-disclaimer { display: none; }
  .kf-count { margin: 0.1rem 0 0.3rem; }
  .kf-card { min-height: 44px; }
  .kf-card-name { font-size: 0.9rem; }
}

@media (max-height: 430px) {
  .kf-hud { padding-block: 0.4rem; gap: 0.4rem; }
}
