/* Gestaltung nach entwurf/index.html: Glasflächen, weiche Farbflächen, Federkurven. */
:root {
  --feder: cubic-bezier(.32, .72, 0, 1);
  --hupf: cubic-bezier(.34, 1.45, .64, 1);
  --grund: #FBF5EF;
  --text: #1C1A18;
  --text2: rgba(28, 26, 24, .7);
  --text3: rgba(28, 26, 24, .4);
  --glas: rgba(255, 255, 255, .56);
  --glas-rand: rgba(255, 255, 255, .78);
  --haar: rgba(28, 26, 24, .08);
  --blatt: rgba(255, 252, 248, .84);
  --pille: rgba(255, 255, 255, .9);
  --spur: rgba(28, 26, 24, .09);
  --a1: #FF8F5C;
  --a2: #FF4F7E;
  --akzent: #E5472F;
  --akzent-text: #B8351F;
  --warn: #8F2F10;
  --warn-glas: rgba(255, 236, 222, .78);
  --warn-rand: rgba(143, 47, 16, .22);
  --gruen: #34C759;
  --b1: #FFCFAE;
  --b2: #FFBFD4;
  --b3: #D9D1FF;
  --schatten: 0 30px 60px -18px rgba(255, 79, 126, .5), 0 12px 24px -10px rgba(255, 143, 92, .45);
  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
  --links: env(safe-area-inset-left, 0px);
  --rechts: env(safe-area-inset-right, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #0D0C11;
    --text: #F6F2EE;
    --text2: rgba(246, 242, 238, .68);
    --text3: rgba(246, 242, 238, .4);
    --glas: rgba(46, 43, 54, .5);
    --glas-rand: rgba(255, 255, 255, .1);
    --haar: rgba(255, 255, 255, .09);
    --blatt: rgba(30, 28, 36, .8);
    --pille: rgba(255, 255, 255, .14);
    --spur: rgba(255, 255, 255, .11);
    --akzent: #FF8A6B;
    --akzent-text: #FF8A6B;
    --warn: #FFC2A6;
    --warn-glas: rgba(110, 40, 22, .5);
    --warn-rand: rgba(255, 160, 120, .26);
    --gruen: #30D158;
    --b1: #6B2F22;
    --b2: #5A2348;
    --b3: #2C2A66;
    --schatten: 0 30px 70px -18px rgba(255, 79, 126, .55), 0 12px 24px -10px rgba(255, 143, 92, .3);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--grund);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--akzent-text); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Rahmen */
.app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overflow: clip;
  background: var(--grund);
  container-type: size;
  isolation: isolate;
}

/* Weiche Farbflächen, auf breiten Fenstern um die Mitte gedeckelt */
.himmel { position: absolute; inset: 0; z-index: -1; --b: min(100cqw, 560px); transition: transform 1.4s var(--feder); }
.himmel i { position: absolute; border-radius: 50%; filter: blur(54px); opacity: .92; will-change: transform; }
.himmel i:nth-child(1) {
  width: calc(var(--b) * .8); height: calc(var(--b) * .8);
  left: calc(50% - var(--b) * .74); top: calc(var(--b) * -.12);
  background: var(--b1); animation: treib1 19s ease-in-out infinite alternate;
}
.himmel i:nth-child(2) {
  width: calc(var(--b) * .72); height: calc(var(--b) * .72);
  right: calc(50% - var(--b) * .76); top: min(26cqh, 300px);
  background: var(--b2); animation: treib2 23s ease-in-out infinite alternate;
}
.himmel i:nth-child(3) {
  width: calc(var(--b) * .88); height: calc(var(--b) * .88);
  left: calc(50% - var(--b) * .44); bottom: calc(var(--b) * -.34);
  background: var(--b3); animation: treib3 27s ease-in-out infinite alternate;
}
@keyframes treib1 { to { transform: translate(calc(var(--b) * .2), min(9cqh, 90px)) scale(1.16); } }
@keyframes treib2 { to { transform: translate(calc(var(--b) * -.22), max(-12cqh, -120px)) scale(.88); } }
@keyframes treib3 { to { transform: translate(calc(var(--b) * -.12), max(-10cqh, -100px)) scale(1.12); } }
.app[data-zustand=hoert] .himmel { transform: scale(1.18); }

