:root {
  --grund: #f6f4ef;
  --karte: #ffffff;
  --text: #1f2328;
  --leise: #6a6f76;
  --linie: #e2ded6;
  --akzent: #2d5b8a;
  --gut: #2f7d4f;
  --mittel: #b07a12;
  --weit: #b3412f;
  --rund: 10px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1 { font-size: 1.35rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0 0 .4rem; }
a { color: var(--akzent); }
button {
  font: inherit; border: 1px solid var(--linie); background: var(--karte); color: var(--text);
  border-radius: 8px; padding: .4rem .75rem; cursor: pointer; min-height: 36px;
}
button:hover { border-color: var(--akzent); }
button:disabled { opacity: .6; cursor: default; }
input, select { font: inherit; padding: .35rem .5rem; border: 1px solid var(--linie); border-radius: 8px; background: #fff; min-height: 36px; }
.leise { color: var(--leise); font-size: .88rem; margin: .1rem 0 0; }

.kopf {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .9rem 1.1rem; background: var(--karte); border-bottom: 1px solid var(--linie);
  position: sticky; top: 0; z-index: 1000;
}
.kopf-rechts { display: flex; gap: .75rem; align-items: center; }

.leiste {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: end;
  padding: .75rem 1.1rem; border-bottom: 1px solid var(--linie);
}
.leiste label { display: flex; flex-direction: column; font-size: .82rem; color: var(--leise); gap: .15rem; }
.leiste label.haken, label.haken { flex-direction: row; align-items: center; gap: .35rem; color: var(--text); font-size: .9rem; }
.umschalter { margin-left: auto; display: flex; }
.umschalter button { border-radius: 0; }
.umschalter button:first-child { border-radius: 8px 0 0 8px; }
.umschalter button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.umschalter .an { background: var(--akzent); color: #fff; border-color: var(--akzent); }

.haupt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; padding: 1rem 1.1rem; }
.liste { display: flex; flex-direction: column; gap: .75rem; }
.karte { height: calc(100vh - 190px); position: sticky; top: 130px; border-radius: var(--rund); border: 1px solid var(--linie); }
@media (max-width: 900px) {
  .haupt { grid-template-columns: 1fr; }
  .haupt[data-ansicht="liste"] .karte { display: none; }
  .haupt[data-ansicht="karte"] .liste { display: none; }
  .karte { position: static; height: 70vh; }
}
@media (min-width: 901px) { .umschalter { display: none; } }

.anzeige {
  background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund);
  padding: .85rem 1rem; display: grid; gap: .45rem; scroll-margin-top: 140px;
}
.anzeige.hervor { outline: 2px solid var(--akzent); }
.anzeige.passt-nicht { opacity: .55; }
.anzeige h3 { margin: 0; font-size: 1rem; }
.anzeige h3 a { text-decoration: none; }
.anzeige h3 a:hover { text-decoration: underline; }
.zahlen { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-variant-numeric: tabular-nums; }
.zahlen b { font-size: 1.1rem; }
.marke {
  display: inline-block; font-size: .75rem; padding: .05rem .45rem; border-radius: 99px;
  background: #ece8df; color: var(--leise); margin-left: .35rem; vertical-align: middle;
}
.marke.warn { background: #fbecd0; color: #7a5208; }
.marke.aus { background: #f3d9d4; color: #7d2a1c; }
.fahrten { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .35rem; }
.fahrt { border-left: 4px solid var(--linie); padding: .15rem .5rem; font-size: .88rem; font-variant-numeric: tabular-nums; }
.fahrt .ziel { color: var(--leise); display: block; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fahrt.gut { border-color: var(--gut); }
.fahrt.mittel { border-color: var(--mittel); }
.fahrt.weit { border-color: var(--weit); }
.summe { font-size: .85rem; color: var(--leise); }
.aktionen { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.aktionen button.an { background: #eaf1f8; border-color: var(--akzent); }
.andere { font-size: .85rem; color: var(--leise); }
.kommentare { border-top: 1px dashed var(--linie); padding-top: .45rem; display: grid; gap: .35rem; }
.kommentar { font-size: .9rem; }
.kommentar .wer { font-weight: 600; margin-right: .35rem; }
.kommentar .wann { color: var(--leise); font-size: .78rem; margin-left: .35rem; }
.kommentar button { min-height: 0; padding: 0 .35rem; font-size: .75rem; margin-left: .35rem; }
.formzeile { display: flex; gap: .4rem; flex-wrap: wrap; }
.formzeile input:not([type=checkbox]) { flex: 1 1 160px; }
.leer { padding: 2rem; text-align: center; color: var(--leise); }

.verwaltung { margin: 0 1.1rem 1rem; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); padding: .75rem 1rem; }
.verwaltung summary { cursor: pointer; font-weight: 600; }
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: .75rem; }
.schlicht { list-style: none; padding: 0; margin: .3rem 0 .6rem; display: grid; gap: .3rem; }
.schlicht li { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.neuer-link { background: #eef6ee; border: 1px solid #b9d8bb; border-radius: 8px; padding: .5rem .7rem; word-break: break-all; }
.fuss { padding: 0 1.1rem 1.5rem; }
.ohne-zugang { max-width: 30rem; margin: 15vh auto; padding: 1.5rem; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--rund); }
.leaflet-popup-content { font: 14px/1.4 system-ui, sans-serif; }
