/* Ferien-Held — Styles für Kind-App und Elternbereich */

:root {
  /* Candy-Palette: satter, fröhlicher, mehr Kontrast (Vorbild Casual Games) */
  --bg1: #ffc3e1;
  --bg2: #ffeaf6;
  --card: #ffffff;
  --ink: #4e2a5e;
  --ink-soft: #9a6fae;
  --primary: #ff4f9a;
  --primary-dark: #e63384;
  --accent: #8f5bff;
  --success: #2fc98c;
  --danger: #e85d75;
  --gold: #ffc02e;
  --magenta: #b82c5b;
  --radius: 22px;
  --shadow: 0 6px 16px rgba(184, 44, 91, 0.18);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 190, 225, 0.55) 0, transparent 32%),
    radial-gradient(circle at 88% 22%, rgba(214, 190, 255, 0.5) 0, transparent 30%),
    radial-gradient(circle at 75% 85%, rgba(255, 214, 170, 0.35) 0, transparent 30%),
    linear-gradient(160deg, var(--bg1), var(--bg2) 65%);
  background-attachment: fixed;
  min-height: 100vh;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

/* ============ KIND-APP ============ */

.kid {
  font-size: 18px;
  user-select: none;
  -webkit-user-select: none;
}

.kid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 6px;
  gap: 10px;
}

