/* HUGO — Farben aus Olivers Logo gemessen: Marine #04235a, Koralle #fd6555,
   Bernstein #fdb84a, Grund #f5f9fa. Aufbau: eine Spalte, unten die feste Leiste
   mit drei Bereichen (Heute, Rückblick, Fortschritt). */

@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("fonts/montserrat.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("fonts/source-sans-3.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --grund:      #f5f9fa;
  --karte:      #ffffff;
  --kante:      #e2e9ee;
  --kante-fest: #c9d4dc;
  --marine:     #04235a;
  --schrift:    #0d2247;
  --leise:      #58677f;
  --koralle:    #fd6555;
  --bernstein:  #fdb84a;
  --done-titel: #d9781a;
  --gruen:      #13873f;
  --gruen-hell: #dff3e6;
  --gruen-text: #0f6b33;
  --offen-bg:   #edf1f5;
  --offen-text: #4a586e;
  --dran-bg:    #fde6d9;
  --dran-text:  #ad4318;
  --warn:       #c2410c;
  --voll-bg:    #04235a;
  --voll-text:  #ffffff;
  --schatten:   0 1px 2px rgba(4, 35, 90, .05), 0 6px 20px rgba(4, 35, 90, .06);
  --display: "Montserrat", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --text:    "Source Sans 3", -apple-system, "Segoe UI", system-ui, sans-serif;
  --leiste-hoehe: 62px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --grund:      #0a1428;
    --karte:      #111f3c;
    --kante:      #1f3058;
    --kante-fest: #2f4477;
    --marine:     #e3ecff;
    --schrift:    #eef3fb;
    --leise:      #9fb0cc;
    --done-titel: #fdb84a;
    --gruen:      #1f9d50;
    --gruen-hell: #123a26;
    --gruen-text: #8fe0ae;
    --offen-bg:   #1b2a4b;
    --offen-text: #b3c2dc;
    --dran-bg:    #47261a;
    --dran-text:  #ffb693;
    --warn:       #ff9a6b;
    --voll-bg:    #fdb84a;
    --voll-text:  #0a1428;
    --schatten:   0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--grund); color: var(--schrift);
  font-family: var(--text); font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app {
  max-width: 620px; margin: 0 auto;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--leiste-hoehe) + 28px + 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));
}

