/* KidsLearningPro — Üben, Spiele, Lernhelfer, Profil, Anmeldung */

/* ---------- Aufgabe ---------- */
.fortschritt-kopf { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.fortschritt-kopf .balken { flex: 1; height: 14px; }
.aufgabe { max-width: 860px; }
.frage-zeile { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.frage { flex: 1; font-family: var(--schrift-titel); font-size: 1.35rem; font-weight: 600; line-height: 1.35; }

/* Antworten in Farbe UND Form — wie Kahoot: man erkennt sie auch ohne Farbsinn */
.antworten { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.antwort {
    display: flex; align-items: center; gap: 14px; min-height: calc(var(--ziel) + 16px); padding: 12px 18px;
    border: 0; border-radius: var(--radius); text-align: left; cursor: pointer; color: #fff; font-weight: 600;
    background: var(--farbe); box-shadow: 0 4px 0 color-mix(in srgb, var(--farbe) 70%, #000);
    transition: transform var(--bewegung), box-shadow var(--bewegung), opacity var(--bewegung);
}
.antwort:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--farbe) 70%, #000); }
.antwort .form { flex: none; width: 34px; height: 34px; display: grid; place-items: center; font-size: 1.4rem; }
.antwort.gewaehlt { outline: 4px solid var(--tinte); outline-offset: 3px; }
.antwort.gesperrt { cursor: default; opacity: .45; }
.antwort.richtig { opacity: 1; box-shadow: 0 0 0 5px var(--gut); animation: hops 450ms ease-out; }
.antwort.falsch { opacity: 1; animation: wackeln 420ms ease-in-out; }
/* Die Farbe hängt am Platz in der Reihe — mit 🔊 steckt die Antwort in einem .antwort-platz (D-042) */
.antworten > :nth-child(1) { --farbe: var(--antwort-1); }
.antworten > :nth-child(2) { --farbe: var(--antwort-2); }
.antworten > :nth-child(3) { --farbe: var(--antwort-3); }
.antworten > :nth-child(4) { --farbe: var(--antwort-4); }
.antworten > :nth-child(5) { --farbe: var(--antwort-5); }
/* 🔊 an jeder Antwort: Nachbar des Antwortknopfs, liegt über seinem rechten Rand */
.antwort-platz { position: relative; display: grid; }
.antwort-platz .antwort { padding-right: calc(var(--ziel) + 24px); }
.knopf.knopf-rund.antwort-ton { position: absolute; right: 12px; top: calc(50% - var(--ziel) / 2); }
.antwort .wird-gelesen { color: #2B2410; }      /* weiße Schrift auf dem hellen Gold wäre unlesbar */
.wahr-falsch { grid-template-columns: 1fr 1fr; }
.wahr-falsch .antwort { justify-content: center; font-size: 1.3rem; min-height: 96px; }
.wahr-falsch .antwort:nth-child(1) { --farbe: var(--antwort-4); }
.wahr-falsch .antwort:nth-child(2) { --farbe: var(--antwort-1); }
.eingabe {
    width: 100%; min-height: 96px; padding: 14px; font-size: 1.15rem; border-radius: var(--radius);
    border: 2px solid var(--rand); background: var(--flaeche); resize: vertical;
}
.eingabe:focus { outline: none; border-color: var(--akzent); }

.rueckmeldung {
    display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; padding: 16px 18px;
    border-radius: var(--radius); animation: einblenden-oben 260ms ease-out;
}
.rueckmeldung.gut { background: var(--gut-hell); }
.rueckmeldung.falsch { background: var(--falsch-hell); }
.rueckmeldung .gross { font-size: 2rem; line-height: 1; }
.rueckmeldung strong { display: block; font-family: var(--schrift-titel); font-size: 1.15rem; }
.rueck-text { flex: 1; }
.rueck-text p + p { margin-top: 6px; }
.rueck-seite { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.punkte-flug { color: var(--gold); font-weight: 800; animation: aufsteigen 900ms ease-out both; display: inline-block; }
.aufgabe-fuss { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.aufgabe-fuss .rechts { margin-left: auto; }

@keyframes hops { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes wackeln { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes aufsteigen { from { transform: translateY(8px); opacity: 0; } 30% { opacity: 1; }
                        to { transform: translateY(-6px); opacity: 1; } }
@keyframes einblenden-oben { from { transform: translateY(-6px); opacity: 0; } }

.ergebnis { text-align: center; padding: 32px 16px; }
.ergebnis .sterne { font-size: 2.6rem; letter-spacing: 6px; margin-bottom: 8px; }
.ergebnis .stern-aus { opacity: .25; }
.note-kreis {
    width: 132px; height: 132px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
    color: #fff; background: var(--note, var(--akzent)); font-family: var(--schrift-titel);
}
.note-kreis b { font-size: 2.8rem; line-height: 1; }

/* ---------- Spiele (übernommen aus der alten Oberfläche, neu gefärbt) ---------- */
.memory-raster { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
/* Karte und Innenteil als Block (12.10.): Die Karte ist ein Knopf (grauer Grund des Systems), der Innenteil ein span —
   inline greifen Höhe, Breite und Drehung nicht, die Vorderseite schrumpfte auf einen Punkt */
.memory-karte { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: none; font: inherit;
                color: inherit; cursor: pointer; perspective: 700px; }
.memory-innen { display: block; position: relative; width: 100%; height: 100%; transition: transform .35s;
                transform-style: preserve-3d; }
.memory-karte.offen .memory-innen { transform: rotateY(180deg); }
.memory-vorne, .memory-hinten {
    position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center;
    border-radius: var(--radius-klein); backface-visibility: hidden; font-weight: 600;
}
.memory-vorne { background: var(--akzent); color: #fff; font-size: 1.8rem; }
.memory-hinten { background: var(--flaeche); border: 2px solid var(--rand); transform: rotateY(180deg); font-size: .9rem; }
.memory-karte.paar .memory-hinten { border-color: var(--gut); background: var(--gut-hell); }
/* Bild-Memory (#59 A): Zeichnungen und Themenbilder auf hellem Grund — wie eine Spielkarte, auch in der Nachtwelt */
.memory-hinten { overflow-wrap: anywhere; hyphens: auto; line-height: 1.25; }
.memory-hinten.mit-bild { padding: 6px; background: #fff; }
.memory-hinten.mit-bild img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.spiel-stand { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-weight: 700; }
.spiel-punkte { color: var(--gold); }
.mathe-aufgabe { font-family: var(--schrift-titel); font-size: 3rem; font-weight: 700; text-align: center;
                 margin: 12px 0; font-variant-numeric: tabular-nums; }
.mathe-eingabe { font-size: 2rem; text-align: center; font-weight: 700; }
.vokabel-karte { text-align: center; min-height: 220px; display: flex; flex-direction: column;
                 justify-content: center; gap: 8px; cursor: pointer; }
.vokabel-karte .wort { font-family: var(--schrift-titel); font-size: 2.2rem; font-weight: 700; }
/* 🔊 in den Spielen (D-042): Nachbar der Karte, liegt über ihrer Ecke — ein Knopf im Knopf wäre ungültig */
.vokabel-platz, .memory-platz { position: relative; }
.knopf.knopf-rund.vokabel-ton { position: absolute; top: 12px; right: 12px; }
.knopf.knopf-rund.memory-ton { position: absolute; right: 4px; bottom: 4px; z-index: 1; }
/* Auf dem Handy ist eine Karte kaum 75 px breit: dort steht 🔊 unter der Karte, sonst deckte er die Schrift zu */
@media (max-width: 700px) {
    .memory-platz { display: grid; justify-items: center; gap: 4px; }
    .knopf.knopf-rund.memory-ton { position: static; width: 36px; height: 36px; min-height: 0; font-size: .95rem; }
}
.memory-platz:not(.offen) .memory-ton { visibility: hidden; }     /* eine verdeckte Karte verrät nichts */
.mathe-zeile { display: flex; align-items: center; justify-content: center; gap: 14px; }

/* ---------- Lernhelfer (Chat) ---------- */
.chat-rahmen { display: grid; grid-template-columns: 260px 1fr; gap: 16px; height: calc(100vh - 160px); min-height: 420px; }
.chat-liste { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.chat-eintrag { padding: 12px 14px; border-radius: var(--radius-klein); cursor: pointer; background: var(--flaeche);
                border: 1px solid var(--rand); font-size: .92rem; }
.chat-eintrag.aktiv { border-color: var(--akzent); background: var(--akzent-hell); }
.chat-haupt { display: flex; flex-direction: column; background: var(--flaeche); border-radius: var(--radius);
              border: 1px solid var(--rand); overflow: hidden; }
.chat-verlauf { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.blase { max-width: 78%; padding: 12px 16px; border-radius: 18px; line-height: 1.5; white-space: pre-wrap; }
.blase.ich { align-self: flex-end; background: var(--akzent); color: #fff; border-bottom-right-radius: 6px; }
.blase.hilfe { align-self: flex-start; background: var(--flaeche-tief); border-bottom-left-radius: 6px;
               display: flex; gap: 10px; align-items: flex-start; }
.blase.hilfe .knopf-rund { width: 40px; height: 40px; font-size: 1.05rem; }
.blase.fehler { color: var(--falsch); }
.chat-eingabe { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--rand); }
.chat-eingabe textarea { flex: 1; resize: none; min-height: var(--ziel); }
.tippt { display: flex; gap: 6px; padding: 6px 2px; }
.tippt i { width: 9px; height: 9px; border-radius: 50%; background: var(--tinte-leise); animation: tippen .8s infinite alternate; }
.tippt i:nth-child(2) { animation-delay: .2s; }
.tippt i:nth-child(3) { animation-delay: .4s; }
@keyframes tippen { to { transform: translateY(-6px); opacity: .4; } }
@media (max-width: 760px) { .chat-rahmen { grid-template-columns: 1fr; height: auto; } .chat-liste { max-height: 160px; } }

/* ---------- Ich: Profil, Welten, Abzeichen, Bestenliste ---------- */
.ich-kopf { display: flex; align-items: center; gap: 20px; }
.kreis-bild { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex: none;
              background: var(--akzent); color: #fff; font-family: var(--schrift-titel); font-size: 2.2rem; font-weight: 700; }
.welt-wahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.welt-karte { border: 3px solid var(--rand); border-radius: var(--radius); padding: 14px; cursor: pointer;
              background: var(--flaeche); text-align: left; display: flex; flex-direction: column; gap: 8px; }
.welt-karte.aktiv { border-color: var(--akzent); box-shadow: 0 0 0 4px var(--akzent-hell); }
.welt-karte .muster { height: 56px; border-radius: var(--radius-klein); display: flex; gap: 6px; padding: 8px; }
.welt-karte .muster span { flex: 1; border-radius: 8px; }
.abzeichen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.abzeichen { text-align: center; padding: 12px 8px; border-radius: var(--radius-klein); background: var(--flaeche-tief);
             opacity: .45; font-size: .82rem; font-weight: 600; }
.abzeichen.verdient { opacity: 1; background: var(--gold-hell); }
.abzeichen .gross { font-size: 2rem; display: block; }
.bestenliste { list-style: none; margin: 0; padding: 0; }
.bestenliste li { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--rand); }
.bestenliste .rang { width: 36px; text-align: center; font-size: 1.3rem; font-weight: 700; }
.bestenliste .wer { flex: 1; font-weight: 600; }

/* ---------- Anmeldung ---------- */
.anmelde-seite { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.anmelde-karte { width: min(460px, 100%); }
.anmelde-marke { font-family: var(--schrift-titel); font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 4px; }
.anmelde-karte .unter { text-align: center; color: var(--tinte-leise); margin-bottom: 20px; }

/* Bilder zu Aufgaben und Erklärseiten (D-018). Die Zeichnungen haben immer hellen Grund — auch in der dunklen
   Welt bleibt der Rahmen hell, sonst verschwinden schwarze Linien. */
.lernbild { margin: 4px 0 22px; display: grid; justify-items: center; gap: 6px; }
.lernbild img { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; background: #fff;
                border-radius: var(--radius-klein); border: 1px solid var(--rand); }
.komisch { justify-self: end; border: 0; background: transparent; color: var(--tinte-leise); font: inherit;
           font-size: .85rem; min-height: 40px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.komisch:hover, .komisch:focus-visible { background: var(--akzent-hell); color: var(--tinte); }
.komisch:disabled { cursor: default; opacity: 1; }

/* Klassenarbeit (N04): die Uhr wird in den letzten fünf Minuten auffällig */
.chip.knapp { color: var(--falsch); font-weight: 700; }
