:root {
  --grund: #f6f4f0;
  --flaeche: #ffffff;
  --text: #1f1d1a;
  --leise: #6b665e;
  --linie: #e3ded5;
  --akzent: #2f5d50;
  --akzent-hell: #e3efe9;
  --warn: #9a5b00;
  --warn-hell: #fbefd9;
  --rot: #a3332a;
  --rot-hell: #f8e3e0;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--grund);
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1 { font-size: 1.25rem; margin: 0; }
h2 { font-size: 1rem; margin: 0 0 .6rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button {
  border: 1px solid var(--linie); background: var(--flaeche); border-radius: 8px;
  padding: .5rem .9rem; cursor: pointer; min-height: 40px;
}
button:hover { border-color: var(--leise); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
button.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
button:disabled { opacity: .6; cursor: wait; }
input, select, textarea { border: 1px solid var(--linie); border-radius: 8px; padding: .4rem .6rem; background: #fff; }
textarea { width: 100%; resize: vertical; }
.leise { color: var(--leise); }
.klein { font-size: .85rem; }

.kopf {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2rem); background: var(--flaeche); border-bottom: 1px solid var(--linie);
}
.verbindung { margin: .2rem 0 0; font-size: .9rem; color: var(--akzent); }
.verbindung.warnung { color: var(--warn); }
.abmelden { color: var(--leise); font-size: .9rem; }
.reiter { display: flex; gap: .25rem; padding: 0 clamp(1rem, 4vw, 2rem); background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.reiter button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; }
.reiter button[aria-selected="true"] { border-bottom-color: var(--akzent); font-weight: 600; }
main { padding: 1rem clamp(1rem, 4vw, 2rem) 4rem; max-width: 1100px; margin: 0 auto; }
.leiste { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.leiste p { margin: 0; }

.tag { margin-bottom: 1.75rem; }
.tag.offen h2 { color: var(--rot); }
.luecke { border: 1px dashed var(--linie); border-radius: var(--radius); padding: .8rem 1rem; color: var(--leise); margin-bottom: .6rem; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .9rem; margin-bottom: .75rem; }
.karte.status-freigegeben { border-color: var(--akzent); }
.karte.status-fehler, .karte.status-verpasst { border-color: var(--rot); }
.karte.status-gepostet { opacity: .75; }
.karten-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.karten-kopf input[type="time"] { margin-left: auto; }
.karten-inhalt { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 1rem; }
.bild { width: 100%; border-radius: 6px; display: block; background: var(--grund); }
.bild.story { max-width: 180px; }
.alternativen { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .5rem; }
.mini { padding: 0; min-height: 0; width: 56px; height: 56px; overflow: hidden; }
.mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ziele { display: flex; gap: 1.25rem; margin: .6rem 0; }
.ziel { display: flex; align-items: center; gap: .35rem; }
.ok { color: var(--akzent); font-weight: 600; }
.knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.fehlertext { color: var(--rot); background: var(--rot-hell); padding: .5rem .7rem; border-radius: 6px; font-size: .9rem; }
.chip { font-size: .78rem; padding: .15rem .55rem; border-radius: 99px; background: var(--grund); border: 1px solid var(--linie); }
.chip.freigegeben { background: var(--akzent-hell); border-color: var(--akzent); color: var(--akzent); }
.chip.gepostet { background: var(--akzent); color: #fff; border-color: var(--akzent); }
.chip.fehler, .chip.verpasst { background: var(--rot-hell); color: var(--rot); border-color: var(--rot); }
.chip.entwurf { background: var(--warn-hell); color: var(--warn); border-color: #e7c98f; }

.gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.alt-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem; display: flex; flex-direction: column; gap: .35rem; }
.alt-karte img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; }
.alt-karte p { margin: 0; }
.alt-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; font-size: .9rem; }
.einplanen { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; }
.einplanen input, .einplanen select { flex: 1 1 110px; }

.verlauf-zeile { display: grid; grid-template-columns: 80px 1fr; gap: .8rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem; margin-bottom: .6rem; }
.verlauf-zeile img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }
.verlauf-zeile strong { margin-right: .5rem; }
.verlauf-zeile p { margin: .25rem 0 0; }

.meldung { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); background: var(--text); color: #fff; padding: .7rem 1.1rem; border-radius: 8px; max-width: 90vw; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.meldung.fehler { background: var(--rot); }

body.anmelden { min-height: 100vh; display: grid; place-items: center; }
.anmelde-box { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 2rem; width: min(360px, 92vw); }
.anmelde-box form { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.25rem; }
.hinweis { color: var(--rot); }

@media (max-width: 700px) {
  .karten-inhalt { grid-template-columns: 1fr; }
  .bild.story { max-width: 160px; }
  .karten-kopf input[type="time"] { margin-left: 0; }
}
