/* Farbwelt „Papier & Minze" (Entscheidung 09.09.2026, Kontrast angezogen am selben Tag): helles Papier,
   Minze als Grundton, Himbeer-Pink als Signal. Einzige Quelle für Farben, Schrift, Radien. */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/outfit-latin-wght.woff2") format("woff2"); }
:root {
  --bg: #FDFBF6; --surface: #FFFFFF; --surface-2: #F3EFE4;
  --text: #0F172A; --muted: #4B5563; --line: #D9D2C2;
  --primary: #0A9E8B; --primary-soft: #CDEFE7; --primary-text: #06695C; --on-primary: #FFFFFF;
  --accent: #E0407A; --accent-soft: #FADCE6; --accent-text: #A3204F;
  --ok: #0A9E8B; --ok-soft: #CDEFE7; --ok-text: #06695C;
  --warn: #EA5A2E; --warn-soft: #FCDCD0; --warn-text: #A33A14;
  --track: #E4DDCB; --korn: .14;
  --r: 18px; --r-s: 12px; --shadow: 0 6px 20px rgba(15,23,42,.10);
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.45;
  -webkit-text-size-adjust: 100%; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: var(--korn); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 .5 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"); }
#app, .toast, .xp-pop, .konfetti { position: relative; z-index: 1; }
body { min-height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
#app { max-width: 560px; margin: 0 auto; padding: 16px 16px 40px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 700; }
p { margin: 0; }
button { font: inherit; cursor: pointer; border: 1px solid transparent; border-radius: 14px; padding: 14px 18px; font-weight: 700;
  background: var(--surface-2); color: var(--text); -webkit-tap-highlight-color: transparent; transition: transform .08s ease, background .15s; }
button:active { transform: scale(.98); }
button:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
h1, h2, .frage, .stat .wert, .ring .gross, .ende h1 { font-family: var(--font); }
.btn-ok { background: var(--ok-soft); color: var(--ok-text); border-color: var(--ok); }
.btn-warn { background: var(--warn-soft); color: var(--warn-text); border-color: var(--warn); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--primary-text); }
.btn-block { width: 100%; font-size: 18px; padding: 16px 18px; }
.btn-klein { padding: 8px 12px; font-size: 14px; border-radius: 10px; white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; }
.row > button { flex: 1; }
.spalte { display: grid; gap: 12px; }
.muted { color: var(--muted); }
.klein { font-size: 14px; }
.karte { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.laden { text-align: center; padding: 60px 0; color: var(--muted); }
.toast { position: fixed !important; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--text); color: #fff;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); z-index: 20; animation: hoch .25s ease; }
@keyframes hoch { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Login */
/* Anmeldeseite: Kartenfächer als Blickfang, Zeile nach Tageszeit statt starrem Untertitel.
   Der Fächer zeigt in drei Sekunden, was die App ist — Karten, die man durchgeht. */
.login { min-height: 82dvh; display: grid; place-content: center; text-align: center; gap: 16px; width: 100%; max-width: 340px; margin: 0 auto; }
.login h1 { font-size: 34px; letter-spacing: -.02em; }
.login .einladung { margin-top: 8px; color: var(--muted); font-size: 16px; text-wrap: balance; min-height: 2.9em; }
.login .signatur { margin-top: 2px; opacity: .75; }
.faecher { position: relative; width: 208px; height: 152px; margin: 0 auto 10px; }
.faecher .fkarte { position: absolute; left: 50%; top: 0; width: 128px; height: 152px; margin-left: -64px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  transform-origin: 50% 118%; display: grid; place-items: center;
  transform: rotate(var(--dreh));
  animation: faecherAuf .55s cubic-bezier(.2,.9,.3,1) backwards; }
/* Die hinteren Karten im Minz-Ton: so liest der Stapel sofort als Stapel, ohne neue Farbe. */
.faecher .fkarte:nth-child(1) { --dreh: -21deg; animation-delay: .04s; background: var(--primary-soft); border-color: var(--primary-soft); }
.faecher .fkarte:nth-child(2) { --dreh:  -7deg; animation-delay: .12s; background: var(--primary-soft); border-color: var(--primary-soft); }
.faecher .fkarte:nth-child(3) { --dreh:  10deg; animation-delay: .20s; }
.faecher .fhaken { width: 74px; height: 74px; animation: hakenAuf .45s .42s backwards cubic-bezier(.2,1.5,.4,1); }
.faecher .fhaken circle { fill: var(--accent); }
.faecher .fhaken path { fill: none; stroke: #fff; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
@keyframes faecherAuf {
  from { opacity: 0; transform: rotate(0deg) translateY(16px) scale(.92); }
  to   { opacity: 1; transform: rotate(var(--dreh)); }
}
@keyframes hakenAuf { from { opacity: 0; transform: scale(.2) rotate(-25deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) {
  .faecher .fkarte, .faecher .fhaken { animation: none; opacity: 1; }
}
input[type=password] { font: inherit; font-size: 18px; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); }
.fehler { color: var(--warn); font-weight: 600; }

/* Start */
.kopf { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.kopf .gruss { font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.kopf h1 { font-size: 22px; text-wrap: balance; }
.spruch { font-size: 16px; color: var(--text); margin: -6px 0 14px; padding-left: 12px; border-left: 3px solid var(--accent); }
.statusleiste { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 14px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 10px; text-align: center; box-shadow: var(--shadow); }
.stat .wert { font-size: 24px; font-weight: 800; }
.stat .label { font-size: 12px; color: var(--muted); }
.ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--track) 0); transition: background .4s; }
.ring.fertig { background: conic-gradient(var(--ok) 100%, var(--ok) 0); }
.ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--surface); display: grid; place-content: center; text-align: center; }
.ring .gross { font-size: 30px; font-weight: 800; line-height: 1; }
.ring .klein { font-size: 12px; }
.ziel-karte { text-align: center; }
.ziel-karte h2 { margin: 12px 0 4px; }
.serie { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-text); padding: 6px 12px; border-radius: 999px; font-weight: 700; }
.serie.aus { background: var(--surface-2); color: var(--muted); }
.kategorien { display: grid; gap: 10px; margin-top: 10px; }
.kat { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: var(--r-s);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 500; }
.kat:active { border-color: var(--primary); }
.kat .symbol { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); display: grid; place-items: center; font-size: 22px; }
.kat .titel { font-weight: 700; }
.kat .meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.kat .lvl { font-size: 12px; font-weight: 800; color: var(--primary); background: var(--primary-soft); padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
.balken { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; margin-top: 6px; }
.balken > i { display: block; height: 100%; background: var(--primary); border-radius: 3px; transition: width .4s; }
.balken.ok > i { background: var(--ok); }
.faellig-pill { color: var(--accent-text); font-weight: 700; }

/* Lernen */
.lern-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lern-kopf .fortschritt { flex: 1; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.lern-kopf .fortschritt > i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.lernkarte { min-height: 300px; display: flex; flex-direction: column; gap: 14px; animation: rein .25s ease; }
@keyframes rein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.typ { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.typ.szenario { color: var(--accent-text); }
.frage { font-size: 20px; font-weight: 700; white-space: pre-wrap; }
.antwort { background: var(--surface-2); border-radius: var(--r-s); padding: 14px; white-space: pre-wrap; animation: rein .25s ease; }
.hinweis { font-size: 14px; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 10px; }
textarea { font: inherit; width: 100%; min-height: 120px; padding: 12px 14px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); resize: vertical; }
.kriterien { display: grid; gap: 8px; }
.kriterium { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px; cursor: pointer; }
.kriterium input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ok); flex: none; }
.kriterium.an { border-color: var(--ok); background: var(--ok-soft); }
.eigene-antwort { font-size: 14px; color: var(--muted); white-space: pre-wrap; border-left: 3px solid var(--line); padding-left: 10px; }
.stand { font-size: 14px; color: var(--muted); text-align: center; }
.xp-pop { position: fixed !important; left: 50%; top: 38%; transform: translateX(-50%); font-size: 34px; font-weight: 900; color: var(--accent);
  pointer-events: none; animation: pop 1s ease forwards; z-index: 30; text-shadow: 0 2px 12px rgba(0,0,0,.12); }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -60px) scale(1); } }