.szene { position: absolute; inset: 0; transform-origin: 50% 38%; transition: transform .6s var(--feder), filter .6s; }
.app[data-blatt=offen] .szene,
.app[data-start=offen] .szene { transform: scale(.93) translateY(-12px); filter: saturate(.85); }

.kopf {
  position: absolute; top: 0; left: 0; right: 0;
  padding: calc(var(--oben) + 20px) 24px 0;
  text-align: center; font-size: 15px; font-weight: 600; line-height: 1.3;
  color: var(--text2); letter-spacing: -.01em;
  transition: opacity .4s;
}
.kopf .logo { display: inline-block; height: 27px; width: auto; aspect-ratio: 633 / 130; vertical-align: top; color: var(--text); }
.kopf .logo-dunkel { display: none; }
@media (prefers-color-scheme: dark) { .kopf .logo-hell { display: none; } .kopf .logo-dunkel { display: inline; } }
.app[data-zustand=hoert] .kopf,
.app[data-zustand=wertet] .kopf,
.app:not([data-ansicht=zuhoeren]) .kopf { opacity: 0; }

/* Ansichten: jede ein eigener Scrollbereich, Inhalt in mittiger Spalte */
.ansicht {
  position: absolute;
  inset: 0;
  padding: calc(var(--oben) + 58px) max(calc(20px + var(--rechts)), calc((100% - 440px) / 2)) calc(var(--unten) + 104px) max(calc(20px + var(--links)), calc((100% - 440px) / 2));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  opacity: 0;
  transform: translateY(12px) scale(.985);
  pointer-events: none;
  transition: opacity .25s ease, transform .55s var(--feder);
}
.ansicht::-webkit-scrollbar { display: none; }
.app[data-ansicht=zuhoeren] .zuhoeren,
.app[data-ansicht=verlauf] .verlauf,
.app[data-ansicht=info] .info { opacity: 1; transform: none; pointer-events: auto; }

h1 { margin: 6px 4px 18px; font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; }
.klein { margin: 14px 0 0; font-size: 13px; line-height: 1.45; color: var(--text2); }

.glas {
  background: var(--glas);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--glas-rand);
  box-shadow: 0 12px 30px -20px rgba(0, 0, 0, .3);
}

/* Zuhören */
.zuhoeren {
  display: flex;
  flex-direction: column;
  align-items: center;
  --g: clamp(150px, min(52cqw, 30cqh), 208px);
  --abstand: clamp(28px, 6cqh, 48px);
}
.zuhoeren > * { flex-shrink: 0; }
/* Fester Abstand oben, damit Meldungen unter dem Knopf ihn nicht verschieben */
.luft.oben { height: max(0px, calc((100cqh - var(--oben) - var(--unten) - 162px - var(--g) - var(--abstand) - 238px) * .45)); }
.luft.unten { flex: 1 0 16px; }

