/* HUGO — Fassung 20.
   Gestaltet nach den Regeln der Plattform, auf der HUGO zu Hause ist:
   - Schrift des Systems in den Textstufen von iOS (34 · 28 · 22 · 20 · 17 · 15 · 13 · 12).
     Montserrat steht nur in der Wortmarke, wie in Olivers Logo.
   - Flächen ohne Verlauf und ohne Schatten: weiße Zellen auf grauem Grund. Nur was schwebt
     (Leiste, Meldung), wirft einen Schatten.
   - Zwei Farben aus dem Logo: Marine für Schrift und Haupthandlung, Koralle als einziger
     Akzent. Der Kreis einer Aufgabe füllt sich in Koralle: leer, halb, voll.
   - Ein Schwerpunkt pro Bildschirm. Auf "Heute" ist das die Liste des Tages, wie in Olivers Entwurf. */

@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/montserrat-700.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("fonts/montserrat-800.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --grund:         #f2f2f7;
  --flaeche:       #ffffff;
  --feld:          #ecedf2;
  --tinte:         #0b1b3a;
  --tinte-2:       #5a6377;
  --tinte-3:       #8b92a2;
  --haar:          rgba(11, 27, 58, .13);
  --marine:        #04235a;
  --koralle:       #fd6555;
  --koralle-text:  #c43d29;
  --hugo-grund:    #fff0eb;
  --bernstein:     #f4a52b;
  --rot:           #c43d29;
  --knopf:         #04235a;
  --auf-knopf:     #ffffff;
  --still:         rgba(11, 27, 58, .065);
  --symbol-grund:  #04235a;
  --schalter-aus:  #dcdee6;
  --meldung:       #ffffff;
  --schweben:      0 10px 30px -12px rgba(11, 27, 58, .30), 0 1px 3px rgba(11, 27, 58, .08);
  --ui:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --marke: "Montserrat", -apple-system, "Segoe UI", sans-serif;
  --aus:   cubic-bezier(.22, 1, .36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --grund:         #05080f;
    --flaeche:       #121a2c;
    --feld:          #1d2740;
    --tinte:         #f3f5fa;
    --tinte-2:       #a4adc1;
    --tinte-3:       #6d768d;
    --haar:          rgba(255, 255, 255, .12);
    --koralle-text:  #ff8f7d;
    --hugo-grund:    #ffffff;
    --rot:           #ff8f7d;
    --knopf:         #f3f5fa;
    --auf-knopf:     #0b1b3a;
    --still:         rgba(255, 255, 255, .10);
    --symbol-grund:  #2b3b62;
    --schalter-aus:  #39435c;
    --meldung:       #1d2740;
    --schweben:      0 12px 32px -12px rgba(0, 0, 0, .75), 0 1px 3px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--grund); color: var(--tinte);
  font-family: var(--ui); font-size: 1.0625rem; line-height: 1.3;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-appearance: none; appearance: none; }
h1, h2, p { margin: 0; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sym { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--koralle); outline-offset: 2px; }
/* In einem Textfeld zeigt die Schreibmarke, wo man ist. Ein Rahmen darum wäre doppelt. */
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }

.app {
  max-width: 600px; margin: 0 auto;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.ansicht { display: flex; flex-direction: column; gap: 24px; }

/* ---------- Kopf und Titel ---------- */
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.marke { display: flex; align-items: center; gap: 8px; }
.marke img { width: 36px; height: auto; display: block; }
/* Olivers Zeichen als eine Zeile: Figur, Name, Leitspruch. */
.marke-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; }
.marke-ruf { font-family: var(--marke); font-weight: 700; font-size: .6875rem; letter-spacing: .01em; color: var(--tinte-2); white-space: nowrap; }
.marke-ruf strong { font-weight: 800; color: var(--koralle-text); }
.wortmarke { font-family: var(--marke); font-weight: 800; font-size: 1.25rem; letter-spacing: .01em; color: var(--marine); }
/* Dunkel: Der Läufer hat marineblaue Beine. Auf dunklem Grund steht er deshalb in einem hellen Kreis, wie überall, wo HUGO spricht. */
@media (prefers-color-scheme: dark) { .wortmarke { color: #fff; } .marke img { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 50%; padding: 6px 5px; } }
.titel { display: flex; flex-direction: column; gap: 2px; }
.kopf + .titel, .kopf + .band + .titel { margin-top: -8px; }
.titel-ueber { font-size: .9375rem; font-weight: 600; color: var(--tinte-2); }
.titel h1 { font-size: 2.125rem; line-height: 1.2; font-weight: 700; text-wrap: balance; overflow-wrap: anywhere; }

/* ---------- Der Impuls: HUGOs Frage, die eine Sache, sein Satz. Flach gehalten, damit die Liste im Bild bleibt. ---------- */
.impuls { display: flex; align-items: flex-start; gap: 12px; background: var(--flaeche); border-radius: 16px; padding: 14px 16px; }
.titel + .impuls { margin-top: -8px; }
.impuls-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; text-wrap: pretty; }
.impuls-ueber { font-size: .8125rem; font-weight: 600; color: var(--tinte-2); }
.impuls-chip::before { content: " · "; color: var(--tinte-2); }
.impuls-chip.warn, .impuls-chip.dran { color: var(--koralle-text); }
.impuls-text > strong { font-weight: 700; }
.impuls-vorhaben { font-size: .9375rem; line-height: 1.33; color: var(--tinte-2); }
.impuls-vorhaben strong { color: var(--tinte); font-weight: 600; }
.impuls-sagt { font-size: .9375rem; line-height: 1.33; }
.impuls-sagt .hugo-name { font-size: inherit; }
/* Olivers Leitspruch in der Begrüßung. "GO FOR IT!" in der Schrift seines Logos. */
.willkommen-ruf { font-size: 1.0625rem; font-weight: 600; color: var(--tinte-2); }
.willkommen-ruf strong { font-family: var(--marke); font-weight: 800; color: var(--koralle-text); }

/* HUGO spricht: überall dieselbe Form – sein Bild, sein Name, sein Satz. */
.hugo-wort { display: flex; align-items: flex-start; gap: 12px; }
.hugo-bild { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--hugo-grund); object-fit: contain; padding: 6px 5px; }
.hugo-wort p { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-wrap: pretty; }
.hugo-name { font-size: .8125rem; font-weight: 600; color: var(--tinte-2); }
.hugo-wort.frei { background: var(--flaeche); border-radius: 16px; padding: 14px 16px; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none;
  min-height: 50px; padding: 0 20px; border: 0; border-radius: 14px; font-size: 1.0625rem; font-weight: 600;
  transition: opacity .15s ease;
}
.knopf:active, .eingabe-knopf:active, .symbolknopf:active, .a-start:active, .wahl button:active { opacity: .6; }
.knopf-haupt { background: var(--knopf); color: var(--auf-knopf); }
.knopf-still { background: var(--still); color: var(--tinte); }
.knopf-text { background: none; color: var(--koralle-text); min-height: 44px; padding: 0 12px; }
.knopf-breit { width: 100%; }
.knopf .sym { width: 20px; height: 20px; stroke-width: 2.4; }
.symbolknopf { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--still); color: var(--tinte-2); display: grid; place-items: center; padding: 0; transition: opacity .15s ease, background .15s ease; }
.symbolknopf::after { content: ""; position: absolute; inset: -6px; }
.symbolknopf .sym { width: 17px; height: 17px; stroke-width: 2.1; }
.symbolknopf.spricht { background: var(--koralle); color: #fff; }
.textknopf { background: none; border: 0; color: var(--koralle-text); font-weight: 600; font-size: .9375rem; min-height: 44px; padding: 0 4px; text-align: left; }

/* ---------- Bänder (Hinweise) ---------- */
.band { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--flaeche); color: inherit; text-decoration: none; text-align: left; }
.band-symbol { flex: none; width: 30px; height: 30px; border-radius: 7px; background: var(--koralle); color: #fff; display: grid; place-items: center; }
.band-symbol .sym { width: 18px; height: 18px; stroke-width: 2; }
.band-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; font-size: .9375rem; line-height: 1.33; color: var(--tinte-2); }
.band-text strong { color: var(--tinte); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; }
.band .pfeil, .zeile .pfeil { flex: none; width: 14px; height: 14px; color: var(--tinte-3); stroke-width: 2.6; }
.band .knopf { min-height: 34px; padding: 0 14px; font-size: .9375rem; border-radius: 999px; }

/* ---------- Gruppen und Listen ---------- */
.gruppe { display: flex; flex-direction: column; gap: 8px; }
.gruppe-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px; }
.gruppe-kopf h2 { font-size: 1.375rem; line-height: 1.27; font-weight: 700; }
.gruppe-kopf h2.frage { font-size: 1.0625rem; line-height: 1.3; font-weight: 600; }
.gruppe-kopf > span { font-size: .9375rem; color: var(--tinte-2); white-space: nowrap; }
.gruppe-fuss, .legende { font-size: .8125rem; line-height: 1.38; color: var(--tinte-2); padding: 0 4px; text-wrap: pretty; }
.liste { list-style: none; margin: 0; padding: 0; background: var(--flaeche); border-radius: 16px; overflow: hidden; }
.liste:empty { display: none; }
.liste > * { position: relative; }
.liste > :not([hidden]) ~ :not([hidden])::before { content: ""; position: absolute; top: 0; right: 0; left: 54px; height: 1px; background: var(--haar); }
.liste.schlicht > :not([hidden]) ~ :not([hidden])::before { left: 16px; }
.liste.mit-symbol > :not([hidden]) ~ :not([hidden])::before { left: 58px; }

