:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2937;
  background: #f3f4f6;
}

body {
  margin: 0;
  background: #f3f4f6;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

/* HEADER */

.header-area {
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.logo {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 auto 14px auto;
}

.gemeinde {
  font-size: 22px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.header-area h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.05;
  color: #12284a;
}

.subtitle {
  margin-top: 10px;
  font-size: 20px;
  color: #475569;
}

/* INTRO */

.intro-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  line-height: 1.6;
  font-size: 18px;
  color: #374151;
}

.intro,
.hint {
  color: #4b5563;
  line-height: 1.45;
}

/* GRUNDLAYOUT */

h1 {
  margin-bottom: 8px;
}

h2 {
  margin-top: 0;
}

.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

label {
  display: block;
  font-weight: 700;
  margin-top: 14px;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  font-size: 16px;
}

textarea {
  resize: vertical;
}

#map {
  height: 560px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  margin: 12px 0;
}

/* BUTTONS */

button {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: #1d4ed8;
  color: #ffffff;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.button-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.button-row button {
  margin: 0;
}

.draw-main-btn {
  background: #1d4ed8;
}

.draw-main-btn:hover {
  background: #1e40af;
}

.finish-btn,
#finishDraw {
  background: #059669 !important;
}

.finish-btn:hover,
#finishDraw:hover {
  background: #047857 !important;
}

.hazard-btn,
#startHazard {
  background: #dc2626 !important;
}

.hazard-btn:hover,
#startHazard:hover {
  background: #b91c1c !important;
}

.hazard-btn.active,
#startHazard.active {
  background: #991b1b !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

button.secondary,
#clearRoute {
  background: #475569;
}

button.secondary:hover,
#clearRoute:hover {
  background: #334155;
}

/* STATUS / CHECKBOX */

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}

.check input {
  width: auto;
  margin-top: 4px;
}

.status {
  font-weight: 700;
}

.status.ok {
  color: #047857;
}

.status.err {
  color: #b91c1c;
}

/* SCHULZIEL-MARKER */

.school-target-icon {
  background: transparent !important;
  border: none !important;
}

.school-target-ring {
  width: 42px;
  height: 42px;
  border: 3px solid #2563eb;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.school-target-marker {
  font-size: 26px;
  line-height: 26px;
  transform: translateY(-3px);
}

/* GEFAHRENSTELLEN */

.hazard-inputs {
  margin-top: 14px;
}

.hazard-inputs h3 {
  margin-top: 12px;
  margin-bottom: 8px;
  color: #1e3a8a;
}

.hazard-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
}

.hazard-box label {
  margin-top: 0;
  color: #1e3a8a;
  font-weight: 700;
}

.hazard-input-icon {
  width: 54px;
  min-width: 54px;
  padding-top: 18px;
}

.hazard-input-content {
  flex: 1;
}

.hazard-label-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.hazard-label-row label {
  margin: 0;
}

.hazard-remove-btn {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  width: auto !important;
  min-width: auto !important;
}

.hazard-remove-btn:hover {
  background: #bae6fd;
  color: #075985;
}

.hazard-div-icon {
  background: transparent !important;
  border: none !important;
}

.hazard-marker {
  position: relative;
  width: 54px;
  height: 64px;
  pointer-events: none;
}

.hazard-marker.small {
  transform: scale(0.85);
  transform-origin: top left;
}

.hazard-cone {
  position: absolute;
  left: 15px;
  top: 14px;
  width: 24px;
  height: 38px;
  background: #f97316;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45));
  z-index: 2;
}

.cone-stripe {
  position: absolute;
  left: 3px;
  width: 18px;
  height: 5px;
  background: #ffffff;
  border-radius: 2px;
}

.stripe-one {
  top: 12px;
}

.stripe-two {
  top: 24px;
}

.hazard-base {
  position: absolute;
  left: 9px;
  top: 48px;
  width: 36px;
  height: 10px;
  background: #ea580c;
  border: 2px solid #ffffff;
  border-radius: 4px;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.hazard-number {
  position: absolute;
  top: 0;
  right: 0;
  background: #dc2626;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  line-height: 20px;
  font-weight: bold;
  text-align: center;
  z-index: 5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

/* LEAFLET */

.map-hazard-mode,
.map-hazard-mode *,
.leaflet-container.map-hazard-mode,
.leaflet-container.map-hazard-mode * {
  cursor: crosshair !important;
}

.leaflet-draw-toolbar {
  display: none !important;
}

.leaflet-draw-actions {
  display: none !important;
}

.leaflet-draw-tooltip {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

/* MOBIL */

@media (max-width: 700px) {
  .wrap {
    padding: 12px;
  }

  .header-area {
    text-align: center;
    padding: 20px;
  }

  .logo {
    width: 85px;
    height: auto;
    margin: 0 auto 12px auto;
  }

  .gemeinde {
    font-size: 18px;
  }

  .header-area h1 {
    font-size: 34px;
    font-weight: 600;
  }

  .subtitle {
    font-size: 16px;
  }

  .intro-card {
    font-size: 16px;
  }

  #map {
    height: 430px;
  }

  .button-row {
    flex-direction: column;
  }

  .button-row button {
    width: 100%;
  }

  .hazard-box {
    gap: 8px;
  }

  .hazard-label-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hazard-remove-btn {
    width: auto !important;
  }
}