/* Momo Web – Gestaltung: warmes Papier, eine Aktionsfarbe, Kindfarben nur dort, wo sie Bedeutung tragen,
   große Knöpfe für Kinderhände. Der Elternbereich ist bewusst schlicht (Wireframe E4). */
:root {
  --papier: #FAF7F2;
  --flaeche: #FFFFFF;
  --tinte: #242421;
  --linie: #8A8A82;
  --aktion: #2E7D6B;
  --aktion-weich: #DCEFE9;
  --gefahr: #C0392B;
  --grau: #6D6D72;
  --trenner: #E5E5EA;
  --radius: 24px;
  --schatten: 0 6px 18px rgba(40, 35, 25, 0.10);
  --schrift: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Nunito", sans-serif;
  --emoji: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  --oben: env(safe-area-inset-top, 0px);
  --rechts: env(safe-area-inset-right, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
  --links: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
#app { height: 100%; }
button, input, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
/* Schnelles Doppeltippen (Kinder!) soll am Handy nicht hineinzoomen; Zoomen mit zwei Fingern bleibt möglich */
button, label, input, select, [role="button"] { touch-action: manipulation; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid rgba(46, 125, 107, 0.55); outline-offset: 2px; }
.nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sicher-sonde { position: fixed; top: 0; left: 0; visibility: hidden; pointer-events: none;
  padding: var(--oben) var(--rechts) var(--unten) var(--links); }

/* ------------------------------------------------------------------ Bildschirme */
.bildschirm { display: none; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.bildschirm.aktiv { display: flex; flex-direction: column; }
.kindansicht {
  gap: 16px; user-select: none; -webkit-user-select: none;
  padding: calc(16px + var(--oben)) calc(16px + var(--rechts)) calc(16px + var(--unten)) calc(16px + var(--links));
}
/* Der Kopf steht in derselben Spalte wie der Inhalt (auf dem Tablet nicht am linken Rand). Rechts bleibt Platz für
   die Elternecke; Text darf ein Stück hineinragen, Knöpfe stehen dort keine. */
.kopf { display: flex; align-items: center; gap: 12px; min-height: 56px; width: 100%; max-width: 900px; margin: 0 auto; padding-right: 56px; flex: none; }
.kopf h1 { margin: 0; font-size: clamp(22px, 4.2vw, 30px); font-weight: 800; }
.kopf-momo { width: 84px; height: 84px; flex: none; }
.kopf-icon { font-family: var(--emoji); font-size: 30px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.rund {
  width: 48px; height: 48px; border-radius: 50%; border: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center; background: var(--flaeche); box-shadow: var(--schatten);
}
.rund.leise { background: transparent; box-shadow: none; font-size: 34px; line-height: 1; color: var(--tinte); }
.kind-inhalt { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 900px; margin: 0 auto; flex: 1; }

/* Kindfarbe rahmt den Bildschirm (F-23); Elternecke oben rechts (SF-02) */
#rahmen { position: fixed; inset: 0; border: 8px solid transparent; pointer-events: none; z-index: 5; }
#elternecke {
  position: fixed; top: 0; right: 0; width: calc(96px + var(--rechts)); height: calc(96px + var(--oben)); z-index: 20;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
@property --p { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.ecken-ring {
  position: absolute; right: 26px; top: calc(26px + var(--oben)); width: 44px; height: 44px; border-radius: 50%; opacity: 0;
  background: conic-gradient(rgba(46, 125, 107, 0.55) var(--p), rgba(46, 125, 107, 0.12) 0);
  -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px);
}
#elternecke.haelt .ecken-ring { animation: halten 2s linear forwards; }
@keyframes halten { 0% { opacity: 0; --p: 0%; } 15% { opacity: 0; --p: 15%; } 30% { opacity: 1; } 100% { opacity: 1; --p: 100%; } }

@keyframes einfliegen { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ Hauptaktion und Kacheln */
.hauptaktion {
  display: flex; align-items: center; justify-content: center; width: 100%; max-width: 440px; min-height: 88px; align-self: center; flex: none;
  border: 3px solid var(--aktion); border-radius: 25px; background: var(--aktion-weich); color: var(--aktion);
}
.hauptaktion.klein { min-height: 64px; border-radius: 18px; }
.hauptaktion.nacht { background: #2F3F44; color: #8FD3BE; border-color: #4F9C86; }
.hauptaktion.unten { margin-top: auto; }
.hauptaktion:active:not(:disabled) { transform: scale(0.97); }
.hauptaktion:disabled { opacity: 0.4; }
.symbol { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.symbol .voll { fill: currentColor; stroke: none; }
.hauptaktion.klein .symbol { width: 34px; height: 34px; }

.kachel {
  --farbe: var(--tinte); --flaeche: var(--flaeche);
  display: flex; align-items: center; gap: 16px; width: 100%; height: var(--h, 96px); padding: 0 16px 0 18px; flex: none;
  border: 2px solid var(--farbe); border-radius: var(--radius); background: var(--flaeche); color: var(--farbe); text-align: left;
  animation: einfliegen 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.kachel.gestrichelt { border-style: dashed; }
.kachel.nacht { background: #3D3B4F; color: #EBE6D9; }
.kachel:disabled { opacity: 0.45; }
.kachel:active:not(:disabled) { transform: scale(0.97); }
.kachel-icon {
  width: calc(var(--h, 96px) * 0.56); height: calc(var(--h, 96px) * 0.56); flex: none; border: 2px solid currentColor; border-radius: 30%;
  display: flex; align-items: center; justify-content: center; font-family: var(--emoji); font-size: calc(var(--h, 96px) * 0.32);
}
.kachel-icon canvas { width: 100%; height: 100%; }
.kachel-text { display: flex; flex-direction: column; min-width: 0; }
.kachel-titel { font-size: calc(var(--h, 96px) * 0.26); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kachel-unter { font-size: 13px; opacity: 0.65; }
.kachel-unter.symbole { font-family: var(--emoji); font-size: 15px; opacity: 1; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Kinder: Kachel in Kindfarbe mit Avatar, Name, eigenem Momo und Stern-Abzeichen */
.kinder-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.kindkachel-huelle { position: relative; animation: einfliegen 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.kindkachel-huelle.mit-badge { padding-top: 12px; }  /* Platz für das Stern-Abzeichen, das über die Ecke ragt */
.kindkachel {
  display: flex; align-items: center; gap: 14px; width: 100%; height: var(--h, 110px); padding: 0 12px 0 16px;
  border: 3px solid var(--kf); border-radius: var(--radius); background: var(--kfl); text-align: left;
}
.kindkachel:active { transform: scale(0.97); }
.avatar {
  width: 52px; height: 52px; flex: none; border-radius: 50%; border: 3px solid var(--kf, var(--linie)); background: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--emoji); font-size: 27px; line-height: 1;
}
.kindkachel .avatar { width: calc(var(--h, 110px) * 0.52); height: calc(var(--h, 110px) * 0.52); font-size: calc(var(--h, 110px) * 0.27); }
.avatar.gross { width: 76px; height: 76px; font-size: 40px; }
.kindkachel-name { flex: 1; min-width: 0; font-size: min(30px, calc(var(--h, 110px) * 0.27)); font-weight: 700; color: var(--tinte);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kindkachel-momo { width: calc(var(--h, 110px) * 0.85); height: calc(var(--h, 110px) - 10px); flex: none; }
.haekchen {
  width: calc(var(--h, 110px) * 0.42); height: calc(var(--h, 110px) * 0.42); flex: none; border-radius: 50%;
  border: 3px solid rgba(138, 138, 130, 0.6); display: flex; align-items: center; justify-content: center;
}
.haekchen.an { background: var(--aktion); border-color: var(--aktion); color: #FFFFFF; }
.haekchen .symbol { width: 60%; height: 60%; }
.badge-knopf { position: absolute; top: 0; right: -8px; width: 40px; height: 40px; padding: 0; border: 0; background: none; border-radius: 50%; }
.badge-knopf canvas { width: 40px; height: 40px; display: block; }

.chip {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px 0 4px; border-radius: 24px;
  border: 2px solid var(--kf); background: var(--kfl); font-size: 18px; font-weight: 700; max-width: 100%;
}
.chip .avatar { width: 40px; height: 40px; font-size: 21px; border-width: 2px; }
.chip.klein { height: 40px; font-size: 16px; }
.chip.klein .avatar { width: 32px; height: 32px; font-size: 17px; }

.momo-gruss { width: 150px; height: 150px; align-self: center; flex: none; }
.routinen-liste { display: grid; gap: 14px; }
.routinen-liste.kompakt { gap: 10px; }
.hinweis-flaeche { flex: 1; min-height: 240px; border: 0; background: none; padding: 0; display: flex; }
.hinweis-flaeche.klein { min-height: 140px; }
.hinweis-flaeche canvas { width: 100%; height: 100%; min-height: inherit; }

/* K2b: Einzelne Aufgabe wählen – ein Raster aus Kacheln mit Symbol, Titel und Dauer */
.kopf h1.aufgaben-titel { font-size: clamp(18px, 4.4vw, 26px); }
.aufgaben-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: 12px; }
.aufgabe-kachel {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 116px; padding: 12px 6px;
  border: 2px solid var(--tinte); border-radius: var(--radius); background: var(--flaeche); color: var(--tinte);
  animation: einfliegen 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.aufgabe-kachel:active { transform: scale(0.97); }
.aufgabe-kachel-icon { font-family: var(--emoji); font-size: 42px; line-height: 1.1; }
.aufgabe-kachel-titel { max-width: 100%; font-size: 17px; font-weight: 800; line-height: 1.15; text-align: center; overflow-wrap: anywhere; hyphens: auto; }
.aufgabe-kachel-dauer { font-size: 13px; color: var(--grau); }
.aufgaben-mehr { margin: 8px 0 -4px 4px; font-size: 13px; font-weight: 700; color: var(--grau); text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 420px) { .kopf h1.aufgaben-titel { display: none; } }
.aufgabe-kachel.gewaehlt { border-color: var(--aktion); background: var(--aktion-weich); color: var(--aktion); }
/* Zu zweit nebeneinander: die Aufgaben eines Kindes als kleines Raster in seiner Hälfte; die erste Kachel führt zurück
   zu den Routinen. Ohne Einflug, weil das Raster bei jeder Wahl neu aufgebaut wird. */
.aufgaben-raster.kompakt { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.aufgaben-raster.kompakt .aufgabe-kachel { min-height: 82px; padding: 8px 4px; gap: 2px; border-radius: 16px; animation: none; }
.aufgaben-raster.kompakt .aufgabe-kachel-icon { font-size: 28px; }
.aufgaben-raster.kompakt .aufgabe-kachel-titel { font-size: 13px; }
.aufgaben-raster.kompakt .aufgabe-kachel-dauer { font-size: 11px; }
.aufgabe-kachel.zurueck-kachel { border-style: dashed; border-color: var(--linie); background: transparent; color: var(--grau); }
.aufgabe-kachel.zurueck-kachel .aufgabe-kachel-icon { font-family: var(--schrift); font-weight: 700; line-height: 1; }

/* K1b: Modus */
.modus-liste { display: flex; flex-direction: column; justify-content: center; gap: 24px; flex: 1; width: 100%; max-width: 640px; margin: 0 auto; }
.modus-kachel {
  display: flex; flex-direction: column; height: 210px; border: 2px solid var(--tinte); border-radius: var(--radius); background: #FFFFFF;
  padding: 0; overflow: hidden; animation: einfliegen 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.modus-kachel:active { transform: scale(0.97); }
.modus-bild { width: 100%; flex: 1; min-height: 0; }
.modus-titel { font-size: 26px; font-weight: 700; padding-bottom: 18px; }

/* K2 nebeneinander: eine Hälfte pro Kind */
.haelften { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.haelfte {
  flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 12px; min-height: 0; overflow-y: auto;
  border: 4px solid var(--kf); border-radius: 20px; background: var(--kfl);
}
@media (orientation: landscape) { .haelften { flex-direction: row; } }

/* K6: Belohnung */
.kind-inhalt.belohnung { min-height: 380px; }
.belohnung-bild { width: 100%; flex: 1; min-height: 380px; }

/* ------------------------------------------------------------------ Lernspiele: Menü, Aufgabe, Antworten */
.spiel-figur { width: 100%; height: clamp(120px, 29vh, 270px); flex: none; display: block; }
.spiel-frage-shirt .symbol { width: 52px; height: 52px; color: #6D6D72; stroke-width: 1.8; }
.spiel-frage-shirt.gefuellt .symbol path { fill: var(--f); }
.spiel-menue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.spiel-kachel {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 140px; padding: 14px 8px;
  border: 2px solid var(--tinte); border-radius: var(--radius); background: var(--flaeche); color: var(--tinte);
  animation: einfliegen 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.spiel-kachel:active { transform: scale(0.97); }
.spiel-kachel-icon { font-family: var(--emoji); font-size: 48px; line-height: 1.1; }
.spiel-kachel-titel { font-size: 22px; font-weight: 800; }
.spiel-kachel-stufe, .spiel-stufen .segment { color: #D49B00; letter-spacing: 2px; }
.spiel-kachel-stufe { font-size: 16px; }
.kopf h1.spiel-titel { font-size: clamp(20px, 4.5vw, 28px); }
.spiel-stufen { width: 100%; max-width: 360px; align-self: center; flex: none; }
.spiel-stufen .segment { font-size: 18px; min-height: 42px; }
.spiel-stufen .segment[aria-checked="true"] { color: #FFE27A; }
.spiel-buehne { display: grid; gap: 12px; grid-template-areas: "fortschritt" "figur" "karte" "antworten"; align-content: start; flex: 1; }
.spiel-fortschritt { grid-area: fortschritt; display: flex; justify-content: center; gap: 8px; }
.spiel-stern { font-size: 26px; line-height: 1; color: rgba(36, 36, 33, 0.14); transition: transform 0.2s; }
.spiel-stern.jetzt { color: rgba(36, 36, 33, 0.32); transform: scale(1.18); }
.spiel-stern.gold { color: #F2BF26; }
.spiel-stern.silber { color: #C3C8CF; }
.spiel-buehne .spiel-figur { grid-area: figur; }
.spiel-karte {
  grid-area: karte; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 120px;
  padding: 14px; border-radius: 20px; background: var(--flaeche); box-shadow: var(--schatten); text-align: center;
}
.spiel-frage { margin: 0; font-size: 18px; font-weight: 700; color: rgba(36, 36, 33, 0.75); }
.spiel-frage-icon { font-family: var(--emoji); font-size: 40px; line-height: 1; }
.spiel-dinge { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.spiel-reihe { display: flex; gap: 4px; }
.spiel-ding { position: relative; font-family: var(--emoji); font-size: clamp(22px, 6.4vw, 34px); line-height: 1.2; }
.spiel-ding.weg { opacity: 0.35; }
.spiel-ding.weg::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 3px solid var(--gefahr); transform: rotate(-35deg);
}
.spiel-rechnung { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.spiel-zeichen { font-size: 34px; font-weight: 900; }
.spiel-gleichung { margin: 0; font-size: clamp(30px, 8vw, 44px); font-weight: 900; letter-spacing: 1px; }
.spiel-luecke { display: inline-block; min-width: 1.2em; padding: 0 6px; border-bottom: 4px solid var(--aktion); color: var(--aktion); }
.spiel-bild { font-family: var(--emoji); font-size: clamp(56px, 16vw, 84px); line-height: 1.05; }
.spiel-wort { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.spiel-buchstabe {
  display: inline-flex; align-items: center; justify-content: center; width: clamp(28px, 8.5vw, 42px); height: clamp(40px, 11vw, 52px);
  border-radius: 10px; background: #F2EFE8; font-size: clamp(22px, 6.5vw, 32px); font-weight: 900;
}
.spiel-buchstabe.luecke { background: #FFFFFF; border: 3px dashed var(--aktion); }
.spiel-buchstabe.gefunden { background: var(--aktion-weich); color: var(--aktion); animation: einfliegen 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.spiel-antworten { grid-area: antworten; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.spiel-antworten.anzahl-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spiel-antwort {
  min-height: clamp(70px, 10.5vh, 96px); padding: 4px; border: 3px solid var(--tinte); border-radius: 22px; background: var(--flaeche); color: var(--tinte);
  font-size: 38px; font-weight: 900; box-shadow: var(--schatten);
}
.spiel-antwort:active:not(:disabled) { transform: scale(0.96); }
.spiel-antwort.farbe { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.spiel-klecks { width: 46px; height: 46px; border-radius: 50%; background: var(--f); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.16); }
.spiel-farbname { font-size: 15px; font-weight: 700; }
.spiel-antwort.richtig { border-color: var(--aktion); background: var(--aktion-weich); color: var(--aktion); transform: scale(1.04); }
.spiel-antwort.falsch { opacity: 0.35; animation: schuetteln 0.4s; }
.spiel-antwort.tipp { border-color: #F2BF26; animation: tipp 1.1s ease-in-out infinite; }
@keyframes tipp { 50% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(242, 191, 38, 0.35); } }
.spiel-geschafft { margin: 0; font-size: 26px; font-weight: 900; }
.spiel-ergebnis { margin: 0; font-size: 16px; color: var(--grau); }
.spiel-antworten.ende { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spiel-antworten.ende .hauptaktion { max-width: none; }
.spiel-antworten.ende.eins { grid-template-columns: minmax(0, 1fr); }
.spiel-antworten.anzahl-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spiel-neu { margin: 0; font-size: 17px; font-weight: 800; color: #6A58C9; animation: einfliegen 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both; }
.spiel-keine { margin: 0; align-self: center; text-align: center; font-size: 15px; font-weight: 700; color: var(--grau); }
.hauptaktion.spiel-menue-knopf.neu, .hauptaktion.spiel-start { background: #EFEBFB; color: #5B4BB8; border-color: #7B6BD1; }

/* Spielzeit im Kopf, Album-Kachel und Schloss im Menü */
.spiel-runden {
  margin-left: auto; padding: 6px 12px; border-radius: 999px; background: #EFEBFB; color: #5B4BB8; font-size: 18px; font-weight: 800;
  white-space: nowrap; font-family: var(--schrift);
}
.spiel-runden.leer { background: #F1F1F3; color: var(--grau); }
.spiel-figur.klein { height: clamp(90px, 18vh, 170px); }
.spiel-menue { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.spiel-kachel { min-height: 118px; padding: 12px 6px; }
.spiel-kachel-icon { font-size: 40px; }
.spiel-kachel-titel { font-size: 18px; line-height: 1.15; text-align: center; }
.spiel-kachel:disabled { opacity: 0.4; }
.spiel-album-kachel {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 2px dashed #7B6BD1; border-radius: var(--radius);
  background: #EFEBFB; color: var(--tinte); text-align: left; flex: none;
}
.spiel-album-kachel:active { transform: scale(0.98); }
.spiel-album-icon { font-family: var(--emoji); font-size: 40px; line-height: 1; }
.spiel-album-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spiel-album-titel { font-size: 20px; font-weight: 800; }
.spiel-album-sterne { font-size: 15px; color: var(--grau); }
.spiel-gesperrt { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: #F1F1F3; flex: none; }
.spiel-gesperrt p { margin: 0; font-size: 16px; font-weight: 600; color: var(--grau); }
.spiel-gesperrt-icon { font-family: var(--emoji); font-size: 28px; }

/* Album: Accessoires mit Fortschrittsbalken bis zum Freischalten */
.spiel-album-stand { margin: 0; text-align: center; font-size: 22px; font-weight: 900; }
.spiel-album-tipp { margin: -6px 0 0; text-align: center; font-size: 15px; color: var(--grau); }
.spiel-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.spiel-album-teil {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 10px;
  border: 2px solid var(--trenner); border-radius: 18px; background: var(--flaeche); box-shadow: var(--schatten);
}
.spiel-album-teil canvas { width: 100%; height: 84px; display: block; }
.spiel-album-teil[aria-checked="true"] { border-color: var(--aktion); background: var(--aktion-weich); }
.spiel-album-teil.zu canvas { opacity: 0.3; filter: grayscale(1); }
.spiel-album-teil.zu .spiel-album-name { color: var(--grau); }
.spiel-album-name { font-size: 14px; font-weight: 700; }
.momo-accessoire.zu canvas { opacity: 0.3; filter: grayscale(1); }
.momo-accessoire.zu span { color: #8A6D00; }
.spiel-album-schloss { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; font-size: 13px; font-weight: 800; color: #8A6D00; }
.balken { display: block; width: 80%; height: 6px; border-radius: 3px; background: #ECE8DF; overflow: hidden; }
.balken > span { display: block; height: 100%; background: #F2BF26; }

/* Karten der neuen Spiele */
.spiel-form { width: 64px; height: 64px; display: block; }
.spiel-form.gross { width: clamp(80px, 22vw, 110px); height: clamp(80px, 22vw, 110px); }
.spiel-antwort.form { display: flex; align-items: center; justify-content: center; }
.spiel-antwort.form .spiel-form { width: min(64px, 80%); height: auto; aspect-ratio: 1; }
.spiel-uhr { width: clamp(130px, 38vw, 190px); height: auto; aspect-ratio: 1; display: block; }
.spiel-antwort.zeit { font-size: clamp(22px, 6vw, 32px); font-variant-numeric: tabular-nums; }
.spiel-antworten.uhr.anzahl-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.spiel-antworten.uhr .spiel-antwort.zeit { padding: 2px; font-size: clamp(18px, 5.4vw, 30px); }
.spiel-antworten.uhr.anzahl-3 .spiel-antwort.zeit { font-size: clamp(22px, 6.5vw, 32px); }
.spiel-mehr-zeichen { font-size: 30px; line-height: 1; }
.spiel-mehr-zeichen.mehr { color: var(--aktion); }
.spiel-mehr-zeichen.weniger { color: var(--gefahr); }
/* Stufe 3 mit „gleich viele“: die beiden Gruppen nebeneinander, „=“ als flache Leiste darunter */
.spiel-antworten.mehr.anzahl-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spiel-antworten.mehr.anzahl-3 .spiel-antwort.gleich { grid-column: 1 / -1; grid-row: 2; min-height: 54px; font-size: 32px; }
.spiel-antwort.gruppe { min-height: 118px; padding: 8px 4px; display: flex; align-items: center; justify-content: center; }
.spiel-antwort.gruppe .spiel-ding { font-size: clamp(16px, 4.6vw, 24px); }
.spiel-antworten.anzahl-2 .spiel-antwort.gruppe .spiel-ding, .spiel-antworten.mehr.anzahl-3 .spiel-antwort.gruppe .spiel-ding { font-size: clamp(18px, 5.4vw, 28px); }
.spiel-antwort.gruppe .spiel-reihe { gap: 2px; }
.spiel-antwort.gleich { font-size: 40px; }
.spiel-muster { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.spiel-muster-ding { font-family: var(--emoji); font-size: clamp(26px, 7.5vw, 40px); line-height: 1.2; }
.spiel-muster.lang { gap: 4px; }
.spiel-muster.lang .spiel-muster-ding { font-size: clamp(20px, 5.8vw, 34px); }
.spiel-muster-ding.luecke {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.4em; height: 1.4em; border: 3px dashed var(--aktion);
  border-radius: 12px; color: var(--aktion); font-family: var(--schrift); font-weight: 900;
}
.spiel-muster-ding.luecke.gefunden { border-style: solid; background: var(--aktion-weich); font-family: var(--emoji); animation: einfliegen 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.spiel-antwort.emoji { font-family: var(--emoji); font-size: 38px; font-weight: 400; }
.spiel-kette { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; }
.spiel-schritt { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 74px; padding: 6px 2px; border-radius: 14px; background: #F2EFE8; }
.spiel-schritt.luecke { background: #FFFFFF; border: 3px dashed var(--aktion); color: var(--aktion); min-height: 72px; justify-content: center; }
.spiel-schritt.luecke.gefunden { border-style: solid; background: var(--aktion-weich); animation: einfliegen 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.spiel-schritt-bild { font-family: var(--emoji); font-size: 32px; line-height: 1.1; }
.spiel-schritt.luecke .spiel-schritt-bild { font-family: var(--schrift); font-weight: 900; }
.spiel-schritt.luecke.gefunden .spiel-schritt-bild { font-family: var(--emoji); font-weight: 400; }
.spiel-schritt-name { font-size: 12px; font-weight: 700; line-height: 1.15; text-align: center; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.spiel-pfeil { font-size: 20px; font-weight: 900; color: var(--grau); }
.spiel-zuerst { font-size: 44px; font-weight: 900; line-height: 1; color: var(--aktion); }
.spiel-antwort.bild { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 700; }
.spiel-option-bild { font-family: var(--emoji); font-size: 34px; line-height: 1.1; }
.spiel-option-name { font-size: 13px; line-height: 1.1; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }

/* Memory: Karten drehen sich um */
.kind-inhalt.spiel.memory .spiel-figur { height: clamp(80px, 15vh, 150px); }
.spiel-karte.memory-hinweis { min-height: 0; padding: 8px 14px; }
.spiel-memory { grid-area: antworten; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.spiel-memory.paare-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.spiel-memory-karte { position: relative; aspect-ratio: 4 / 5; max-height: 130px; padding: 0; border: 0; background: none; perspective: 600px; }
.spiel-memory-vorne, .spiel-memory-hinten {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 16px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform 0.35s ease; box-shadow: var(--schatten);
}
.spiel-memory-hinten { background: var(--kf, #7B6BD1); color: rgba(255, 255, 255, 0.85); font-size: 30px; font-weight: 900; border: 3px solid rgba(0, 0, 0, 0.12); }
.spiel-memory-vorne { background: var(--flaeche); border: 3px solid var(--tinte); font-family: var(--emoji); font-size: clamp(30px, 9vw, 46px); transform: rotateY(180deg); }
.spiel-memory-karte.offen .spiel-memory-vorne { transform: rotateY(0deg); }
.spiel-memory-karte.offen .spiel-memory-hinten { transform: rotateY(-180deg); }
.spiel-memory-karte.gefunden .spiel-memory-vorne { border-color: var(--aktion); background: var(--aktion-weich); }
.spiel-memory-karte.gefunden { animation: tipp 0.6s ease-in-out 1; }

/* Durchlauf: „Spielen“ nach der Routine und der Würfel einer Lernspiel-Aufgabe */
.lauf-knopf.spiel-start { gap: 10px; }

@media (min-width: 560px) {
  .spiel-antworten.anzahl-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .spiel-menue { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .spiel-memory.paare-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* Schmale Handys: Name und Symbol im Kopf reichen; die Stufenwahl bleibt eine Reihe */
@media (max-width: 400px) {
  .kopf h1.spiel-titel { display: none; }
  .spiel-kette { gap: 2px; }
  .spiel-schritt { width: 66px; }
  .spiel-schritt-name { font-size: 11px; }
  .spiel-pfeil { font-size: 14px; }
  .spiel-antworten.anzahl-3 .spiel-option-name { font-size: 11px; }
}
@media (max-width: 360px) {
  .segmente.gleich.spiel-stufen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .segmente.gleich.spiel-stufen .segment:nth-child(3):last-child { grid-column: auto; }
}
/* Niedrige Bildschirme: Figur und Karte kleiner, damit die Antworten ohne Scrollen sichtbar sind */
@media (max-height: 700px) {
  .spiel-figur { height: clamp(96px, 20vh, 160px); }
  .spiel-karte { min-height: 0; padding: 10px; }
  .spiel-bild { font-size: 52px; }
  .spiel-buehne { gap: 10px; }
  .spiel-antworten.anzahl-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .spiel-antworten.anzahl-4 .spiel-klecks { width: 34px; height: 34px; }
  .spiel-antworten.anzahl-4 .spiel-farbname { font-size: 12px; }
  .spiel-antworten.anzahl-4 .spiel-antwort { font-size: 30px; }
  .spiel-uhr { width: 112px; }
  .spiel-antwort.gruppe { min-height: 86px; }
  .spiel-antworten.mehr.anzahl-3 .spiel-antwort.gleich { min-height: 44px; }
  .spiel-karte.memory-hinweis { display: none; }
  .kind-inhalt.spiel.memory .spiel-figur { height: clamp(70px, 14vh, 120px); }
}
/* Niedrige Handys hochkant: Bild-Antworten in zwei Spalten (Namen brauchen Platz), etwas flacher */
@media (max-height: 700px) and (orientation: portrait) {
  .spiel-antworten.anzahl-4.naechstes, .spiel-antworten.anzahl-4.anziehen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spiel-antwort.bild { min-height: 56px; padding: 3px 4px; }
  .spiel-antwort.bild .spiel-option-bild { font-size: 24px; }
  .spiel-schritt-bild { font-size: 26px; }
  .spiel-schritt.luecke { min-height: 60px; }
}
/* Querformat am Handy: Figur links, Aufgabe und Antworten rechts, alles etwas kompakter */
@media (orientation: landscape) and (max-height: 620px) {
  #spiel.kindansicht { gap: 8px; }
  .spiel-buehne { grid-template-columns: minmax(150px, 30%) 1fr; grid-template-areas: "figur fortschritt" "figur karte" "figur antworten"; gap: 8px; }
  .spiel-buehne .spiel-figur { height: 100%; min-height: 150px; }
  .spiel-stufen .segment { min-height: 34px; }
  .spiel-stern { font-size: 20px; }
  .spiel-karte { min-height: 0; padding: 6px 10px; gap: 4px; }
  .spiel-bild { font-size: 42px; }
  .spiel-ding { font-size: 22px; }
  .spiel-gleichung { font-size: 30px; }
  .spiel-buchstabe { width: 30px; height: 38px; font-size: 22px; }
  .spiel-frage-shirt .symbol { width: 36px; height: 36px; }
  .spiel-frage { font-size: 15px; }
  .spiel-antwort { min-height: 56px; font-size: 30px; }
  .spiel-klecks { width: 32px; height: 32px; }
  .spiel-antworten.anzahl-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .spiel-menue { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .spiel-kachel { min-height: 100px; }
  .spiel-form.gross { width: 72px; height: 72px; }
  .spiel-antwort.gruppe { min-height: 84px; }
  .spiel-antworten.mehr.anzahl-3 { grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); }
  .spiel-antworten.mehr.anzahl-3 .spiel-antwort.gleich { grid-column: auto; grid-row: auto; min-height: 84px; }
  .spiel-schritt { width: 64px; padding: 4px 2px; }
  .spiel-schritt-bild { font-size: 26px; }
  .spiel-schritt.luecke { min-height: 56px; }
  .spiel-option-bild { font-size: 26px; }
  .spiel-muster-ding { font-size: 28px; }
  .spiel-memory { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .spiel-memory.paare-3 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .spiel-memory.paare-4 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .spiel-memory-karte { max-height: 76px; }
  .spiel-memory-vorne { font-size: 30px; }
  .spiel-uhr { width: 104px; }
  .spiel-album { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
}

/* ------------------------------------------------------------------ Durchlauf */
.lauf.aktiv { display: block; position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; }
.buehne { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.lauf-knopf { position: absolute; max-width: none; min-height: 0; z-index: 2; transition: opacity 0.2s; }
/* Eltern-Freigabe: Schloss neben blassem Haken, bewusst nicht in der grünen Aktionsfarbe */
.hauptaktion.sperre {
  gap: 14px; background: #F3EFE6; color: #6A6A64; border-color: var(--linie); overflow: hidden;
  touch-action: none; -webkit-touch-callout: none;
}
.hauptaktion.sperre.nacht { background: #35343F; color: #C9C3D6; border-color: #77738A; }
.hauptaktion.sperre .symbol { position: relative; }
.hauptaktion.sperre .symbol + .symbol { opacity: 0.3; }
/* Freigabe durch Halten: Der Knopf füllt sich von links, solange der Finger darauf liegt; beim Loslassen ist er sofort leer */
.hauptaktion.sperre::before {
  content: ""; position: absolute; inset: 0; background: #BFE3D6; transform: scaleX(0); transform-origin: left center;
}
.hauptaktion.sperre.nacht::before { background: #3F6A5E; }
.hauptaktion.sperre.haelt::before { transform: scaleX(1); transition: transform var(--halten, 3s) linear; }
.hauptaktion.sperre.klein { gap: 10px; }
.lauf-knopf.aufploppen { animation: einfliegen 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.lauf-knopf.unter-schleier { opacity: 0.2; pointer-events: none; }
.lauf-knopf.gedimmt { opacity: 0.4; }
.lauf .hauptaktion.klein { border-radius: 18px; }

/* ------------------------------------------------------------------ Dialoge, PIN, Eltern-Gate */
.dialog {
  border: 0; border-radius: 20px; padding: 22px; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  box-shadow: 0 20px 60px rgba(30, 25, 20, 0.3); background: #FFFFFF; color: var(--tinte);
}
.dialog.breit { width: min(560px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(30, 25, 20, 0.4); }
.dialog h2 { margin: 0 0 10px; font-size: 20px; }
.dialog p { margin: 0 0 12px; line-height: 1.4; }
.dialog .karte { background: #F7F7F9; }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.klein { font-size: 13px; color: var(--grau); }

.knopf {
  border: 1px solid #D1D1D6; border-radius: 10px; background: #FFFFFF; padding: 8px 14px; font-size: 15px; min-height: 38px;
}
.knopf:hover:not(:disabled) { background: #F2F8F6; }
.knopf:disabled { color: #C7C7CC; }
.knopf.primaer { background: var(--aktion); border-color: var(--aktion); color: #FFFFFF; font-weight: 600; }
.knopf.primaer:hover:not(:disabled) { background: #276B5C; }
.knopf.primaer:disabled { opacity: 0.45; color: #FFFFFF; }
.knopf.gefahr { background: var(--gefahr); border-color: var(--gefahr); color: #FFFFFF; font-weight: 600; }
.knopf.klein { padding: 4px 10px; font-size: 13px; min-height: 32px; color: var(--tinte); }
.knopf.primaer.klein { color: #FFFFFF; }
.knopf.pfeil { width: 34px; padding: 0; }
.knopf.emoji { font-family: var(--emoji); font-size: 15px; }
.knopf.gross { min-height: 44px; padding: 0 22px; font-size: 16px; }
.flach { border: 0; background: none; color: var(--aktion); font-size: 15px; padding: 6px 4px; }
.knopfzeile { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.knopfzeile.rechts { justify-content: flex-end; }

.dialog.gate { width: min(420px, calc(100vw - 24px)); background: #F4F3EF; }
.gate-kopf { display: flex; align-items: center; justify-content: space-between; }
.gate-kopf h2 { margin: 0; }
.gate-seite { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 0 8px; }
.gate-schloss { font-family: var(--emoji); font-size: 42px; text-align: center; }
.gate-hinweis { font-size: 16px; font-weight: 600; color: #6A6A64; margin: 0; text-align: center; }
.gate-blatt { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.blatt-knopf {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%;
  padding: 12px 14px; border: 1px solid #DCDCD5; border-radius: 12px; background: #FFFFFF; font-size: 15px;
}
.blatt-knopf small { color: var(--grau); padding-left: 26px; }
.blatt-knopf:hover { background: #F0F7F4; }
.blatt-knopf.haupt { color: var(--aktion); font-weight: 600; }
.blatt-knopf.gefahr { color: #B23A3A; }
.auswahl-liste { display: flex; flex-direction: column; gap: 8px; }

.pinpad { display: flex; flex-direction: column; align-items: center; gap: 18px; outline: none; }
.pin-punkte { display: flex; gap: 16px; }
.pin-punkte span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--tinte); }
.pin-punkte span.voll { background: var(--tinte); }
.pin-punkte.fehler { animation: schuetteln 0.4s; }
.pin-punkte.fehler span { border-color: var(--gefahr); }
.pin-punkte.fehler span.voll { background: var(--gefahr); }
@keyframes schuetteln { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-tasten { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px 12px; justify-items: center; }
.pin-taste {
  width: 62px; height: 62px; border-radius: 50%; border: 1.5px solid var(--tinte); background: #FFFFFF; font-size: 26px; font-weight: 500;
}
.pin-taste:active { background: var(--aktion-weich); }
.pinpad.wartet .pin-taste { opacity: 0.35; }

/* ------------------------------------------------------------------ Elternbereich (E1–E8) */
.bildschirm.eltern { background: #F2F2F7; overflow: hidden; }
.eltern-kopf {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; flex: none;
  min-height: calc(52px + var(--oben)); padding: var(--oben) calc(8px + var(--rechts)) 0 calc(8px + var(--links));
  background: #F9F9FB; border-bottom: 1px solid #DADADF;
}
.eltern-kopf h1 { margin: 0; font-size: 17px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
.nav {
  border: 0; background: none; color: var(--aktion); font-size: 16px; padding: 8px; justify-self: start;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav.fett { font-weight: 600; justify-self: end; }
.eltern-inhalt { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.eltern-spalte { max-width: 720px; margin: 0 auto; padding: 8px calc(16px + var(--rechts)) calc(32px + var(--unten)) calc(16px + var(--links)); }
.abschnitt { margin-top: 18px; }
.abschnitt-titel { margin: 0 0 6px; padding-left: 14px; font-size: 12px; font-weight: 500; text-transform: uppercase; color: var(--grau); letter-spacing: 0.02em; }
.karte { background: #FFFFFF; border-radius: 12px; overflow: hidden; }
.karte > * + * { border-top: 1px solid var(--trenner); }
.fuss { margin: 6px 0 0; padding: 0 14px; font-size: 12px; color: var(--grau); line-height: 1.4; }
.zeile {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px;
  border: 0; background: none; text-align: left; font-size: 15px; color: #1C1C1E;
}
.zeile.klickbar { cursor: pointer; }
.zeile.klickbar:hover { background: #F2F8F6; }
.zeile.gefahr { color: var(--gefahr); }
.zeile.aktion { color: var(--aktion); }
.zeile.innen { display: block; padding: 12px 14px; }
.zeile.aus { opacity: 0.45; }
.zeile-icon { width: 30px; flex: none; text-align: center; font-family: var(--emoji); font-size: 20px; }
.zeile-icon.gross { font-size: 24px; }
.zeile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.zeile-text small { font-size: 12px; color: var(--grau); }
.zeile-text strong { font-weight: 600; }
.zeile-wert { color: var(--grau); white-space: nowrap; }
.zeile-icon.gesperrt { position: relative; }
.zeile-icon.gesperrt::after { content: "🔒"; position: absolute; right: -5px; bottom: -6px; font-size: 12px; line-height: 1; }
.zeile-pfeil { color: #C7C7CC; font-size: 22px; line-height: 1; }
.zeile-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
/* Listen mit vielen Knöpfen (Routinen, Aufgaben): Reicht der Platz nicht, rutschen die Knöpfe unter den Text */
.zeile.umbruch { flex-wrap: wrap; }
.zeile.umbruch .zeile-text { flex: 1 1 90px; }
.zeile.umbruch .zeile-knoepfe { margin-left: auto; flex-wrap: nowrap; gap: 8px; }
.zeile.form { cursor: default; }
.form-name { width: 120px; flex: none; }
.zeile.schalter { cursor: pointer; }
.zeile input[type="checkbox"], .vorlage input { width: 22px; height: 22px; accent-color: var(--aktion); flex: none; }
.eingabe {
  width: 100%; padding: 8px 10px; border: 1px solid #D1D1D6; border-radius: 8px; background: #FFFFFF; font-size: 16px; min-height: 38px;
}
.eingabe:focus, .zahl:focus, .auswahl:focus { outline: none; border-color: var(--aktion); }
.zahl { width: 84px; padding: 8px; border: 1px solid #D1D1D6; border-radius: 8px; font-size: 16px; background: #FFFFFF; }
.zahl-huelle { display: inline-flex; align-items: center; gap: 6px; }
.einheit { color: var(--grau); font-size: 14px; }
.dauer { display: inline-flex; gap: 14px; flex-wrap: wrap; }
.auswahl { padding: 8px; border: 1px solid #D1D1D6; border-radius: 8px; font-size: 16px; background: #FFFFFF; }
.badge { font-size: 12px; color: var(--grau); background: #EFEFF4; border-radius: 9px; padding: 2px 8px; }
.mini-schalter { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--grau); }
.mini-schalter input { width: 18px !important; height: 18px !important; }
input[type="range"] { width: 100%; accent-color: var(--aktion); }
.handicap-info { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.handicap-wert { font-size: 16px; }
.tage { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.tag { width: 40px; height: 40px; border-radius: 20px; border: 1px solid #D1D1D6; background: #FFFFFF; font-size: 13px; font-weight: 600; }
.tag[aria-pressed="true"] { background: var(--aktion); border-color: var(--aktion); color: #FFFFFF; }
.segmente { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.segment { border: 1px solid #D1D1D6; background: #FFFFFF; padding: 7px 14px; border-radius: 8px; font-size: 14px; }
.segment[aria-selected="true"], .segment[aria-checked="true"] { background: var(--aktion); border-color: var(--aktion); color: #FFFFFF; }
/* Punkte korrigieren: Richtung und Menge wählen, große Flächen für den Finger */
.segmente.gleich { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); margin-top: 0; }
.wahl-name { display: block; margin-bottom: 8px; }
.segmente.gleich .segment { min-height: 44px; padding: 6px 2px; }
.punkte-wahl { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.schritte { display: flex; justify-content: center; align-items: center; gap: 10px; }
.schritte .zahl { width: 104px; min-height: 48px; text-align: center; font-size: 22px; font-weight: 600; }
.knopf.schritt { width: 48px; min-height: 48px; padding: 0; font-size: 24px; line-height: 1; }
.mengen { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.menge { min-height: 44px; padding: 0; border: 1px solid #D1D1D6; border-radius: 10px; background: #FFFFFF; font-size: 16px; font-weight: 600; }
.menge[aria-pressed="true"] { background: var(--aktion-weich); border-color: var(--aktion); color: var(--aktion); }
.dialog .punkte-wahl + .eingabe { margin-top: 14px; }
.dialog .punkte-vorschau { margin: 14px 0 0; text-align: center; font-size: 15px; }
.punkte-vorschau strong { font-size: 20px; }
.status { color: rgb(var(--s)); background: rgba(var(--s), 0.14); border-radius: 9px; padding: 2px 8px; font-size: 12px; white-space: nowrap; }
.vorschaubild { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.vorschaubild.symbol { display: inline-flex; align-items: center; justify-content: center; background: #EAF4F1; font-family: var(--emoji); }
.balken { display: block; height: 8px; margin-top: 4px; background: #EFEFF4; border-radius: 4px; overflow: hidden; }
.balken span { display: block; height: 100%; background: var(--f); border-radius: 4px; }
.belohnung-zeile { flex-wrap: wrap; }
.belohnung-vorschau { width: 84px; height: 84px; flex: none; }
.belohnung-vorschau .vorschaubild { width: 84px; height: 84px; border-radius: 14px; }
.bild-zeile { display: flex; align-items: center; gap: 14px; margin: 12px 0; }
.bild-knoepfe { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.katalog { max-height: min(50vh, 460px); overflow-y: auto; border: 1px solid #D1D1D6; border-radius: 12px; }
.katalog-eintrag { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: #FFFFFF; text-align: left; font-size: 15px; }
.katalog-eintrag + .katalog-eintrag { border-top: 1px solid var(--trenner); }
.katalog-eintrag:hover { background: #F2F8F6; }
.katalog-eintrag small { color: var(--grau); font-size: 12px; }

/* Auswahlraster: Symbole, Kindfarben, Momo, Animationen, Hintergründe. Jedes Raster füllt seine Zeilen gleichmäßig,
   und jede Markierung liegt innerhalb der eigenen Fläche, damit am Kartenrand nichts abgeschnitten wird. */
.symbol-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.symbol-knopf {
  width: 100%; aspect-ratio: 1; min-height: 46px; border-radius: 12px; border: 3px solid transparent; font-family: var(--emoji); font-size: 23px; line-height: 1; padding: 0;
  background: color-mix(in srgb, var(--wahl) 7%, transparent);
}
.symbol-knopf[aria-checked="true"] { border-color: var(--wahl); background: color-mix(in srgb, var(--wahl) 18%, transparent); }
/* Kindfarben: acht in einer Reihe, auf schmalen Bildschirmen vier und vier. Gewählt: Ring in der eigenen Farbe, heller
   Spalt, kleinere Scheibe mit Haken. */
.farb-auswahl { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px 6px; justify-items: center; }
.farb-knopf { width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; background: none; position: relative; }
.farb-knopf::before {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--f);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); transition: inset 0.15s ease;
}
.farb-knopf[aria-checked="true"] { box-shadow: inset 0 0 0 3px var(--f); }
.farb-knopf[aria-checked="true"]::before { inset: 8px; }
.farb-knopf[aria-checked="true"]::after {
  content: ""; box-sizing: border-box; position: absolute; left: 50%; top: 50%; width: 10px; height: 17px; margin: -10px 0 0 -5px;
  border: solid #FFFFFF; border-width: 0 3px 3px 0; border-radius: 1px; transform: rotate(45deg);
}
@media (max-width: 560px) { .farb-auswahl { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Sehr schmale Handys (um 320 px): Beschriftungen und Felder enger, damit nichts abgeschnitten wird */
@media (max-width: 360px) {
  .form-name { width: 84px; }
  .zahl { width: 72px; }
  .segmente.gleich { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmente.gleich .segment:nth-child(3):last-child { grid-column: 1 / -1; }
  .kindkachel { gap: 8px; padding: 0 10px 0 12px; }
  .kindkachel-momo { width: calc(var(--h, 110px) * 0.62); }
}
.momo-auswahl { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.momo-vorschau { width: 150px; height: 150px; }
.momo-gestalt { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.momo-farben, .momo-accessoires { display: grid; gap: 8px; justify-content: center; width: 100%; }
.momo-figuren { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.momo-figuren .momo-figur { width: min(100px, 31%); height: auto; min-height: 100px; }
.momo-figur span { padding: 0 3px; line-height: 1.15; text-align: center; }
.momo-farben { grid-template-columns: repeat(6, minmax(0, 56px)); }
/* Fellfarben der gewählten Tierfigur: leicht abgesetzt unter den Figuren, mit dem Namen der Farbe */
.figur-fell { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 10px 0 4px; border-radius: 14px;
  background: rgba(36, 36, 33, 0.035); }
.figur-toene { grid-template-columns: repeat(5, minmax(0, 56px)); }
.ton-name { margin: 0; font-size: 13px; color: var(--grau); text-align: center; }
.momo-accessoires { grid-template-columns: repeat(3, minmax(0, 100px)); }
.kachel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.momo-farbe {
  width: 100%; aspect-ratio: 1; min-height: 40px; padding: 0; border-radius: 12px; border: 2px solid transparent;
  background: rgba(36, 36, 33, 0.05); position: relative;
}
.momo-farbe canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.momo-accessoire, .bild-kachel {
  display: flex; flex-direction: column; align-items: center; padding: 0 0 6px; border-radius: 12px; border: 2px solid transparent;
  background: rgba(36, 36, 33, 0.05); font-size: 11px; font-weight: 500; color: var(--tinte);
}
.momo-accessoire { width: 100%; height: 100px; }
.momo-accessoire canvas { width: 100%; height: 74px; }
.bild-kachel { width: 100%; height: 110px; justify-content: space-between; }
.bild-kachel canvas { width: 92px; height: 80px; }
.bild-kachel.hintergrund { height: 88px; }
.bild-kachel.hintergrund canvas { width: 86px; height: 56px; margin-top: 4px; border-radius: 10px; }
.bild-kachel span { padding: 0 3px; line-height: 1.15; text-align: center; }
.momo-farbe[aria-checked="true"], .momo-accessoire[aria-checked="true"], .bild-kachel[aria-checked="true"] {
  border-color: var(--aktion); background: var(--aktion-weich);
}
@media (min-width: 600px) { .momo-accessoires { grid-template-columns: repeat(6, minmax(0, 100px)); } }
@media (max-width: 340px) {
  .momo-farben { grid-template-columns: repeat(3, minmax(0, 56px)); }
  .momo-farben.figur-toene { grid-template-columns: repeat(5, minmax(0, 56px)); gap: 6px; }
}

/* ------------------------------------------------------------------ Ersteinrichtung (K0) */
.bildschirm.einrichtung { background: var(--papier); }
.einrichtung-innen { width: 100%; max-width: 560px; margin: 0 auto; padding: calc(24px + var(--oben)) 20px calc(24px + var(--unten)); }
.einrichtung-seite.mitte { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; min-height: calc(100vh - 48px); }
.einrichtung-seite h1 { margin: 0; font-size: 30px; }
.einrichtung-seite h2 { margin: 0; font-size: 22px; text-align: center; }
.einrichtung-momo { width: 220px; height: 230px; }
.fliesstext { margin: 0; max-width: 440px; font-size: 15px; line-height: 1.45; color: rgba(36, 36, 33, 0.72); }
.einrichtung .hauptaktion { margin-top: 12px; }
.avatar-vorschau { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 10px 0 4px; }
.vorschau-name { font-size: 16px; font-weight: 600; }
.zeile.vorlage { align-items: flex-start; cursor: pointer; }
.zeile.vorlage small { line-height: 1.4; margin-top: 2px; }

/* ------------------------------------------------------------------ Flache Querformate (Handy quer) */
@media (orientation: landscape) and (max-height: 620px) {
  .kopf-momo { width: 64px; height: 64px; }
  .momo-gruss { width: 110px; height: 110px; }
  .modus-liste { flex-direction: row; max-width: 900px; }
  .modus-kachel { flex: 1; height: 190px; }
  .einrichtung-momo { width: 150px; height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .kachel, .kindkachel-huelle, .modus-kachel, .aufgabe-kachel, .lauf-knopf.aufploppen, .spiel-kachel, .spiel-antwort.tipp, .spiel-buchstabe.gefunden,
  .spiel-neu, .spiel-muster-ding.luecke.gefunden, .spiel-schritt.luecke.gefunden, .spiel-memory-karte.gefunden { animation: none; }
  .spiel-memory-vorne, .spiel-memory-hinten { transition: none; }
  .farb-knopf::before { transition: none; }
}
/* Vorschau-Adressen (?demo=…) für Bildschirmfotos: ohne Einflug */
.vorschau .kachel, .vorschau .kindkachel-huelle, .vorschau .modus-kachel, .vorschau .aufgabe-kachel { animation: none; }
