:root {
  --grund: #eef1f4;
  --flaeche: #ffffff;
  --text: #1c2733;
  --leise: #5b6875;
  --linie: #cfd6dd;
  --ok: #1d7a46;
  --fehlt: #b3261e;
  --akzent: #24527a;
  --akzent-text: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #141a20;
    --flaeche: #1d252d;
    --text: #e6ebf0;
    --leise: #9aa7b3;
    --linie: #33404c;
    --ok: #5cc98a;
    --fehlt: #f28b82;
    --akzent: #8ab6dc;
    --akzent-text: #141a20;
    color-scheme: dark;
  }
}
* { 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, "Helvetica Neue", Arial, sans-serif;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
main { max-width: 40rem; margin: 0 auto; padding: 1.25rem 1.25rem 2rem; }
h1 { font-size: 1.8rem; line-height: 1.2; margin: 0.2rem 0 0.25rem; }
h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.hinweis { margin: 0; color: var(--fehlt); font-weight: 600; font-size: 0.9rem; }
.kontext { margin: 0 0 1rem; color: var(--leise); }
.kontext strong { color: var(--akzent); }

.reiter { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.reiter-knopf { padding: 0.7rem; font-weight: 600; }
.reiter-knopf.aktiv { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }

section {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.gross { font-size: 2rem; font-weight: 700; letter-spacing: 0.04em; margin: 0 0 0.25rem; color: var(--akzent); }
.deutung { margin: 0 0 0.75rem; }
.erklaerung { color: var(--leise); font-size: 0.92rem; margin: 0.5rem 0 0; }
.geheimnis { font-size: 2.2rem; font-weight: 800; margin: 0.25rem 0; color: var(--fehlt); }

dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; }
dt { color: var(--leise); }
dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

.wahl { display: grid; gap: 0.6rem; }
.wahl label { display: flex; gap: 0.6rem; align-items: flex-start; }
.wahl input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; flex: none; }

.knoepfe { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
button {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--linie);
  background: var(--grund);
  color: var(--text);
}
button.gefahr { color: var(--fehlt); }
button:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
section > button { margin-top: 0.75rem; }

.protokoll { list-style: none; margin: 0.5rem 0 0; padding: 0; max-height: 22rem; overflow-y: auto; }
.protokoll li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 0.6rem;
  padding: 0.35rem 0;
  border-top: 1px solid var(--linie);
  font-size: 0.88rem;
}
.protokoll li:first-child { border-top: 0; }
.protokoll .zeit { color: var(--leise); font-variant-numeric: tabular-nums; grid-row: span 2; }
.protokoll .leise { color: var(--leise); font-size: 0.8rem; }

.abdeckung {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--akzent);
  color: var(--akzent-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.abdeckung[hidden] { display: none; }
.abdeckung p { margin: 0; font-size: 1.8rem; font-weight: 700; }
.abdeckung .klein { font-size: 1rem; font-weight: 400; margin-top: 0.5rem; }
