:root {
  --see: #1d5c63;
  --see-dunkel: #123f44;
  --wiese: #e9f1ec;
  --papier: #ffffff;
  --text: #1f2a2c;
  --leise: #5d6b6d;
  --linie: #d7e1dd;
  --gold: #d99a1e;
  --rot: #b3362c;
  --forelle: #c86a5a;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --see: #4fb3bd;
    --see-dunkel: #8fd3da;
    --wiese: #111a1b;
    --papier: #1a2526;
    --text: #e4ecea;
    --leise: #9fb0ae;
    --linie: #2c3a3b;
    --gold: #f0b43a;
    --rot: #ff7a6e;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--wiese);
  color: var(--text);
}
a { color: var(--see); }
button, input, select, textarea { font: inherit; color: inherit; }

/* Kopf */
.kopf {
  background: linear-gradient(160deg, #1d5c63 0%, #2c7a6f 60%, #c86a5a 140%);
  color: #fff;
  padding: 28px 16px 56px;
}
.kopf-innen { max-width: 860px; margin: 0 auto; }
.kopf h1 { margin: 0; font-size: 1.9rem; letter-spacing: .5px; }
.kopf p { margin: 4px 0 0; opacity: .9; }

main { max-width: 860px; margin: -36px auto 0; padding: 0 12px 24px; }

/* Suchmaske */
.suche {
  display: grid;
  grid-template-columns: 1fr 140px auto;
  gap: 10px;
  align-items: end;
  background: var(--papier);
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.feld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.suche .feld { margin: 0; }
.feld span { font-size: .85rem; color: var(--leise); }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--linie);
  border-radius: 10px;
  background: var(--papier);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--see); outline-offset: 1px; }
button {
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--see);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: wait; }
.knopf-zweit { background: transparent; color: var(--see); border: 1px solid var(--linie); }
.knopf-gefahr { background: var(--rot); margin-right: auto; }
.knopf-klein { padding: 6px 12px; font-size: .9rem; }
.knopf-link {
  background: none; color: var(--see); padding: 0; font-weight: 600;
  text-decoration: underline; border-radius: 0;
}
@media (max-width: 560px) {
  .suche { grid-template-columns: 1fr 1fr; }
  .suche button { grid-column: 1 / -1; }
}

/* Meldungen & Leisten */
#meldungen { margin-top: 12px; }
.meldung {
  background: #fff6e0; color: #6b4b00; border-left: 4px solid var(--gold);
  padding: 10px 12px; border-radius: 8px; margin-bottom: 8px;
}
.meldung.fehler { background: #fdeceb; color: #7a1f17; border-color: var(--rot); }
@media (prefers-color-scheme: dark) {
  .meldung { background: #3a3011; color: #ffe2a3; }
  .meldung.fehler { background: #3d1916; color: #ffc4be; }
}
.leiste, .adminleiste {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  flex-wrap: wrap; margin: 16px 2px 8px; color: var(--leise); font-size: .95rem;
}
.adminleiste { margin-top: 0; }
.sortierung { display: flex; align-items: center; gap: 6px; }
.sortierung select { width: auto; padding: 6px 8px; }
.laden { text-align: center; color: var(--leise); padding: 30px 0; }
.laden::before {
  content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 10px;
  border: 3px solid var(--linie); border-top-color: var(--see); border-radius: 50%;
  animation: drehen 0.9s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

/* Ergebnisliste */
.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.karte {
  background: var(--papier);
  border-radius: var(--radius);
  padding: 14px 16px;
  border: 1px solid var(--linie);
}
.karte.versteckt { opacity: .55; border-style: dashed; }
.karte-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.karte h2 { font-size: 1.12rem; margin: 0; line-height: 1.3; }
.entfernung {
  white-space: nowrap; font-weight: 700; color: var(--see-dunkel);
  background: var(--wiese); padding: 2px 10px; border-radius: 999px; font-size: .9rem;
}
.adresse { color: var(--leise); font-size: .92rem; margin: 2px 0 8px; }
.marken { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.marke {
  font-size: .75rem; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--linie); color: var(--leise);
}
.marke.warnung { border-color: var(--rot); color: var(--rot); }
.zeile { display: flex; gap: 8px; margin: 6px 0; align-items: baseline; }
.zeile > .symbol { width: 1.3em; flex: none; text-align: center; }
.zeile > .inhalt { flex: 1; min-width: 0; }
.sterne { color: var(--gold); letter-spacing: 1px; }
.offen { color: #1e7d3a; font-weight: 600; }
.zu { color: var(--rot); font-weight: 600; }
@media (prefers-color-scheme: dark) { .offen { color: #6fd98d; } }
.vortext { white-space: pre-line; }
.leise { color: var(--leise); font-size: .9rem; }
details > summary { cursor: pointer; color: var(--see); font-weight: 600; font-size: .92rem; }
details ul { margin: 6px 0 0; padding-left: 18px; }
.zeitenliste li.heute { font-weight: 700; }
.auszuege { margin: 6px 0 0; padding-left: 18px; }
.auszuege li { margin: 2px 0; }
.rezension { border-top: 1px solid var(--linie); padding: 8px 0; }
.rezension:first-of-type { border-top: 0; }
.rezension p { margin: 4px 0 0; white-space: pre-line; }
.links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.links a, .links button {
  text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: .9rem;
  border: 1px solid var(--linie); background: var(--wiese); color: var(--see-dunkel); font-weight: 600;
}
.leer { text-align: center; color: var(--leise); padding: 30px 10px; }

/* Fuß */
.fuss { max-width: 860px; margin: 0 auto; padding: 8px 16px 40px; color: var(--leise); font-size: .85rem; }

/* Dialoge */
dialog {
  border: 0; border-radius: var(--radius); padding: 18px; width: min(520px, 94vw);
  background: var(--papier); color: var(--text); box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
dialog::backdrop { background: rgba(10, 30, 32, .55); }
dialog h2 { margin: 0 0 10px; font-size: 1.2rem; }
.knoepfe { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.haken { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.haken input { width: auto; }
.fehlertext { color: var(--rot); min-height: 1.2em; margin: 4px 0; }
.klein { font-size: .9rem; color: var(--leise); margin-top: 0; }
