[hidden] { display: none !important; }
:root {
  --hg: #f4f6f3;
  --karte: #ffffff;
  --text: #1c2420;
  --leise: #5d6b63;
  --linie: #dfe5e0;
  --akzent: #1f7a4d;
  --akzent-text: #ffffff;
  --akzent-hell: #e3f2e9;
  --gefahr: #b42318;
  --warn-hg: #fdecea;
  --schatten: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --hg: #111613;
    --karte: #1a211d;
    --text: #e7ece9;
    --leise: #9aa8a0;
    --linie: #2c3530;
    --akzent: #3fb27a;
    --akzent-text: #0c1a12;
    --akzent-hell: #1d3428;
    --gefahr: #f97066;
    --warn-hg: #3a1f1d;
    --schatten: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--hg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.3rem; letter-spacing: .08em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; margin-top: 1.2rem; }
p { margin: .4rem 0; }

.kopf {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top));
  background: var(--karte); border-bottom: 1px solid var(--linie);
}
.marke { display: flex; align-items: center; gap: 10px; }
.logo { width: 36px; height: 36px; border-radius: 10px; }
.unterzeile { margin: 0; font-size: .78rem; color: var(--leise); }

.reiter {
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px;
  background: var(--karte); border-bottom: 1px solid var(--linie);
  scrollbar-width: none;
}
.reiter button {
  flex: none; border: 1px solid var(--linie); background: transparent; color: var(--leise);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .9rem;
}
.reiter button.aktiv { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.reiter button:disabled { opacity: .55; }
.bald { font-size: .7rem; border: 1px solid currentColor; border-radius: 6px; padding: 0 4px; margin-left: 2px; }

main { max-width: 680px; margin: 0 auto; padding: 16px; }
.karte {
  background: var(--karte); border: 1px solid var(--linie); border-radius: 14px;
  padding: 16px; box-shadow: var(--schatten); margin-bottom: 12px;
}
.mitte { text-align: center; }
.gross { font-size: 2.4rem; }
.hilfe { color: var(--leise); font-size: .92rem; }
.klein { color: var(--leise); font-size: .82rem; display: block; margin-top: 2px; }
.hinweis { background: var(--akzent-hell); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.warnung { background: var(--warn-hg); color: var(--gefahr); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }

.zeile-titel { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.person { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; width: 100%;
  text-align: left; font: inherit; color: inherit; }
.person:hover { border-color: var(--akzent); }
.person .zeichen { font-size: 1.8rem; line-height: 1; width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; background: var(--akzent-hell); border-radius: 12px; }
.person .inhalt { min-width: 0; flex: 1; }
.person .name { font-weight: 650; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.marker { font-size: .72rem; font-weight: 600; background: var(--akzent-hell); color: var(--akzent);
  border-radius: 6px; padding: 1px 6px; }
.person .beschreibung { color: var(--leise); font-size: .9rem; margin: 2px 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person .regel { font-size: .82rem; color: var(--leise); }

.feld { display: block; margin-top: 12px; font-size: .9rem; font-weight: 600; }
.feld input, .feld textarea, .feld select {
  display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 400; color: var(--text);
  background: var(--hg); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px;
}
.feld textarea { resize: vertical; min-height: 110px; }
.feld input:focus, .feld textarea:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zwei .emoji-feld { max-width: 100px; }
.zwei:has(.emoji-feld) { grid-template-columns: 90px 1fr; }
.emoji-feld input { text-align: center; font-size: 1.3rem; padding: 6px; }

.tage { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tage button {
  width: 44px; height: 40px; border-radius: 10px; border: 1px solid var(--linie);
  background: var(--hg); color: var(--leise); font: inherit; font-weight: 600;
}
.tage button[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }

.knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.platz { display: none; }
.knoepfe #loeschen { order: 3; grid-column: 1 / -1; }
button.haupt, button.leise, button.gefahr {
  font: inherit; font-weight: 600; border-radius: 10px; padding: 10px 16px; border: 1px solid transparent;
  min-height: 44px; cursor: pointer;
}
button.haupt { background: var(--akzent); color: var(--akzent-text); }
button.leise { background: transparent; color: var(--leise); border-color: var(--linie); }
button.gefahr { background: transparent; color: var(--gefahr); border-color: var(--gefahr); }

#toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--hg); padding: 10px 16px; border-radius: 999px; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100% - 32px);
}
#toast.sichtbar { opacity: 1; }

.symbol-zeile { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.symbol-vorschau {
  width: 76px; height: 76px; flex: none; border-radius: 18px; background: var(--akzent-hell);
  display: grid; place-items: center; font-size: 2.4rem; overflow: hidden;
}
.symbol-vorschau img, .person .zeichen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person .zeichen { overflow: hidden; }
.symbol-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.symbol-knoepfe .klein { flex-basis: 100%; }
.symbol-knoepfe button { min-height: 40px; padding: 8px 12px; }