/* Ende */
.ende { text-align: center; display: grid; gap: 16px; }
.ende .gross { font-size: 56px; line-height: 1; }
.konfetti { position: fixed !important; inset: 0; pointer-events: none; overflow: hidden; z-index: 15; }
.konfetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .2; } }
@media (prefers-color-scheme: dark) {
  :root { --bg: #151A1E; --surface: #1D2429; --surface-2: #273037; --text: #EEF2F0; --muted: #98A6A8; --line: #33403F;
    --primary: #2FD3BC; --primary-soft: #143F3A; --primary-text: #8BEBDC; --on-primary: #0E1A18;
    --accent: #F07A9E; --accent-soft: #4A2230; --accent-text: #FFB3C8;
    --ok: #2FD3BC; --ok-soft: #143F3A; --ok-text: #8BEBDC; --warn: #FF8A66; --warn-soft: #4A2A20; --warn-text: #FFC0AE;
    --track: #2C3639; --korn: .12; --shadow: 0 6px 24px rgba(0,0,0,.28); }
}
}

/* Eingabe + Abgleich */
.eingabe { position: relative; }
.eingabe textarea { padding-right: 56px; }
.mic { position: absolute; right: 8px; bottom: 8px; width: 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 20px;
  background: var(--primary-soft); border-color: var(--primary-soft); }
.mic.aktiv { background: var(--warn); color: #fff; border-color: var(--warn); animation: puls 1s ease-in-out infinite; }
@keyframes puls { 50% { transform: scale(1.08); } }
.bewertung { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; animation: rein .25s ease; }
.bewertung.gut { border-color: var(--ok); background: var(--ok-soft); }
.bewertung .balken { margin: 8px 0; }
.punkte { margin: 6px 0 0; padding-left: 0; list-style: none; font-size: 14px; display: grid; gap: 3px; }
.punkte.erfasst li { color: var(--ok-text); }
.punkte.fehlt li { color: var(--warn-text); }

/* Hilfe */
.hilfe { display: grid; gap: 12px; }
.hilfe section { display: grid; gap: 8px; }
.hilfe h2 { font-size: 18px; }
.hilfe p { font-size: 15px; }
