* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1a1a1a; }
body { display: flex; flex-direction: column; overflow: hidden; }

#bar {
  flex: none; display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 14px calc(8px) 14px; padding-top: max(10px, env(safe-area-inset-top));
  background: #fff; border-bottom: 1px solid #ddd; z-index: 1000;
}
#title { font-size: 20px; font-weight: 700; }
#number { color: #c00000; }
#kind { font-size: 13px; color: #2a4fa8; }

#map { flex: 1; min-height: 0; }

#sheet {
  flex: none; background: #fff; border-top: 1px solid #ddd; box-shadow: 0 -2px 8px rgba(0,0,0,.08);
  padding: 4px 14px max(10px, env(safe-area-inset-bottom)); max-height: 55vh; overflow-y: auto; z-index: 1000;
}
#handle { display: block; width: 100%; border: 0; background: none; padding: 4px 0 6px; cursor: pointer; }
#handle span { display: block; width: 40px; height: 4px; border-radius: 2px; background: #c8c8c8; margin: 0 auto; }
.actions { display: flex; gap: 8px; }
.btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  border: 1px solid #c8c8c8; border-radius: 8px; background: #fff; color: #1a1a1a;
  font: inherit; font-size: 15px; text-decoration: none; cursor: pointer;
}
.btn.primary { background: #b00000; border-color: #b00000; color: #fff; font-weight: 600; }
.btn.active { background: #e8f0ff; border-color: #2a6ed8; }

#streets { margin-top: 10px; }
.extra { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #eee; }
.extra-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.25; }
.extra-text span { display: block; font-size: 12px; color: #555; }
.btn.small { flex: none; min-height: 36px; padding: 0 10px; font-size: 13px; }
.leaflet-tooltip.extra-label { font-weight: 600; color: #c80000; padding: 1px 5px; }
#sheet.collapsed #streets { display: none; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: #555; border-bottom: 1px solid #444; padding: 4px 2px; }
td { padding: 6px 2px; border-bottom: 1px solid #eee; vertical-align: top; }
td.n { white-space: nowrap; color: #333; }
.count { margin: 6px 0 0; font-size: 12px; color: #666; }
#source { margin: 8px 0 0; font-size: 11px; color: #777; }
#source a { color: inherit; }

#message {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: #fff; z-index: 2000; font-size: 17px; text-align: center; color: #444;
}
#message[hidden] { display: none; }
#message { white-space: pre-line; }
.leaflet-control-attribution { display: none; } /* Quellenangabe steht im unteren Bereich */
