/* KidsLearningPro — Bauteile für alle Welten: Knöpfe, Karten, Kacheln, Wochenziel, Lernpfad */

/* ---------- Knöpfe ---------- */
.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: var(--ziel); padding: 0 22px; border: 0; border-radius: var(--radius-klein);
    background: var(--flaeche-tief); color: var(--tinte); font-weight: 600; text-decoration: none;
    cursor: pointer; transition: transform var(--bewegung), box-shadow var(--bewegung), background var(--bewegung);
}
.knopf:active { transform: translateY(2px); }
.knopf:disabled { opacity: .5; cursor: default; transform: none; }
.knopf-haupt { background: var(--akzent); color: #fff; box-shadow: var(--sockel-akzent, var(--sockel)); }
.knopf-haupt:hover { background: var(--akzent-tief); }
.knopf-gut { background: var(--gut); color: #fff; }
.knopf-leise { background: transparent; color: var(--akzent-tief); }
.knopf-leise:hover { background: var(--akzent-hell); }
.knopf-gross { min-height: calc(var(--ziel) + 12px); padding: 0 32px; font-size: 1.1rem; }
.knopf-voll { width: 100%; }
.knopf.knopf-rund {
    width: var(--ziel); height: var(--ziel); padding: 0; border-radius: 50%; flex: none;
    background: var(--akzent-hell); color: var(--akzent-tief); font-size: calc(var(--ziel) * .42);
}
.knopf.knopf-rund.laeuft { background: var(--akzent); color: #fff; }
.knopf-reihe { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- Karten, Abschnitte ---------- */
.karte {
    background: var(--flaeche); border-radius: var(--radius); padding: 20px 22px;
    box-shadow: var(--schatten); border: 1px solid var(--rand);
}
.abschnitt { margin-top: 32px; }
.abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
                  margin-bottom: 14px; }
.stapel { display: flex; flex-direction: column; gap: 12px; }
.zeile { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.leer { text-align: center; padding: 40px 16px; color: var(--tinte-leise); }
.leer .gross { font-size: 3rem; display: block; margin-bottom: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
    background: var(--flaeche-tief); color: var(--tinte-leise); font-size: .8rem; font-weight: 600;
}

/* ---------- Formulare, Hinweise, Laden ---------- */
.feld-gruppe { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.feld-label { font-weight: 600; font-size: .92rem; }
.feld {
    min-height: var(--ziel); padding: 10px 14px; border-radius: var(--radius-klein);
    border: 2px solid var(--rand); background: var(--flaeche); width: 100%;
}
.feld:focus { outline: none; border-color: var(--akzent); }
.haken { display: flex; align-items: center; gap: 12px; min-height: var(--ziel); cursor: pointer; }
.haken input { width: 24px; height: 24px; accent-color: var(--akzent); }
.hinweis { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--radius-klein);
           background: var(--akzent-hell); margin: 12px 0; }
.hinweis-fehler { background: var(--falsch-hell); color: #8A1C2E; }
.hinweis-gut { background: var(--gut-hell); color: #11603A; }
.laden { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 48px;
         color: var(--tinte-leise); }
.laden::before {
    content: ""; width: 28px; height: 28px; border-radius: 50%;
    border: 3px solid var(--akzent-hell); border-top-color: var(--akzent);
    animation: drehen .8s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

/* ---------- Kacheln: Fächer, Spiele ---------- */
.kachel-raster { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.kachel {
    display: flex; flex-direction: column; gap: 10px; padding: 18px; min-height: 132px;
    border-radius: var(--radius); background: var(--flaeche); border: 1px solid var(--rand);
    box-shadow: var(--schatten); color: var(--tinte); text-decoration: none; cursor: pointer;
    transition: transform var(--bewegung), box-shadow var(--bewegung);
}
.kachel:hover { transform: translateY(-2px); }
.kachel .symbol {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.7rem;
    background: color-mix(in srgb, var(--fach, var(--akzent)) 16%, transparent);
}
.kachel .name { font-family: var(--schrift-titel); font-weight: 650; font-size: 1.05rem; }
.kachel .unter { font-size: .85rem; color: var(--tinte-leise); margin-top: auto; }
.kachel .balken { margin-top: 4px; }

/* ---------- Extra-Training (N23): dasselbe Thema noch einmal, leichter — ganz oben auf der Startseite ---------- */
.abschnitt.extra { margin-bottom: 24px; }          /* danach folgt die Wochen-Karte ohne eigenen Abstand */
.extra-kachel { border: 2px solid color-mix(in srgb, var(--fach, var(--akzent)) 45%, transparent); }
.extra-bild { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-klein); }
.extra-satz { font-size: .92rem; line-height: 1.4; color: var(--tinte); }
.extra-botschaft { margin-bottom: 20px; font-size: 1.05rem; align-items: center; }

/* ---------- Fortschritt: Balken und Ring ---------- */
.balken { height: 10px; border-radius: 999px; background: var(--flaeche-tief); overflow: hidden; }
.balken > span { display: block; height: 100%; border-radius: inherit; background: var(--fach, var(--akzent));
                 transition: width 600ms ease-out; }
.ring { display: block; }
.ring .spur { stroke: var(--flaeche-tief); }
.ring .wert { stroke: var(--ring-farbe, var(--akzent)); transition: stroke-dashoffset 800ms ease-out; }
.ring text { font-family: var(--schrift-titel); font-weight: 700; fill: var(--tinte); }

/* ---------- Wochenziel und Geschwister-Ziel (D-009) ---------- */
.woche { display: grid; grid-template-columns: auto 1fr; gap: 20px 28px; align-items: center; }
.woche-text h2 { margin-bottom: 4px; }
.tage { display: flex; gap: 8px; margin-top: 12px; }
.tag {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    font-size: .75rem; font-weight: 700; background: var(--flaeche-tief); color: var(--tinte-leise);
}
.tag.aktiv { background: var(--gut); color: #fff; }
.tag.heute { box-shadow: 0 0 0 3px var(--akzent); }
.gemeinsam { grid-column: 1 / -1; padding-top: 16px; border-top: 1px dashed var(--rand); }
.gemeinsam .zeile { justify-content: space-between; margin-bottom: 8px; }
.gemeinsam .balken > span { background: linear-gradient(90deg, var(--gold), var(--akzent)); }
.geschafft-stempel { color: var(--gut); font-weight: 700; }
@media (max-width: 560px) { .woche { grid-template-columns: 1fr; justify-items: start; } }

/* ---------- Lernpfad (D-012): Stationen eines Fachs ---------- */
.pfad { list-style: none; margin: 0; padding: 8px 0; position: relative; }
.pfad::before {
    content: ""; position: absolute; top: 24px; bottom: 24px; left: 31px;
    border-left: 4px dotted var(--rand);
}
.station { position: relative; padding: 10px 0; }
.station a { display: flex; align-items: center; gap: 18px; color: inherit; text-decoration: none;
             border-radius: var(--radius); }
.punkt {
    position: relative; z-index: 1; flex: none; width: 66px; height: 66px; border-radius: 50%;
    display: grid; place-items: center; font-family: var(--schrift-titel); font-weight: 700; font-size: 1.2rem;
    background: var(--flaeche); color: var(--tinte-leise); border: 4px solid var(--rand);
    transition: transform var(--bewegung);
}
.station:hover .punkt { transform: scale(1.06); }
.station.begonnen .punkt { border-color: var(--fach, var(--akzent)); color: var(--fach, var(--akzent)); }
.station.fertig .punkt { background: var(--fach, var(--akzent)); border-color: var(--fach, var(--akzent));
                         color: #fff; }
.station-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.station-titel { font-weight: 650; font-size: 1.05rem; }
.station-unter { font-size: .85rem; color: var(--tinte-leise); }
.fach-kopf {
    display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--radius);
    margin-bottom: 20px; background: color-mix(in srgb, var(--fach, var(--akzent)) 14%, var(--flaeche));
}
.fach-kopf .symbol { font-size: 2.4rem; }
.fach-kopf h1 { flex: 1; }

/* ---------- Thema: Lesetext mit Vorlesen (D-010) ---------- */
.lesetext { font-size: calc(var(--text-groesse) * 1.03); max-width: 68ch; }
.lesetext p, .lesetext li { margin: 0 0 .7em; }
.lesetext ul, .lesetext ol { padding-left: 1.3em; margin: 0 0 .7em; }
.lesetext h2, .lesetext h3 { margin: .6em 0 .4em; }
.lese-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.wird-gelesen {
    background: var(--gold-hell); border-radius: 6px; box-shadow: 0 0 0 4px var(--gold-hell);
    transition: background var(--bewegung);
}

/* ---------- Kurze Mitteilung unten (Vorlesen geht nicht, gespeichert …) ---------- */
.mitteilung {
    position: fixed; z-index: 50; left: 50%; bottom: calc(var(--unten) + 16px); transform: translateX(-50%);
    background: var(--tinte); color: var(--grund); padding: 12px 20px; border-radius: 999px;
    box-shadow: var(--schatten); animation: einblenden 200ms ease-out;
}
@media (min-width: 900px) { .mitteilung { bottom: 24px; } }

/* ---------- Störung der Plattform (5xx) — blockiert nichts, geht beim Seitenwechsel weg (Durchsicht O8) ---------- */
#stoerung-hinweis {
    position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(var(--unten) + 12px);
    display: flex; align-items: center; gap: 12px; max-width: 640px; margin: 0 auto; padding: 12px 16px;
    background: var(--flaeche); color: var(--tinte); border: 1px solid var(--rand); border-radius: var(--radius-klein);
    box-shadow: var(--schatten); animation: einblenden 200ms ease-out;
}
#stoerung-hinweis p { margin: 0; flex: 1; font-weight: 600; }
#stoerung-hinweis button {
    min-height: var(--ziel); padding: 0 16px; border: 0; border-radius: var(--radius-klein); font: inherit;
    font-weight: 600; color: #fff; background: var(--akzent); cursor: pointer;
}
@media (min-width: 900px) { #stoerung-hinweis { bottom: 24px; left: calc(var(--rail) + 12px); } }
@keyframes einblenden { from { opacity: 0; transform: translate(-50%, 8px); } }
