:root {
  --bg: #f3f4f7; --karte: #ffffff; --text: #1b1e24; --leise: #666c78; --linie: #e1e3e9;
  --akzent: #2b5fa8; --akzent-text: #ffffff; --gruen: #23845a; --gruen-weich: #e3f2ea;
  --rot: #c0392b; --rot-weich: #f8e5e2; --grau-weich: #eceef2;
  --radius: 14px; --schatten: 0 1px 2px rgba(0,0,0,.05), 0 2px 10px rgba(0,0,0,.04);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161b; --karte: #1e2128; --text: #e8eaef; --leise: #9aa0ab; --linie: #2e323b;
    --akzent: #6d9be0; --akzent-text: #0f1420; --gruen: #4cc28a; --gruen-weich: #183126;
    --rot: #ee7b6c; --rot-weich: #3a1f1b; --grau-weich: #262a32;
    --schatten: none;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  padding: env(safe-area-inset-top) 0 calc(24px + env(safe-area-inset-bottom));
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
.kopf { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 18px 6px; max-width: 560px; margin: 0 auto; }
.marke { font-weight: 650; font-size: 20px; letter-spacing: -.01em; }
.verbindung { color: var(--leise); font-size: 14px; }
main { max-width: 560px; margin: 0 auto; padding: 4px 14px 24px; }
h2 { font-size: 15px; font-weight: 600; color: var(--leise); margin: 24px 4px 8px; }
.karte { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); padding: 16px 18px; margin: 10px 0; }
.leise { color: var(--leise); }
.klein { font-size: 14px; }
.mitte { text-align: center; }
.fehler { color: var(--rot); }

/* Gegenüber */
.gegen { text-align: center; padding: 26px 18px 22px; }
.gegen .name { font-size: 26px; font-weight: 650; letter-spacing: -.01em; }
.status { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 15px; color: var(--leise); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--linie); }
.status.an { color: var(--gruen); }
.status.an::before { background: var(--gruen); }

/* Knöpfe */
button { font: inherit; border: 0; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
.gross { display: block; width: 100%; padding: 18px; border-radius: 999px; font-size: 20px; font-weight: 600; margin-top: 20px; }
.gruen { background: var(--gruen); color: #fff; }
.rot { background: var(--rot); color: #fff; }
.blau { background: var(--akzent); color: var(--akzent-text); }
.hell { background: var(--grau-weich); color: var(--text); }
.knopf { padding: 10px 16px; border-radius: 10px; font-size: 16px; font-weight: 550; }
.zeile { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
input[type=text], input[type=url] {
  font: inherit; width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--linie);
  background: var(--bg); color: var(--text);
}
.zeile input { flex: 1 1 180px; width: auto; }

/* Verlauf */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linie); }
.liste li:last-child { border-bottom: 0; }
.liste .wer { font-weight: 550; }
.liste .wann { color: var(--leise); font-size: 14px; }
.liste .wie { text-align: right; white-space: nowrap; font-size: 15px; }
.liste .verpasst { color: var(--rot); }

/* Anruf-Bildschirm */
.anruf {
  position: fixed; inset: 0; z-index: 10; background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(40px + env(safe-area-inset-top)) 22px calc(30px + env(safe-area-inset-bottom));
}
.anruf .oben { text-align: center; }
.anruf .titel { color: var(--leise); font-size: 17px; }
.anruf .name { font-size: 34px; font-weight: 650; margin-top: 6px; letter-spacing: -.01em; }
.anruf .zeit { font-size: 22px; margin-top: 10px; }
.anruf .hinweis { color: var(--leise); font-size: 14px; margin-top: 14px; line-height: 1.4; }
.anruf .unten { max-width: 420px; width: 100%; margin: 0 auto; }
.anruf .zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.anruf .zwei .gross { margin-top: 0; }
.anruf .stumm.an { background: var(--text); color: var(--bg); }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 15px; max-width: 90vw;
}
