:root {
  --grund: #F6F3EE;
  --flaeche: #FFFFFF;
  --text: #1C2321;
  --leise: #6B7471;
  --linie: #E3DED6;
  --tief: #16302B;
  --akzent: #C8553D;
  --gut: #2F7D5B;
  --warn: #B7791F;
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #111614;
    --flaeche: #1A211F;
    --text: #ECEFEC;
    --leise: #9AA4A0;
    --linie: #2A3330;
    --tief: #0B1311;
    --akzent: #E06A50;
    --gut: #4FB38A;
    --warn: #E0A84A;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--grund); color: var(--text); }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) 0 calc(64px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
main { max-width: 560px; margin: 0 auto; padding: 16px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--leise); margin: 24px 0 8px; font-weight: 600; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.knopf { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 550; }
.knopf.voll { background: var(--tief); color: #fff; border-color: var(--tief); }
.knopf.gut { background: var(--gut); color: #fff; border-color: var(--gut); }
.knopf:active { transform: scale(0.97); }
.leise { color: var(--leise); }
.klein { font-size: 13px; }

/* Startseite */
.kopfzeile { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.kopfzeile .datum { font-size: 15px; color: var(--leise); }
.mikro-bereich { display: flex; flex-direction: column; align-items: center; padding: 28px 0 20px; }
.mikro {
  width: min(62vw, 240px); aspect-ratio: 1; border-radius: 50%;
  background: var(--tief); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 40px rgba(22, 48, 43, 0.25);
  transition: transform 0.15s, background 0.2s;
}
.mikro svg { width: 34%; height: 34%; }
.mikro:active { transform: scale(0.96); }
.mikro.aktiv { background: var(--akzent); animation: puls 1.6s ease-in-out infinite; }
@keyframes puls {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 85, 61, 0.45); }
  50% { box-shadow: 0 0 0 22px rgba(200, 85, 61, 0); }
}
.mikro-text { margin-top: 18px; font-size: 18px; font-weight: 600; text-align: center; min-height: 27px; }
.mikro-unter { margin-top: 4px; color: var(--leise); font-size: 14px; text-align: center; min-height: 20px; }
.mikro-aktionen { margin-top: 14px; display: flex; gap: 10px; min-height: 38px; }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.karte.check { border-color: var(--warn); }
.karte .marke { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--leise); font-weight: 600; }
.karte .gross { font-size: 20px; font-weight: 650; margin: 6px 0 4px; line-height: 1.3; }
.karte .zeilen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.fragen { margin: 8px 0 0; padding-left: 18px; }

.tippen textarea {
  width: 100%; min-height: 96px; resize: vertical; font: inherit; color: inherit;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 12px;
}

/* Liste */
.aufgabe { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.aufgabe .zeile { display: flex; gap: 10px; align-items: flex-start; }
.aufgabe .haken { width: 24px; height: 24px; flex: none; border: 2px solid var(--linie); border-radius: 50%; margin-top: 1px; }
.aufgabe.erledigt .haken { background: var(--gut); border-color: var(--gut); }
.aufgabe.erledigt .titel { text-decoration: line-through; color: var(--leise); }
.aufgabe .titel { font-weight: 560; }
.aufgabe .info { font-size: 13px; color: var(--leise); margin-top: 2px; }
.aufgabe .schritt { font-size: 14px; margin-top: 6px; }
.aufgabe .aktionen { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.etikett { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--grund); border: 1px solid var(--linie); margin-right: 4px; }
.etikett.p1 { border-color: var(--akzent); color: var(--akzent); }
.etikett.p2 { border-color: var(--warn); color: var(--warn); }
.leer { color: var(--leise); font-size: 14px; padding: 4px 0; }

/* Verlauf */
.eintrag { border-bottom: 1px solid var(--linie); padding: 12px 0; }
.eintrag .oben { display: flex; justify-content: space-between; font-size: 13px; color: var(--leise); }
.eintrag .roh { margin-top: 6px; font-size: 15px; }
.eintrag .zus { margin-top: 4px; font-size: 14px; color: var(--leise); }
.status { font-weight: 600; }
.status.fehler { color: var(--akzent); }
.status.fertig { color: var(--gut); }

/* Anmeldung */
.anmeldung { padding-top: 18vh; text-align: center; }
.anmeldung input { width: 100%; max-width: 320px; font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); color: inherit; margin: 18px 0 12px; }

nav#leiste {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; gap: 4px;
  background: var(--flaeche); border-top: 1px solid var(--linie);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
nav#leiste a { flex: 1; max-width: 180px; text-align: center; padding: 10px 0; border-radius: 10px; color: var(--leise); text-decoration: none; font-weight: 560; font-size: 15px; }
nav#leiste a.an { color: var(--text); background: var(--grund); }

#hinweis {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--tief); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 550;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); max-width: calc(100vw - 32px);
}
