/* Koffein – iOS-Stil mit Liquid Glass. Dunkel, Weiß als Akzent. */

:root {
  color-scheme: dark;
  --hg: #000;
  --flaeche: rgba(28, 28, 30, 0.82);
  --flaeche-fest: #1c1c1e;
  --flaeche-2: #2c2c2e;
  --fuellung: rgba(118, 118, 128, 0.24);
  --fuellung-2: rgba(118, 118, 128, 0.36);
  --text: #fff;
  --text-2: rgba(235, 235, 245, 0.62);
  --text-3: rgba(235, 235, 245, 0.32);
  --trenner: rgba(84, 84, 88, 0.5);
  --akzent: #fff;
  --auf-akzent: #000;
  --rot: #ff453a;
  --r-karte: 26px;
  --r-gross: 38px;
  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
  --schrift: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", system-ui, sans-serif;
  --rund: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --feder: linear(0, 0.0218 1.1%, 0.0846 2.3%, 0.3245 5.1%, 0.6188 8.4%, 0.8317 11.5%, 0.9701 14.9%, 1.0371 18%, 1.0631 20.9%, 1.0663 23.9%, 1.0414 30.5%, 1.0066 38.8%, 0.9971 45.8%, 0.9971 59.8%, 1);
  --sanft: cubic-bezier(0.22, 0.9, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--hg); }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--hg);
  color: var(--text);
  font: 17px/1.35 var(--schrift);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
body.blatt-offen { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-user-select: none; user-select: none; }
button:disabled { opacity: 0.4; cursor: default; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.8); outline-offset: 2px; }
h1, h2, p { margin: 0; }
small { font-size: 0.6em; font-weight: 600; color: var(--text-2); letter-spacing: 0; }

.sym { width: 1.3em; height: 1.3em; flex: none; display: block; }
.unsichtbar { position: fixed; left: -100px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------ Hintergrund und Glas */

.umgebung {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 45% at 10% -5%, rgba(140, 158, 186, 0.20), transparent 70%),
    radial-gradient(55% 40% at 105% 25%, rgba(96, 116, 146, 0.14), transparent 70%),
    radial-gradient(80% 50% at 50% 115%, rgba(255, 255, 255, 0.07), transparent 70%),
    var(--hg);
}

.glas {
  position: relative;
  background: linear-gradient(180deg, rgba(72, 72, 78, 0.42), rgba(36, 36, 40, 0.38));
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 0.38),
    inset 0 -0.5px 0 rgba(255, 255, 255, 0.06),
    0 10px 30px rgba(0, 0, 0, 0.42),
    0 1px 3px rgba(0, 0, 0, 0.3);
}
.glas::after, .glas-dick::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.06) 28%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, 0.16) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glas-dick {
  position: relative;
  background: linear-gradient(180deg, rgba(44, 44, 48, 0.78), rgba(24, 24, 27, 0.82));
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  backdrop-filter: blur(40px) saturate(180%);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.3), 0 20px 60px rgba(0, 0, 0, 0.55);
}

/* ------------------------------------------------------------ Gerüst */

.inhalt {
  max-width: 600px;
  margin: 0 auto;
  padding: calc(var(--oben) + 18px) 16px calc(var(--unten) + 120px);
}

.leiste {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; pointer-events: none;
  height: calc(var(--oben) + 52px);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px;
}
.leiste::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0));
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
  opacity: 0.55; transition: opacity 0.3s;
}
.leiste-titel {
  position: relative; font-weight: 600; font-size: 17px;
  opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.35s var(--sanft);
}
.gescrollt .leiste::before { opacity: 1; }
.gescrollt .leiste-titel { opacity: 1; transform: none; }