.buehne { --pegel: 0; position: relative; width: var(--g); height: var(--g); }
.halo {
  position: absolute; inset: -22%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 96, 120, .5), rgba(255, 96, 120, 0) 74%);
  opacity: .55; animation: atmen 4.2s ease-in-out infinite; transition: opacity .6s;
}
.welle { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(255, 90, 120, .55); opacity: 0; pointer-events: none; }
.app[data-zustand=ruhe] .welle:nth-of-type(2) { animation: ruhewelle 4.2s ease-out infinite; }
.app[data-zustand=hoert] .welle { animation: welle 2.4s cubic-bezier(.2, .6, .3, 1) infinite; }
.app[data-zustand=hoert] .welle:nth-of-type(3) { animation-delay: .8s; }
.app[data-zustand=hoert] .welle:nth-of-type(4) { animation-delay: 1.6s; }
@keyframes ruhewelle { 0% { transform: scale(1); opacity: .3; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
@keyframes welle { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes atmen { 50% { scale: 1.04; } }

.ring { position: absolute; inset: -9%; width: 118%; height: 118%; transform: rotate(-90deg); opacity: 0; transition: opacity .45s; pointer-events: none; }
.ring circle { fill: none; stroke-width: 3.5; }
.ring .spur { stroke: var(--spur); }
.ring .lauf { stroke: var(--a2); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.app[data-zustand=hoert] .ring,
.app[data-zustand=wertet] .ring { opacity: 1; }

.knopf {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; border-radius: 50%; padding: 0; color: #fff;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 28% 18%, #FFB892 0%, var(--a1) 34%, var(--a2) 100%);
  box-shadow: var(--schatten), inset 0 2px 1px rgba(255, 255, 255, .5), inset 0 -16px 30px rgba(190, 30, 70, .28);
  animation: atmen 4.2s ease-in-out infinite;
  transition: transform .5s var(--hupf), scale .14s linear, opacity .4s, filter .4s;
  touch-action: manipulation;
}
.knopf:active { transform: scale(.93); transition-duration: .12s; }
.knopf:focus-visible { outline-offset: 6px; }
.knopf:disabled { cursor: default; animation: none; opacity: .5; filter: grayscale(.7); box-shadow: none; transform: none; }
.app[data-zustand=hoert] .knopf { animation: none; scale: calc(1 + var(--pegel) * .07); }
.app[data-zustand=hoert] .halo { animation: none; opacity: .9; scale: calc(.86 + var(--pegel) * .5); transition: scale .16s linear, opacity .6s; }
.app[data-zustand=wertet] .knopf { animation: none; transform: scale(.9); }
.knopf > * { grid-area: 1 / 1; transition: opacity .3s, transform .55s var(--hupf); }
.mikro { width: 34%; height: 34%; }
.balken { display: flex; align-items: center; justify-content: center; gap: 7%; width: 44%; height: 38%; opacity: 0; transform: scale(.5); }
.balken i { width: 12%; height: 100%; border-radius: 99px; background: #fff; transform: scaleY(calc(.16 + var(--h, 0) * .84)); transition: transform .1s linear; }
.punkte { display: flex; gap: 9px; opacity: 0; transform: scale(.5); }
.punkte i { width: 11px; height: 11px; border-radius: 50%; background: #fff; }
.app[data-zustand=wertet] .punkte i { animation: tupf 1s ease-in-out infinite; }
.app[data-zustand=wertet] .punkte i:nth-child(2) { animation-delay: .15s; }
.app[data-zustand=wertet] .punkte i:nth-child(3) { animation-delay: .3s; }
@keyframes tupf { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-8px); opacity: 1; } }
.app[data-zustand=hoert] .mikro,
.app[data-zustand=wertet] .mikro { opacity: 0; transform: scale(.5); }
.app[data-zustand=hoert] .balken,
.app[data-zustand=wertet] .punkte { opacity: 1; transform: none; }

.lage { margin-top: var(--abstand); text-align: center; transition: opacity .18s ease, transform .35s var(--feder); }
.lage.wechsel { opacity: 0; transform: translateY(8px); }
.lage b { display: block; font-size: 30px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; }
.lage span {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  max-width: 100%; margin-top: 4px; font-size: 16px; color: var(--text2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.lage { max-width: 100%; padding: 0 4px; }

.platz { position: relative; width: 100%; margin-top: 14px; min-height: 48px; display: flex; flex-direction: column; align-items: center; }
.abbrechen {
  position: absolute; top: 0;
  min-height: 44px; border: 0; background: none; padding: 10px 18px; border-radius: 999px;
  font-size: 16px; font-weight: 600; color: var(--akzent-text);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: opacity .3s, transform .5s var(--feder);
}
.app[data-zustand=hoert] .abbrechen { position: static; opacity: 1; pointer-events: auto; transform: none; }
.status {
  margin: 0; max-width: 340px; text-align: center;
  font-size: 14px; line-height: 1.45; color: var(--text2);
  transition: opacity .3s;
}
.app[data-zustand=hoert] .status { margin-top: 2px; }
.app[data-zustand=wertet] .status { opacity: 0; }
.status.warnung {
  max-width: none; width: 100%; padding: 12px 16px; border-radius: 18px;
  text-align: left; color: var(--warn); font-weight: 500;
  background: var(--warn-glas); border: 1px solid var(--warn-rand);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  animation: hinein .5s var(--feder);
}
@keyframes hinein { from { opacity: 0; transform: translateY(8px); } }

.schnell { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; transition: opacity .35s, transform .6s var(--feder); }
.app[data-zustand=hoert] .schnell,
.app[data-zustand=wertet] .schnell { opacity: 0; transform: translateY(24px); pointer-events: none; }
.karte { min-width: 0; min-height: 64px; border-radius: 22px; padding: 14px 16px; text-align: left; transition: transform .45s var(--hupf), background .4s; }
.karte:active { transform: scale(.95); transition-duration: .12s; }
.karte b { display: block; font-size: 15px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.karte-zeile { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--text2); }
.karte svg { width: 14px; height: 14px; flex: none; stroke: var(--akzent); stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; display: none; }
.karte.bestaetigt svg { display: block; animation: haken .5s .1s var(--feder) forwards; }
@keyframes haken { to { stroke-dashoffset: 0; } }
.pruefmodus { margin: 14px 0 0; font-size: 12px; line-height: 1.4; text-align: center; color: var(--text2); }

/* Reiterleiste */
.reiter {
  position: absolute; left: 50%; bottom: calc(var(--unten) + 20px); z-index: 3;
  display: flex; padding: 5px; border-radius: 999px;
  transform: translateX(-50%);
  transition: transform .65s var(--feder), opacity .35s;
}
.reiter button {
  position: relative; z-index: 1; min-height: 44px;
  border: 0; background: none; padding: 11px 20px; border-radius: 999px;
  font-size: 15px; line-height: 1.2; font-weight: 600; color: var(--text2);
  transition: color .3s, transform .4s var(--hupf);
}
.reiter button:active { transform: scale(.94); }
.reiter button[aria-current] { color: var(--text); }
.pille {
  position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px;
  background: var(--pille); box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  transition: transform .55s var(--feder), width .55s var(--feder);
}
.app[data-zustand=hoert] .reiter,
.app[data-zustand=wertet] .reiter { transform: translateX(-50%) translateY(150%); opacity: 0; pointer-events: none; }

/* Ergebnis als Blatt */
.schleier { position: absolute; inset: 0; z-index: 4; background: rgba(24, 12, 10, .3); opacity: 0; pointer-events: none; transition: opacity .5s; }
.app[data-blatt=offen] .schleier,
.app[data-start=offen] .schleier { opacity: 1; pointer-events: auto; }
.blatt, .start {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  max-width: 520px; margin: 0 auto;
  max-height: min(92cqh, calc(100cqh - var(--oben) - 12px));
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  padding: 0 calc(22px + var(--rechts)) calc(var(--unten) + 22px) calc(22px + var(--links));
  border-radius: 36px 36px 0 0;
  background: var(--blatt);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid var(--glas-rand);
  box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, .35);
  transform: translateY(106%);
  visibility: hidden;
  transition: transform .6s var(--feder), visibility 0s .6s;
}
.blatt::-webkit-scrollbar, .start::-webkit-scrollbar { display: none; }
.app[data-blatt=offen] .blatt { transform: translateY(var(--zug, 0px)); visibility: visible; transition: transform .6s var(--feder), visibility 0s; }
.blatt.zieht { transition: none !important; }
.zieh { display: block; width: 100%; height: 44px; margin: 0; padding: 10px 0 0; border: 0; background: none; touch-action: none; cursor: grab; }
.zieh:focus-visible { outline-offset: -3px; border-radius: 14px; }
.griff { display: block; width: 38px; height: 5px; margin: 0 auto; border-radius: 99px; background: var(--text3); }
.blatt .ein { opacity: 0; transform: translateY(16px); transition: opacity .2s ease, transform .2s ease; }
.app[data-blatt=offen] .blatt .ein {
  opacity: 1; transform: none;
  transition: opacity .45s ease calc(var(--n) * 55ms + 140ms), transform .7s var(--feder) calc(var(--n) * 55ms + 140ms);
}
.etikett { margin: 0; font-size: 13px; font-weight: 600; color: var(--akzent-text); }
.blatt h2, .start h2 { margin: 4px 0 18px; font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.028em; overflow-wrap: anywhere; }
.blatt h3, .start h3 { margin: 22px 0 12px; font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.knapp { margin: -8px 0 16px; font-size: 15px; line-height: 1.45; color: var(--text2); }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.liste li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 16px; }
.liste .w { color: var(--text2); font-variant-numeric: tabular-nums; }
.liste .vorne { font-weight: 600; }
.liste .vorne .w { color: var(--text); }
.liste .bahn { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--spur); overflow: hidden; }
.liste .fuell { display: block; height: 100%; width: 100%; border-radius: 99px; background: var(--text3); transform: translateX(-100%); transition: transform .3s ease; }
.liste .vorne .fuell { background: linear-gradient(90deg, var(--a1), var(--a2)); }
.app[data-blatt=offen] .liste .fuell { transform: translateX(calc(var(--p) * 1% - 100%)); transition: transform 1.1s var(--feder) var(--verzug, 0ms); }
.grundlage { margin: 18px 0 0; font-size: 15px; line-height: 1.45; font-weight: 500; }
.blatt .klein { margin-top: 8px; }

.auswahl { display: flex; flex-wrap: wrap; gap: 8px; }
.auswahl button {
  min-height: 44px; max-width: 100%;
  border: 1px solid var(--haar); background: var(--glas); border-radius: 999px;
  padding: 10px 16px; font-size: 15px; line-height: 1.3; font-weight: 500; text-align: left;
  transition: transform .45s var(--hupf), background .25s, color .25s, border-color .25s;
}
.auswahl button:active { transform: scale(.93); transition-duration: .12s; }
.auswahl button[aria-pressed=true] { background: var(--text); color: var(--grund); border-color: transparent; }
.danke { min-height: 20px; margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--text2); opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .5s var(--feder); }
.danke.da { opacity: 1; transform: none; }

/* Knöpfe */
.haupt, .haupt-knopf {
  display: block; width: 100%; min-height: 52px; margin-top: 14px;
  border: 0; border-radius: 18px; padding: 15px 16px;
  font-size: 17px; line-height: 1.3; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: 0 16px 30px -16px rgba(255, 79, 126, .75);
  transition: transform .45s var(--hupf), opacity .3s;
  touch-action: manipulation;
}
.haupt:active, .haupt-knopf:active { transform: scale(.97); transition-duration: .12s; }
.zweit-knopf {
  display: block; width: 100%; min-height: 48px; margin-top: 10px;
  border: 0; border-radius: 14px; padding: 12px 16px;
  font-size: 15px; line-height: 1.3; font-weight: 600;
  background: var(--spur);
  transition: transform .45s var(--hupf), opacity .3s;
}
.zweit-knopf:active { transform: scale(.97); transition-duration: .12s; }
.haupt:disabled, .haupt-knopf:disabled, .zweit-knopf:disabled { opacity: .55; cursor: default; transform: none; }
.text-knopf {
  min-height: 44px; border: 0; background: none; border-radius: 12px; padding: 10px 12px;
  font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--akzent-text); text-align: left;
  transition: transform .4s var(--hupf);
}
.text-knopf:active { transform: scale(.96); }

/* Verlauf */
.treffer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: 26px; padding: 18px 20px; }
.treffer small { display: block; font-size: 13px; line-height: 1.35; color: var(--text2); }
.treffer b { display: block; margin-top: 2px; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kreis { position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kreis svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.kreis circle { fill: none; stroke-width: 7; stroke: var(--spur); }
.kreis .wert { stroke: url(#kreis-verlauf); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--q)); transition: stroke-dashoffset 1.3s var(--feder) .25s; }
.verlauf.vor .kreis .wert { stroke-dashoffset: 100; transition: none; }
.verlauf > .klein:first-of-type { margin: 10px 4px 0; }
.zaehler { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.zaehler li { padding: 5px 11px; border-radius: 999px; font-size: 13px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.verlauf .zaehler + .klein { margin: 10px 4px 0; }
.tag {
  margin: 22px 6px 8px; font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--text2);
  transition: opacity .4s ease calc(var(--n) * 45ms + 100ms), transform .7s var(--feder) calc(var(--n) * 45ms + 100ms);
}
.gruppe { list-style: none; margin: 0; padding: 0; border-radius: 24px; overflow: hidden; }
.gruppe > li { border-top: 1px solid var(--haar); }
.gruppe > li:first-child { border-top: 0; }
.zeile {
  display: flex; align-items: center; gap: 13px; width: 100%; min-height: 60px;
  padding: 13px 16px; border: 0; background: none; text-align: left;
  transition: opacity .4s ease calc(var(--n) * 45ms + 120ms), transform .7s var(--feder) calc(var(--n) * 45ms + 120ms);
}
.zeile:focus-visible { outline-offset: -3px; border-radius: 20px; }
.verlauf.vor .zeile, .verlauf.vor .tag { opacity: 0; transform: translateY(14px); transition: none; }
.marke { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--text3); display: grid; place-items: center; }
.marke.offen { border-style: dashed; }
.marke.ja { border: 0; background: linear-gradient(135deg, var(--a1), var(--a2)); }
.marke svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.zeile-text { flex: 1; min-width: 0; }
.zeile-text b { display: block; font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.zeile-text small { display: block; font-size: 13px; line-height: 1.35; color: var(--text2); overflow-wrap: anywhere; }
.zeile time { flex: none; font-size: 13px; color: var(--text2); font-variant-numeric: tabular-nums; }
.aufklapp { padding: 2px 16px 14px; animation: hinein .45s var(--feder); }
.aufklapp .text-knopf { margin: 6px 0 0 -12px; }
.nachfrage { margin-top: 10px; padding: 12px 14px 6px; border-radius: 16px; background: var(--spur); animation: hinein .45s var(--feder); }
.aufklapp > .nachfrage:first-child { margin-top: 0; }
.nachfrage p { margin: 0 0 2px; font-size: 15px; line-height: 1.45; }
.nachfrage .text-knopf { margin: 0 4px 0 -12px; }
.leer { margin: 4px 0 0; padding: 18px 20px; border-radius: 24px; font-size: 15px; line-height: 1.5; color: var(--text2); }

/* Info */
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kachel { border-radius: 22px; padding: 14px 10px 14px 14px; min-width: 0; }
.kachel b { display: block; font-size: clamp(19px, 6.4cqw, 24px); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kachel small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.3; color: var(--text2); overflow-wrap: anywhere; }
.block { margin-top: 12px; border-radius: 24px; padding: 18px 20px; overflow-wrap: anywhere; }
h1 + .block { margin-top: 0; }
.block h2 { margin: 0 0 6px; font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; overflow-wrap: normal; }
.block h3 { margin: 18px 0 6px; font-size: 15px; line-height: 1.3; font-weight: 700; }
.block p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--text2); }
.block h2 + p { margin-top: 0; }
.block .klein { font-size: 13px; line-height: 1.45; }
.kennzahlen { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 14px; line-height: 1.4; }
.kennzahlen td { padding: 8px 0; border-top: 1px solid var(--haar); vertical-align: top; overflow-wrap: anywhere; }
.kennzahlen tr:first-child td { border-top: 0; }
.kennzahlen td:last-child { padding-left: 12px; text-align: right; white-space: nowrap; overflow-wrap: normal; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Abgleich */
.abgleich-an { display: flex; align-items: center; color: var(--text) !important; font-weight: 600; }
.punkt { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--gruen); flex: none; }
.abgleich-zeile { margin-top: 2px !important; }
.abgleich-meldung { margin: 10px 0 0 !important; color: var(--text) !important; font-weight: 500; }
.abgleich-meldung:empty { margin: 0 !important; }
.abgleich .haupt-knopf { margin-top: 16px; }
.abgleich .text-knopf { display: block; margin: 6px 0 0 -12px; }
.abgleich .nachfrage .text-knopf { display: inline-block; }
.abgleich .nachfrage p { color: var(--text); }

.schalter { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-top: 12px; cursor: pointer; font-size: 15px; line-height: 1.35; font-weight: 500; }
.schalter span { order: -1; }
.schalter input {
  -webkit-appearance: none; appearance: none;
  position: relative; flex: none; width: 51px; height: 31px; margin: 0;
  border-radius: 999px; background: var(--spur); cursor: pointer;
  transition: background .3s;
}
.schalter input::before {
  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, .15), 0 1px 1px rgba(0, 0, 0, .16);
  transition: transform .35s var(--hupf);
}
.schalter input:checked { background: var(--gruen); }
.schalter input:checked::before { transform: translateX(20px); }

.code-feld { margin: 14px 0 0; padding: 16px; border-radius: 18px; background: var(--spur); }
.code-bloecke {
  display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; gap: 8px 18px;
  margin: 0 0 4px !important; color: var(--text) !important;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(20px, 6vw, 26px); font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums;
}
.code-bloecke span { white-space: nowrap; }
@media (min-width: 560px) { .code-bloecke { grid-template-columns: repeat(4, max-content); } }
.code-feld .zweit-knopf { background: var(--glas); }
.verbinden label { display: block; margin-top: 4px; font-size: 15px; font-weight: 600; }
.verbinden input {
  display: block; width: 100%; min-height: 52px; margin-top: 6px; padding: 10px 14px;
  border-radius: 14px; border: 1px solid var(--haar); background: var(--glas); color: var(--text);
  font: inherit; font-size: 18px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .06em; text-transform: uppercase;
}
.verbinden input::placeholder { color: var(--text2); opacity: .8; text-transform: none; }

/* Start: Blatt von unten wie das Ergebnis. Es reicht 200px unter den Rand, damit beim Schrittwechsel
   (Höhe gleitet über transform) unten nie eine Lücke aufgeht. --tastatur und --sicht hält es über der Tastatur. */
.start {
  bottom: calc(var(--tastatur, 0px) - 200px);
  max-height: calc(min(92cqh, 100cqh - var(--oben) - 12px - var(--tastatur, 0px), var(--sicht, 100cqh) - 12px) + 200px);
  padding-bottom: calc(var(--unten) + 26px + 200px);
  transform: translateY(106%);
}
.app[data-start=offen] .start {
  transform: translateY(calc(var(--zug, 0px) + var(--hub, 0px)));
  visibility: visible;
  transition: transform .6s var(--feder), visibility 0s;
}
.start.zieht, .start.springt { transition: none !important; }
.start .griff { transition: opacity .3s; }
.start.fest .griff { opacity: 0; }
.start.fest .zieh { cursor: default; }
.start-inhalt { transition: opacity .3s ease, transform .55s var(--feder); }
.start-inhalt.weg { opacity: 0; transform: translateX(var(--dx, 0px)); pointer-events: none; transition: opacity .16s ease, transform .2s ease; }
.start-inhalt.sofort { transition: none; }
.start h2 { margin-bottom: 14px; }
.start h2:focus { outline: none; }
.start-text { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--text2); }
.start-meldung { min-height: 0; margin: 12px 0 0; font-size: 15px; line-height: 1.45; font-weight: 500; color: var(--warn); }
.start-meldung:empty { margin: 0; }
.start-meldung.ruhig { color: var(--text); }
.unter-knopf { display: block; margin: 8px auto 0; text-align: center; }
.start .code-feld { margin-top: 6px; }

/* Eingabefelder */
.feld { margin-top: 16px; }
.feld:first-child { margin-top: 4px; }
.feld label { display: flex; align-items: baseline; gap: 8px; font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--text); }
.feld .frei { font-size: 13px; font-weight: 500; color: var(--text2); }
.eingabe {
  display: block; width: 100%; min-height: 54px; margin: 8px 0 0; padding: 13px 16px;
  border-radius: 16px; border: 1px solid var(--haar); background: var(--glas); color: var(--text);
  font: inherit; font-size: 17px; line-height: 1.3;
  -webkit-appearance: none; appearance: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
  transition: border-color .25s, background .25s;
}
.eingabe::placeholder { color: var(--text3); opacity: 1; }
.eingabe:focus { border-color: var(--akzent-text); background: var(--blatt); }
.eingabe[aria-invalid=true] { border-color: var(--warn); }
.eingabe.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.eingabe.mono::placeholder { text-transform: none; }
.eingabe.datum { min-width: 0; text-align: left; }
.eingabe.datum::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
.eingabe.datum::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
@media (prefers-color-scheme: dark) { .eingabe.datum::-webkit-calendar-picker-indicator { filter: invert(1); } }
.feld-hinweis { margin: 6px 2px 0; font-size: 13px; line-height: 1.45; color: var(--text2); }
.feld-fehler { margin: 6px 2px 0; font-size: 14px; line-height: 1.4; font-weight: 500; color: var(--warn); animation: hinein .4s var(--feder); }
.feld-fehler:empty { display: none; }
.block .feld-hinweis { margin-top: 6px; font-size: 13px; color: var(--text2); }
.block .feld-fehler { margin-top: 6px; font-size: 14px; color: var(--warn); }

/* Häkchen zum Einverständnis */
.haken-feld { display: flex; align-items: center; gap: 14px; min-height: 52px; margin-top: 14px; padding: 4px 2px; cursor: pointer; font-size: 16px; line-height: 1.35; font-weight: 600; }
.haken-feld input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 28px; height: 28px; margin: 0; border-radius: 9px;
  border: 2px solid var(--text3); background: var(--glas);
  display: grid; place-items: center; cursor: pointer;
  transition: background .25s, border-color .25s, transform .4s var(--hupf);
}
.haken-feld input::after {
  content: ""; width: 12px; height: 7px; margin-top: -3px;
  border-left: 2.6px solid #fff; border-bottom: 2.6px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .35s var(--hupf);
}
.haken-feld input:checked { border-color: transparent; background: linear-gradient(135deg, var(--a1), var(--a2)); }
.haken-feld input:checked::after { transform: rotate(-45deg) scale(1); }
.haken-feld input:active { transform: scale(.9); }