/* ---------- Kopf ---------- */
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.marke { display: flex; align-items: center; gap: 12px; min-width: 0; }
.siegel { flex: none; width: 54px; height: 54px; border-radius: 15px; background: #fff; box-shadow: var(--schatten); display: grid; place-items: center; }
.siegel img { width: 40px; height: auto; display: block; }
.marke-text { display: flex; flex-direction: column; min-width: 0; }
.wortmarke { font-family: var(--display); font-weight: 800; font-size: 1.72rem; line-height: 1; letter-spacing: .01em; color: var(--marine); }
.losung { font-family: var(--display); font-weight: 700; font-size: .6rem; letter-spacing: .11em; text-transform: uppercase; color: var(--marine); margin-top: 5px; white-space: nowrap; }
.datum { font-size: .86rem; color: var(--leise); text-align: right; line-height: 1.25; }

/* ---------- Karten ---------- */
main, .ansicht { display: flex; flex-direction: column; gap: 16px; }
.karte { background: var(--karte); border: 1px solid var(--kante); border-radius: 18px; padding: 20px 18px; box-shadow: var(--schatten); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.karten-titel { font-family: var(--display); font-weight: 800; font-size: 1.42rem; line-height: 1.2; margin: 0; color: var(--marine); }
.karten-titel.klein { font-size: 1.08rem; }
.reihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.reihe-luft { margin-top: 2px; }

/* ---------- Knöpfe ---------- */
button, .knopf { font-family: var(--text); font-size: 1rem; cursor: pointer; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  min-height: 46px; padding: 10px 20px; border-radius: 999px; font-weight: 600; border: 1.5px solid transparent;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.knopf:active, .rund:active { transform: scale(.97); }
.knopf-voll { background: var(--voll-bg); color: var(--voll-text); }
.knopf-gruen { background: var(--gruen); color: #fff; }
.knopf-leer { background: transparent; color: var(--schrift); border-color: var(--kante-fest); }
.knopf-breit { width: 100%; }
.knopf-klein { min-height: 40px; padding: 7px 16px; font-size: .95rem; }
.textknopf { background: none; border: 0; color: var(--leise); font-weight: 600; padding: 10px 4px; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.rund { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--kante-fest); background: transparent; color: var(--schrift); display: grid; place-items: center; padding: 0; }
.rund svg, .leiste svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: currentColor; }
.rund svg path[fill="none"], .leiste svg [fill="none"] { fill: none; }
.rund-klein { width: 38px; height: 38px; }
.rund-klein svg { width: 19px; height: 19px; }
.rund.mehr { width: 40px; height: 40px; border-color: transparent; color: var(--leise); font-size: 1.25rem; }
.rund-voll { background: var(--voll-bg); color: var(--voll-text); border-color: var(--voll-bg); }
.rund.spricht { background: var(--bernstein); border-color: var(--bernstein); color: #0a1428; }
:focus-visible { outline: 3px solid var(--koralle); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--marine); outline-offset: 0; border-color: var(--marine); }

/* ---------- Chips ---------- */
.chip { font-size: .82rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.chip-jetzt, .chip-gruen { background: var(--gruen-hell); color: var(--gruen-text); }
.chip-warn { background: var(--dran-bg); color: var(--dran-text); }
.chip-offen { background: var(--offen-bg); color: var(--offen-text); }
.chip-dran { background: var(--dran-bg); color: var(--dran-text); }

/* ---------- Impuls ---------- */
.impuls { gap: 10px; }
.impuls-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.impuls-titel { font-weight: 600; font-size: 1.02rem; }
.impuls-frage { font-family: var(--display); font-weight: 800; font-size: 1.62rem; line-height: 1.15; margin: 2px 0 0; color: var(--marine); text-wrap: balance; }
.impuls-vorhaben { margin: 0; font-size: 1.08rem; overflow-wrap: anywhere; }
.impuls-vorhaben strong { font-weight: 600; }
.hugo-sagt { display: flex; flex-direction: column; gap: 2px; }
.hugo-sagt-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hugo-sagt-kopf { font-weight: 600; }
.hugo-sagt p { margin: 0; font-size: 1.08rem; }
.goforit { background: linear-gradient(100deg, var(--koralle) 0%, var(--bernstein) 100%); border-radius: 14px; padding: 13px 16px; display: flex; flex-direction: column; color: #0a1428; margin: 4px 0 2px; }
.goforit-gross { font-family: var(--display); font-weight: 800; font-size: 1.16rem; letter-spacing: .01em; }
.goforit-klein { font-weight: 600; opacity: .82; }

/* ---------- Hinweiskarten ---------- */
.hinweis, .abend { gap: 12px; }
.hinweis-text { display: flex; flex-direction: column; gap: 3px; }
.hinweis-text strong { font-family: var(--display); font-weight: 700; color: var(--marine); }
.hinweis-text span { color: var(--leise); }
.abend { border-color: var(--bernstein); }

/* ---------- Lob ---------- */
.lob { background: var(--gruen-hell); border: 1px solid transparent; border-radius: 16px; padding: 15px 16px; display: flex; align-items: center; gap: 12px; animation: herein .25s ease-out; }
.lob-haken { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--gruen); color: #fff; display: grid; place-items: center; font-weight: 700; }
.lob-text { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.04rem; line-height: 1.3; color: var(--gruen-text); flex: 1; min-width: 0; text-wrap: balance; }
.lob.neutral { background: var(--karte); border-color: var(--kante); }
.lob.neutral .lob-text { color: var(--schrift); font-family: var(--text); font-weight: 400; font-size: 1rem; overflow-wrap: anywhere; }
@keyframes herein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Eingabe ---------- */
.eingabe { display: flex; flex-direction: column; gap: 10px; }
.eingabe-zeile { display: flex; gap: 10px; align-items: center; }
input[type="text"], input[type="date"], input[type="time"], textarea {
  width: 100%; min-width: 0; font-family: var(--text); font-size: 1.04rem; color: var(--schrift);
  background: var(--karte); border: 1.5px solid var(--kante-fest); border-radius: 14px; padding: 12px 14px;
}
.eingabe-zeile input { border-radius: 999px; padding: 12px 18px; min-height: 48px; }
input::placeholder, textarea::placeholder { color: var(--leise); opacity: .75; }
textarea { resize: vertical; min-height: 84px; }
.eingabe-mehr { display: flex; gap: 10px; flex-wrap: wrap; }
.feld { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; font-size: .9rem; color: var(--leise); }
.feld em { font-style: normal; opacity: .8; }
.feld-schmal { flex: 0 1 170px; }

/* ---------- Liste ---------- */
.bereich { display: flex; flex-direction: column; gap: 10px; }
.bereich-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.done-titel { font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--done-titel); margin: 0; letter-spacing: .01em; }
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.liste:empty { display: none; }
.aufgabe { background: var(--karte); border: 1px solid var(--kante); border-radius: 16px; padding: 15px 15px 14px; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.a-oben { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.a-text { min-width: 0; flex: 1; }
.a-titel { font-weight: 600; font-size: 1.1rem; line-height: 1.3; overflow-wrap: anywhere; }
.a-zeile { color: var(--leise); font-size: .95rem; margin-top: 3px; overflow-wrap: anywhere; }
.a-zeile.faellig { color: var(--warn); font-weight: 600; }
.aufgabe.fertig { padding: 13px 15px; }
.aufgabe.fertig .a-oben { align-items: center; }
.aufgabe.fertig .a-titel { text-decoration: line-through; font-weight: 400; color: var(--leise); }
.a-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.a-knoepfe .mehr { margin-left: auto; }
.a-mehr { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--kante); padding-top: 11px; }
.a-termin { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .95rem; color: var(--leise); }
.bearbeiten { display: flex; flex-direction: column; gap: 10px; }
.leer { color: var(--leise); border: 1.5px dashed var(--kante-fest); border-radius: 16px; padding: 22px 18px; text-align: center; text-wrap: balance; }

/* ---------- Rückblick ---------- */
.frage { font-weight: 600; font-size: 1.08rem; margin: 0; }
.noten { display: flex; flex-direction: column; gap: 2px; }
.note { display: flex; align-items: flex-start; gap: 13px; padding: 10px 6px; border-radius: 12px; background: none; border: 0; text-align: left; color: var(--schrift); font-size: 1.06rem; line-height: 1.35; width: 100%; }
.note-kreis { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--kante-fest); margin-top: 1px; display: grid; place-items: center; }
.note[aria-checked="true"] { background: var(--offen-bg); }
.note[aria-checked="true"] .note-kreis { border-color: var(--voll-bg); background: var(--voll-bg); }
.note[aria-checked="true"] .note-kreis::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--voll-text); }
.hugo-antwort { margin: 0; background: linear-gradient(100deg, var(--koralle), var(--bernstein)); color: #0a1428; border-radius: 14px; padding: 12px 15px; font-weight: 600; animation: herein .25s ease-out; }
.trenner { height: 1px; background: var(--kante); margin: 4px 0; }
.tagesfakten { margin: 0; color: var(--leise); font-size: .95rem; }
.fussnote { color: var(--leise); font-size: .9rem; margin: 0; padding: 0 4px; text-wrap: pretty; }

/* ---------- Fortschritt ---------- */
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kachel { background: var(--grund); border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-zahl { font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1.05; color: var(--marine); font-variant-numeric: tabular-nums; }
.k-wort { color: var(--leise); font-size: .88rem; line-height: 1.25; }
.trend { margin: 0; font-weight: 600; }
.trend.gut { color: var(--gruen-text); }
.woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 150px; }
.tag { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; min-width: 0; }
.tag-zahl { font-size: .8rem; color: var(--leise); font-variant-numeric: tabular-nums; min-height: 1.1em; }
.saeule { width: 100%; max-width: 34px; border-radius: 8px 8px 3px 3px; background: var(--offen-bg); min-height: 5px; }
.saeule.hat { background: linear-gradient(180deg, var(--bernstein), var(--koralle)); }
.tag-name { font-size: .78rem; color: var(--leise); font-weight: 600; }
.tag.heute .tag-name { color: var(--marine); }
.tag-note { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 600; background: var(--offen-bg); color: var(--offen-text); font-variant-numeric: tabular-nums; }
.tag-note.hat { background: var(--voll-bg); color: var(--voll-text); }
.legende, .schnitt, .erklaer { margin: 0; color: var(--leise); font-size: .9rem; }
.leg-balken { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: linear-gradient(180deg, var(--bernstein), var(--koralle)); vertical-align: -1px; }
.schnitt { color: var(--schrift); font-weight: 600; font-size: 1rem; }
.zeiten { display: flex; gap: 10px; }
.zeiten .feld { flex: 1 1 0; }
.schalterzeile { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.schalterzeile div { display: flex; flex-direction: column; min-width: 0; }
.schalterzeile span { color: var(--leise); font-size: .92rem; }
.schalter { flex: none; width: 54px; height: 32px; border-radius: 999px; border: 0; background: var(--kante-fest); position: relative; padding: 0; transition: background .15s ease; }
.schalter span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.schalter[aria-checked="true"] { background: var(--gruen); }
.schalter[aria-checked="true"] span { transform: translateX(22px); }
.datei { position: relative; overflow: hidden; }
.datei input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

/* ---------- Leiste unten ---------- */
.leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; gap: 4px;
  background: color-mix(in srgb, var(--karte) 92%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--kante);
  padding: 6px max(12px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
}
.leiste a { flex: 1 1 0; max-width: 200px; min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--leise); font-size: .76rem; font-weight: 600; border-radius: 12px; }
.leiste a.aktiv { color: var(--marine); }
.leiste a.aktiv svg { color: var(--koralle); }

@media (min-width: 700px) {
  .app { padding-top: 34px; }
  .kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
