/* FFP-App – Mobile First (iPad und Handy), hell und dunkel */
:root {
  --grund: #f6f4ee; --flaeche: #ffffff; --text: #1f2430; --leise: #5d6472; --linie: #e2ded3;
  --akzent: #1f4e79; --akzent-hell: #e3ecf6; --gut: #2e7d4f; --warn: #b3541e;
  --blau: #e3ecf6; --gruen: #e2f2e6; --gelb: #fbf1cf; --rot: #f9e0dc; --lila: #ece4f6;
  --radius: 14px; --schatten: 0 1px 3px rgb(0 0 0 / .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #15181e; --flaeche: #1e232b; --text: #e8e6e1; --leise: #a3a9b4; --linie: #2f3540;
    --akzent: #8db8e6; --akzent-hell: #233246; --gut: #7cc596; --warn: #f0a070;
    --blau: #233246; --gruen: #1f3428; --gelb: #3a331c; --rot: #3d2522; --lila: #2f2840;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
a { color: var(--akzent); }
main { max-width: 980px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.6rem; margin: .4rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.leise { color: var(--leise); }

/* Kopf und Navigation */
.kopf {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--flaeche); border-bottom: 1px solid var(--linie);
}
.marke { font-weight: 800; font-size: 1.2rem; text-decoration: none; letter-spacing: .04em; }
.oben { display: none; gap: 4px; flex: 1; }
.oben a, .abmelden { text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.oben a:hover { background: var(--akzent-hell); }
.abmelden { margin-left: auto; color: var(--leise); font-size: .9rem; }
.unten {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex;
  background: var(--flaeche); border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom);
}
.unten a {
  flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 0 6px;
  font-size: .75rem; text-decoration: none; color: var(--leise); min-height: 56px;
}
.unten span { font-size: 1.35rem; line-height: 1.2; }
@media (min-width: 900px) {
  .oben { display: flex; }
  .unten { display: none; }
  body { padding-bottom: 0; }
}

/* Bausteine */
.block { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; box-shadow: var(--schatten); }
.titelzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.etikett { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--akzent-hell); color: var(--akzent); }
.knopf, button {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--akzent); color: var(--flaeche); border: 0; border-radius: 10px; padding: 10px 16px; min-height: 44px;
}
.knopf.gross { font-size: 1.1rem; padding: 14px 26px; }
button.klein { background: transparent; color: var(--leise); border: 1px solid var(--linie); padding: 4px 10px; min-height: 32px; font-weight: 500; font-size: .85rem; }
button.gefahr { color: var(--warn); border-color: var(--warn); margin-top: 12px; }
.hinweis { background: var(--gelb); border-radius: 10px; padding: 10px 12px; }
.werkzeuge { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: .9rem; }
.werkzeuge form { margin: 0; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }

/* Anmelden */
.anmelden { text-align: center; max-width: 460px; margin: 12vh auto 0; }
.anmelden h1 { font-size: 1.9rem; }

/* Fahrplan */
.phasen { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.phasen li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; }
.phasen p { margin: 0; color: var(--leise); font-size: .92rem; }
.phasen .nr { flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--grund); border: 2px solid var(--linie); }
.phasen .jetzt { background: var(--akzent-hell); }
.phasen .jetzt .nr { background: var(--akzent); color: var(--flaeche); border-color: var(--akzent); }
.phasen .fertig .nr { border-color: var(--gut); color: var(--gut); }
.schritte { margin: 0; padding-left: 1.3rem; display: grid; gap: 6px; }
@media (min-width: 700px) { .phasen { grid-template-columns: 1fr 1fr; } }

/* Kacheln (Hilfen) */
.kacheln { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.kacheln a { display: block; padding: 12px 14px; border-radius: 10px; background: var(--grund); border: 1px solid var(--linie); text-decoration: none; color: var(--text); font-weight: 600; min-height: 48px; }

/* Termine */
.termine { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.termin { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 12px; border-radius: 10px; background: var(--flaeche); border: 1px solid var(--linie); border-left: 5px solid var(--akzent); }
.termin .wann { flex: 0 0 130px; display: flex; flex-direction: column; }
.termin .wann span { color: var(--leise); font-size: .9rem; }
.termin .was { flex: 1 1 200px; }
.termin .was p { margin: 2px 0 0; color: var(--leise); font-size: .92rem; }
.termin .werkzeuge { flex-basis: 100%; }
.termin.art-abgabe { border-left-color: var(--warn); }
.termin.art-praesentation { border-left-color: var(--gut); }
.termin.naechster { box-shadow: 0 0 0 2px var(--akzent); }
.vorbei .termin { opacity: .65; }
details summary { cursor: pointer; font-weight: 600; }

/* Pinnwand */
.pinnwand { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; }
.karte { position: relative; border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--schatten); border: 1px solid var(--linie); }
.karte h3 { margin: 0 0 6px; font-size: 1.05rem; padding-right: 24px; }
.karte .text p { margin: 0 0 6px; }
.karte .pin { position: absolute; top: 10px; right: 12px; }
.karte .links { margin: 6px 0 0; padding-left: 1.1rem; }
.farbe-blau { background: var(--blau); } .farbe-gruen { background: var(--gruen); } .farbe-gelb { background: var(--gelb); }
.farbe-rot { background: var(--rot); } .farbe-lila { background: var(--lila); }

/* Tools */
.tools { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tools li { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 12px 14px; }
.tools p { margin: 4px 0 0; color: var(--leise); }

/* Kursleitung */
.zahlen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.zahlen div { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; }
.zahlen strong { font-size: 1.6rem; }
.zahlen span { color: var(--leise); font-size: .85rem; }
@media (min-width: 700px) { .zahlen { grid-template-columns: repeat(4, 1fr); } }
.liste { width: 100%; border-collapse: collapse; }
.liste th, .liste td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--linie); }

/* Formulare */
.formular { display: grid; gap: 14px; max-width: 640px; }
.formular label { display: grid; gap: 4px; font-weight: 600; }
.formular small { font-weight: 400; color: var(--leise); }
.formular input, .formular textarea, .formular select { font-weight: 400; }
.formular > button { justify-self: start; }
input, textarea, select {
  font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%;
}
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.farben { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.farben label { display: flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 500; padding: 6px 10px; border-radius: 8px; }
.farben input, .haken input { width: auto; min-height: 0; }
.formular .haken { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* Lesetext (Hilfen) */
.lesetext { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px; }
.lesetext table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.lesetext th, .lesetext td { border: 1px solid var(--linie); padding: 6px 8px; text-align: left; }
.lesetext blockquote { margin: 0; padding: 4px 14px; border-left: 4px solid var(--akzent); background: var(--akzent-hell); border-radius: 0 8px 8px 0; }
.lesetext img { max-width: 100%; }
