:root {
  --tinte: #1c2434; --grau: #5d6678; --linie: #dcd8cf; --papier: #f5f2ec; --karte: #fff;
  --akzent: #0d6b5e; --akzent-hell: #e2f1ee; --warm: #c8791a; --warm-hell: #fbf0dd;
  --gut: #2c8a57; --mittel: #cf9a12; --schwach: #c9483c; --gut-hell: #e6f4ec; --schwach-hell: #fbeae8;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--tinte); background: var(--papier); }
main { max-width: 920px; margin: 0 auto; padding: 24px 20px 60px; }
body.schmal main { max-width: 520px; padding-top: 8vh; }
h1, h2 { font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 2rem; margin: .2em 0 .5em; }
h1 small { font: 400 .95rem system-ui, sans-serif; color: var(--grau); margin-left: .4em; }
h2 { font-size: 1.45rem; margin: 2em 0 .6em; }
h3 { font-size: 1.1rem; margin: 1.6em 0 .5em; }
a { color: var(--akzent); }
small, .klein { font-size: .86rem; color: var(--grau); }
.vorzeile { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--akzent); font-weight: 600; margin: 0; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 20px; background: var(--tinte); color: #fff; }
.logo { font: 700 1.2rem Georgia, serif; color: #fff; text-decoration: none; }
.logo span { font: 400 .95rem system-ui, sans-serif; margin-left: 6px; opacity: .75; }
.top nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: .95rem; }
.top nav a { color: #fff; text-decoration: none; opacity: .9; }
.top nav a:hover { text-decoration: underline; }
.wer { opacity: .6; font-size: .85rem; }
.unten { text-align: center; font-size: .82rem; color: var(--grau); padding: 20px; }
.unten a { color: var(--grau); }

.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px; }
.held { background: linear-gradient(135deg, var(--akzent), #114d63); color: #fff; border-radius: var(--radius); padding: 28px; }
.held .vorzeile { color: #bfe6dc; }
.held h1 { margin-top: .3em; }
.held p { margin-bottom: 0; max-width: 60ch; }
.kartenraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.kartenraster.zwei { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.zettel { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--tinte); padding: 16px; transition: transform .12s, box-shadow .12s; }
.zettel:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(28, 36, 52, .1); }
.zettel .num { font: 700 1.5rem Georgia, serif; color: var(--warm); }
.klausurkarte h3 { margin-top: 0; font: 700 1.3rem Georgia, serif; }

.knopf { display: inline-block; border: 0; border-radius: 999px; padding: 12px 22px; background: var(--akzent); color: #fff; font: 600 1rem system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.knopf:hover { background: #0a574c; }
.knopf.klein { padding: 7px 14px; font-size: .88rem; }
.knopf.hell { background: var(--akzent-hell); color: var(--akzent); }
.knopf.gross { padding: 16px 30px; font-size: 1.1rem; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--akzent); text-decoration: underline; cursor: pointer; }
.link.rot { color: var(--schwach); font-size: .85rem; }
form.inline { display: inline; margin-left: 10px; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; }

.login label { display: block; font-weight: 600; margin: 18px 0; }
.login input { display: block; width: 100%; margin-top: 6px; }
input[type=text], input[type=email], input[type=password], select, textarea { font: inherit; color: inherit; border: 1.5px solid #b9b4a8; border-radius: 8px; padding: 9px 11px; background: #fff; }
textarea { width: 100%; resize: vertical; line-height: 1.5; }
.fehler { background: var(--schwach-hell); color: #8d2a21; padding: 10px 14px; border-radius: 8px; }
.hinweis { background: var(--warm-hell); border-left: 4px solid var(--warm); padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: .95rem; }
.pfad { font-size: .9rem; color: var(--grau); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pfad .knopf { margin-left: auto; }
.scroll { overflow-x: auto; }

/* Klausur */
.klausurkopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.uhr { position: sticky; top: 8px; background: var(--tinte); color: #fff; border-radius: 10px; padding: 8px 14px; text-align: center; line-height: 1.2; }
.uhr b { display: block; font: 700 1.4rem ui-monospace, Consolas, monospace; }
.uhr span { font-size: .72rem; opacity: .75; }
.uhr.knapp { background: var(--warm); } .uhr.vorbei { background: var(--schwach); }
h2.teil { background: var(--tinte); color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 1.2rem; margin-top: 2.4em; }
h3.abschnitt { text-decoration: underline; text-underline-offset: 4px; margin-top: 1.8em; }
.aufgabe { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); margin: 16px 0; overflow: hidden; scroll-margin-top: 12px; }
.aufgabe > header { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--linie); background: #fbfaf7; }
.aufgabe .nr { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--tinte); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.aufgabe .frage { flex: 1; font-weight: 600; }
.aufgabe .pkt { flex: none; font-size: .9rem; color: var(--grau); white-space: nowrap; padding-top: 3px; }
.aufgabe.voll > header { background: var(--gut-hell); } .aufgabe.voll .nr { background: var(--gut); }
.aufgabe.null > header { background: var(--schwach-hell); } .aufgabe.null .nr { background: var(--schwach); }
.aufgabe.teil > header { background: var(--warm-hell); } .aufgabe.teil .nr { background: var(--warm); }
.koerper { padding: 16px 18px; }
.koerper h4 { margin: 1em 0 .4em; }

fieldset.mc { border: 0; padding: 0; margin: 0 0 18px; }
fieldset.mc legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
fieldset.mc em { font-weight: 400; color: var(--grau); font-size: .88rem; }
.wahl { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
label.wahl:hover { background: var(--akzent-hell); }
.wahl input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--akzent); }
.wahl.erg { cursor: default; } .wahl.erg .box { flex: none; width: 20px; text-align: center; }
.wahl.richtig { background: var(--gut-hell); } .wahl.falsch { background: var(--schwach-hell); }
.erkl { font-size: .9rem; color: var(--grau); margin: 6px 0 0 10px; }
.ok { color: var(--gut); font-weight: 700; } .nok { color: var(--schwach); font-weight: 700; }

table { border-collapse: collapse; width: 100%; }
.matrix td, .matrix th { border: 1px solid var(--linie); padding: 8px 10px; vertical-align: middle; }
.matrix th { font-size: .82rem; background: #f3f0e9; hyphens: manual; text-align: center; min-width: 74px; }
.matrix .mitte { text-align: center; white-space: nowrap; }
.kreuz { display: inline-grid; place-items: center; width: 44px; height: 36px; cursor: pointer; }
.kreuz input { position: absolute; opacity: 0; }
.kreuz span { width: 24px; height: 24px; border: 2px solid #9a968c; border-radius: 5px; display: grid; place-items: center; font-weight: 700; color: var(--akzent); }
.kreuz input:checked + span { border-color: var(--akzent); background: var(--akzent-hell); }
.kreuz input:checked + span::after { content: "✕"; }
.kreuz input:focus-visible + span { outline: 3px solid var(--warm); outline-offset: 2px; }
tr.ist-ok td:nth-child(2) { background: var(--gut-hell); } tr.ist-nok td:nth-child(2) { background: var(--schwach-hell); }
tr.ist-nok td:nth-child(3) { font-weight: 600; color: var(--gut); }

.ltext { line-height: 2.5; white-space: pre-wrap; }
.linp { width: 150px; padding: 4px 8px !important; border-width: 0 0 2px !important; border-radius: 0 !important; background: #fdf9ee !important; }
.linp.breit { width: 100%; max-width: 280px; }
.lsel { padding: 5px 8px; }
.lerg { padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.lerg.ist-ok { background: var(--gut-hell); } .lerg.ist-nok { background: var(--schwach-hell); }
.lsg { color: var(--gut); font-weight: 600; } .lsg::before { content: "→ "; }
.tipp { color: var(--warm); font-size: .85rem; }
ol.aussagen { margin: 0 0 6px; }
ol.stroeme { columns: 2; column-gap: 28px; padding-left: 26px; margin: 14px 0 0; }
ol.stroeme li { break-inside: avoid; margin-bottom: 8px; padding-left: 4px; }
.gegeben { font-style: italic; color: var(--grau); }

.kreislauf { width: 100%; min-width: 560px; max-width: 760px; display: block; margin: 0 auto; color: var(--tinte); }
.kreislauf .sektor { stroke: var(--tinte); stroke-width: 1.5; }
.kreislauf .s1 { fill: #dfe7f5; } .kreislauf .s2 { fill: #fde9c9; } .kreislauf .s3 { fill: #d9efe9; } .kreislauf .s4 { fill: #ece3f5; } .kreislauf .s5 { fill: #f6dcd7; }
.kreislauf .sektortext { font: 700 15px system-ui, sans-serif; fill: var(--tinte); }
.kreislauf .nrkreis { fill: #fff; stroke: var(--tinte); stroke-width: 1.5; }
.kreislauf .nrtext { font: 700 13px system-ui, sans-serif; fill: var(--tinte); }

.baum, .baum ul { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0; position: relative; }
.baum { min-width: 620px; padding-bottom: 6px; }
.baum ul { padding-top: 20px; }
.baum li { position: relative; padding: 20px 5px 0; text-align: center; flex: 1; }
.baum > li { padding-top: 0; }
.baum li::before, .baum li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 20px; border-top: 2px solid #8d897f; }
.baum li::after { right: auto; left: 50%; border-left: 2px solid #8d897f; }
.baum li:only-child::before, .baum li:only-child::after, .baum > li::before, .baum > li::after { display: none; }
.baum li:only-child { padding-top: 0; }
.baum li:first-child::before, .baum li:last-child::after { border: 0 none; }
.baum li:last-child::before { border-right: 2px solid #8d897f; }
.baum ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 20px; border-left: 2px solid #8d897f; }
.knoten { display: inline-block; border: 2px solid var(--tinte); border-radius: 8px; padding: 8px 10px; background: #fff; font-weight: 600; font-size: .92rem; min-width: 110px; }
.knoten small { display: block; font-weight: 400; }
.knoten.offen { background: #fdf9ee; border-style: dashed; }
.knoten .linp { max-width: 170px; }

.daten td { border: 1px solid var(--linie); padding: 7px 10px; }
.daten .rechts { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rechenfelder { margin-top: 14px; display: grid; gap: 10px; }
.rechenfelder label { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.rechenfelder input { width: 120px; text-align: right; }
.neben { margin-top: 12px; font-size: .9rem; } .neben textarea { margin-top: 6px; }

.material { background: #fff; border: 2px solid var(--tinte); border-radius: var(--radius); padding: 20px 22px; margin: 16px 0; }
.mkopf { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--warm); }
.material h3 { font: 700 1.35rem Georgia, serif; margin: .2em 0; }
.munter { margin: 0 0 12px; color: var(--grau); font-size: .92rem; }
.mtext p { margin: 0 0 .8em; hyphens: auto; }
.msumme { font-weight: 700; margin: 8px 0 0; }
.quelle { font-size: .78rem; color: var(--grau); margin: 10px 0 0; }
.diagramm { width: 100%; display: block; font: 14px system-ui, sans-serif; fill: var(--tinte); }
.diagramm .b1 { fill: var(--akzent); } .diagramm .b2 { fill: #e0a23a; } .diagramm .wert { font-weight: 700; }

.antwort { background: #fbfaf7; border: 1px solid var(--linie); border-radius: 8px; padding: 12px 14px; white-space: normal; }
.kriterien { list-style: none; padding: 0; margin: 10px 0; font-size: .93rem; }
.kriterien li { padding: 5px 8px; border-radius: 6px; margin-bottom: 3px; }
.kriterien li.ist-ok { background: var(--gut-hell); } .kriterien li.ist-nok { background: #f3f0e9; }
.kriterien label { cursor: pointer; display: block; padding-left: 28px; text-indent: -28px; }
.kriterien input { width: 18px; height: 18px; vertical-align: -3px; accent-color: var(--gut); margin: 0 6px 0 0; }
.selbst { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.muster { margin-top: 12px; border-left: 4px solid var(--akzent); background: var(--akzent-hell); border-radius: 0 8px 8px 0; padding: 10px 16px; font-size: .95rem; }
.muster summary { font-weight: 700; cursor: pointer; } .muster h4 { margin: 0 0 4px; }
.feldtitel { margin-top: 1em; }
.abgabe { text-align: center; margin: 36px 0 0; }

/* Ergebnis */
.bilanz { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px; }
.bilanz .gross { font-size: 1.15rem; } .bilanz .zahl { font: 700 3rem Georgia, serif; color: var(--akzent); margin-right: 6px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.kacheln div { background: var(--papier); border-radius: 10px; padding: 12px 14px; }
.kacheln b { display: block; font-size: 1.4rem; } .kacheln span { font-size: .82rem; color: var(--grau); }
.themen { display: grid; gap: 6px; }
.thema { display: grid; grid-template-columns: minmax(150px, 1.3fr) 2fr auto; gap: 14px; align-items: center; padding: 9px 14px; background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; text-decoration: none; color: var(--tinte); font-size: .95rem; }
.thema:hover { border-color: var(--akzent); }
.balken { display: block; height: 10px; background: #e9e5db; border-radius: 99px; overflow: hidden; }
.balken.mini { display: inline-block; width: 70px; vertical-align: middle; }
.balken i { display: block; height: 100%; border-radius: 99px; }
.gut { background: var(--gut); } .mittel { background: var(--mittel); } .schwach { background: var(--schwach); }
.liste { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); font-size: .93rem; }
.liste th, .liste td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.liste th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--grau); }
.liste tr:last-child td { border-bottom: 0; }
.platz { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e9e5db; font-weight: 700; }
.besten tr.erster .platz { background: var(--warm); color: #fff; }
.besten tr.ich td { background: var(--akzent-hell); }
.marke { background: var(--warm); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .04em; margin-left: 4px; }
.trend { display: flex; gap: 10px; align-items: flex-end; height: 170px; padding: 14px 16px 0; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); margin-bottom: 14px; overflow-x: auto; }
.trend a { flex: 0 0 54px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-decoration: none; color: var(--tinte); font-size: .78rem; }
.trend i { width: 100%; border-radius: 6px 6px 0 0; order: 2; } .trend b { order: 1; } .trend span { order: 3; color: var(--grau); padding: 4px 0 8px; }

/* Lernzettel */
.lz { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 22px; }
.lz header { border-bottom: 3px solid var(--tinte); margin-bottom: 16px; }
.lz h1 { font-size: 1.7rem; margin: .1em 0 .4em; }
.lz h3 { color: var(--akzent); border-bottom: 1px solid var(--linie); padding-bottom: 3px; }
.lz ul, .lz ol { padding-left: 22px; margin: .5em 0; } .lz li { margin-bottom: 3px; }
.merk { background: var(--warm-hell); border-left: 4px solid var(--warm); border-radius: 0 8px 8px 0; padding: 10px 14px; margin: 12px 0; }
.tab { margin: 10px 0; font-size: .93rem; }
.tab th, .tab td { border: 1px solid var(--linie); padding: 7px 10px; text-align: left; vertical-align: top; }
.tab th { background: #f3f0e9; }
.tab.strom td:first-child { text-align: center; font-weight: 700; width: 46px; }
.pyramide { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 14px 0; }
.pyramide div { background: var(--akzent); color: #fff; padding: 8px 6px; text-align: center; font-weight: 600; font-size: .92rem; border-radius: 4px; }
.pyramide div:nth-child(1) { background: #114d63; border-radius: 40px 40px 4px 4px; padding-top: 16px; }
.pyramide div:nth-child(2) { background: #0f5b61; } .pyramide div:nth-child(4) { background: #23806f; } .pyramide div:nth-child(5) { background: #3a9583; }
.pyramide b { opacity: .7; margin-right: 6px; }
.kette { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.kette div { flex: 1 1 170px; border: 2px solid var(--tinte); border-radius: 10px; padding: 10px 12px; background: #fff; }
.kette div b { display: block; font-size: 1.1rem; } .kette div span { font-size: .86rem; color: var(--grau); }
.kette i { align-self: center; font-size: .82rem; color: var(--akzent); font-weight: 700; text-align: center; }
.kette i::after { content: " →"; }
.saeulen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; text-align: center; }
.saeulen .dach { grid-column: 1 / -1; background: var(--tinte); color: #fff; font-weight: 700; padding: 10px; clip-path: polygon(50% 0, 100% 100%, 0 100%); padding-top: 26px; }
.saeulen div:not(.dach) { border: 2px solid var(--tinte); border-radius: 6px; padding: 12px 8px; background: #fff; }
.saeulen b, .saeulen span, .saeulen small { display: block; } .saeulen span { color: var(--akzent); font-size: .85rem; }
.baum.lz { background: none; border: 0; padding: 0; margin: 14px 0; min-width: 0; }
.blaettern { display: flex; justify-content: space-between; gap: 12px; }

/* ===== Optik-Überarbeitung ===== */
body { background: radial-gradient(1200px 500px at 85% -10%, #e3efe9 0, transparent 60%), radial-gradient(900px 420px at -10% 20%, #f8ecd9 0, transparent 55%), var(--papier); background-attachment: fixed; min-height: 100vh; display: flex; flex-direction: column; }
main { width: 100%; max-width: 980px; flex: 1; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.22em; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.top { position: sticky; top: 0; z-index: 20; background: rgba(28, 36, 52, .94); backdrop-filter: blur(8px); box-shadow: 0 2px 14px rgba(28, 36, 52, .18); }
.logo { display: flex; align-items: center; gap: 10px; }
.logo i { font: 800 .95rem system-ui, sans-serif; font-style: normal; letter-spacing: .02em; background: linear-gradient(135deg, #e9a441, var(--warm)); color: #fff; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.logo span { font: 600 1.05rem system-ui, sans-serif; opacity: 1; margin: 0; }
.top nav a { padding: 6px 12px; border-radius: 99px; }
.top nav a:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.top nav a.aus { border: 1px solid rgba(255, 255, 255, .3); }
body.klausur .top { position: static; }

h2 { display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: linear-gradient(var(--warm), var(--akzent)); flex: none; }
h2.teil::before, .login h2::before, .lz h2::before { display: none; }
h2 .icon { color: var(--warm); }

.karte, .aufgabe, .bilanz, .liste, .lz, .thema, .trend { box-shadow: 0 1px 2px rgba(28, 36, 52, .04), 0 6px 20px rgba(28, 36, 52, .05); }
.knopf { display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 3px 10px rgba(13, 107, 94, .25); transition: transform .12s, box-shadow .12s, background .12s; }
.knopf:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(13, 107, 94, .3); }
.knopf.hell { box-shadow: none; }

.held { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: center; padding: 34px; background: linear-gradient(135deg, #0d6b5e 0%, #114d63 60%, #1c2434 130%); box-shadow: 0 14px 40px rgba(13, 107, 94, .28); }
.held::before, .held::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .07); pointer-events: none; }
.held::before { width: 320px; height: 320px; right: -90px; top: -130px; }
.held::after { width: 200px; height: 200px; right: 180px; bottom: -120px; }
.heldtext, .heldzahlen { position: relative; z-index: 1; }
.held h1 { font-size: 2.3rem; }
.heldzahlen { display: grid; gap: 10px; }
.heldzahlen div { display: grid; grid-template-columns: auto auto 1fr; gap: 12px; align-items: center; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; padding: 10px 14px; }
.heldzahlen .icon { width: 26px; height: 26px; color: #f6c873; }
.heldzahlen b { font: 700 1.6rem Georgia, serif; min-width: 2.2ch; }
.heldzahlen span { font-size: .85rem; opacity: .85; }

.kartenraster.drei { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.klausurkarte { display: flex; flex-direction: column; border-top: 4px solid var(--akzent); transition: transform .14s, box-shadow .14s; }
.klausurkarte:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(28, 36, 52, .12); }
.klausurkarte > p:not(.klein):not(.offen) { flex: 1; }
.klausurkarte h3 { margin: 14px 0 4px; }
.klausurkarte p { margin: 4px 0 10px; }
.kkopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.kicon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: var(--akzent-hell); color: var(--akzent); }
.kicon .icon { width: 26px; height: 26px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chips span { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 600; background: var(--papier); border-radius: 99px; padding: 4px 10px; color: var(--grau); }
.chips .icon { width: 14px; height: 14px; }
.klausurkarte.zufall { border-top-color: var(--warm); background: linear-gradient(180deg, #fffaf1, #fff 55%); }
.klausurkarte.zufall .kicon { background: var(--warm-hell); color: var(--warm); }
.klausurkarte.zufall .knopf { background: var(--warm); box-shadow: 0 3px 10px rgba(200, 121, 26, .3); }
.klausurkarte.zufall .knopf:hover { background: #a9640f; }
.themenwahl { display: flex; gap: 8px; flex-wrap: wrap; }
.themenwahl select { flex: 1 1 150px; min-width: 0; }
.offen { font-size: .88rem; margin: 10px 0 0 !important; }

.zettel { position: relative; border-top: 4px solid var(--c, var(--akzent)); padding: 16px 16px 14px; gap: 2px; }
.zicon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c, var(--akzent)); margin-bottom: 10px; }
.zicon .icon { width: 23px; height: 23px; }
.zettel .num { position: absolute; top: 12px; right: 14px; font-size: 1.6rem; color: var(--c); opacity: .28; }
.zettel b { line-height: 1.3; }

.tname { display: flex; align-items: center; gap: 9px; }
.tname .icon { color: var(--c, var(--akzent)); width: 20px; height: 20px; }
.thema { transition: border-color .12s, transform .12s; }
.thema:hover { transform: translateX(3px); }

.lz { border-top: 5px solid var(--c, var(--tinte)); }
.lz header { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--linie); padding-bottom: 12px; }
.lz header .zicon { margin: 0; width: 52px; height: 52px; }
.lz header .zicon .icon { width: 28px; height: 28px; }
.lz header h1 { margin: 0; }
.lz .vorzeile { color: var(--c, var(--akzent)); }
.lz h3 { color: var(--c, var(--akzent)); }
.lzstart { margin-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--papier); border-radius: 12px; padding: 14px 18px; }

.bilanzkopf { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.bilanzkopf .kacheln { flex: 1 1 320px; margin: 0; }
.kacheln b small { font-weight: 400; }
.ring { position: relative; width: 150px; height: 150px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring .rbg { stroke: #e9e5db; }
.ring .rfg { stroke-linecap: round; }
.ring .rfg.gut { stroke: var(--gut); } .ring .rfg.mittel { stroke: var(--mittel); } .ring .rfg.schwach { stroke: var(--schwach); }
.ring .rfg.gut, .ring .rfg.mittel, .ring .rfg.schwach { background: none; }
.ring div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring b { font: 700 2rem Georgia, serif; } .ring span { font-size: .8rem; color: var(--grau); }

.startseite { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; min-height: 62vh; }
.startbild { background: linear-gradient(135deg, #0d6b5e, #114d63 70%, #1c2434 140%); color: #fff; border-radius: 18px; padding: 38px 34px; box-shadow: 0 14px 40px rgba(13, 107, 94, .28); position: relative; overflow: hidden; }
.startbild::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .07); right: -80px; bottom: -110px; }
.startbild .vorzeile { color: #bfe6dc; }
.startbild h1 { font-size: 2.5rem; margin: .3em 0 .7em; }
.vorteile { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.vorteile li { display: flex; gap: 12px; align-items: flex-start; }
.vorteile .icon { width: 24px; height: 24px; color: #f6c873; margin-top: 2px; }
.login h2 { margin-top: 0; }
.login .knopf { width: 100%; justify-content: center; }
body.start main { max-width: 980px; }

.fortschritt { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 14px; padding: 10px 20px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(8px); border-top: 1px solid var(--linie); box-shadow: 0 -4px 18px rgba(28, 36, 52, .08); font-size: .9rem; }
.fbalken { flex: 1; height: 8px; background: #e9e5db; border-radius: 99px; overflow: hidden; }
.fbalken i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--akzent), #3a9583); border-radius: 99px; transition: width .3s; }
body.klausur main { padding-bottom: 110px; }
body.klausur .unten { padding-bottom: 80px; }
.aufgabe.bearbeitet .nr { background: var(--akzent); }
.uhr { box-shadow: 0 6px 18px rgba(28, 36, 52, .25); z-index: 10; }
h2.teil { background: linear-gradient(90deg, var(--tinte), #2b3a57); }
.material { box-shadow: 6px 6px 0 var(--warm-hell); }

.unten { margin-top: 30px; border-top: 1px solid var(--linie); background: rgba(255, 255, 255, .5); }
.unten p { margin: 2px 0; }
.unten .copy { font-weight: 600; color: var(--tinte); letter-spacing: .03em; }

/* ===== Lernzettel-Auswertung, Prognose und Animationen ===== */
.gelesen { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; align-self: flex-start; font-size: .74rem; font-weight: 700; color: var(--gut); background: var(--gut-hell); border-radius: 99px; padding: 3px 9px; }
.gelesen .icon { width: 13px; height: 13px; }
.lzcheck { margin-top: 14px; background: var(--papier); border-radius: 12px; padding: 16px 18px; display: grid; gap: 10px; scroll-margin-top: 80px; }
.stufenwahl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stufenwahl button { font: 600 .92rem system-ui, sans-serif; padding: 11px 8px; border-radius: 10px; border: 2px solid var(--linie); background: #fff; color: var(--tinte); cursor: pointer; transition: transform .12s, border-color .12s, background .12s; }
.stufenwahl button:hover { transform: translateY(-2px); border-color: var(--f); }
.stufenwahl .s1 { --f: #c9483c; } .stufenwahl .s2 { --f: #d98324; } .stufenwahl .s3 { --f: #9aa52a; } .stufenwahl .s4 { --f: #2c8a57; }
.stufenwahl .aktiv { background: var(--f); border-color: var(--f); color: #fff; animation: pop .35s ease both; }

.stufenanzeige { display: inline-flex; gap: 4px; vertical-align: middle; }
.stufenanzeige i { width: 22px; height: 10px; border-radius: 99px; background: #e9e5db; }
.stufenanzeige i.an { animation: pop .4s ease both; animation-delay: calc(var(--i) * 110ms + 250ms); }
.stufenanzeige.s1 i.an { background: #c9483c; } .stufenanzeige.s2 i.an { background: #d98324; } .stufenanzeige.s3 i.an { background: #9aa52a; } .stufenanzeige.s4 i.an { background: #2c8a57; }

.gesamtbild { background: linear-gradient(135deg, #fff, #f4faf7); border: 1px solid var(--linie); border-radius: var(--radius); padding: 22px 26px; margin: 16px 0 6px; box-shadow: 0 6px 20px rgba(28, 36, 52, .06); animation: auftauchen .5s ease both; }
.gesamtbild.leer { background: none; border: 0; box-shadow: none; padding: 0; }
.prognose { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.prognose .np { font-size: 1.15rem; margin: 4px 0 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prognose .np b { font: 700 3.2rem/1 Georgia, serif; color: var(--tinte); }
.notenmarke { display: inline-block; font-size: .82rem; font-weight: 700; color: #fff; border-radius: 99px; padding: 3px 11px; white-space: nowrap; }
.notenmarke.mittel { color: #3d2e00; }
.trendpfeil { display: inline-block; font-size: .88rem; font-weight: 600; margin-top: 4px; }
.trendpfeil.auf { color: var(--gut); } .trendpfeil.ab { color: var(--schwach); } .trendpfeil.gleich { color: var(--grau); }

.lzbilanz { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 16px; }
.lzbilanz .kacheln { flex: 1 1 320px; margin: 0; }
.lzbilanz .ring { width: 120px; height: 120px; } .lzbilanz .ring b { font-size: 1.5rem; } .lzbilanz .ring span { font-size: .68rem; max-width: 84px; }
.lzraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.lzkarte { background: var(--karte); border: 1px solid var(--linie); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 6px 20px rgba(28, 36, 52, .05); animation: auftauchen .5s ease both; animation-delay: calc(var(--i, 0) * 70ms); transition: transform .14s, box-shadow .14s; }
.lzkarte:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(28, 36, 52, .11); }
.lzkarte header { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.lzkarte header b { flex: 1 1 130px; min-width: 0; }
.lzkarte dd { overflow-wrap: anywhere; }
.lzkarte header .zicon { width: 38px; height: 38px; margin: 0; flex: none; } .lzkarte header .zicon .icon { width: 20px; height: 20px; }
.lzkarte header b { flex: 1; line-height: 1.25; }
.lzkarte .status { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gut); background: var(--gut-hell); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.lzkarte.ungelesen { border-top-color: #c9c4b8; background: #fbfaf7; }
.lzkarte.ungelesen .zicon { background: #b9b4a8; } .lzkarte.ungelesen .status { color: var(--grau); background: #ece8df; }
.lzkarte dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 10px; }
.lzkarte dl div { background: var(--papier); border-radius: 9px; padding: 8px 10px; }
.lzkarte dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--grau); }
.lzkarte dd { margin: 0; font-weight: 700; font-size: .98rem; }
.lzk-zeile { display: grid; grid-template-columns: 1fr; gap: 3px; font-size: .86rem; padding: 7px 0; border-top: 1px solid var(--linie); }
.lzk-zeile > span:first-child { color: var(--grau); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; }
.lzk-zeile b { font-size: .9rem; }
.lzk-hinweis { font-size: .82rem; margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; }
.lzk-hinweis.warn { background: var(--schwach-hell); color: #8d2a21; } .lzk-hinweis.gutzu { background: var(--gut-hell); color: #1c6a40; }
.lzliste .balken i.thema-farbe { background: var(--c); }

/* ===== Rechenaufgaben in Schritten (Mathe) ===== */
.schritte { display: grid; gap: 10px; margin-top: 12px; }
.schritt { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 6px 16px; align-items: center; padding: 10px 14px; border: 1px solid var(--linie); border-radius: 10px; background: #fff; }
.schritt label, .schritt .skopf span { font-weight: 600; font-size: .95rem; }
.schritt em { font-style: normal; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--warm); color: #fff; border-radius: 99px; padding: 2px 8px; margin-right: 4px; vertical-align: 1px; }
.schritt.ansatz { background: #fffaf1; border-color: #ecd9b5; }
.eing { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: relative; }
.eing .vor, .eing .einh { font-weight: 600; white-space: nowrap; }
.eing input.zahlfeld { width: 110px; text-align: right; }
.eing input.formel { flex: 1 1 170px; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: .95rem; }
.eing select { flex: 1 1 170px; min-width: 0; }
.tasten { display: flex; gap: 4px; flex-basis: 100%; }
.tasten button { font: 600 .9rem system-ui, sans-serif; min-width: 36px; padding: 5px 8px; border: 1px solid var(--linie); border-radius: 7px; background: var(--papier); cursor: pointer; }
.tasten button:hover { background: var(--akzent-hell); border-color: var(--akzent); }
.schritt.erg { grid-template-columns: 1fr; gap: 4px; }
.schritt.erg.ist-ok { background: var(--gut-hell); border-color: #bfe3cd; }
.schritt.erg.ist-teil { background: var(--warm-hell); border-color: #ecd9b5; }
.schritt.erg.ist-nok { background: var(--schwach-hell); border-color: #f1c9c4; }
.skopf { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.skopf b { white-space: nowrap; font-size: .88rem; }
.sein { font-family: ui-monospace, Consolas, monospace; font-size: .98rem; }
.halb { color: var(--warm); font-weight: 700; }
.shin { margin: 2px 0 0; font-size: .85rem; color: #6b4a10; }
.slsg { margin: 2px 0 0; font-size: .92rem; color: #1c6a40; }
.mgraph { display: block; width: 100%; max-width: 340px; margin: 4px auto 6px; font: 9px system-ui, sans-serif; }
.mgraph .flaeche { fill: #fff; stroke: #b9b4a8; }
.mgraph .gitter { stroke: #e3dfd6; stroke-width: 1; fill: none; }
.mgraph .achse { stroke: var(--tinte); stroke-width: 1.6; fill: none; }
.mgraph .zahl { fill: var(--grau); }
.mgraph .kurve { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.mgraph .k0 { stroke: var(--akzent); } .mgraph .k1 { stroke: var(--warm); }
.mgraph.klein { max-width: 150px; margin: 0; } .mgraph.klein .kurve { stroke-width: 2.2; }
fieldset.mc.bilder { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
fieldset.mc.bilder legend { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; margin-bottom: 10px; }
fieldset.mc.bilder .wahl { flex-direction: column; align-items: center; border: 1px solid var(--linie); border-radius: 10px; padding: 10px; background: #fff; }
fieldset.mc.bilder .erkl { grid-column: 1 / -1; }
.mbild { display: block; width: 100%; max-width: 440px; margin: 0 auto 8px; font: 13px system-ui, sans-serif; fill: var(--tinte); }
.mbild .boden { stroke: var(--tinte); stroke-width: 3; }
.mbild .bogen { fill: #e2f1ee; stroke: var(--akzent); stroke-width: 3; }
.mbild .mass { stroke: var(--warm); stroke-width: 1.5; stroke-dasharray: 5 4; }
.mbild .masslinie { stroke: var(--grau); stroke-width: 1.3; fill: none; }
.mbild .achsenpfeil { stroke: var(--grau); stroke-width: 1; fill: none; }
.mbild .ax { fill: var(--grau); font-size: 11px; }
.wtab { margin: 10px 0; } .wtab th, .wtab td { border: 1px solid var(--linie); padding: 7px 8px; text-align: center; }
.wtab th { background: #f3f0e9; width: 64px; } .wtab input { width: 64px; text-align: center; }
.mdaten th { text-align: left; background: #f3f0e9; border: 1px solid var(--linie); padding: 7px 10px; font-size: .9rem; }
.zeichnen { background: var(--papier); }
.zupload { display: grid; gap: 10px; }
.zupload.nach { margin-top: 12px; grid-template-columns: 1fr auto; align-items: center; }
.zupload.nach .zvorschau { grid-column: 1 / -1; }
.bildknopf { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 2px dashed #b9b4a8; border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; transition: border-color .12s, background .12s; }
.bildknopf:hover, .bildknopf:focus-within { border-color: var(--akzent); background: var(--akzent-hell); }
.bildknopf .icon { width: 24px; height: 24px; color: var(--akzent); }
.bildknopf span { flex: 1; } .bildknopf small { display: block; font-weight: 400; }
.bildknopf input { max-width: 46%; font-size: .85rem; }
.bildknopf.gewaehlt { border-style: solid; border-color: var(--gut); background: var(--gut-hell); }
.zvorschau { max-width: 260px; max-height: 200px; border-radius: 8px; border: 1px solid var(--linie); }
.kigrund { display: block; margin: 3px 0 0 26px; font-size: .86rem; color: var(--grau); }
.kibox { margin: 10px 0; padding: 12px 16px; border-radius: 10px; background: linear-gradient(135deg, #eef3fb, #f4faf7); border: 1px solid #cfdcee; animation: auftauchen .5s ease both; }
.kibox b { display: flex; align-items: center; gap: 6px; } .kibox .icon { color: var(--akzent); }
.kibox p { margin: 6px 0; } .kibox small { display: block; }
.wartet { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; padding: 24px; background: rgba(245, 242, 236, .93); backdrop-filter: blur(4px); animation: einblenden .25s ease both; }
.wartet b { font: 700 1.4rem Georgia, serif; } .wartet span { color: var(--grau); max-width: 34ch; }
.kreisel { width: 54px; height: 54px; border-radius: 50%; border: 5px solid #d9d4c8; border-top-color: var(--akzent); animation: drehen 0.9s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
.zbild { margin: 0 0 12px; }
.zbild img { display: block; max-width: 100%; max-height: 460px; border-radius: 10px; border: 1px solid var(--linie); box-shadow: 0 6px 18px rgba(28, 36, 52, .12); }
.zbild figcaption { font-size: .88rem; color: var(--grau); margin-top: 6px; }
.zweispaltig { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 18px; align-items: center; margin: 10px 0; }
.zweispaltig p { margin: .35em 0; }
.lz code { background: var(--papier); border-radius: 5px; padding: 1px 6px; font-size: .92em; }
@media (max-width: 640px) { .schritt { grid-template-columns: 1fr; } .zweispaltig { grid-template-columns: 1fr; } }

@keyframes wachsen { from { transform: scaleX(0); } }
@keyframes hochwachsen { from { transform: scaleY(0); } }
@keyframes ringfuellen { from { stroke-dashoffset: 326.73; } }
@keyframes auftauchen { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.balken i { transform-origin: left; animation: wachsen 1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: .15s; }
.trend i { transform-origin: bottom; animation: hochwachsen .8s cubic-bezier(.2, .8, .2, 1) both; }
.ring .rfg { animation: ringfuellen 1.2s cubic-bezier(.2, .8, .2, 1) both; animation-delay: .1s; }
@keyframes einblenden { from { opacity: 0; } }
.kartenraster > *, .themen > .thema { animation: auftauchen .45s ease both; }
.liste tbody tr { animation: einblenden .5s ease both; }   /* ohne Verschiebung, sonst flackern Rollbalken der Tabelle */
.kartenraster > :nth-child(2), .themen > :nth-child(2), .liste tbody tr:nth-child(2) { animation-delay: 60ms; }
.kartenraster > :nth-child(3), .themen > :nth-child(3), .liste tbody tr:nth-child(3) { animation-delay: 120ms; }
.kartenraster > :nth-child(4), .themen > :nth-child(4), .liste tbody tr:nth-child(4) { animation-delay: 180ms; }
.kartenraster > :nth-child(5), .themen > :nth-child(5), .liste tbody tr:nth-child(5) { animation-delay: 240ms; }
.kartenraster > :nth-child(6), .themen > :nth-child(6), .liste tbody tr:nth-child(6) { animation-delay: 300ms; }
.kartenraster > :nth-child(7), .themen > :nth-child(7), .liste tbody tr:nth-child(7) { animation-delay: 360ms; }
.kartenraster > :nth-child(8), .themen > :nth-child(8), .liste tbody tr:nth-child(8) { animation-delay: 420ms; }
.kartenraster > :nth-child(n+9), .themen > :nth-child(n+9), .liste tbody tr:nth-child(n+9) { animation-delay: 480ms; }
.held, .bilanz, .lzbilanz { animation: auftauchen .5s ease both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
@media print { * { animation: none !important; } }

@media (max-width: 760px) {
  .stufenwahl { grid-template-columns: repeat(2, 1fr); }
  .held, .startseite { grid-template-columns: 1fr; }
  .held { padding: 24px; } .held h1, .startbild h1 { font-size: 1.8rem; }
  .heldzahlen { grid-template-columns: repeat(3, 1fr); }
  .heldzahlen div { grid-template-columns: 1fr; gap: 2px; justify-items: start; }
  .wer { display: none; }
  .fortschritt .fstand { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; } main { padding: 16px 12px 40px; }
  ol.stroeme { columns: 1; } .thema { grid-template-columns: 1fr auto; } .thema .balken { grid-column: 1 / -1; order: 3; }
  .lz { padding: 18px 16px; } .aufgabe > header { flex-wrap: wrap; }
}
@media print {
  .top, .unten, .nichtdrucken { display: none !important; }
  body { background: #fff; font-size: 11pt; } main { max-width: none; padding: 0; }
  .lz { border: 0; padding: 0; break-after: page; } .lz:last-of-type { break-after: auto; }
  .merk, .tab th, .pyramide div, .saeulen .dach { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  h3, .merk, tr { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===================== Aufgabenbeispiele (links Rechnung, rechts Erklärung) ===================== */
body.bspseite main { max-width: 1100px; }
.fa { color: #b0620a; font-weight: 700; } .fb { color: #1f66ab; font-weight: 700; } .fc { color: #b8355c; font-weight: 700; }
.bruch { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.15; margin: 0 .15em; font-size: .9em; }
.bruch > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 .35em 1px; } .bruch > span:last-child { padding: 1px .35em 0; }
.unterzeile { margin-top: -.3em; color: var(--grau); }
.bkarte .banz { margin-top: 8px; align-self: flex-start; font-size: .74rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border-radius: 99px; padding: 3px 9px; }
.lzbsp { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 18px; border-radius: 12px; text-decoration: none; color: #fff; background: linear-gradient(135deg, #2f2560, #1c2434); transition: transform .12s, box-shadow .12s; }
.lzbsp:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(28, 36, 52, .25); }
.lzbsp .stern { color: #ffd166; font-size: 1.5rem; line-height: 1; } .lzbsp span:nth-child(2) { flex: 1; } .lzbsp .icon { width: 22px; height: 22px; flex: none; }

.bkopf { display: flex; gap: 18px; align-items: flex-start; color: #fff; border-radius: var(--radius); padding: 26px 28px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 52%, #1c2434)); animation: auftauchen .5s ease both; }
.bkopf .zicon { background: rgba(255, 255, 255, .2); width: 56px; height: 56px; flex: none; margin: 0; } .bkopf .zicon .icon { width: 30px; height: 30px; }
.bkopf .vorzeile { color: rgba(255, 255, 255, .82); } .bkopf h1 { margin: .15em 0 .3em; } .bkopf p { margin: 0; max-width: 72ch; }
.bkopf .fa { color: #ffd596; } .bkopf .fb { color: #b5dbff; }
.bsprung { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 10px; }
.bsprung a { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--linie); border-radius: 99px; padding: 5px 14px 5px 5px; font-size: .9rem; text-decoration: none; color: var(--tinte); transition: border-color .12s, transform .12s; }
.bsprung a:hover { border-color: var(--tinte); transform: translateY(-1px); }
.bsprung i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--tinte); color: #fff; font-size: .78rem; font-weight: 700; }
.blegende { display: flex; gap: 6px 20px; flex-wrap: wrap; font-size: .82rem; color: var(--grau); margin: 0 0 22px; }
.blegende span { display: inline-flex; align-items: center; gap: 7px; }
.blegende i { width: 17px; height: 17px; border-radius: 4px; display: inline-grid; place-items: center; font-style: normal; font-size: .68rem; border: 1px solid #cfd9e4; }
.blegende .l1 { background-color: #fcfdfe; background-image: linear-gradient(#c3d2e1 1px, transparent 1px), linear-gradient(90deg, #c3d2e1 1px, transparent 1px); background-size: 6px 6px; } .blegende .l2 { background: #fff; } .blegende .l3 { background: #ffd166; border-color: #e9a400; color: #6b4a00; }

.bsp { background: var(--karte); border: 1px solid var(--linie); border-top: 5px solid var(--c); border-radius: var(--radius); padding: 24px 26px 22px; margin-bottom: 30px; scroll-margin-top: 14px; box-shadow: 0 8px 26px rgba(28, 36, 52, .06); }
.bsp > header { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.bnr { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; font: 700 1.4rem Georgia, serif; }
.bsp h2 { margin: 0; font-size: 1.45rem; } .bsp h2::before { display: none; } .bsp .vorzeile { color: var(--c); }
.bmarke { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; margin: 0 0 4px; color: var(--grau); }
.baufgabe { background: var(--papier); border-radius: 12px; padding: 16px 20px; }
.baufgabe.mitbild { display: grid; grid-template-columns: 1fr minmax(0, 320px); gap: 22px; align-items: center; }
.baufgabe p { margin: .3em 0; font-size: 1.05rem; } .baufgabe .bmarke { font-size: .72rem; } .baufgabe ol, .baufgabe ul { margin: .4em 0; padding-left: 24px; } .baufgabe li { margin-bottom: 2px; }
.baufgabe .tab { background: #fff; }
.bidee { display: flex; gap: 14px; align-items: flex-start; margin: 14px 0 20px; padding: 16px 20px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #2f2560, #1c2434); }
.bidee .stern { font-size: 1.7rem; line-height: 1.1; color: #ffd166; animation: funkeln 2.8s ease-in-out infinite; }
.bidee .bmarke { color: #ffd166; } .bidee p { margin: 0; }
.bidee .fa { color: #ffc46b; } .bidee .fb { color: #9fd0ff; } .bidee .fc { color: #ff9fbd; }
@keyframes funkeln { 50% { transform: scale(1.22) rotate(18deg); opacity: .72; } }

.bspalten { display: grid; grid-template-columns: 46% 1fr; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--grau); margin-bottom: 6px; }
.bspalten span { padding: 0 4px; } .bspalten span + span { padding-left: 21px; }
.bleer { display: none; margin: 0; padding: 18px; border: 2px dashed #cfc9bb; border-radius: 12px; color: var(--grau); text-align: center; }
.bsp.start .bleer { display: block; } .bsp.start .bspalten, .bsp.start .bschritte { display: none; }
.bschritte { list-style: none; margin: 0; padding: 0; border: 1px solid #cfd9e4; border-radius: 12px; overflow: hidden; background-color: #fcfdfe; background-image: linear-gradient(#dbe5ef 1px, transparent 1px), linear-gradient(90deg, #dbe5ef 1px, transparent 1px); background-size: 22px 22px; }
.bschritt { display: grid; grid-template-columns: 46% 1fr; }
.bschritt + .bschritt { border-top: 1px dashed #b3c1d0; }
.rechnung { position: relative; min-width: 0; padding: 16px 16px 16px 54px; font: 1.16rem/1.45 "Cambria Math", Cambria, "STIX Two Text", Georgia, serif; }
.snr { position: absolute; left: 14px; top: 17px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tinte); color: #fff; font: 700 .85rem system-ui, sans-serif; }
.zeilen > div { display: flow-root; padding: 2px 0; } .zeilen > div + div { margin-top: 4px; }
.op { float: right; margin-left: 14px; color: #68788b; font-size: .86em; white-space: nowrap; }
.sbild { margin-top: 10px; }
.erkl { min-width: 0; background: #fff; border-left: 1px solid #cfd9e4; padding: 14px 20px 16px; }
.erkl h3 { margin: 0 0 4px; font-size: 1.04rem; color: var(--c); border: 0; padding: 0; }
.erkl p { margin: .3em 0; font-size: .97rem; }
.erkl .warum { background: var(--papier); border-radius: 8px; padding: 8px 12px; margin-top: 9px; font-size: .92rem; } .warum b:first-child { color: var(--c); }
.bschritt.kern .rechnung { background: linear-gradient(90deg, rgba(255, 209, 102, .5), rgba(255, 209, 102, .14)); box-shadow: inset 4px 0 0 #e9a400; }
.bschritt.kern .snr { background: #e9a400; color: #3b2a00; }
.bschritt.kern .erkl { background: #fffaf0; }
.kernmarke { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b4a00; background: #ffd166; border-radius: 99px; padding: 3px 10px; margin-bottom: 6px; }

.bsp.gefuehrt .bschritt.zu, .bsp.gefuehrt .amende.zu { display: none; }
.bsp.gefuehrt .bschritt.neu { animation: auftauchen .45s ease both; }
.bsp.gefuehrt .bschritt.neu .kernmarke { animation: pop .5s .3s ease both; }
.bgraph .eb { transition: opacity .5s ease; } .bgraph .eb.zu { opacity: 0; }
.bsteuer { display: none; }
.bsp.gefuehrt .bsteuer { display: flex; align-items: center; gap: 8px; position: sticky; bottom: 12px; z-index: 5; margin: 16px auto 0; max-width: 620px; padding: 7px; border-radius: 99px; background: var(--tinte); color: #fff; box-shadow: 0 10px 30px rgba(28, 36, 52, .32); }
.bsp.gefuehrt.start .bsteuer, .bsp.gefuehrt.fertig .bsteuer { position: static; }
.bsteuer button { border: 0; border-radius: 99px; font: 600 .95rem system-ui, sans-serif; cursor: pointer; padding: 10px 18px; white-space: nowrap; }
.bsteuer .bzurueck { width: 40px; height: 40px; padding: 0; flex: none; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.3rem; line-height: 1; }
.bsteuer .bzurueck:disabled { opacity: .35; cursor: default; }
.bsteuer .balle { background: transparent; color: #fff; text-decoration: underline; padding: 10px 6px; opacity: .85; font-weight: 400; font-size: .86rem; }
.bsteuer .bweiter { background: #ffd166; color: #2a1f00; } .bsteuer .bweiter:hover { background: #ffdf91; }
.bfort { flex: 1; min-width: 0; padding: 0 6px; }
.bstand { display: block; font-size: .8rem; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bbalken { display: block; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .2); margin-top: 4px; overflow: hidden; }
.bbalken i { display: block; height: 100%; width: 0; background: #ffd166; border-radius: 9px; transition: width .4s ease; }

.amende { margin-top: 16px; display: grid; gap: 12px; animation: auftauchen .5s ease both; }
.bantwort { background: var(--gut-hell); border-left: 4px solid var(--gut); border-radius: 0 10px 10px 0; padding: 12px 16px; }
.bantwort .bmarke { color: var(--gut); display: flex; gap: 6px; align-items: center; } .bantwort .icon { width: 15px; height: 15px; }
.bantwort p:last-child { margin: 0; font-weight: 600; font-size: 1.05rem; }
.bfehler { background: var(--schwach-hell); border-left: 4px solid var(--schwach); border-radius: 0 10px 10px 0; padding: 12px 16px; }
.bfehler .bmarke { color: var(--schwach); } .bfehler p:last-child { margin: 0; }
.bgraph { display: block; width: 100%; margin: 0 auto; font: 10px system-ui, sans-serif; overflow: visible; }
.bgraph .flaeche { fill: #fff; stroke: #c3cbd6; } .bgraph .gitter { stroke: #e4e9ef; fill: none; } .bgraph .achse { stroke: var(--tinte); stroke-width: 1.5; fill: none; }
.bgraph .zahl text { fill: #6b7385; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.bgraph .zahl .name { font-style: italic; font-size: 12px; fill: var(--tinte); }
.bgraph .eb { --k: var(--akzent); } .bgraph .ka { --k: #d07a12; } .bgraph .kb { --k: #1f66ab; } .bgraph .kc { --k: #b8355c; } .bgraph .kg { --k: #7c8597; }
.bgraph .kurve { fill: none; stroke: var(--k); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.bgraph .weg { fill: none; stroke: var(--k); stroke-width: 2; stroke-dasharray: 5 4; }
.bgraph circle { fill: var(--k); stroke: #fff; stroke-width: 1.6; }
.bgraph .schrift { fill: var(--k); font-weight: 700; font-size: 11px; paint-order: stroke; stroke: #fff; stroke-width: 3.5px; stroke-linejoin: round; }

@media (max-width: 760px) {
  .bschritt, .bspalten { grid-template-columns: 1fr; } .bspalten span + span { display: none; }
  .erkl { border-left: 0; border-top: 1px solid #cfd9e4; }
  .baufgabe.mitbild { grid-template-columns: 1fr; }
  .bsp { padding: 18px 14px; } .bkopf { padding: 20px; flex-direction: column; gap: 12px; }
  .bsteuer button { padding: 10px 14px; font-size: .9rem; } .bstand { font-size: .72rem; }
}
@media print {
  .bsp.gefuehrt .bschritt.zu, .bsp.gefuehrt .amende.zu { display: grid !important; }
  .bsp.start .bspalten { display: grid !important; } .bsp.start .bschritte { display: block !important; }
  .bgraph .eb.zu { opacity: 1 !important; }
  .bsp { box-shadow: none; } .bschritt, .baufgabe, .bidee { break-inside: avoid; }
  .bidee, .bkopf, .bschritt.kern .rechnung, .bnr, .snr, .kernmarke, .bantwort, .bfehler, .bschritte { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ----- Sterne, Rang und interaktive Übung ----- */
.zeilen > div { white-space: pre-wrap; }
.sterne { display: inline-flex; gap: 2px; font-size: 1.25rem; line-height: 1; flex: none; }
.sterne i { font-style: normal; color: #d9d4c7; transition: color .3s; }
.sterne i.an { color: #f2b01e; text-shadow: 0 1px 0 rgba(120, 80, 0, .22); }
.sterne.mini { font-size: .82rem; gap: 1px; margin-left: 2px; }
.sterne.dgross { font-size: 2.7rem; gap: 6px; }
.sterne.dgross i.an { animation: pop .5s ease both; } .sterne.dgross i.an:nth-child(2) { animation-delay: .22s; } .sterne.dgross i.an:nth-child(3) { animation-delay: .44s; }
.rbalken { display: block; height: 7px; border-radius: 9px; background: rgba(28, 36, 52, .1); overflow: hidden; margin: 6px 0 4px; }
.rbalken i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #f2b01e, #ffd166); transition: width .8s cubic-bezier(.2, .8, .2, 1); transform-origin: left; animation: wachsen 1s cubic-bezier(.2, .8, .2, 1) both; }
.bkopf .bkopftext { flex: 1; min-width: 0; }
.bkopfstand { flex: none; min-width: 158px; text-align: right; background: rgba(255, 255, 255, .15); border-radius: 12px; padding: 12px 14px; }
.bkopfstand b { display: block; font: 700 1.5rem Georgia, serif; } .bkopfstand b i { font-style: normal; color: #ffd166; }
.bkopfstand .rbalken { background: rgba(255, 255, 255, .25); } .bkopfstand small { color: rgba(255, 255, 255, .82); }
.kstand { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .8rem; } .kstand .rbalken { flex: 1; margin: 0; } .kstand b { white-space: nowrap; color: #9a6a00; }
.bkarte.voll { box-shadow: 0 0 0 2px #f2b01e; }
.brang { display: flex; gap: 14px 26px; align-items: center; flex-wrap: wrap; margin: 6px 0 18px; padding: 18px 22px; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, #2f2560, #1c2434); animation: auftauchen .5s ease both; }
.rangmarke { display: flex; align-items: center; gap: 12px; } .rangmarke .stern { font-size: 2.3rem; color: #ffd166; line-height: 1; animation: funkeln 2.8s ease-in-out infinite; }
.rangmarke small { display: block; color: rgba(255, 255, 255, .75); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; } .rangmarke b { font: 700 1.45rem Georgia, serif; }
.rangmitte { flex: 1 1 280px; } .rangmitte p { margin: 0; } .rangmitte .rbalken { background: rgba(255, 255, 255, .18); height: 9px; } .rangmitte small { color: rgba(255, 255, 255, .78); }
.rangzahl { color: #ffd166; font-size: 1.15rem; }
.blegende .l4 { background: #fff7de; border-color: #f2b01e; color: #c98a00; }
.bsprung a .sterne { margin-left: 4px; }

.bdu { margin-top: 20px; border: 2px solid color-mix(in srgb, var(--c) 30%, #fff); border-radius: 14px; background: color-mix(in srgb, var(--c) 5%, #fff); padding: 16px 18px 18px; }
.bdu > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.bdu .bmarke { color: var(--c); } .dfrage { margin: 0; font-size: 1.05rem; }
.dschritte { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dschritt { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; background: #fff; border: 1.5px solid var(--linie); border-radius: 11px; padding: 11px 14px; }
.bdu.aktiv .dschritt.zu { display: none; }
.dschritt.dran { border-color: var(--c); box-shadow: 0 4px 16px rgba(28, 36, 52, .09); animation: auftauchen .35s ease both; }
.dnr { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tinte); color: #fff; font-weight: 700; font-size: .85rem; }
.dschritt.dgut .dnr { background: var(--gut); } .dschritt.dauf .dnr { background: var(--mittel); }
.dkern { min-width: 0; } .dkern label { display: block; font-weight: 600; margin-bottom: 7px; }
.deing { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input.dzahl { width: 124px; font: 600 1.1rem "Cambria Math", Cambria, Georgia, serif; text-align: center; padding: 7px 9px; }
.dschritt.dgut .dzahl { border-color: var(--gut); background: var(--gut-hell); color: #1c6a40; } .dschritt.dauf .dzahl { border-color: var(--mittel); background: var(--warm-hell); color: #7a5200; }
.dpruef { border: 0; border-radius: 99px; padding: 9px 18px; background: var(--c); color: #fff; font: 600 .95rem system-ui, sans-serif; cursor: pointer; }
.dpruef:hover { filter: brightness(.92); }
.dtipp { border: 0; background: none; color: var(--grau); text-decoration: underline; cursor: pointer; font: inherit; font-size: .88rem; padding: 6px 4px; }
.dwahl { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.dopt { border: 1.5px solid #b9b4a8; background: #fff; border-radius: 99px; padding: 8px 16px; font: 600 .95rem system-ui, sans-serif; cursor: pointer; color: var(--tinte); }
.dopt:hover:not(:disabled) { border-color: var(--c); }
.dopt.richtig { background: var(--gut-hell); border-color: var(--gut); color: #1c6a40; } .dopt.falsch { background: var(--schwach-hell); border-color: var(--schwach); color: #8d2a21; text-decoration: line-through; }
.dschritt button:disabled { cursor: default; }
.dschritt.dgut .dpruef, .dschritt.dgut .dtipp, .dschritt.dauf .dpruef, .dschritt.dauf .dtipp { display: none; }
.dtipptext { margin: 8px 0 0; font-size: .92rem; background: var(--warm-hell); border-radius: 8px; padding: 7px 11px; }
.drueck { margin: 6px 0 0; font-size: .92rem; font-weight: 600; } .drueck:empty { display: none; }
.dschritt.dgut .drueck { color: var(--gut); } .dschritt.dauf .drueck { color: #8a5d00; } .drueck.nein { color: var(--schwach); }
.dpunkte { font-size: .95rem; color: #ddd8cc; letter-spacing: 1px; white-space: nowrap; padding-top: 4px; } .dpunkte b { color: #f2b01e; font-weight: 400; }
.dschritt.wackeln { animation: wackeln .35s ease; }
@keyframes wackeln { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.dserie { display: inline-block; margin-left: 8px; font-size: .74rem; font-weight: 700; color: #6b4a00; background: #ffd166; border-radius: 99px; padding: 2px 9px; animation: pop .4s ease both; }
.dfertig { position: relative; margin-top: 12px; background: #fff; border-radius: 12px; padding: 16px 18px; border: 1.5px solid #f2b01e; display: grid; gap: 12px; justify-items: start; overflow: hidden; animation: auftauchen .4s ease both; }
.dfertig[hidden] { display: none; }
.dergebnis { display: flex; gap: 6px 18px; align-items: center; flex-wrap: wrap; } .dtitel { display: block; font: 700 1.25rem Georgia, serif; } .dtext { color: var(--grau); font-size: .93rem; }
.dloes { width: 100%; } .dloes summary { cursor: pointer; color: var(--akzent); font-weight: 600; }
.dul { margin-top: 8px; border-top: 1px dashed var(--linie); padding-top: 8px; font: 1.05rem/1.5 "Cambria Math", Cambria, Georgia, serif; }
.konfetti { position: absolute; top: 34%; left: 50%; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; animation: konfetti 1.3s ease-out forwards; }
@keyframes konfetti { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }
.btoast { position: fixed; left: 50%; bottom: 84px; z-index: 50; background: linear-gradient(135deg, #2f2560, #1c2434); color: #fff; border-radius: 14px; padding: 14px 22px; box-shadow: 0 14px 40px rgba(28, 36, 52, .4); display: flex; gap: 12px; align-items: center; animation: toast 4.2s ease forwards; }
.btoast .stern { color: #ffd166; font-size: 1.7rem; line-height: 1; } .btoast small { display: block; color: rgba(255, 255, 255, .78); } .btoast b { font: 700 1.2rem Georgia, serif; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 20px); } 8%, 88% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 10px); } }
@media (max-width: 760px) {
  .bkopfstand { text-align: left; width: 100%; } .dschritt { grid-template-columns: 28px 1fr; } .dpunkte { grid-column: 2; padding: 0; }
  .bdu { padding: 14px 12px; } .bdu > header { flex-direction: column; gap: 6px; }
}
@media print {
  .bdu.aktiv .dschritt.zu { display: grid !important; } .deing, .dfertig .knopf, .dtipp { display: none !important; }
  .brang, .bkopfstand { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
