

:root{
  --bg:#0b1f14; --fg:#eaf6ef; --muted:#b7cbbf; --card:#112a1d; --line:#1f3a2c;
  --a:#2dd4bf; --b:#f59e0b;
}
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;background:#07160e;color:var(--fg)}
a{color:inherit}
.container{max-width:1100px;margin:0 auto;padding:16px}
.topbar{position:sticky;top:0;background:rgba(7,22,14,.88);backdrop-filter: blur(8px);border-bottom:1px solid var(--line);z-index:50}
.topbar__inner{display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{font-weight:800;text-decoration:none;letter-spacing:.3px}
.nav{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.nav a{text-decoration:none;color:var(--muted)}
.nav a:hover{color:var(--fg)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border-radius:12px;border:1px solid var(--line);background:linear-gradient(180deg,#163624,#0f271a);color:var(--fg);text-decoration:none;cursor:pointer}
.btn:hover{filter:brightness(1.05)}
.btn--small{padding:7px 10px;border-radius:10px;font-size:14px}
.hero{padding:18px 0 10px}
.hero h1{font-size:38px;line-height:1.08;margin:10px 0}
.lead{color:var(--muted);max-width:70ch;font-size:18px}
.hero__cta{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-top:18px}
.cardlink{display:block;border:1px solid var(--line);border-radius:16px;padding:14px;background:linear-gradient(180deg,#0f271a,#0b1f14);text-decoration:none}
.cardlink__title{font-weight:800;margin-bottom:6px}
.cardlink__text{color:var(--muted)}
.hero__note{margin-top:14px;color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px;margin-top:16px}
.panel{border:1px solid var(--line);border-radius:16px;padding:14px;background:rgba(17,42,29,.7)}
.form{display:flex;flex-direction:column;gap:10px}
label{display:flex;flex-direction:column;gap:6px;color:var(--muted)}
input,textarea,select{padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:#0a1b12;color:var(--fg);outline:none}
textarea{resize:vertical}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.flash{padding:10px 12px;border-radius:14px;margin:10px 0;border:1px solid var(--line)}
.flash--ok{background:rgba(45,212,191,.12)}
.flash--err{background:rgba(244,63,94,.12)}
.muted{color:var(--muted)}
.list{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.listitem{display:flex;gap:12px;align-items:center;border:1px solid var(--line);border-radius:16px;padding:12px;background:rgba(17,42,29,.55);text-decoration:none}
.listitem:hover{filter:brightness(1.05)}
.badge{font-size:12px;padding:6px 10px;border-radius:999px;border:1px solid var(--line);text-transform:uppercase;letter-spacing:.5px}
.badge--a{color:var(--a)}
.badge--b{color:var(--b)}
.listitem__title{font-weight:800}
.listitem__meta{color:var(--muted);font-size:13px;margin-top:2px}
.filters{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-top:8px}
.map{height:320px;border-radius:16px;border:1px solid var(--line);overflow:hidden}
.map--big{height:520px}
.pillrow{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px}
.pill{border:1px solid var(--line);border-radius:999px;padding:6px 10px;color:var(--muted)}
.pill--a{color:var(--a)}
.pill--b{color:var(--b)}
.footer{margin-top:30px;border-top:1px solid var(--line);color:var(--muted)}
.footer__inner{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;padding:18px 16px}
.sep{opacity:.5}
.badge{
  display:inline-block;
  min-width:18px;
  height:18px;
  padding:0 6px;
  margin-left:6px;
  border-radius:999px;
  font-size:12px;
  line-height:18px;
  font-weight:800;
  background:#e74c3c;
  color:#fff;
  vertical-align:middle;
}

/* Zentrales Seitenlayout (Fix für zu breite Seite) */
.wrap {
  max-width: 1100px;   /* vorher vermutlich ~1000–1200px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

.topbar .wrap {
  max-width: 1100px;
}

/* --- Topbar / Navigation: hübscher & moderner --- */
:root{
  --bg: #0b1f14;
  --card: rgba(7, 22, 14, .60);
  --card2: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.12);
  --text: #e9f4ee;
  --muted: rgba(233,244,238,.72);
  --accent: #33d17a;
  --accent2: rgba(51, 209, 122, .18);
}

/* Wenn du diese Variablen schon hast: diesen Block weglassen oder angleichen */

body{
  background: radial-gradient(1200px 600px at 10% -10%, rgba(51,209,122,.18), transparent 55%),
              radial-gradient(900px 500px at 90% 0%, rgba(81,140,255,.12), transparent 55%),
              var(--bg);
  color: var(--text);
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 31, 20, .72);
  border-bottom: 1px solid var(--line);
}

.brand{
  font-weight: 900;
  letter-spacing: .2px;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Nav Layout */
.nav{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

/* Links als Pills */
.nav a{
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav a:hover{
  background: var(--card2);
  border-color: var(--line);
  transform: translateY(-1px);
}

.nav a:active{
  transform: translateY(0px);
}

/* Aktiver Menüpunkt */
.nav a.is-active{
  background: var(--accent2);
  border-color: rgba(51, 209, 122, .45);
  color: var(--text);
}

/* Badge (ungelesen) */
.badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 900;
  background: rgba(255, 77, 109, .95);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
}

/* Header Innenlayout schöner */
.topbar .wrap{
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Mobile: Brand oben, Menu darunter */
@media (max-width: 860px){
  .topbar .wrap{
    flex-direction: column;
    align-items: stretch;
  }
  .nav{
    justify-content: flex-start;
  }
}

/* --- Buttons / Panels etwas wertiger --- */
.panel{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.btn{
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: var(--text);
  padding: 10px 14px;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}

.btn:hover{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
  transform: translateY(-1px);
}

.flash.ok{
  border: 1px solid rgba(51, 209, 122, .35);
  background: rgba(51, 209, 122, .12);
}
.flash.err{
  border: 1px solid rgba(255, 77, 109, .35);
  background: rgba(255, 77, 109, .12);
}

/* =========================
   Chat / Nachrichtenverlauf
========================= */

.chat-row{
  display: flex;
  margin: 6px 0;
}

/* Eigene Nachricht: rechts */
.chat-row.me{
  justify-content: flex-end;
}

/* Fremde Nachricht: links */
.chat-row.them{
  justify-content: flex-start;
}

.chat-bubble{
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 18px;
  line-height: 1.45;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  border: 1px solid var(--line);
}

/* Absender (ich) */
.chat-row.me .chat-bubble{
  background: rgba(51, 209, 122, .18);
  border-bottom-right-radius: 6px;
}

/* Empfänger (gegenüber) */
.chat-row.them .chat-bubble{
  background: rgba(255,255,255,.08);
  border-bottom-left-radius: 6px;
}

.chat-meta{
  font-size: 12px;
  opacity: .75;
  margin-bottom: 4px;
}

.chat-text{
  white-space: pre-wrap;
  word-break: break-word;
}

/* Mobile: volle Breite */
@media (max-width: 600px){
  .chat-bubble{
    max-width: 90%;
  }
}

/* Badge für ungelesene Nachrichten */
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 6px;
  border-radius:999px;
  font-size:12px;
  line-height:18px;
  font-weight:900;
  background: rgba(255, 77, 109, .95);
  color:#fff;
  border: 1px solid rgba(255,255,255,.22);
}

/* Chat Layout: links (them) / rechts (me) */
.chat-row{display:flex;margin:6px 0;}
.chat-row.me{justify-content:flex-end;}
.chat-row.them{justify-content:flex-start;}

.chat-bubble{
  max-width:72%;
  padding:10px 14px;
  border-radius:18px;
  border:1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

.chat-row.me .chat-bubble{
  background: rgba(51, 209, 122, .18);
  border-bottom-right-radius:6px;
}

.chat-row.them .chat-bubble{
  background: rgba(255,255,255,.08);
  border-bottom-left-radius:6px;
}

.chat-meta{font-size:12px;opacity:.75;margin-bottom:4px;}
.chat-text{white-space:pre-wrap;word-break:break-word;}

@media (max-width: 600px){
  .chat-bubble{max-width:90%;}
}
/* --- Revierhelfer Home Styles --- */

.home-hero { padding: 26px 0 10px; }
.home-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 980px) {
  .home-hero-grid { grid-template-columns: 1fr; }
}

.home-badge {
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(11, 31, 20, 0.08);
  color: #0b1f14;
  margin-bottom: 10px;
}

.home-lead { margin-top: 10px; max-width: 60ch; }

.home-cta { display:flex; gap:10px; flex-wrap:wrap; margin-top: 14px; }
.btn.btn-ghost { background: transparent; border: 1px solid rgba(0,0,0,.12); }

.home-stats { display:flex; gap:12px; flex-wrap:wrap; margin-top: 16px; }
.home-stat {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.6);
  min-width: 140px;
}
.home-stat-num { font-weight: 900; font-size: 20px; }
.home-stat-label { opacity: .75; font-size: 13px; margin-top: 2px; }

.home-hero-media { }
.home-media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.home-media-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  background: #f3f4f5;
  position: relative;
}

/* ✅ wichtig: Bild-Größe begrenzen */
.home-media-img {
  width: 100%;
  height: 160px;          /* <- steuert die Höhe der Kacheln */
  display: block;
  object-fit: cover;       /* <- verhindert „gequetscht/zu groß“ */
}
@media (max-width: 980px) {
  .home-media-img { height: 170px; }
}

.home-media-caption {
  position:absolute;
  left: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  backdrop-filter: blur(4px);
}

.home-section { padding: 18px 0; }

.home-cards {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 980px) { .home-cards { grid-template-columns: 1fr; } }

.home-card {
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.65);
  padding: 14px;
}
.home-card-icon { font-size: 22px; }
.home-card-title { font-weight: 900; margin-top: 6px; }
.home-card-text { opacity: .85; margin-top: 6px; }
.home-card-tags { display:flex; gap:8px; flex-wrap:wrap; margin-top: 10px; }
.tag {
  display:inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(11,31,20,.06);
}

.home-steps {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 10px;
}
@media (max-width: 980px) { .home-steps { grid-template-columns: 1fr; } }

.home-step {
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.65);
  padding: 14px;
}
.home-step-num {
  width: 34px; height: 34px;
  border-radius: 999px;
  display:flex; align-items:center; justify-content:center;
  font-weight: 900;
  background: rgba(11,31,20,.10);
}
.home-step-title { font-weight: 900; margin-top: 10px; }
.home-step-text { opacity: .85; margin-top: 6px; }

/* falls dein Layout plötzlich „zu breit“ wirkt */
.wrap { max-width: 1100px; }

/* Bilder im Home-Raster begrenzen */
.home-media-img{
  width:100%;
  height:160px;
  object-fit:cover;
  display:block;
}

/* --- Leaflet Fix: globale img-Regeln (max-width:100%) brechen Tiles --- */
.leaflet-container img,
.leaflet-container .leaflet-tile {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-container {
  background: #e9eef2;
}


/* === Leaflet Tiles Fix (wichtig!) =========================
   Viele Templates haben global: img{max-width:100%;}
   Das zerstört Leaflet-Kacheln (Leaflet rendert Tiles als <img>).
=========================================================== */
.leaflet-container img,
.leaflet-container .leaflet-tile {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-tile {
  width: 256px !important;
  height: 256px !important;
}

.leaflet-container {
  background: #e9eef2;
}