/* Tableiste: schwebende Glas-Kapsel */
.tabs {
  position: fixed; z-index: 30;
  left: 50%; transform: translateX(-50%);
  bottom: max(14px, calc(var(--unten) - 4px));
  width: min(calc(100% - 40px), 400px);
  height: 64px; padding: 4px;
  border-radius: 999px;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.linse {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / 4);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.4), inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  transition: transform 0.55s var(--feder);
}
.tab {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.62);
  transition: color 0.2s, transform 0.3s var(--feder);
}
.tab .sym { width: 27px; height: 27px; stroke-width: 1.7; }
.tab.aktiv { color: var(--akzent); }
.tab.aktiv .sym { stroke-width: 2.1; }
.tab:active { transform: scale(0.92); }

/* ------------------------------------------------------------ Typo und Abschnitte */

.titelzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 4px 16px; }
.vortitel { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); margin-bottom: 2px; }
.grosstitel { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: 0.01em; overflow-wrap: anywhere; }
.abschnitt { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 4px 10px; }
.abschnitt h2 { font-size: 21px; font-weight: 700; letter-spacing: 0.005em; }
.textknopf { color: var(--akzent); font-weight: 500; opacity: 0.9; display: inline-flex; align-items: center; gap: 4px; }
.textknopf.leise { color: var(--text-2); font-size: 15px; margin-top: 10px; }
.textknopf.mitte { display: flex; margin: 18px auto 6px; }
.leerzeile { color: var(--text-2); padding: 4px 6px; font-size: 15px; }
.fussnote { color: var(--text-3); font-size: 13px; text-align: center; margin: 26px 16px 0; line-height: 1.45; }
.fusszeile { color: var(--text-2); font-size: 15px; margin-top: 12px; }
.fusszeile b { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------ Karten und Listen */

.karte {
  display: block; position: relative;
  background: var(--flaeche);
  border-radius: var(--r-karte);
  padding: 18px;
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.07), 0 0 0 0.5px rgba(255, 255, 255, 0.04);
  margin-bottom: 12px;
}