/* Drei Wege beim Speichern */
.wege { display: grid; gap: 10px; margin-top: 4px; }
.weg {
  display: block; width: 100%; min-height: 64px; padding: 16px 18px; border-radius: 22px; text-align: left;
  transition: transform .45s var(--hupf), background .3s;
}
.weg:active { transform: scale(.97); transition-duration: .12s; }
.weg b { display: block; font-size: 17px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.weg span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--text2); }

/* Was, wo, wer: Angaben vor dem Einverständnis */
.fakten { margin: 0; padding: 2px 18px; border-radius: 22px; }
.fakten div { padding: 12px 0; border-top: 1px solid var(--haar); }
.fakten div:first-child { border-top: 0; }
.fakten dt { font-size: 13px; line-height: 1.35; font-weight: 600; color: var(--akzent-text); }
.fakten dd { margin: 3px 0 0; font-size: 15px; line-height: 1.45; }

/* Ehrlicher Hinweis bei nur lokaler Speicherung */
.lokal-hinweis {
  margin: 0 0 14px; padding: 16px 18px; border-radius: 22px;
  color: var(--warn); background: var(--warn-glas); border: 1px solid var(--warn-rand);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  animation: hinein .5s var(--feder);
}
.lokal-hinweis p, .block .lokal-hinweis p { margin: 0; font-size: 15px; line-height: 1.45; font-weight: 500; color: var(--warn); }
.lokal-hinweis p + p, .block .lokal-hinweis p + p { margin-top: 6px; font-weight: 400; }
.lokal-hinweis .zweit-knopf { margin-top: 12px; background: var(--glas); color: var(--text); }
.block .lokal-hinweis { margin: 4px 0 14px; }

/* Baby unter Info */
.baby-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.baby-text { min-width: 0; margin: 0 !important; font-size: 20px !important; line-height: 1.3 !important; font-weight: 700; letter-spacing: -.015em; color: var(--text) !important; overflow-wrap: anywhere; }
.baby-zeile .text-knopf { flex: none; margin-right: -12px; }
.baby .zweit-knopf { margin-top: 12px; }
.baby-form .haupt-knopf { margin-top: 18px; }
.baby-form .text-knopf { display: block; margin: 6px 0 0 -12px; }
.text-knopf.warn { color: var(--warn); }
.abgleich .text-knopf.warn { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
