:root {
  --gruen: #27ae60;
  --gelb: #f39c12;
  --rot: #c0392b;
  --grau: #95a5a6;
  --hintergrund: #f4f4f2;
  --text: #1f2a30;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--hintergrund); }
body { display: flex; flex-direction: column; }

header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 1rem; padding-top: max(0.5rem, env(safe-area-inset-top));
  background: var(--rot); color: #fff;
}
header h1 { font-size: 1.1rem; margin: 0; }

.punkt { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; display: inline-block; }
.punkt.gruen { background: var(--gruen); }
.punkt.rot { background: #000; }
.punkt.grau { background: var(--grau); }

main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#karte { flex: 1; min-height: 50vh; }
#liste {
  max-height: 40vh; overflow-y: auto; padding: 0.5rem;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  display: grid; gap: 0.5rem;
}
@media (min-width: 900px) {
  main { flex-direction: row; }
  #liste { max-height: none; width: 340px; align-content: start; }
}

.hund {
  display: grid; gap: 0.15rem; text-align: left; width: 100%;
  border: none; border-left: 8px solid var(--farbe); border-radius: 8px;
  padding: 0.6rem 0.8rem; background: #fff; font: inherit; color: inherit; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.hund .name { font-weight: 700; font-size: 1.05rem; }
.hund .alter { font-weight: 600; }
.hund .details { font-size: 0.85rem; opacity: 0.8; }
.hund.gruen .alter { color: var(--gruen); }
.hund.gelb .alter { color: var(--gelb); }
.hund.rot { background: #fdecea; }
.hund.rot .alter { color: var(--rot); }

.gateway { margin: 0; font-size: 0.85rem; padding: 0 0.3rem; }
.gateway.gruen { color: var(--gruen); }
.gateway.gelb { color: var(--gelb); }
.gateway.rot { color: var(--rot); }
.hinweis { margin: 0.5rem; opacity: 0.7; }

dialog { border: none; border-radius: 10px; max-width: 360px; width: 90%; }
dialog input { width: 100%; padding: 0.6rem; font-size: 1rem; }
dialog menu { padding: 0; margin: 1rem 0 0; text-align: right; }
dialog button { padding: 0.5rem 1rem; font-size: 1rem; background: var(--rot); color: #fff; border: none; border-radius: 6px; }