/* Aufgabenzeile: Kreis (leer, halb, voll) · Text · Handlung */
.aufgabe { display: flex; align-items: center; gap: 2px; padding: 6px 14px 6px 4px; min-height: 60px; }
.ring { flex: none; width: 48px; height: 48px; border: 0; background: none; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.ring i { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--tinte-3); display: grid; place-items: center; transition: background .2s ease, border-color .2s ease; }
.ring .sym { grid-area: 1 / 1; width: 14px; height: 14px; stroke: #fff; stroke-width: 3.2; opacity: 0; }
/* Begonnen: der Kreis ist halb gefüllt. Die Hälfte ist eine eigene Fläche, kein Verlauf. */
.aufgabe.dran .ring i { border-color: var(--koralle); justify-items: start; padding-left: 3px; }
.aufgabe.dran .ring i::before { content: ""; grid-area: 1 / 1; width: 7.5px; height: 15px; border-radius: 7.5px 0 0 7.5px; background: var(--koralle); }
.aufgabe.fertig .ring i, .schritt-zeile.ok .ring i { border-color: var(--koralle); background: var(--koralle); }
.aufgabe.fertig .ring .sym, .schritt-zeile.ok .ring .sym { opacity: 1; }
/* Der Moment des Abhakens: Der Kreis füllt sich, der Haken zeichnet sich, ein kurzer
   Funkenkranz in den Farben des Logos. Nur der Haken, der gerade gesetzt wurde, bewegt sich. */
.ring { position: relative; }
.aufgabe.fertig.frisch .ring i, .schritt-zeile.ok.frisch .ring i { animation: fuellen .32s var(--aus); }
.aufgabe.fertig.frisch .ring .sym, .schritt-zeile.ok.frisch .ring .sym { stroke-dasharray: 19; stroke-dashoffset: 19; animation: zeichnen .3s .1s var(--aus) forwards; }
.aufgabe.fertig.frisch .ring::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 -19px 0 var(--koralle), 13px -13px 0 var(--bernstein), 19px 0 0 var(--koralle), 13px 13px 0 var(--bernstein),
              0 19px 0 var(--koralle), -13px 13px 0 var(--bernstein), -19px 0 0 var(--koralle), -13px -13px 0 var(--bernstein);
  animation: funken .55s .05s var(--aus) both;
}
@keyframes fuellen { from { transform: scale(.72); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
@keyframes funken { 0% { transform: scale(.45); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.a-rumpf { flex: 1; min-width: 0; border: 0; background: none; padding: 6px 4px; text-align: left; display: flex; flex-direction: column; gap: 1px; border-radius: 8px; }
.a-titel { overflow-wrap: anywhere; }
.a-zusatz { font-size: .9375rem; line-height: 1.33; color: var(--tinte-2); overflow-wrap: anywhere; }
.a-zusatz .faellig { color: var(--koralle-text); }
.a-zusatz .fest { white-space: nowrap; }
.aufgabe.fertig .a-titel { color: var(--tinte-2); text-decoration: line-through; text-decoration-color: var(--tinte-3); }
.aufgabe.spaeter .a-titel { color: var(--tinte-2); }
.a-start { flex: none; border: 0; min-height: 32px; padding: 0 14px; border-radius: 999px; background: var(--still); color: var(--koralle-text); font-weight: 700; font-size: .9375rem; transition: opacity .15s ease; }
.a-status { flex: none; font-size: .9375rem; font-weight: 700; color: var(--koralle-text); padding-left: 6px; white-space: nowrap; }
/* Begonnen: Der Knopf an der Zeile ist dann der nächste Schritt, "Erledigt". Marine auf Koralle, die Farben des Logos. */
.a-fertig { background: var(--koralle); color: #04235a; }
.a-zusatz .begonnen { color: var(--koralle-text); font-weight: 600; }
.sym.klein { width: 14px; height: 14px; stroke-width: 2.8; vertical-align: -2px; }
/* Zustand einer Sache: schlichte Schrift, kein Etikett */
.chip { flex: none; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.chip-offen { color: var(--tinte-2); }
.chip-dran, .chip-gruen { color: var(--koralle-text); }

/* Einstellungszeilen */
.zeile { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 7px 16px; width: 100%; border: 0; background: none; text-align: left; text-decoration: none; color: inherit; }
.zeile-symbol { flex: none; width: 30px; height: 30px; border-radius: 7px; background: var(--symbol-grund); color: #fff; display: grid; place-items: center; }
.zeile-symbol .sym { width: 18px; height: 18px; stroke-width: 2; }
.zeile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zeile-text small { font-size: .8125rem; line-height: 1.38; color: var(--tinte-2); }
.zeile > strong { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.zeile input[type="time"], .zeile input[type="text"], .zeile select { border: 0; background: var(--feld); border-radius: 8px; padding: 6px 10px; min-width: 0; max-width: 58%; }
.zeile input[type="text"] { background: none; flex: 1; max-width: none; padding-right: 0; text-align: right; }
.zeile input::placeholder { color: var(--tinte-3); }
.zeile input[type="time"] { flex: none; width: 6.4em; max-width: none; text-align: center; }
.zeile select { flex: none; max-width: 54%; -webkit-appearance: none; appearance: none; padding-right: 28px;
  background: var(--feld) no-repeat right 9px center / 10px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14' fill='none' stroke='%238b92a2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5l3-3 3 3M2 9l3 3 3-3'/%3E%3C/svg%3E"); }
/* Datum und Uhrzeit: Der Wert steht als Text da. Das echte Feld liegt unsichtbar darüber, ein
   Tipp öffnet die Auswahl des Systems. Ein leeres Datumsfeld ist auf dem iPhone sonst nur
   ein grauer Kasten. */
.datumfeld { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 34px; padding: 6px 10px; border-radius: 8px; background: var(--feld); }
.datumfeld.leer { color: var(--tinte-2); }
.zeile .datumfeld input[type], .routine-eingabe .datumfeld input[type], .eingabe .datumfeld input[type], .plan-wann .datumfeld input[type] { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; padding: 0; margin: 0; border: 0; opacity: 0; background: none; -webkit-appearance: none; appearance: none; }
.datumfeld:has(:focus-visible), .wahl-datum:has(:focus-visible) { outline: 3px solid var(--koralle); outline-offset: 2px; }
.datei { position: relative; cursor: pointer; }
.datei input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.schalter { flex: none; width: 51px; height: 31px; border-radius: 999px; border: 0; background: var(--schalter-aus); position: relative; padding: 0; transition: background .2s ease; }
.schalter span { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform .24s var(--aus); box-shadow: 0 2px 5px rgba(0, 0, 0, .22); }
.schalter[aria-checked="true"] { background: var(--koralle); }
.schalter[aria-checked="true"] span { transform: translateX(20px); }
/* Zeilen und Bänder, die etwas auslösen, antworten auf den Fingerdruck. */
.zeile-aktion:active, a.band:active, button.band:active { background: var(--still); }
.zeile.gefahr .zeile-text { color: var(--rot); }
.zeile.gefahr .zeile-symbol { background: var(--rot); }
@media (prefers-color-scheme: dark) { .zeile.gefahr .zeile-symbol { color: #0b1b3a; } }

.sym.wdh { width: 13px; height: 13px; vertical-align: -1.5px; margin-right: 3px; stroke-width: 2.3; }
.sym.stern { width: 15px; height: 15px; fill: var(--bernstein); stroke: none; vertical-align: -1.5px; margin-right: 5px; }

/* ---------- Auswahlzeilen (HUGO fragt nach) und Textfelder ---------- */
.note { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 16px; border: 0; background: none; text-align: left; }
.note-text { flex: 1; min-width: 0; }
.note > .sym { width: 20px; height: 20px; color: var(--koralle); opacity: 0; stroke-width: 2.6; transition: opacity .15s ease; }
.note[aria-checked="true"] .note-text { font-weight: 600; }
.note[aria-checked="true"] > .sym { opacity: 1; }
.liste.noten.schlicht > :not([hidden]) ~ :not([hidden])::before { left: 16px; }
textarea { width: 100%; border: 0; border-radius: 16px; background: var(--flaeche); padding: 13px 16px; line-height: 1.3; resize: none; min-height: 96px; }
textarea::placeholder { color: var(--tinte-3); }

/* ---------- Heute: die Liste des Tages, die Zeile zum Eintragen, der Abschluss ---------- */
.tageszeile { font-size: .9375rem; line-height: 1.33; color: var(--tinte-2); margin-top: 2px; text-wrap: pretty; }
.leer { background: var(--flaeche); border-radius: 16px; padding: 18px 16px; font-size: .9375rem; line-height: 1.33; color: var(--tinte-2); text-align: center; text-wrap: balance; }
/* Eintragen in einer Zeile: Feld, Uhrzeit, Knopf. */
.eingabe { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 6px 6px 16px; border-radius: 16px; background: var(--flaeche); }
.eingabe input[type="text"] { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 0; }
.eingabe input::placeholder { color: var(--tinte-3); }
.eingabe-knopf { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0; background: var(--koralle); color: #04235a; display: grid; place-items: center; transition: opacity .15s ease; }
.eingabe-knopf .sym { width: 22px; height: 22px; stroke-width: 2.6; }
/* Wie war dein Tag? Fünf Zahlen nebeneinander, wie in Olivers Entwurf. */
.notenreihe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.notenreihe button { border: 0; min-height: 52px; padding: 0; border-radius: 12px; background: var(--flaeche); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; transition: opacity .15s ease, background .2s ease, color .2s ease; }
.notenreihe button:active { opacity: .6; }
.notenreihe button[aria-checked="true"], .notenreihe button[aria-pressed="true"] { background: var(--knopf); color: var(--auf-knopf); }
/* Priorität im Plan: Hoch, Mittel, Leicht neben dem Wort. */
.plan-prio { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding-left: 4px; }
.plan-prio > span { font-size: .9375rem; font-weight: 600; color: var(--tinte-2); }
.notenreihe.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.notenreihe.drei button { min-height: 44px; font-size: .9375rem; font-weight: 600; }
.schluss strong { font-weight: 600; }
.schluss p > span:last-child { font-size: .9375rem; color: var(--tinte-2); margin-top: 3px; }
.schluss:not([hidden]) { animation: setzen .38s var(--aus); }

/* ---------- Plan: Datum und Uhrzeit nebeneinander, an der Zeile das Kalenderzeichen ---------- */
.plan-wann { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.plan-wann .datumfeld { background: var(--flaeche); border-radius: 12px; min-height: 48px; padding: 0 14px; justify-content: center; }
.a-kalender { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; padding: 0; background: var(--still); color: var(--tinte); display: grid; place-items: center; transition: opacity .15s ease; }
.a-kalender:active { opacity: .6; }
.a-kalender .sym { width: 20px; height: 20px; }

/* ---------- Erfolge: die Zahl und die Liste, Tag für Tag ---------- */
.karte.erfolg-zahl { gap: 0; }
.erfolg-zahl strong { font-size: 3rem; line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--koralle-text); }
.erfolg-zahl span { font-weight: 600; }
.verlauf { display: flex; flex-direction: column; gap: 16px; }
.verlauf:empty { display: none; }
.erfolg { display: flex; align-items: baseline; gap: 12px; width: 100%; min-height: 46px; padding: 11px 16px; border: 0; background: none; text-align: left; }
.erfolg span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.erfolg time { flex: none; font-size: .9375rem; color: var(--tinte-2); font-variant-numeric: tabular-nums; }
.erfolg:active { background: var(--still); }

/* ---------- Die Woche und die Zahlen ---------- */
.karte { background: var(--flaeche); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.mess-name { font-size: .9375rem; font-weight: 600; color: var(--koralle-text); }
.mess-wert { display: flex; align-items: baseline; gap: 7px; margin-top: -8px; }
.mess-wert strong { font-size: 2.125rem; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
.mess-wert span { font-size: .9375rem; font-weight: 600; color: var(--tinte-2); }
.trend { font-size: .9375rem; line-height: 1.33; color: var(--tinte-2); text-wrap: pretty; }
.trend.gut { color: var(--tinte); font-weight: 600; }
.woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 156px; }
.tag { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; min-width: 0; }
.tag-zahl { font-size: .75rem; color: var(--tinte-2); min-height: 1.3em; font-variant-numeric: tabular-nums; }
.saeule { width: 100%; max-width: 24px; border-radius: 4px 4px 1px 1px; background: var(--feld); min-height: 3px; }
.saeule.hat { background: var(--koralle); }
.tag-name { font-size: .75rem; color: var(--tinte-2); }
.tag.heute .tag-name { color: var(--tinte); font-weight: 700; }
.tag-note { font-size: .75rem; min-height: 1.3em; color: var(--tinte-3); font-variant-numeric: tabular-nums; }
.tag-note.hat { color: var(--tinte); font-weight: 600; }
.legende { padding: 0; }

/* ---------- Meldung: HUGO meldet sich von oben, wie eine Mitteilung ---------- */
.toast {
  position: fixed; z-index: 70; left: 50%; top: calc(8px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%); width: min(calc(100vw - 20px), 560px);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px;
  background: var(--meldung); color: var(--tinte); box-shadow: var(--schweben);
  font-weight: 600; font-size: 1rem; line-height: 1.3; animation: meldung-ein .45s var(--aus);
}
.toast p { flex: 1; min-width: 0; text-wrap: pretty; }
.toast button { flex: none; border: 0; background: none; color: var(--koralle-text); font-weight: 600; min-height: 36px; padding: 0 2px 0 8px; }
@keyframes meldung-ein { from { opacity: 0; transform: translate(-50%, -130%); } to { opacity: 1; transform: translate(-50%, 0); } }
/* HUGO ist ein Läufer: Bei jedem Lob macht er einen kleinen Satz. An besonderen Tagen sprühen Funken. */
.toast .hugo-bild { animation: satz .6s .2s var(--aus) both; }
@keyframes satz { 0% { transform: translateY(5px) scale(.88); opacity: 0; } 55% { transform: translateY(-3px); opacity: 1; } 100% { transform: none; opacity: 1; } }
.toast.fest::before {
  content: ""; position: absolute; left: 32px; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 -27px 0 var(--koralle), 19px -19px 0 var(--bernstein), 27px 0 0 var(--koralle), 19px 19px 0 var(--bernstein),
              0 27px 0 var(--koralle), -19px 19px 0 var(--bernstein), -27px 0 0 var(--koralle), -19px -19px 0 var(--bernstein);
  animation: funken .8s .35s var(--aus) both;
}

/* ---------- Die Kette ---------- */
.kette-tage { flex: none; display: flex; align-items: center; gap: 5px; }
.glied { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--tinte-3); }
.glied.ja { background: var(--koralle); border-color: var(--koralle); }
.glied.offen { border-color: var(--koralle); border-style: dashed; }

/* ---------- Schwebende Leiste: die vier Seiten ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  display: flex; align-items: center; justify-content: center; gap: 10px; pointer-events: none;
  padding: 0 max(14px, env(safe-area-inset-left, 0px)) 0 max(14px, env(safe-area-inset-right, 0px));
}
.leiste {
  pointer-events: auto; display: flex; padding: 4px; border-radius: 999px;
  background: var(--meldung);
  box-shadow: var(--schweben);
}
.leiste a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 78px; min-height: 52px; padding: 4px 8px; border-radius: 999px; font-size: .6875rem; font-weight: 600; color: var(--tinte-2); text-decoration: none; transition: background .2s ease, color .2s ease; }
.leiste a .sym { width: 24px; height: 24px; }
.leiste a.aktiv { background: var(--still); color: var(--koralle-text); }
.leiste a.aktiv .sym { stroke-width: 2.1; }
@media (max-width: 350px) { .leiste a { min-width: 66px; padding: 4px 4px; } }

/* ---------- Blätter von unten ---------- */
.schleier { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .36); opacity: 0; transition: opacity .3s ease; }
.schleier.offen { opacity: 1; }
.blatt {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; margin: 0 auto; max-width: 620px;
  background: var(--grund); border-radius: 24px 24px 0 0;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px) + var(--tastatur, 0px)) max(16px, env(safe-area-inset-left, 0px));
  max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  transform: translateY(105%); transition: transform .45s var(--aus);
  display: flex; flex-direction: column; gap: 14px;
}
.blatt.offen { transform: none; }
/* Was im Blatt steht, behält seine Höhe. Wird es zu viel, rollt das Blatt – es staucht nichts. */
.blatt > *, .start > *, .willkommen > * { flex-shrink: 0; }
.blatt:focus, .start:focus, .willkommen:focus { outline: none; }
.blatt > form { display: flex; flex-direction: column; gap: 14px; }
/* Der Griff ist größer, als er aussieht: Die ganze Zeile lässt sich greifen und ziehen. */
.blatt-griff { align-self: stretch; height: 22px; margin: -8px 0; display: grid; place-items: center; touch-action: none; cursor: grab; }
.blatt-griff::after { content: ""; width: 36px; height: 5px; border-radius: 999px; background: var(--tinte-3); opacity: .45; }
.blatt-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; touch-action: none; }
.blatt-kopf h2 { font-size: 1.375rem; line-height: 1.27; font-weight: 700; overflow-wrap: anywhere; }
.blatt-wort { font-size: .8125rem; line-height: 1.38; font-weight: 600; color: var(--koralle-text); padding: 0 4px; text-wrap: pretty; }
.feld-gross { width: 100%; border: 0; border-radius: 12px; background: var(--flaeche); padding: 13px 16px; }
.feld-gross::placeholder { color: var(--tinte-3); }
.liste.blatt-felder { border-radius: 12px; }
.liste.blatt-felder > :not([hidden]) ~ :not([hidden])::before { left: 16px; }
.aktion-kopf { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.aktion-kopf p { font-size: .9375rem; color: var(--tinte-2); overflow-wrap: anywhere; }
.aktion-notiz { font-size: .9375rem; line-height: 1.33; white-space: pre-wrap; overflow-wrap: anywhere; padding: 0 0 2px; }
.blatt textarea { border-radius: 12px; min-height: 68px; }
.wahl .sym.stern { margin-right: 6px; }
.gruppe > .wahl.einzeilig { padding-bottom: 2px; }
.aktion-haupt { display: flex; gap: 8px; flex-wrap: wrap; }
.aktion-haupt .knopf { flex: 1 1 150px; }
.aktion-termin { display: flex; flex-direction: column; gap: 8px; }
.aktion-termin > span { font-size: .8125rem; font-weight: 600; color: var(--tinte-2); padding: 0 4px; }
#aktionListe > :not([hidden]) ~ :not([hidden])::before { left: 58px; }

/* Wahlknöpfe: Termin, Wiederholung, Beispiele */
.wahl { display: flex; gap: 7px; flex-wrap: wrap; }
.wahl button, .wahl-datum { flex: none; display: inline-flex; align-items: center; border: 0; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--flaeche); color: var(--tinte); font-weight: 600; font-size: .9375rem; white-space: nowrap; transition: opacity .15s ease; }
.wahl button.gewaehlt, .wahl-datum.gewaehlt { background: var(--knopf); color: var(--auf-knopf); }
/* Eine Zeile, seitlich wischbar: hält das Blatt niedrig, damit der Hauptknopf im Bild bleibt. */
.wahl.einzeilig { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
.wahl.einzeilig::-webkit-scrollbar { display: none; }
.wahl-teil { display: contents; }
/* Sieben Wochentage in einer Reihe, alle gleich breit und ganz zu sehen. */
.wahl.wochentage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wahl.wochentage button { justify-content: center; padding: 0; min-height: 40px; }
/* Routinen: Name und Uhrzeit in einer Zeile, darunter die Tage. */
.routine-eingabe { display: flex; gap: 8px; align-items: stretch; }
.routine-eingabe .feld-gross { flex: 1; min-width: 0; }
.routine-eingabe .datumfeld { background: var(--flaeche); border-radius: 12px; padding: 0 14px; min-width: 5.8em; justify-content: center; }
.routine { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 6px 6px 16px; }
/* Eigenes Datum: sieht aus wie die übrigen Wahlknöpfe, das Datumsfeld liegt unsichtbar darüber. */
.wahl-datum { position: relative; cursor: pointer; padding: 0 12px; }
.wahl-datum > span { display: inline-flex; align-items: center; gap: 6px; }
.wahl-datum .sym { width: 18px; height: 18px; }
.wahl-datum input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; opacity: 0; background: none; -webkit-appearance: none; appearance: none; }
/* Was HUGO aus der Eingabe verstanden hat */
.verstanden { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 4px; font-size: .8125rem; color: var(--tinte-2); }
.verstanden .chip { background: var(--still); color: var(--tinte); padding: 3px 9px; border-radius: 999px; }
.verstanden button { border: 0; background: none; min-height: 36px; padding: 4px 6px; font-size: .8125rem; font-weight: 600; color: var(--koralle-text); }

/* Kleine Schritte */
#aktionSchritte > :not([hidden]) ~ :not([hidden])::before { left: 50px; }
.schritt-zeile { display: flex; align-items: center; gap: 2px; min-height: 48px; padding: 1px 6px 1px 2px; }
.ring-klein { width: 46px; height: 46px; }
.ring-klein i { width: 22px; height: 22px; }
.ring-klein .sym { width: 13px; height: 13px; }
.ring-klein:disabled { opacity: .7; cursor: default; }
.schritt-text { flex: 1; min-width: 0; padding: 7px 4px; overflow-wrap: anywhere; }
.schritt-zeile.ok .schritt-text { color: var(--tinte-2); text-decoration: line-through; text-decoration-color: var(--tinte-3); }
.schritt-weg { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: none; padding: 0; color: var(--tinte-3); display: grid; place-items: center; }
.schritt-weg .sym { width: 14px; height: 14px; stroke-width: 2.4; }
.schritt-neu { display: flex; flex-direction: row; align-items: center; gap: 8px; min-height: 48px; padding: 4px 10px 4px 16px; }
.schritt-neu input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 0; }
.schritt-neu input::placeholder { color: var(--tinte-3); }
.schritt-neu .symbolknopf { width: 28px; height: 28px; background: var(--koralle); color: #fff; }
.schritt-neu .symbolknopf .sym { width: 15px; height: 15px; stroke-width: 2.6; }

/* ---------- Der HUGO-Start: fünf Minuten für die eine Sache ---------- */
.start {
  position: fixed; inset: 0; z-index: 50; color: #fff; overflow-y: auto; background: #04235a;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px) + var(--tastatur, 0px)) max(20px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 14px;
  opacity: 0; transition: opacity .3s ease;
}
.start.offen { opacity: 1; }
.start > * { width: 100%; max-width: 520px; margin-left: auto; margin-right: auto; }
.start-kopf { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.start-ueber { font-size: .9375rem; font-weight: 600; color: rgba(255, 255, 255, .72); }
.start .symbolknopf { background: rgba(255, 255, 255, .14); color: #fff; }
.start-mitte { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 6px 0; }
.start-mitte h2 { font-size: 1.75rem; line-height: 1.21; font-weight: 700; text-wrap: balance; overflow-wrap: anywhere; }
/* Der nächste kleine Schritt, zum Abhaken mitten im Start */
.start-schritt { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; border: 0; border-radius: 14px; padding: 9px 16px 9px 10px; background: rgba(255, 255, 255, .11); color: #fff; line-height: 1.3; text-align: left; overflow-wrap: anywhere; transition: opacity .15s ease; }
.start-schritt:active { opacity: .7; }
.start-ring { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .7); display: grid; place-items: center; }
.start-ring .sym { width: 13px; height: 13px; stroke-width: 3.2; opacity: 0; }
.start-schritt:active .start-ring { background: var(--koralle); border-color: var(--koralle); }
.start-schritt:active .start-ring .sym { opacity: 1; }
.start-frage { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 380px; }
.start-frage label { font-size: .9375rem; color: rgba(255, 255, 255, .78); }
.start-frage-zeile { display: flex; gap: 10px; align-items: center; }
.start-frage input { flex: 1; min-width: 0; border: 0; border-radius: 12px; padding: 11px 14px; background: rgba(255, 255, 255, .12); color: #fff; }
.start-frage input::placeholder { color: rgba(255, 255, 255, .5); }
.uhr { position: relative; width: min(66vw, 264px); aspect-ratio: 1; margin: 10px 0 6px; }
.uhr svg { width: 100%; height: 100%; display: block; }
.uhr-bahn { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 6; }
.uhr-lauf { fill: none; stroke: #fd6555; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 603.19; stroke-dashoffset: 603.19; transition: stroke-dashoffset .5s linear, stroke .4s ease; }
/* Fünf Minuten geschafft: Der Ring wird warm und atmet einmal. */
.uhr.geschafft .uhr-lauf { stroke: #f4a52b; }
.uhr.geschafft { animation: atmen .7s var(--aus); }
@keyframes atmen { 0% { transform: scale(1); } 45% { transform: scale(1.045); } 100% { transform: scale(1); } }
.uhr-zahl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.uhr-zahl strong { font-size: 4.5rem; line-height: 1; font-weight: 200; font-variant-numeric: tabular-nums; }
.uhr-zahl span { font-size: .9375rem; color: rgba(255, 255, 255, .66); }
.start-sagt { line-height: 1.3; color: rgba(255, 255, 255, .92); text-wrap: balance; max-width: 22em; min-height: 2.7em; }
.start-knoepfe { display: flex; flex-direction: column; gap: 2px; }
.start .knopf-haupt { background: #fff; color: #04235a; }
.start .knopf-text { color: #fff; }

/* ---------- Erster Start: HUGO stellt sich vor ---------- */
.willkommen {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto; background: var(--grund); color: var(--tinte);
  padding: calc(20px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px) + var(--tastatur, 0px)) max(24px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 22px;
  opacity: 0; transition: opacity .3s ease;
}
.willkommen.offen { opacity: 1; }
.willkommen > * { width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
.willkommen-mitte { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 30px; }
.willkommen-kopf { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.willkommen-marke { width: 84px; height: 84px; border-radius: 19px; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 2px rgba(11, 27, 58, .06), 0 8px 20px -10px rgba(11, 27, 58, .28); margin-bottom: 6px; }
.willkommen-marke img { width: 60px; height: auto; display: block; }
.willkommen h2 { font-size: 2.125rem; line-height: 1.2; font-weight: 700; text-wrap: balance; }
.willkommen-satz { color: var(--tinte-2); max-width: 19em; text-wrap: balance; }
.willkommen-liste { list-style: none; margin: 0; padding: 0 4px; display: flex; flex-direction: column; gap: 20px; }
.willkommen-liste li { display: flex; align-items: flex-start; gap: 14px; }
.willkommen-liste .sym { width: 30px; height: 30px; color: var(--koralle); stroke-width: 1.7; margin-top: 3px; }
.willkommen-liste strong { display: block; font-weight: 600; }
.willkommen-liste span { display: block; font-size: .9375rem; line-height: 1.33; color: var(--tinte-2); text-wrap: pretty; }
.willkommen-fuss { display: flex; flex-direction: column; gap: 10px; }
.willkommen-fuss input { width: 100%; border: 0; border-radius: 12px; background: var(--flaeche); padding: 13px 16px; }
.willkommen-fuss input::placeholder { color: var(--tinte-3); }

.willkommen-recht { font-size: .8125rem; color: var(--tinte-2); text-align: center; }
.willkommen-recht a, .textseite a { color: var(--koralle-text); }
.vorrat { position: absolute; }
/* Bewegung nur dort, wo sie etwas sagt: Ein Bereich kommt herein, eine neue Zeile setzt sich, der Zähler steigt. */
.ansicht:not([hidden]) { animation: herein .26s var(--aus); }
@keyframes herein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.aufgabe.frisch { animation: setzen .38s var(--aus); }
/* Erledigt: Die Zeile bleibt einen Atemzug lang stehen und geht dann. Die Sache steht danach unter "Erfolge". */
.aufgabe.geht { opacity: 0; transition: opacity .3s ease; }
@keyframes setzen { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.puls { display: inline-block; animation: puls .5s var(--aus); }
@keyframes puls { 0% { transform: scale(1); } 40% { transform: scale(1.16); color: var(--koralle-text); } 100% { transform: scale(1); } }
/* Bis die Einträge gelesen sind, bleibt die App unsichtbar. So blitzt beim ersten Start nichts auf, bevor HUGO sich vorstellt. */
.laedt .app, .laedt .dock { visibility: hidden; }
.ohne-skript { padding: 48px 20px; text-align: center; }

/* ---------- Textseiten: Datenschutz und Impressum ---------- */
.textseite {
  max-width: 640px; margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(48px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
}
.textseite .zurueck { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.textseite .zurueck::before { content: "‹"; font-size: 1.5rem; line-height: 1; margin-right: 6px; }
.textseite h1 { font-size: 2.125rem; line-height: 1.2; font-weight: 700; margin-top: 8px; }
.textseite .stand { font-size: .9375rem; color: var(--tinte-2); margin-top: 4px; }
.textseite h2 { font-size: 1.25rem; line-height: 1.25; font-weight: 600; margin-top: 30px; }
.textseite p { line-height: 1.47; margin-top: 10px; text-wrap: pretty; overflow-wrap: break-word; }

@media (min-width: 720px) {
  .app { padding-top: 32px; }
  .blatt { border-radius: 24px; bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Vergleichsfassung: Zeichen der Marke in der Kopfzeile */
.marke img.zeichen { width: 36px; height: 36px; border-radius: 9px; padding: 0; background: none; object-fit: cover; }