.kid-header .level-chip {
  background: linear-gradient(135deg, #ffffff, #ffeaf5);
  border: 2px solid #ffc7e3;
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 8px 16px;
  font-weight: 800;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kid-header .punkte-chip {
  background: linear-gradient(135deg, var(--gold), #ffab5e);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 8px 18px;
  font-weight: 800;
  font-size: 20px;
  color: #7a4d00;
}

.kid main {
  padding: 8px 14px 110px;
  max-width: 700px;
  margin: 0 auto;
}

.kid h1 {
  font-size: 26px;
  margin: 10px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--magenta);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.6);
}

.kid .tag-karte, .kid .erfolg-karte, .kid .belohnung-karte {
  border: 3px solid rgba(255, 255, 255, 0.9);
}

/* --- Wochenplan --- */

.tag-karte {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  padding: 12px 14px;
  opacity: 0.92;
}

.tag-karte.heute {
  border: 3px solid var(--primary);
  opacity: 1;
  transform: scale(1.01);
}

.tag-karte.vergangen { opacity: 0.55; }

.tag-titel {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.tag-titel .heute-badge {
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  border-radius: 999px;
  padding: 2px 12px;
}

.tag-titel .datum { color: var(--ink-soft); font-size: 15px; font-weight: 600; }

.slots { display: flex; gap: 10px; }

.slot {
  flex: 1;
  min-height: 84px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 6px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
}

.slot.leer {
  border: 3px dashed #f0bfe0;
  color: #d8a3c8;
  font-size: 34px;
  font-weight: 400;
}

.slot.leer:active { background: #fff0f8; }
.slot.leer.gesperrt { border-style: solid; border-color: #f7e3ef; color: #ecd3e3; }

.slot.belegt { background: #f7efff; border: 3px solid #e2ccff; }
.slot.belegt .slot-icon { font-size: 32px; }
.slot.status-done_pending { background: #fff6e0; border-color: #ffd98a; }
.slot.status-confirmed { background: #e4f8ec; border-color: #9fe0bb; }
.slot .slot-status { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

/* --- Schatzkiste --- */

.punkte-anzeige {
  background: linear-gradient(135deg, var(--gold), #ffb347);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 18px;
  margin-bottom: 16px;
  color: #6b4e00;
}

.punkte-anzeige .zahl { font-size: 52px; font-weight: 900; line-height: 1; }
.punkte-anzeige .label { font-weight: 700; }

.belohnung-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.belohnung-karte {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.belohnung-karte .b-icon { font-size: 44px; }
.belohnung-karte .b-titel { font-weight: 700; font-size: 15px; min-height: 2.4em; display: flex; align-items: center; }
.belohnung-karte .b-preis { font-weight: 800; color: #b8860b; }

.belohnung-karte.zu-teuer { filter: grayscale(0.65); opacity: 0.75; }
.belohnung-karte.erreichbar { border: 3px solid var(--gold); }

.fortschritt-balken {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #edf0f8;
  overflow: hidden;
}

.fortschritt-balken > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--primary));
  transition: width 0.6s ease;
}

.wunsch-badge {
  background: #ffe3f0;
  color: #c2447c;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
}

/* --- Erfolge --- */

.erfolg-karte {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  text-align: center;
}

.erfolg-karte .gross { font-size: 46px; }
.erfolg-karte h2 { margin: 6px 0; font-size: 20px; }
.erfolg-karte .sub { color: var(--ink-soft); font-weight: 600; font-size: 15px; }

.stat-reihe { display: flex; gap: 12px; }
.stat-reihe .erfolg-karte { flex: 1; margin-bottom: 0; }
.stat-reihe .zahl { font-size: 36px; font-weight: 900; }

/* --- Bottom-Navigation --- */

.kid-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  box-shadow: 0 -4px 18px rgba(45, 53, 80, 0.14);
  display: flex;
  justify-content: space-around;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
}

.kid-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 6px 18px;
  border-radius: 16px;
  min-width: 92px;
}

.kid-nav button span { font-size: 13px; }
.kid-nav button.aktiv { background: #ffe4f1; color: var(--primary-dark); }

/* --- Modal & Vollbild --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 53, 80, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal-box {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  color: var(--ink-soft);
  padding: 8px 12px;
}

.fullscreen {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, var(--bg1), var(--bg2) 60%);
  z-index: 60;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* --- Aufgaben-Auswahl (Picker) --- */

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.picker-karte {
  background: #f6f8ff;
  border: 3px solid #e2e8fb;
  border-radius: 16px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 14px;
}

.picker-karte:active { background: #eef1ff; border-color: var(--accent); }
.picker-karte .p-icon { font-size: 38px; }
.picker-karte .p-punkte { color: #b8860b; font-weight: 800; font-size: 13px; }

/* --- Aufgabe-machen-Karte --- */

.aufgabe-voll {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 14px;
}

.aufgabe-voll .a-icon { font-size: 96px; }
.aufgabe-voll h2 { font-size: 30px; margin: 0; }
.aufgabe-voll .hinweis { color: var(--ink-soft); font-size: 18px; font-weight: 600; max-width: 420px; }

/* --- Buttons --- */

.btn {
  border-radius: 999px;
  font-weight: 800;
  font-size: 19px;
  padding: 14px 30px;
  box-shadow: var(--shadow);
  min-height: 56px;
}

.btn:active { transform: scale(0.95) translateY(2px); }

/* Candy-Look: Glanz oben, satte Kante unten */
.btn-primary, .btn-success, .btn-accent {
  color: #fff;
  text-shadow: 0 1px 2px rgba(90, 20, 60, 0.35);
}

.btn-primary {
  background: linear-gradient(180deg, #ff7ab8, var(--primary) 45%, var(--primary-dark));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), inset 0 -5px 0 rgba(150, 20, 90, 0.35), 0 6px 14px rgba(184, 44, 91, 0.35);
}

.btn-success {
  background: linear-gradient(180deg, #5fe0a5, var(--success) 45%, #1fa871);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), inset 0 -5px 0 rgba(10, 110, 70, 0.35), 0 6px 14px rgba(47, 201, 140, 0.35);
}

.btn-accent {
  background: linear-gradient(180deg, #ab86ff, var(--accent) 45%, #7440e8);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), inset 0 -5px 0 rgba(80, 30, 160, 0.35), 0 6px 14px rgba(143, 91, 255, 0.35);
}

.btn-still { background: #f3ecfa; color: var(--ink-soft); }
.btn:disabled { filter: grayscale(0.8); opacity: 0.6; }

.btn-sprich {
  font-size: 24px;
  background: #eaf4ff;
  border-radius: 999px;
  width: 52px;
  height: 52px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

/* --- Übungs-Engine --- */

.uebung-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.uebung-punkte { display: flex; gap: 6px; }

.uebung-punkte i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #dfe5f3;
  display: inline-block;
}

.uebung-punkte i.ok { background: var(--success); }
.uebung-punkte i.jetzt { background: var(--primary); transform: scale(1.25); }

.uebung-mitte {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px 18px 30px;
  text-align: center;
}

.uebung-bild { font-size: 110px; line-height: 1; }

.antwort-reihe {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.antwort {
  background: var(--card);
  border: 3px solid #ecd9ff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  font-size: 28px;
  font-weight: 800;
  padding: 16px 28px;
  min-width: 96px;
  min-height: 64px;
  letter-spacing: 0.06em;
}

.antwort:active { border-color: var(--accent); }
.antwort.richtig { background: #e4f8ec; border-color: var(--success); }
.antwort.falsch { animation: wackeln 0.45s; border-color: var(--danger); }
.antwort.weg { visibility: hidden; }

.wort-aufbau {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.1em;
  min-height: 1.3em;
  color: var(--accent);
}

.luecken-wort { font-size: 44px; font-weight: 900; letter-spacing: 0.12em; }
.luecken-wort .luecke { color: var(--primary); border-bottom: 4px solid var(--primary); padding: 0 6px; }

/* Sätze lesen */
.satz-text {
  background: var(--card);
  border: 3px solid #ffd1e8;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.5;
  padding: 20px 24px;
  max-width: 480px;
}

.antwort.antwort-bild { font-size: 46px; padding: 14px 24px; }

/* Rechnen */
.rechen-aufgabe {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--accent);
}

@keyframes wackeln {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-9px); }
  75% { transform: translateX(9px); }
}

/* Jubel-Screen */
.jubel { text-align: center; padding: 30px; }
.jubel .sterne { font-size: 56px; letter-spacing: 8px; }
.jubel .punkte { font-size: 40px; font-weight: 900; color: var(--primary-dark); }

/* ---------- Maskottchen ---------- */

.wahl-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 8px;
}

.wahl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  max-width: 440px;
  margin-top: 10px;
}

.wahl-karte {
  background: var(--card);
  border: 3px solid #ffd1e8;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.wahl-karte:active { transform: scale(0.96); border-color: var(--primary); }
.wahl-emoji { font-size: 64px; }
.wahl-name { font-size: 20px; font-weight: 800; }
.wahl-tier { font-size: 14px; color: var(--ink-soft); font-weight: 600; }

.wahl-bestaetigen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 6px;
}

.sprechblase-zeile {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 4px 4px 14px;
}

.sb-maskottchen { font-size: 44px; }

.sprechblase {
  position: relative;
  background: var(--card);
  border: 2px solid #ffd1e8;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 480px;
}

.sb-sprich { font-size: 18px; flex-shrink: 0; }

.maskottchen-figur { font-size: 110px; line-height: 1.2; }

.maskottchen-figur.huepft { animation: huepfen 0.7s ease; }

@keyframes huepfen {
  0%, 100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-26px) rotate(-8deg); }
  55% { transform: translateY(0) rotate(0); }
  75% { transform: translateY(-12px) rotate(6deg); }
}

/* Chat */

.chat-box {
  background: #fdf7ff;
  border: 2px solid #f0dcff;
  border-radius: 16px;
  padding: 10px;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.chat-nachricht { display: flex; align-items: flex-end; gap: 6px; }
.chat-nachricht.von-kind { justify-content: flex-end; }
.chat-avatar { font-size: 26px; flex-shrink: 0; }

.chat-text {
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 600;
  max-width: 80%;
  line-height: 1.35;
}

.von-maskottchen .chat-text { background: #fff; border: 2px solid #f0dcff; border-bottom-left-radius: 4px; }
.von-kind .chat-text { background: #ffe1f0; border: 2px solid #ffc7e3; border-bottom-right-radius: 4px; }

.chat-zeile { display: flex; gap: 8px; align-items: center; }

.chat-eingabe {
  flex: 1;
  font-family: inherit;
  font-size: 17px;
  border: 3px solid #ecd9ff;
  border-radius: 999px;
  padding: 12px 16px;
  min-width: 0;
}

/* ---------- Animierte 3D-Maskottchen (KI-gerenderte Ebenen-Sprites) ---------- */

.m-figur { display: inline-block; line-height: 0; filter: drop-shadow(0 6px 12px rgba(150, 50, 120, 0.28)); }
.m-figur svg { width: 100%; height: 100%; overflow: visible; }
.m-figur svg g { transform-box: fill-box; }

.m-figur.m-bild { position: relative; }

.m-figur.m-bild img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* freigestellte PNGs — kein Rahmen, kein Zuschnitt */
}

.m-figur.m-bild .m-basis { position: relative; }

.m-figur.m-bild .m-blinzel {
  opacity: 0;
  animation: bildBlinzeln 4.8s infinite;
}

@keyframes bildBlinzeln {
  0%, 91%, 100% { opacity: 0; }
  93%, 97% { opacity: 1; }
}

.m-figur.m-bild .m-sprechbild { opacity: 0; }

.m-figur.spricht .m-sprechbild { animation: bildSprechen 0.34s steps(1) infinite; }
.m-figur.spricht .m-blinzel { animation: none; }

@keyframes bildSprechen {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.m-augen { transform-origin: center; animation: blinzeln 4.6s infinite; }

@keyframes blinzeln {
  0%, 90%, 100% { transform: scaleY(1); }
  93%, 96% { transform: scaleY(0.06); }
}

.m-mund { transform-origin: center; transform: scaleY(0.4); }
svg.spricht .m-mund { animation: sprechen 0.22s ease-in-out infinite alternate; }

@keyframes sprechen {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1.05); }
}

.m-ohr-l { transform-origin: 50% 100%; animation: ohrwackeln 3.6s ease-in-out infinite; }
.m-ohr-r { transform-origin: 50% 100%; animation: ohrwackeln 3.6s ease-in-out infinite 0.4s; }

@keyframes ohrwackeln {
  0%, 78%, 100% { transform: rotate(0); }
  85% { transform: rotate(-8deg); }
  92% { transform: rotate(6deg); }
}

.m-maehne, .m-haar { transform-origin: 50% 20%; animation: wiegen 3.2s ease-in-out infinite alternate; }
.m-flosse { transform-origin: 20% 20%; animation: wiegen 2.2s ease-in-out infinite alternate; }

@keyframes wiegen {
  from { transform: rotate(-2.4deg); }
  to { transform: rotate(2.6deg); }
}

.m-fluegel-l { transform-origin: 100% 60%; animation: flatternL 1.4s ease-in-out infinite alternate; }
.m-fluegel-r { transform-origin: 0% 60%; animation: flatternR 1.4s ease-in-out infinite alternate; }

@keyframes flatternL { from { transform: rotate(-4deg); } to { transform: rotate(16deg); } }
@keyframes flatternR { from { transform: rotate(4deg); } to { transform: rotate(-16deg); } }

.m-funkeln { animation: funkeln 1.7s ease-in-out infinite alternate; }

@keyframes funkeln {
  from { opacity: 0.25; transform: scale(0.75); }
  to { opacity: 1; transform: scale(1.2); }
}

.m-kamm polygon { animation: funkeln 2.6s ease-in-out infinite alternate; animation-delay: 0.3s; opacity: 1; }

/* ---------- Schwebende Hintergrund-Deko (Candy-Feeling) ---------- */

#app { position: relative; z-index: 1; }

.deko { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.deko span {
  position: absolute;
  bottom: -50px;
  opacity: 0.32;
  animation: aufsteigen linear infinite;
}

@keyframes aufsteigen {
  to { transform: translateY(-118vh) rotate(35deg); }
}

/* ---------- Ecken-Begleiter + Spaziergang über den Bildschirm ---------- */

.eck-maskottchen {
  position: fixed;
  left: 6px;
  bottom: 96px;
  z-index: 30;
  background: none;
  border: none;
  cursor: pointer;
  animation: schwebt 2.6s ease-in-out infinite alternate;
}

.spaziergang {
  position: fixed;
  bottom: 92px;
  left: 0;
  z-index: 39;
  pointer-events: none;
  animation: laufen 9s linear forwards;
}

.spaziergang .m-figur { animation: watscheln 0.4s ease-in-out infinite alternate; }

@keyframes laufen {
  from { transform: translateX(-140px); }
  to { transform: translateX(106vw); }
}

@keyframes watscheln {
  from { transform: rotate(-7deg) translateY(0); }
  to { transform: rotate(7deg) translateY(-7px); }
}

/* ---------- Aktions-Ring am Maskottchen (Sprechen / Schreiben / Leckerli) ---------- */

.figur-buehne { position: relative; display: inline-block; }

.aktions-ring {
  position: absolute;
  inset: -46px -70px -10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.aktions-halter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: auto;
  animation: popIn 0.35s ease both;
}

.aktions-halter:nth-child(1), .aktions-halter:nth-child(3) { margin-top: 40px; }
.aktions-halter:nth-child(2) { animation-delay: 0.08s; align-self: flex-start; }
.aktions-halter:nth-child(3) { animation-delay: 0.16s; }

.aktions-halter span {
  font-size: 12px;
  font-weight: 800;
  color: var(--magenta);
  text-shadow: 0 1px 0 #fff;
}

.aktions-knopf {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 26px;
  background: linear-gradient(180deg, #ffffff, #ffe3f1);
  border: 3px solid #ffb1d4;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.8), 0 5px 12px rgba(184, 44, 91, 0.3);
}

.aktions-knopf:active { transform: scale(0.92); }

/* ---------- Übungs-Begleiter (Maskottchen hilft in der Aufgabe) ---------- */

.uebung-begleiter {
  position: absolute;
  left: 10px;
  bottom: 12px;
  z-index: 5;
  background: none;
  border: none;
  cursor: pointer;
  animation: schwebt 2.5s ease-in-out infinite alternate;
}

.begleiter-menu {
  position: absolute;
  left: 12px;
  bottom: 86px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 3px solid #ffd1e8;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow);
  padding: 12px;
  animation: popIn 0.3s ease;
  max-width: 78vw;
}

/* ---------- Leben & Animationen ---------- */

@keyframes schwebt {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-7px) rotate(2.5deg); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes popIn {
  0% { transform: scale(0); }
  70% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@keyframes pulsGlow {
  0%, 100% { box-shadow: var(--shadow); }
  50% { box-shadow: 0 4px 24px rgba(255, 95, 162, 0.55); }
}

@keyframes shimmer {
  from { transform: translateX(-160px); }
  to { transform: translateX(320px); }
}

@keyframes wartetPuls {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes feuerwerkTeil {
  to { transform: translate(var(--dx), var(--dy)) scale(0.3); opacity: 0; }
}

@keyframes feierText {
  0% { transform: translateX(-50%) scale(0) rotate(-8deg); opacity: 0; }
  60% { transform: translateX(-50%) scale(1.3) rotate(3deg); opacity: 1; }
  100% { transform: translateX(-50%) scale(1) rotate(0); }
}

/* Maskottchen lebt: sanftes Dauer-Schweben überall */
.maskottchen-figur,
.sb-maskottchen,
.wahl-emoji {
  display: inline-block;
  animation: schwebt 2.3s ease-in-out infinite alternate;
}

.sb-maskottchen { animation-duration: 2.9s; }
.maskottchen-figur.huepft, .sb-maskottchen.huepft { animation: huepfen 0.7s ease; }

/* Karten schweben gestaffelt herein (Verzögerung via Inline-Style) */
.tag-karte, .erfolg-karte, .belohnung-karte, .picker-karte, .wahl-karte, .sprechblase-zeile {
  animation: fadeInUp 0.4s ease both;
}

/* Wichtige Buttons pulsieren einladend */
.btn-primary, .btn-success { animation: pulsGlow 2.4s ease-in-out infinite; }

/* Wartende Aufgaben wippen, erledigte Haken poppen */
.slot.status-done_pending { animation: wartetPuls 1.5s ease-in-out infinite; }
.slot.status-confirmed .slot-status { display: inline-block; animation: popIn 0.5s ease; }
.heute-badge { animation: popIn 0.6s ease; }

/* Punkte-Chip hüpft, wenn neue Punkte da sind */
.punkte-chip.pop { animation: popIn 0.6s ease; }

/* Fortschrittsbalken glitzern */
.fortschritt-balken { position: relative; }
.fortschritt-balken > div { position: relative; overflow: hidden; }
.fortschritt-balken > div::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 80px;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: shimmer 2s ease-in-out infinite;
}

/* Feuerwerk + Jubel-Schriftzug */
.feuerwerk { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }

.feuerwerk i {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: feuerwerkTeil 0.95s ease-out both;
}

.feier-text {
  position: fixed;
  top: 36%;
  left: 50%;
  z-index: 101;
  pointer-events: none;
  font-size: 46px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 0 rgba(120, 40, 90, 0.25), 0 0 28px rgba(255, 95, 162, 0.9);
  animation: feierText 0.7s ease both;
}

.jubel .sterne span { display: inline-block; animation: popIn 0.5s ease both; }

/* Konfetti */
.konfetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }

.konfetti span {
  position: absolute;
  top: -40px;
  animation: fallen linear forwards;
}

@keyframes fallen {
  to { transform: translateY(110vh) rotate(340deg); opacity: 0.7; }
}

/* Kein-Zugang-Screen */
.kein-zugang {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  gap: 12px;
}

.kein-zugang .gross { font-size: 80px; }

/* ============ ELTERNBEREICH ============ */

.parent { font-size: 16px; background: #f4f6fb; }

.parent .wrap { max-width: 640px; margin: 0 auto; padding: 16px 14px 90px; }

.parent h1 { font-size: 22px; display: flex; align-items: center; gap: 8px; }
.parent h2 { font-size: 17px; color: var(--ink-soft); margin: 18px 0 8px; }

.parent .karte {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(45, 53, 80, 0.08);
  padding: 14px;
  margin-bottom: 10px;
}

.parent .zeile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.parent .zeile .z-icon { font-size: 28px; }
.parent .zeile .z-text { flex: 1; min-width: 0; }
.parent .zeile .z-titel { font-weight: 700; }
.parent .zeile .z-sub { color: var(--ink-soft); font-size: 13px; }

.parent .btn { font-size: 15px; padding: 10px 16px; min-height: 44px; box-shadow: none; }
.parent .btn-klein { font-size: 14px; padding: 8px 14px; min-height: 40px; }

.parent-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e3e7f0;
  display: flex;
  justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}

.parent-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 22px;
  color: var(--ink-soft);
  padding: 4px 10px;
  border-radius: 10px;
}

.parent-nav button span { font-size: 11px; font-weight: 600; }
.parent-nav button.aktiv { color: var(--accent); }

.parent input, .parent select {
  font-family: inherit;
  font-size: 16px;
  border: 2px solid #dfe4f0;
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}

.parent label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }

.pin-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.pin-screen input {
  font-size: 30px;
  text-align: center;
  letter-spacing: 12px;
  max-width: 240px;
  border: 2px solid #dfe4f0;
  border-radius: 14px;
  padding: 12px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  margin-top: 6px;
}

.emoji-grid button {
  font-size: 24px;
  padding: 6px;
  border-radius: 8px;
  border: 2px solid transparent;
}

.emoji-grid button.gewaehlt { border-color: var(--accent); background: #f0ecff; }

.fehler-text { color: var(--danger); font-weight: 600; }
.ok-text { color: var(--success); font-weight: 600; }

.badge {
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 8px;
  vertical-align: top;
}

@media (min-width: 720px) {
  .kid { font-size: 19px; }
  .slots { gap: 14px; }
}
