:root {
  --flaeche: #ffffff;
  --text: #1d2229;
  --leise: #687280;
  --linie: #dfe3e8;
  --akzent: #2d4a7a;
  --akzent-text: #ffffff;
  --akzent-hell: #e6ecf5;
  --gefahr: #b3412f;
  --rund: 16px;
  --tapete: radial-gradient(120% 80% at 15% 0%, #f5b47a 0%, rgba(245,180,122,0) 55%),
            radial-gradient(110% 90% at 100% 30%, #c77dba 0%, rgba(199,125,186,0) 60%),
            radial-gradient(120% 90% at 30% 100%, #3f8fb0 0%, rgba(63,143,176,0) 65%),
            linear-gradient(160deg, #4a5fa8 0%, #2d4a7a 100%);
  --glas: rgba(255,255,255,.28);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --flaeche: #1c222a;
    --text: #e8ecf0;
    --leise: #9aa4b0;
    --linie: #2c343e;
    --akzent: #86a9e0;
    --akzent-text: #0c1520;
    --akzent-hell: #222f42;
    --gefahr: #e0745f;
    --tapete: radial-gradient(120% 80% at 15% 0%, #7a4a2a 0%, rgba(122,74,42,0) 55%),
              radial-gradient(110% 90% at 100% 30%, #5e3360 0%, rgba(94,51,96,0) 60%),
              radial-gradient(120% 90% at 30% 100%, #1d4d63 0%, rgba(29,77,99,0) 65%),
              linear-gradient(160deg, #1d2547 0%, #111a2e 100%);
    --glas: rgba(255,255,255,.14);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; min-height: 100%; background: #2d4a7a; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--text); background: var(--tapete) fixed;
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--akzent); }
[hidden] { display: none !important; }

/* ---------- Startbildschirm ---------- */
body.start main { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  padding: 28px 20px calc(118px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
.gruss { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.25); margin: 8px 6px 30px; }
.gruss .datum { font-size: 15px; font-weight: 600; opacity: .9; }
.gruss h1 { margin: 2px 0 0; font-size: 32px; font-weight: 700; letter-spacing: -.01em; }

.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 26px 10px; }
.symbol { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none;
  color: #fff; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; }
.symbol img { width: 66px; height: 66px; border-radius: 15px; box-shadow: 0 4px 14px rgba(0,0,0,.22);
  transition: transform .12s ease; }
.symbol:active img { transform: scale(.9); filter: brightness(.85); }
.symbol span { font-size: 13px; font-weight: 500; text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,.45);
  max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.symbol:focus-visible { outline: none; }
.symbol:focus-visible img { outline: 3px solid #fff; outline-offset: 3px; }
.leer-start { color: #fff; text-align: center; font-size: 18px; text-shadow: 0 1px 6px rgba(0,0,0,.3); margin-top: 10vh; }

.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; gap: 22px; padding: 12px 22px 8px; border-radius: 28px; background: var(--glas);
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 30px rgba(0,0,0,.15); }
.dock .symbol img { width: 54px; height: 54px; border-radius: 13px; }
.dock .symbol span { font-size: 11px; }

/* ---------- Blätter (Anmeldung, Konto, Verwaltung) ---------- */
body.mit-blatt main { padding: 18px 14px 60px; }
.blatt { max-width: 560px; margin: 0 auto; background: var(--flaeche); border-radius: 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,.18); padding: 8px 20px 24px; }
.blatt-kopf { display: flex; align-items: center; gap: 8px; margin: 0 -8px 6px; }
.blatt-kopf h1 { flex: 1; margin: 0; font-size: 19px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zurueck { width: 44px; height: 44px; flex: none; display: grid; place-items: center; font-size: 34px; line-height: 1;
  color: var(--akzent); text-decoration: none; }

.anmeldung { max-width: 380px; margin-top: 10vh; padding-top: 28px; text-align: center; }
.anmeldung .logo { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.anmeldung h1 { margin: 12px 0 8px; font-size: 24px; }
.anmeldung label { text-align: left; }

h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--leise); margin: 24px 2px 8px; font-weight: 600; }
label { display: block; font-size: 14px; font-weight: 600; color: var(--leise); margin: 14px 2px 6px; }
.feld { width: 100%; padding: 12px 14px; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche);
  outline: none; -webkit-appearance: none; appearance: none; }
.feld:focus { border-color: var(--akzent); }
.klein { font-size: 14px; color: var(--leise); margin: 6px 2px; }
.fehler { color: var(--gefahr); min-height: 1.4em; margin: 10px 2px 0; }
.fehler:empty { margin: 0; }
.hinweis { font-size: 14px; color: var(--leise); background: var(--akzent-hell); border-radius: 12px; padding: 10px 14px; margin-top: 18px; }
.leer { color: var(--leise); text-align: center; padding: 24px 12px; }
.wer { margin: 4px 2px 0; }
.marke { display: inline-block; margin-left: 8px; background: var(--akzent-hell); color: var(--akzent); font-size: 12px;
  font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }

.knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.knopf { flex: 1 1 140px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche);
  font-weight: 600; cursor: pointer; text-align: center; text-decoration: none; color: var(--text); display: inline-block; }
.knopf.haupt { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.knopf.gefahr { color: var(--gefahr); }
.knopf.breit { display: block; width: 100%; margin-top: 16px; }
.knoepfe .knopf.breit { margin-top: 0; }

.liste { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--linie); border-radius: var(--rund); overflow: hidden; }
.liste > li + li { border-top: 1px solid var(--linie); }
.zeile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px; color: inherit; text-decoration: none; }
.zeile:active { background: var(--akzent-hell); }
.zeile .text { flex: 1; min-width: 0; }
.zeile .name { font-weight: 600; }
.zeile .unter { font-size: 14px; color: var(--leise); }
.pfeil { color: var(--leise); font-size: 22px; }

.schalter { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 17px; font-weight: 600; margin-top: 18px; }
.schalter small { font-weight: 400; color: var(--leise); font-size: 14px; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--akzent); flex: none; margin: 0; }
.app-wahl { display: grid; gap: 8px; }
.app-wahl.gedimmt { opacity: .45; }
.app-haken { display: flex; align-items: center; gap: 12px; margin: 0; padding: 8px 12px; border: 1px solid var(--linie);
  border-radius: 12px; color: var(--text); font-size: 17px; font-weight: 500; cursor: pointer; }
.app-haken img { width: 34px; height: 34px; border-radius: 8px; }

#meldung { position: fixed; left: 50%; transform: translateX(-50%); z-index: 30; bottom: calc(100px + env(safe-area-inset-bottom));
  background: var(--text); color: var(--flaeche); padding: 10px 18px; border-radius: 999px; font-size: 15px; max-width: 90vw; }
.laedt { opacity: .6; pointer-events: none; }
