* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  overflow: hidden;
}

#map {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #1e293b;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
  background: linear-gradient(to bottom, rgba(15,23,42,0.92), rgba(15,23,42,0.6) 70%, transparent);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.topbar-actions { display: flex; gap: 8px; }

.chip {
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(30,41,59,0.9);
  color: #e2e8f0;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.chip-drive { background: #16a34a; color: #fff; }
.chip-drive.active { background: #dc2626; }

.status {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  background: rgba(30,41,59,0.95);
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 0.85rem;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hidden { display: none !important; }

.sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1100;
  background: #1e293b;
  border-radius: 20px 20px 0 0;
  padding: 10px 18px calc(env(safe-area-inset-bottom, 0px) + 18px);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
  max-height: 70vh;
  overflow-y: auto;
}

.sheet-handle {
  width: 42px; height: 4px;
  background: #475569;
  border-radius: 2px;
  margin: 4px auto 12px;
}

.sheet-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 34px; height: 34px;
  border: none;
  border-radius: 50%;
  background: #334155;
  color: #cbd5e1;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sheet h2 { font-size: 0.95rem; color: #94a3b8; margin: 14px 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }

.interests { display: flex; flex-wrap: wrap; gap: 8px; }

.interest-chip {
  border: 1px solid #475569;
  border-radius: 18px;
  padding: 8px 14px;
  font-size: 0.9rem;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
}
.interest-chip.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.route-row { display: flex; gap: 8px; }
.route-row input {
  flex: 1;
  border: 1px solid #475569;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 1rem;
  background: #0f172a;
  color: #e2e8f0;
}
.btn-block { display: block; width: 100%; margin-top: 8px; }

.radius-row { display: flex; align-items: center; gap: 12px; }
.radius-row input { flex: 1; }
#radius-label { min-width: 48px; text-align: right; font-weight: 600; }

.toggle-row { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; padding: 4px 0; }

.btn-primary, .btn-secondary {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}
.btn-primary { background: #2563eb; color: #fff; margin-top: 16px; width: 100%; }
.btn-secondary { background: #334155; color: #e2e8f0; }

.poi-header { display: flex; gap: 12px; align-items: flex-start; }
.poi-header h2 { font-size: 1.2rem; color: #f1f5f9; margin: 0; text-transform: none; letter-spacing: 0; }
.poi-img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.poi-meta { font-size: 0.85rem; color: #94a3b8; margin-top: 4px; }

.poi-summary { margin: 14px 0; line-height: 1.55; font-size: 1rem; white-space: pre-line; }

.poi-images {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.poi-images img {
  height: 96px;
  border-radius: 10px;
  flex-shrink: 0;
}

.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: 10px;
  background: #273548;
  color: #e2e8f0;
  padding: 12px 14px;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}
.history-item small { color: #94a3b8; flex-shrink: 0; }

.cat-pin-wrap { background: none; border: none; }
.cat-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.45);
}

.poi-actions { display: flex; gap: 10px; }
.poi-actions .btn-primary { margin-top: 0; width: auto; flex: 1; }

.leaflet-control-attribution { font-size: 0.6rem; }

/* Marker-Puls für aktuell vorgelesenen POI */
.poi-marker-active { filter: drop-shadow(0 0 6px #38bdf8); }