.liste {
  background: var(--flaeche);
  border-radius: var(--r-karte);
  overflow: hidden;
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.07);
  margin-bottom: 12px;
}
.zeile {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 10px 16px;
  text-align: left; position: relative;
  transition: background 0.15s;
}
.zeile + .zeile::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: 0.5px; background: var(--trenner); }
button.zeile:active, label.zeile:active { background: rgba(255, 255, 255, 0.06); }
.zeile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zeile-text b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile-text b em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--text-2); margin-left: 4px; }
.zeile-text span { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.zeile-text span .sym { width: 14px; height: 14px; }
.zeile-zeit { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 15px; width: 44px; flex: none; }
.zeile-wert { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 15px; flex: none; }
.zeile-pfeil { color: var(--text-3); }
.zeile-pfeil .sym { width: 16px; height: 16px; }
.zeile-sym { width: 30px; height: 30px; border-radius: 8px; background: var(--fuellung); display: grid; place-items: center; flex: none; }
.zeile-sym .sym { width: 18px; height: 18px; }
.zeile-sym.hell { background: #fff; color: #000; }
.zeile.rot, .zeile.rot .zeile-sym { color: var(--rot); }
.zeile.rot .zeile-sym { background: rgba(255, 69, 58, 0.16); }

/* ------------------------------------------------------------ Knöpfe und Felder */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 50px; padding: 0 22px; border-radius: 999px;
  font-size: 17px; font-weight: 600; white-space: nowrap;
  transition: transform 0.35s var(--feder), opacity 0.2s, background 0.2s;
}
.knopf:active { transform: scale(0.95); }
.knopf .sym { width: 19px; height: 19px; }
.knopf.primaer { background: var(--akzent); color: var(--auf-akzent); box-shadow: 0 6px 20px rgba(255, 255, 255, 0.12); }
.knopf.leise { background: var(--fuellung); }
.knopf.gefahr { background: rgba(255, 69, 58, 0.16); color: var(--rot); }
.knopf.breit { width: 100%; }
.knopf.klein { height: 34px; padding: 0 14px; font-size: 15px; gap: 5px; }
.knopf.klein .sym { width: 16px; height: 16px; }
.knopfreihe { display: flex; gap: 10px; flex-wrap: wrap; }
.knopfreihe .knopf { flex: 1 1 140px; }

.rundknopf {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  transition: transform 0.35s var(--feder);
}
.rundknopf:active { transform: scale(0.9); }
.rundknopf .sym { width: 22px; height: 22px; }
.rundknopf.klein { width: 34px; height: 34px; }
.rundknopf.klein .sym { width: 17px; height: 17px; }
.rundknopf.leise { background: var(--fuellung); }

.feld-label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.03em; }
.feld-label .segment { text-transform: none; letter-spacing: 0; }
.feld {
  width: 100%; height: 52px; padding: 0 16px;
  background: var(--fuellung); border: 0; border-radius: 14px;
  font-size: 17px; color: var(--text); text-transform: none; letter-spacing: 0;
  outline: none; -webkit-appearance: none; appearance: none;
  transition: box-shadow 0.2s;
}
.feld::placeholder { color: var(--text-3); }
.feld:focus { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); }
select.feld { background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 22px) 23px, calc(100% - 17px) 23px; background-size: 5px 5px; background-repeat: no-repeat; }
.code-feld { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.zeit-feld { background: var(--fuellung); border: 0; border-radius: 9px; height: 34px; padding: 0 10px; font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none; }
.zeit-feld:disabled { opacity: 0.35; }

.segment {
  display: flex; padding: 3px; gap: 2px;
  background: var(--fuellung); border-radius: 999px;
}
.segment button {
  flex: 1; min-width: 0; height: 32px; padding: 0 6px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.segment button[aria-pressed="true"] {
  background: #636366; font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25), inset 0 0.5px 0 rgba(255, 255, 255, 0.25);
}

.schalter {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0;
  width: 51px; height: 31px; border-radius: 999px; position: relative; cursor: pointer;
  background: rgba(120, 120, 128, 0.32); transition: background 0.25s;
}
.schalter::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18), 0 1px 1px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s var(--feder), background 0.25s;
}
.schalter:checked { background: #fff; }
.schalter:checked::after { transform: translateX(20px); background: #111; box-shadow: none; }
.schalter-zeile { cursor: pointer; }

/* ------------------------------------------------------------ Heute */

.hinweis { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; }
.hinweis-sym { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: #000; display: grid; place-items: center; flex: none; }
.hinweis-sym .sym { width: 22px; height: 22px; }
.hinweis-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hinweis-text b { font-weight: 600; }
.hinweis-text span { font-size: 14px; color: var(--text-2); }
.hinweis-knopf { font-size: 15px; font-weight: 600; background: var(--fuellung); padding: 7px 12px; border-radius: 999px; white-space: nowrap; }

.held { padding: 22px 18px 18px; }
.held-ring { position: relative; width: min(232px, 64vw); aspect-ratio: 1; margin: 6px auto 4px; }
.ring { width: 100%; height: 100%; display: block; overflow: visible; }
.ring-spur { fill: none; stroke: rgba(255, 255, 255, 0.1); }
.ring-wert { fill: none; stroke: url(#ringVerlauf); stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.25)); transition: stroke-dashoffset 1s var(--sanft); }
.ring.ueber .ring-wert { stroke: var(--rot); filter: drop-shadow(0 0 10px rgba(255, 69, 58, 0.4)); }
.held-mitte { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.riesenzahl { font: 700 64px/1 var(--rund); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.einheit { font-size: 15px; color: var(--text-2); margin-top: 4px; font-weight: 500; }
.klein-hinweis { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--fuellung); padding: 3px 9px; border-radius: 999px; margin-top: 8px; }
.kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.kennzahlen > * { display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.kennzahlen > * + *::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 0.5px; background: var(--trenner); }
.kz-wert { font: 650 22px/1.15 var(--rund); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kz-wert.warn { color: var(--rot); }
.kz-name { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.warnzeile { color: var(--rot); font-size: 14px; text-align: center; margin-top: 14px; }

.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kachel {
  position: relative; text-align: left;
  display: flex; flex-direction: column;
  min-height: 112px; padding: 14px 14px 12px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(48, 48, 52, 0.9), rgba(28, 28, 30, 0.9));
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.12), 0 0 0 0.5px rgba(255, 255, 255, 0.04);
  transition: transform 0.35s var(--feder);
}
.kachel:active { transform: scale(0.95); }
.kachel-plus { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; }
.kachel-plus .sym { width: 16px; height: 16px; }
.kachel-name { font-weight: 600; padding-right: 34px; line-height: 1.2; }
.kachel-detail { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.kachel-mg { margin-top: auto; padding-top: 10px; font: 650 24px/1 var(--rund); font-variant-numeric: tabular-nums; }

.fasten-kurz { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.fasten-kurz-kopf { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fasten-kurz-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fasten-kurz-sub { font-size: 14px; color: var(--text-2); }

.marke {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  background: var(--fuellung); color: var(--text-2);
}
.marke .sym { width: 14px; height: 14px; }
.marke.hell { background: #fff; color: #000; }
.marke.rot { background: rgba(255, 69, 58, 0.16); color: var(--rot); }
.marke.gross { font-size: 15px; padding: 9px 16px; margin-top: 16px; }

.kurve, .balkenbild { width: 100%; height: auto; display: block; overflow: visible; }
.kurve .linie { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.kurve .linie-zukunft { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; }
.grundlinie { stroke: rgba(255, 255, 255, 0.12); stroke-width: 1; }
.grenzlinie { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; stroke-dasharray: 4 4; }
.jetzt-linie { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; }
.jetzt-hof { fill: rgba(255, 255, 255, 0.18); }
.jetzt-punkt { fill: #fff; stroke: #000; stroke-width: 2; }

.eintrag-marke { fill: #fff; }
.achse { fill: var(--text-2); font-size: 11px; font-weight: 500; font-family: var(--schrift); }
.achse.fett { fill: #fff; font-weight: 700; }
.wert { fill: #fff; font-size: 11.5px; font-weight: 700; font-family: var(--rund); }
.balken { fill: rgba(255, 255, 255, 0.55); }
.balken.heute { fill: #fff; }
.balken.leicht { fill: rgba(255, 255, 255, 0.22); }
.balken.markiert { fill: rgba(255, 255, 255, 0.75); }
.balken.zuviel { fill: var(--rot); }
.null-punkt { fill: rgba(255, 255, 255, 0.2); }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 10px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende span:last-child { margin-left: auto; }
.punkt { width: 14px; height: 0; border-top: 2.5px solid #fff; display: inline-block; border-radius: 2px; }
.punkt.leer { border-top: 2px dotted rgba(255, 255, 255, 0.6); }

/* ------------------------------------------------------------ Wirkung */

.wirkung-held { text-align: center; padding: 24px 20px 20px; overflow: hidden; }
.wirkung-held::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 120%; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.10), transparent 70%);
}
.vorzeile { font-size: 15px; color: var(--text-2); font-weight: 500; }
.faktor-gross { font: 700 92px/1 var(--rund); letter-spacing: -0.03em; margin: 8px 0 6px; font-variant-numeric: tabular-nums; text-shadow: 0 0 40px rgba(255, 255, 255, 0.25); }
.faktor-gross span { font-size: 0.5em; font-weight: 600; color: var(--text-2); margin-left: 2px; }
.unterzeile { font-size: 16px; color: var(--text); opacity: 0.9; max-width: 30ch; margin: 0 auto; }
.skala { margin: 22px 4px 4px; }
.skala-spur { position: relative; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.skala-fuell { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), #fff); }
.skala-punkt { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 255, 255, 0.5); }
.skala-text { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-top: 10px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; padding: 7px 12px; border-radius: 999px; background: var(--fuellung); }
.chip .sym { width: 15px; height: 15px; }

.phasen { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.phasen::before { content: ""; position: absolute; top: 8px; left: 10%; right: 10%; height: 2px; background: rgba(255, 255, 255, 0.12); }
.phasen li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 11.5px; color: var(--text-3); font-weight: 500; position: relative; }
.phasen i { width: 18px; height: 18px; border-radius: 50%; background: #2c2c2e; border: 2px solid rgba(255, 255, 255, 0.18); position: relative; z-index: 1; }
.phasen li.vorbei { color: var(--text-2); }
.phasen li.vorbei i { background: rgba(255, 255, 255, 0.55); border-color: transparent; }
.phasen li.jetzt { color: #fff; font-weight: 700; }
.phasen li.jetzt i { background: #fff; border-color: #fff; box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.16), 0 0 18px rgba(255, 255, 255, 0.5); }
.phase-text { font-size: 15px; color: var(--text-2); margin-top: 16px; }
.phase-text b { color: #fff; }

.erklaerung summary { list-style: none; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.erklaerung summary::-webkit-details-marker { display: none; }
.erklaerung summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--text-2); transition: transform 0.3s var(--feder); }
.erklaerung[open] summary::after { transform: rotate(45deg); }
.erklaerung p { font-size: 15px; color: var(--text-2); margin-top: 12px; line-height: 1.45; }
.erklaerung p b { color: #fff; font-weight: 600; }
.erklaerung .leise { font-size: 13px; color: var(--text-3); }
details.karte { margin-top: 26px; }

/* ------------------------------------------------------------ Fasten */

.leer-gross { text-align: center; padding: 30px 22px 26px; }
.leer-bild { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: radial-gradient(circle at 30% 25%, #4a4a4f, #1c1c1e 70%); box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.5); }
.leer-bild .sym { width: 42px; height: 42px; stroke-width: 1.5; }
.leer-gross h2 { font-size: 22px; margin-bottom: 8px; }
.leer-gross p { color: var(--text-2); font-size: 15.5px; line-height: 1.45; }

.gruppe-karte { transition: transform 0.35s var(--feder); }
.gruppe-karte:active { transform: scale(0.98); }
.gk-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.gk-name { font-size: 20px; font-weight: 700; }
.gk-sub { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.gk-pfeil { color: var(--text-3); }
.gk-fuss { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.gk-status { display: flex; align-items: center; gap: 8px; }
.serie { display: inline-flex; align-items: center; gap: 3px; font: 650 16px var(--rund); }
.serie .sym { width: 18px; height: 18px; }

.avatare { display: flex; }
.avatare .avatar + .avatar { margin-left: -6px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font: 650 16px var(--rund); color: #fff;
  background: linear-gradient(160deg, #4a4a50, #232326);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.25);
}
.avatar.klein { width: 32px; height: 32px; font-size: 13px; border: 2px solid var(--flaeche-fest); }
.avatar.gross { width: 92px; height: 92px; font-size: 38px; margin: 0 auto 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 40px rgba(0, 0, 0, 0.5); }
.avatar.clean, .avatar.belohnung { background: #fff; color: #000; }
.avatar.gebrochen { background: rgba(255, 69, 58, 0.22); color: var(--rot); }
.avatar.mehr { background: var(--flaeche-2); color: var(--text-2); }
.zeile.mitglied .avatar.offen { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25); background: transparent; }

.nav-oben { display: flex; justify-content: space-between; margin: 0 0 6px; }

.abhaken { text-align: center; padding: 22px 18px; }
.abhaken-frage { font-size: 20px; font-weight: 700; }
.abhaken-knopf {
  position: relative; display: block;
  width: 156px; height: 156px; margin: 20px auto 12px; border-radius: 50%;
  transition: transform 0.45s var(--feder);
}
.abhaken-knopf:active { transform: scale(0.93); }
.abhaken-glas {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 60%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 8px rgba(255, 255, 255, 0.05), 0 18px 40px rgba(0, 0, 0, 0.5);
  transition: background 0.35s, box-shadow 0.35s;
}
.abhaken-haken { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 0; transition: stroke 0.3s; }
.abhaken-knopf.fertig .abhaken-glas { background: #fff; box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.12), 0 0 50px rgba(255, 255, 255, 0.35), 0 18px 40px rgba(0, 0, 0, 0.5); }
.abhaken-knopf.fertig .abhaken-haken { stroke: #000; animation: haken-zeichnen 0.5s var(--sanft) both; }
.abhaken-knopf.gebrochen .abhaken-glas { box-shadow: inset 0 0 0 2px rgba(255, 69, 58, 0.7), 0 18px 40px rgba(0, 0, 0, 0.5); background: rgba(255, 69, 58, 0.08); }
.abhaken-knopf.gebrochen .abhaken-haken { opacity: 0; }
.abhaken-kreuz { position: absolute; inset: 0; display: grid; place-items: center; color: var(--rot); }
.abhaken-kreuz .sym { width: 56px; height: 56px; }
.abhaken-knopf.plopp { animation: plopp 0.55s var(--feder); }
.abhaken-label { font-size: 15px; color: var(--text-2); font-weight: 500; }
.abhaken-text h2 { font-size: 22px; margin-bottom: 6px; }
.abhaken-text p { color: var(--text-2); }
@keyframes haken-zeichnen { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes plopp { 0% { transform: scale(0.9); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }

.belohnung-heute h2 { font-size: 24px; margin: 14px 0 6px; }
.belohnung-heute p { color: var(--text-2); margin-bottom: 18px; }
.belohnung-heute p b { color: #fff; }
.geschenk-kreis { width: 92px; height: 92px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; box-shadow: 0 0 60px rgba(255, 255, 255, 0.35); animation: schweben 3s ease-in-out infinite; }
.geschenk-kreis .sym { width: 46px; height: 46px; }
@keyframes schweben { 50% { transform: translateY(-5px); } }

.gestern { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 0.5px solid var(--trenner); font-size: 15px; color: var(--text-2); }

.status-sym { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.status-sym .sym { width: 17px; height: 17px; }
.status-sym.clean, .status-sym.belohnung { background: #fff; color: #000; }
.status-sym.gebrochen { background: rgba(255, 69, 58, 0.18); color: var(--rot); }

.pfeile { display: flex; gap: 8px; }
.woche { padding: 16px 12px; }
.woche-kopf, .woche-zeile { display: grid; grid-template-columns: minmax(64px, 1.4fr) repeat(7, 1fr); align-items: center; }
.woche-kopf { font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; margin-bottom: 6px; }
.woche-kopf .heute { color: #fff; }
.woche-kopf .belohnungstag { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.woche-zeile { min-height: 40px; }
.woche-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 6px; }
.zelle { width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; }
.zelle .sym { width: 15px; height: 15px; }
.zelle.clean, .zelle.belohnung { background: #fff; color: #000; }
.zelle.gebrochen { background: rgba(255, 69, 58, 0.2); color: var(--rot); }
.zelle.offen { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.22); }
.zelle.zukunft { background: rgba(255, 255, 255, 0.05); }
.zelle.geplant-belohnung, .zelle.belohnung-frei { color: var(--text-2); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.15); }
.zelle.leer { opacity: 0; }

.zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.zahl { margin: 0; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.zahl-wert { font: 700 28px/1 var(--rund); font-variant-numeric: tabular-nums; }
.zahl-name { font-size: 12.5px; color: var(--text-2); line-height: 1.25; }

.belohnung-vorschau { display: flex; gap: 14px; align-items: center; }
.belohnung-vorschau div { display: flex; flex-direction: column; }
.belohnung-vorschau span:not(.bv-sym) { font-size: 14px; color: var(--text-2); }
.bv-sym { width: 44px; height: 44px; border-radius: 14px; background: var(--fuellung); display: grid; place-items: center; flex: none; }
.bv-sym .sym { width: 24px; height: 24px; }

.einladen { text-align: center; }
.code { font: 700 34px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.14em; margin: 6px 0 10px; }
.code span { color: var(--text-3); margin: 0 4px; }
.einladen p { color: var(--text-2); font-size: 14px; margin-bottom: 16px; }

/* ------------------------------------------------------------ Ich */

.profil { text-align: center; margin: 10px 0 4px; }
.profil .vortitel { margin-top: 4px; text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 500; }
.einstellung { padding: 16px; }
.einst-kopf { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; gap: 10px; }
.einst-kopf b { font-weight: 600; }
.einst-kopf span { font-size: 14px; color: var(--text-2); text-align: right; }
.einst-hilfe { font-size: 13px; color: var(--text-2); margin-top: 10px; line-height: 1.4; text-transform: none; letter-spacing: 0; font-weight: 400; }

/* ------------------------------------------------------------ Willkommen */

.willkommen { min-height: 100dvh; max-width: 440px; margin: 0 auto; padding: calc(var(--oben) + 40px) 20px calc(var(--unten) + 30px); display: flex; flex-direction: column; justify-content: center; }
.willkommen::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(60% 40% at 50% 12%, rgba(255, 255, 255, 0.12), transparent 70%), radial-gradient(70% 50% at 0% 100%, rgba(120, 140, 170, 0.14), transparent 70%), #000; }
.wk-kopf { text-align: center; margin-bottom: 26px; }
.wk-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.15), 0 20px 60px rgba(255, 255, 255, 0.12), 0 10px 30px rgba(0, 0, 0, 0.6); }
.wk-kopf h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.01em; margin-top: 18px; }
.wk-kopf p { color: var(--text-2); font-size: 17px; margin-top: 6px; }
.wk-form { display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: 30px; background: linear-gradient(180deg, rgba(44, 44, 48, 0.7), rgba(24, 24, 27, 0.75)); }
.fehlerzeile { color: var(--rot); font-size: 15px; text-align: center; }
.einladung-karte { display: flex; gap: 14px; align-items: center; }
.einladung-karte div { display: flex; flex-direction: column; }
.einladung-karte span:not(.ek-sym) { font-size: 14px; color: var(--text-2); }
.ek-sym { width: 44px; height: 44px; border-radius: 14px; background: #fff; color: #000; display: grid; place-items: center; flex: none; }
.ek-sym .sym { width: 24px; height: 24px; }

.laden { min-height: 100dvh; display: grid; place-items: center; }
.laden-punkt { width: 14px; height: 14px; border-radius: 50%; background: #fff; animation: pulsieren 1s ease-in-out infinite; }
@keyframes pulsieren { 50% { transform: scale(0.6); opacity: 0.4; } }

/* ------------------------------------------------------------ Blätter */

.blatt-huelle { position: fixed; inset: 0; z-index: 50; }
.blatt-hinter { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.35s; }
.blatt {
  position: absolute; left: 8px; right: 8px; bottom: max(8px, calc(var(--unten) - 18px));
  max-width: 560px; margin: 0 auto;
  max-height: calc(100dvh - var(--oben) - 24px);
  border-radius: var(--r-gross);
  display: flex; flex-direction: column;
  transform: translateY(calc(100% + 40px));
  transition: transform 0.55s var(--feder);
  overflow: hidden;
}
.blatt.hoch { height: calc(100dvh - var(--oben) - 24px); }
.blatt-inhalt { overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 20px; flex: 1; display: flex; flex-direction: column; -webkit-overflow-scrolling: touch; }
.offen .blatt-hinter { opacity: 1; }
.offen .blatt { transform: none; }
.griff { width: 38px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.28); margin: 8px auto 2px; flex: none; touch-action: none; }
.blatt-kopf { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; padding: 8px 0 14px; position: sticky; top: 0; z-index: 2; touch-action: none; }
.blatt-kopf h2 { text-align: center; font-size: 17px; font-weight: 600; }
.blatt .liste { background: rgba(255, 255, 255, 0.07); }
.formular { display: flex; flex-direction: column; gap: 18px; }
.formular > p { color: var(--text-2); font-size: 15px; }

.wahl-liste { flex: 1; }
.wahl-gruppe { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-2); margin: 16px 6px 7px; }
.wahl-gruppe:first-child { margin-top: 0; }
.zeile.wahl { min-height: 52px; }
.wahl-haken { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25); color: transparent; transition: background 0.2s; }
.wahl-haken .sym { width: 14px; height: 14px; }
.zeile.wahl.an .wahl-haken { background: #fff; color: #000; box-shadow: none; }
.blatt-fuss {
  position: sticky; bottom: -20px; margin: 10px -18px -20px; padding: 14px 18px 18px;
  background: linear-gradient(to bottom, rgba(26, 26, 29, 0), rgba(26, 26, 29, 0.96) 18px);
  display: flex; flex-direction: column; gap: 10px;
}
.fuss-zeile { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 8px; font-size: 15px; color: var(--text-2); }
.fuss-zeile .segment button { font-size: 13.5px; padding: 0 4px; }
.zeit-wahl { display: flex; gap: 8px; }
.zeit-wahl .segment { flex: 1; }
.feld.zeit { width: 112px; height: 38px; font-variant-numeric: tabular-nums; text-align: center; }

.aktion-blatt { background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; overflow: visible; }
.aktion-blatt::after, .aktion-blatt .griff { display: none; }
.aktion-blatt .blatt-inhalt { padding: 0; }
.aktionsblatt { display: flex; flex-direction: column; gap: 8px; }
.aktion-gruppe { border-radius: 26px; overflow: hidden; background: rgba(44, 44, 48, 0.82); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%); }
.aktion-titel { display: flex; flex-direction: column; align-items: center; padding: 14px 16px; font-size: 13px; color: var(--text-2); gap: 2px; }
.aktion-titel b { font-size: 15px; color: var(--text); font-weight: 600; }
.aktion { display: block; width: 100%; height: 56px; font-size: 18px; border-top: 0.5px solid var(--trenner); color: var(--text); }
.aktion:active { background: rgba(255, 255, 255, 0.08); }
.aktion.rot { color: var(--rot); }
.aktion.abbrechen { border: 0; border-radius: 26px; background: rgba(44, 44, 48, 0.9); font-weight: 600; -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px); }

.schritte { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 14px; }
.schritte li { display: flex; gap: 14px; align-items: flex-start; }
.schritte li div { display: flex; flex-direction: column; gap: 2px; }
.schritte li span:not(.schritt-nr) { font-size: 15px; color: var(--text-2); }
.schritte .sym { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; color: #fff; }
.schritt-nr { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; font: 700 15px var(--rund); flex: none; }
.blatt .einst-hilfe { margin: 0 0 16px; }

/* ------------------------------------------------------------ Meldung oben */

.toast {
  position: fixed; z-index: 70; top: calc(var(--oben) + 8px); left: 50%;
  transform: translate(-50%, calc(-100% - var(--oben) - 20px));
  width: max-content; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 14px; min-height: 52px; border-radius: 999px;
  font-size: 15px; font-weight: 500;
  transition: transform 0.6s var(--feder);
}
.toast.da { transform: translate(-50%, 0); }
.toast-sym { width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; flex: none; }
.toast-sym .sym { width: 16px; height: 16px; }
.toast.fehler .toast-sym { background: var(--rot); color: #fff; }
.toast-text { padding-right: 6px; }
.toast-knopf { font-weight: 600; background: var(--fuellung-2); padding: 8px 14px; border-radius: 999px; font-size: 14px; white-space: nowrap; }

/* ------------------------------------------------------------ Bewegung */

.inhalt.neu > * { animation: rein 0.5s var(--sanft) both; }
.inhalt.neu > *:nth-child(2) { animation-delay: 0.03s; }
.inhalt.neu > *:nth-child(3) { animation-delay: 0.06s; }
.inhalt.neu > *:nth-child(4) { animation-delay: 0.09s; }
.inhalt.neu > *:nth-child(5) { animation-delay: 0.12s; }
.inhalt.neu > *:nth-child(n+6) { animation-delay: 0.15s; }
@keyframes rein { from { opacity: 0; transform: translateY(10px); } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (min-width: 700px) {
  .inhalt { padding-top: calc(var(--oben) + 40px); }
}
