/* ===== Farben und Maße ===== */
:root {
    --grund: #f3f5f8;
    --flaeche: #ffffff;
    --flaeche-2: #f7f8fa;
    --text: #1b1f24;
    --text-2: #5b6470;
    --linie: #e3e7ec;
    --akzent: #0f6cbd;
    --akzent-hell: #e8f1fa;
    --akzent-text: #ffffff;
    --gut: #107c41;
    --gut-hell: #e7f5ec;
    --schlecht: #c42b1c;
    --schlecht-hell: #fdecea;
    --warn: #b25e00;
    --warn-hell: #fff4e0;
    --neutral-hell: #eef1f5;
    --schatten: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
    --schatten-gross: 0 12px 32px -12px rgba(16, 24, 40, .18);
    --radius: 14px;
    --radius-klein: 10px;
    --leiste: 248px;
    color-scheme: light;
}

html[data-dunkel="ja"] {
    --grund: #1c1c1c;
    --flaeche: #262626;
    --flaeche-2: #2e2e2e;
    --text: #f2f2f2;
    --text-2: #b4b9c0;
    --linie: #3a3a3a;
    --akzent: #4aa0f0;
    --akzent-hell: #1c3247;
    --akzent-text: #0b1a28;
    --gut: #5fd08a;
    --gut-hell: #173524;
    --schlecht: #ff8a7f;
    --schlecht-hell: #44201d;
    --warn: #ffb259;
    --warn-hell: #3d2a12;
    --neutral-hell: #333;
    --schatten: 0 1px 2px rgba(0, 0, 0, .4);
    --schatten-gross: 0 12px 32px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

html, body {
    background: var(--grund);
    color: var(--text);
    font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

body { margin: 0; }
h1:focus { outline: none; }
a { color: var(--akzent); }

/* ===== Gerüst ===== */
.app { display: flex; min-height: 100vh; }

.leiste {
    width: var(--leiste);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 14px;
    box-sizing: border-box;
    background: var(--flaeche);
    border-right: 1px solid var(--linie);
}

.marke {
    display: flex; align-items: center; gap: 12px;
    padding: 4px 8px 20px;
    text-decoration: none; color: var(--text);
}
.marke-logo {
    display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--akzent), #5b5fc7);
    color: #fff;
    box-shadow: 0 6px 16px -6px var(--akzent);
}
.marke-logo { animation: blaulicht 3.2s ease-in-out infinite; }
@keyframes blaulicht {
    0%, 100% { box-shadow: 0 6px 16px -6px var(--akzent); }
    50% { box-shadow: 0 0 0 3px color-mix(in srgb, #3b82f6 25%, transparent), 0 0 18px 2px rgba(59, 130, 246, .55); }
}
@media (prefers-reduced-motion: reduce) { .marke-logo { animation: none; } }
.marke-akzent { color: var(--akzent); }
.marke-text { display: flex; flex-direction: column; line-height: 1.2; }
.marke-text strong { font-size: 17px; letter-spacing: -.01em; }
.marke-text small { color: var(--text-2); font-size: 12.5px; }

.navi { display: flex; flex-direction: column; gap: 2px; }
.navi-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-klein);
    color: var(--text-2); text-decoration: none; font-weight: 500;
    transition: background .15s, color .15s;
}
.navi-link:hover { background: var(--flaeche-2); color: var(--text); }
.navi-link.active { background: var(--akzent-hell); color: var(--akzent); }

.leiste-fuss { margin-top: auto; }
.thema-knopf {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 10px 12px; border: 1px solid var(--linie); border-radius: var(--radius-klein);
    background: transparent; color: var(--text-2); font: inherit; cursor: pointer;
}
.thema-knopf:hover { background: var(--flaeche-2); color: var(--text); }
.version { margin-top: 10px; text-align: center; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.copyright { margin-top: 2px; text-align: center; font-size: 11.5px; color: var(--text-2); opacity: .85; }

.inhalt {
    flex: 1; min-width: 0;
    padding: 28px clamp(16px, 3vw, 40px) 60px;
    box-sizing: border-box;
    max-width: 1400px;
}

@media (max-width: 760px) {
    .app { flex-direction: column; }
    .leiste {
        position: sticky; top: 0; z-index: 50;
        width: 100%; height: auto; flex-direction: row; align-items: center;
        padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--linie);
    }
    .marke { padding: 0 8px 0 0; }
    .marke-text small { display: none; }
    .navi { flex-direction: row; overflow-x: auto; }
    .navi-link span { display: none; }
    .leiste-fuss { margin: 0 0 0 auto; }
    .thema-knopf span { display: none; }
    .version, .copyright { display: none; }
    .thema-knopf { width: auto; }
    .inhalt { padding-top: 20px; }
}

/* ===== Seitenkopf ===== */
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.kopf h1 { font-size: clamp(24px, 3vw, 30px); font-weight: 700; letter-spacing: -.02em; margin: 0; }
.kopf p { margin: 6px 0 0; color: var(--text-2); }
.kopf-aktionen { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* Label im Stil eines DevExpress-Umrissknopfs (öffnet die Dateiauswahl) */
.knopf-datei {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 12px; height: 32px; box-sizing: border-box; cursor: pointer; user-select: none;
    border: 1px solid var(--linie); border-radius: 4px; background: transparent;
    color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.knopf-datei:hover { background: var(--flaeche-2); border-color: var(--text-2); }
.oberzeile { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--akzent); margin-bottom: 6px; }

/* ===== Karten ===== */
.karte {
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 20px;
    min-width: 0;
}
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.karte-kopf h2 { font-size: 16px; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.karte-kopf .hinweis { font-size: 13px; color: var(--text-2); }
.karte-kopf a { font-size: 13.5px; text-decoration: none; font-weight: 600; }

.raster { display: grid; gap: 18px; }
.raster-kpi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 18px; }
.raster-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-bottom: 18px; }
.raster-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
@media (max-width: 1100px) { .raster-2-1, .raster-1-1 { grid-template-columns: minmax(0, 1fr); } }

/* ===== Kennzahlen ===== */
.kpi { display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi-titel { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.kpi-symbol { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--akzent-hell); color: var(--akzent); }
.kpi-symbol.gut { background: var(--gut-hell); color: var(--gut); }
.kpi-symbol.warn { background: var(--warn-hell); color: var(--warn); }
.kpi-symbol.schlecht { background: var(--schlecht-hell); color: var(--schlecht); }
.kpi-wert { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-wert small { font-size: 15px; font-weight: 500; color: var(--text-2); margin-left: 2px; }
.kpi-unten { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.trend-hoch { color: var(--gut); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.trend-runter { color: var(--schlecht); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }

/* ===== Startfläche (Dashboard) ===== */
.held {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 28px 30px; margin-bottom: 18px;
    border-radius: calc(var(--radius) + 4px);
    background:
        radial-gradient(1200px 300px at 100% 0%, rgba(255,255,255,.18), transparent 60%),
        linear-gradient(120deg, #0f6cbd 0%, #3b5bdb 55%, #6741d9 100%);
    color: #fff;
    box-shadow: var(--schatten-gross);
}
.held h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; }
.held p { margin: 8px 0 0; opacity: .9; max-width: 640px; }
.held-aktionen { display: flex; gap: 10px; flex-wrap: wrap; }
.held .knopf-hell {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 18px; border-radius: 999px; border: 0; cursor: pointer;
    background: #fff; color: #1b3a8a; font: inherit; font-weight: 650; text-decoration: none;
    box-shadow: 0 6px 18px -8px rgba(0,0,0,.5);
}
.held .knopf-glas {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 18px; border-radius: 999px; cursor: pointer;
    background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35);
    font: inherit; font-weight: 600; text-decoration: none; backdrop-filter: blur(6px);
}
.held .knopf-hell:hover { transform: translateY(-1px); }
.held .knopf-glas:hover { background: rgba(255,255,255,.22); }

.banner {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 14px 18px; margin-bottom: 18px;
    border-radius: var(--radius); border: 1px solid var(--linie);
    background: var(--warn-hell); color: var(--text);
}
.banner .symbol { color: var(--warn); }
.banner strong { margin-right: auto; }

/* ===== Listen ===== */
.liste { display: flex; flex-direction: column; }
.liste-zeile {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 4px; border-bottom: 1px solid var(--linie);
    color: var(--text); text-decoration: none;
}
.liste-zeile:last-child { border-bottom: 0; }
a.liste-zeile:hover { background: var(--flaeche-2); border-radius: 8px; }
.liste-haupt { flex: 1; min-width: 0; }
.liste-haupt strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liste-haupt small { color: var(--text-2); font-size: 12.5px; }
.rang {
    display: grid; place-items: center; flex-shrink: 0;
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--neutral-hell); color: var(--text-2); font-weight: 700; font-size: 13px;
}
.rang.r1 { background: #fde68a; color: #7c4a03; }
.rang.r2 { background: #e5e7eb; color: #374151; }
.rang.r3 { background: #fed7aa; color: #7c2d12; }

.leer {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
    padding: 28px 12px; color: var(--text-2);
}
.leer .symbol { color: var(--akzent); opacity: .8; }

/* ===== Abzeichen ===== */
.marke-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
    background: var(--neutral-hell); color: var(--text-2); white-space: nowrap;
}
.marke-chip.akzent { background: var(--akzent-hell); color: var(--akzent); }
.marke-chip.gut { background: var(--gut-hell); color: var(--gut); }
.marke-chip.schlecht { background: var(--schlecht-hell); color: var(--schlecht); }
.marke-chip.warn { background: var(--warn-hell); color: var(--warn); }

.punkte { display: inline-flex; gap: 4px; align-items: center; }
.punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--linie); }
.punkt.ja { background: var(--gut); }
.punkt.nein { background: var(--schlecht); }

.balken { height: 8px; border-radius: 99px; background: var(--neutral-hell); overflow: hidden; min-width: 60px; }
.balken > span { display: block; height: 100%; border-radius: 99px; background: var(--akzent); }
.balken.schlecht > span { background: var(--schlecht); }
.balken.gut > span { background: var(--gut); }
.balken.warn > span { background: var(--warn); }

/* ===== Quiz-Einstellungen ===== */
.schritt { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.schritt-nr {
    display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
    background: var(--akzent); color: var(--akzent-text); font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.schritt h2 { margin: 0; font-size: 17px; font-weight: 650; }
.schritt p { margin: 2px 0 0; color: var(--text-2); font-size: 13.5px; }
.schritt-text { flex: 1; }

.gebiete { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.gebiet {
    border: 1px solid var(--linie); border-radius: var(--radius-klein);
    padding: 12px 14px; background: var(--flaeche-2);
    transition: border-color .15s, background .15s;
}
.gebiet.aktiv { border-color: color-mix(in srgb, var(--akzent) 55%, transparent); background: var(--akzent-hell); }
.gebiet-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px dashed var(--linie); font-weight: 650; }
.gesetz-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.gesetz-zeile .anzahl { color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
    padding: 8px 16px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--linie); background: var(--flaeche); color: var(--text);
    font: inherit; font-weight: 600; font-variant-numeric: tabular-nums;
    transition: all .15s;
}
.chip:hover { border-color: var(--akzent); }
.chip.aktiv { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }

.optionen-wahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.wahl {
    display: flex; gap: 12px; align-items: flex-start; text-align: left;
    padding: 14px; border-radius: var(--radius-klein); cursor: pointer;
    border: 1.5px solid var(--linie); background: var(--flaeche); color: var(--text); font: inherit;
    transition: all .15s;
}
.wahl:hover { border-color: color-mix(in srgb, var(--akzent) 60%, var(--linie)); }
.wahl.aktiv { border-color: var(--akzent); background: var(--akzent-hell); box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 18%, transparent); }
.wahl .symbol { color: var(--akzent); flex-shrink: 0; margin-top: 2px; }
.wahl strong { display: block; margin-bottom: 2px; }
.wahl small { color: var(--text-2); font-size: 13px; line-height: 1.4; }

.startleiste {
    position: sticky; bottom: 16px; z-index: 20;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-top: 18px; padding: 14px 18px;
    border-radius: var(--radius); border: 1px solid var(--linie);
    background: color-mix(in srgb, var(--flaeche) 88%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: var(--schatten-gross);
}
.startleiste .zusammenfassung { margin-right: auto; }
.startleiste .zusammenfassung strong { font-size: 16px; }
.startleiste .zusammenfassung small { display: block; color: var(--text-2); }

/* ===== Quiz ===== */
.quiz { max-width: 860px; margin: 0 auto; }
.quiz-oben { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.quiz-oben .titel { font-weight: 650; margin-right: auto; }
.quiz-zaehler { display: flex; gap: 8px; align-items: center; }
.ton-knopf {
    display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
    border: 1px solid var(--linie); border-radius: 8px; cursor: pointer;
    background: var(--flaeche); color: var(--text-2);
}
.ton-knopf:hover { color: var(--akzent); border-color: var(--akzent); }
.ton-knopf[aria-pressed="false"] { color: var(--text-2); opacity: .7; }
.fortschritt { margin-bottom: 22px; }
.fortschritt .dxbl-progress-bar { width: 100% !important; max-width: none !important; }
.fortschritt .dxbl-progress-bar-horizontal { width: 100% !important; }
.fortschritt-text { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-variant-numeric: tabular-nums; }

.frage-karte { padding: clamp(20px, 3vw, 32px); animation: einblenden .25s ease-out; }
@keyframes einblenden { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.frage-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.frage-stellung { color: var(--text-2); font-size: 14px; margin-bottom: 6px; }
.frage-begriff { font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.02em; margin: 0 0 22px; line-height: 1.2; }
.frage-definition {
    font-size: 17px; line-height: 1.55; margin: 0 0 22px; padding: 16px 18px;
    border-left: 4px solid var(--akzent); border-radius: 0 var(--radius-klein) var(--radius-klein) 0;
    background: var(--flaeche-2);
}

.maske {
    display: inline-block; padding: 0 6px; border-radius: 5px; letter-spacing: -2px;
    background: var(--akzent-hell); color: var(--akzent); font-weight: 700;
}
.antworten { display: flex; flex-direction: column; gap: 10px; }
.antwort {
    display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left;
    padding: 14px 16px; border-radius: var(--radius-klein); cursor: pointer;
    border: 1.5px solid var(--linie); background: var(--flaeche); color: var(--text);
    font: inherit; font-size: 15.5px; line-height: 1.5;
    transition: border-color .12s, background .12s, transform .12s, opacity .2s;
}
.antwort:hover:not(:disabled) { border-color: var(--akzent); background: var(--akzent-hell); transform: translateX(2px); }
.antwort:disabled { cursor: default; }
.antwort .buchstabe {
    display: grid; place-items: center; flex-shrink: 0;
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--neutral-hell); color: var(--text-2); font-weight: 700; font-size: 14px;
}
.antwort .antwort-text { flex: 1; padding-top: 3px; }
.antwort .ergebnis-symbol { flex-shrink: 0; padding-top: 4px; }
.antwort.richtig { border-color: var(--gut); background: var(--gut-hell); }
.antwort.richtig .buchstabe { background: var(--gut); color: #fff; }
.antwort.richtig .ergebnis-symbol { color: var(--gut); }
.antwort.falsch { border-color: var(--schlecht); background: var(--schlecht-hell); }
.antwort.falsch .buchstabe { background: var(--schlecht); color: #fff; }
.antwort.falsch .ergebnis-symbol { color: var(--schlecht); }
.antwort.gedimmt { opacity: .5; }

.rueckmeldung {
    display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap;
    margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-klein);
    animation: einblenden .2s ease-out;
}
.rueckmeldung.gut { background: var(--gut-hell); }
.rueckmeldung.schlecht { background: var(--schlecht-hell); }
.rueckmeldung .symbol-kreis { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; flex-shrink: 0; }
.rueckmeldung.gut .symbol-kreis { background: var(--gut); }
.rueckmeldung.schlecht .symbol-kreis { background: var(--schlecht); }
.rueckmeldung-text { flex: 1; min-width: 220px; }
.rueckmeldung-text strong { display: block; margin-bottom: 2px; }
.rueckmeldung-text p { margin: 4px 0 0; line-height: 1.5; color: var(--text); }
.tastenhinweis { margin-top: 14px; font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
kbd {
    display: inline-block; min-width: 18px; padding: 1px 6px; text-align: center;
    border: 1px solid var(--linie); border-bottom-width: 2px; border-radius: 5px;
    background: var(--flaeche); font: 600 11.5px/1.5 inherit; color: var(--text);
}

/* ===== Ergebnis ===== */
.ergebnis-held { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.ergebnis-ring { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.ergebnis-ring svg { transform: rotate(-90deg); }
.ergebnis-ring .ring-text { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ergebnis-ring .ring-text strong { font-size: 34px; font-weight: 750; letter-spacing: -.03em; line-height: 1; }
.ergebnis-ring .ring-text small { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.ergebnis-werte { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 12px; }
.ergebnis-werte div { display: flex; flex-direction: column; }
.ergebnis-werte strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.ergebnis-werte small { color: var(--text-2); font-size: 12.5px; }

.auflistung { display: flex; flex-direction: column; gap: 8px; }
.auflistung details {
    border: 1px solid var(--linie); border-radius: var(--radius-klein); background: var(--flaeche);
}
.auflistung summary {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none;
}
.auflistung summary::-webkit-details-marker { display: none; }
.auflistung .status { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; flex-shrink: 0; }
.auflistung .status.ja { background: var(--gut); }
.auflistung .status.nein { background: var(--schlecht); }
.auflistung .status.offen { background: var(--linie); color: var(--text-2); }
.auflistung .inhalt-detail { padding: 0 14px 14px 52px; font-size: 14.5px; line-height: 1.55; }
.auflistung .inhalt-detail .zeile { margin-top: 8px; }
.auflistung .inhalt-detail .label { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }

/* ===== Gitter (DxGrid) ===== */
.gitter-karte { padding: 8px; }
.gitter-karte .dxbl-grid { border: 0; }
.detail { padding: 10px 14px; line-height: 1.55; white-space: normal; max-width: 900px; }
.detail .label { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin-top: 10px; }
.detail .label:first-child { margin-top: 0; }
.verwechslung { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }
.zelle-begriff strong { display: block; }
.zelle-begriff small { color: var(--text-2); }

.podest { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.podest .karte { display: flex; flex-direction: column; gap: 8px; }
.podest .zahl { font-size: 28px; font-weight: 750; color: var(--schlecht); line-height: 1; }

.diagramm-hoehe { height: 320px; }

.fusszeile-hinweis { margin-top: 24px; font-size: 12.5px; color: var(--text-2); }

/* ===== Abschluss-Animation (Ergebnis) ===== */
.konfetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2000; }

.feier {
    position: fixed; inset: 0; z-index: 1500;
    display: grid; place-items: center; padding: 16px;
    background: color-mix(in srgb, var(--grund) 55%, transparent);
    backdrop-filter: blur(6px);
    animation: feier-ein .3s ease-out;
}
.feier.stufe-1 { --feier-farbe: #5b6b80; }
.feier.stufe-2 { --feier-farbe: #e8890c; }
.feier.stufe-3 { --feier-farbe: #2e9d5b; }
.feier.stufe-4 { --feier-farbe: #d99a00; }

.feier-karte {
    position: relative; width: min(420px, 100%); box-sizing: border-box; text-align: center;
    padding: 34px 28px 26px; border-radius: 24px;
    background: var(--flaeche); border: 1px solid var(--linie);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
    animation: feier-karte .6s cubic-bezier(.2, 1.4, .4, 1) both;
}
.feier-karte h2 { margin: 6px 0 6px; font-size: 24px; letter-spacing: -.02em; }
.feier-karte p { margin: 0 0 20px; color: var(--text-2); line-height: 1.5; }

.feier-symbol {
    position: relative; isolation: isolate;
    width: 108px; height: 108px; margin: 0 auto 16px;
    display: grid; place-items: center; border-radius: 50%; color: #fff;
    background: var(--feier-farbe);
    box-shadow: 0 12px 30px -10px var(--feier-farbe);
    animation: feier-huepfen .9s .3s cubic-bezier(.3, 1.6, .5, 1) both;
}
.stufe-4 .feier-symbol { background: linear-gradient(135deg, #ffd43b, #e8890c); }
.feier-symbol .strahlen {
    position: absolute; inset: -34px; z-index: -1; border-radius: 50%; opacity: 0;
    background: repeating-conic-gradient(color-mix(in srgb, var(--feier-farbe) 40%, transparent) 0 9deg, transparent 9deg 30deg);
    -webkit-mask: radial-gradient(circle, #000 35%, transparent 70%);
    mask: radial-gradient(circle, #000 35%, transparent 70%);
}
.stufe-3 .strahlen, .stufe-4 .strahlen { animation: feier-strahlen-ein .6s .5s forwards, feier-drehen 9s linear infinite; }
.stufe-1 .feier-symbol { animation: feier-wackeln 1.4s .4s ease-in-out both; }
.stufe-2 .feier-symbol { animation: feier-huepfen .9s .3s cubic-bezier(.3, 1.6, .5, 1) both, feier-schweben 2.4s 1.3s ease-in-out infinite; }
.stufe-4 .feier-symbol svg { animation: feier-pokal 1.8s 1.2s ease-in-out infinite; }

.feier-sterne { display: flex; justify-content: center; gap: 8px; margin-bottom: 6px; }
.stern { display: inline-flex; color: var(--linie); transform: scale(0); animation: feier-stern .5s calc(.55s + var(--i) * .2s) cubic-bezier(.2, 1.7, .4, 1) forwards; }
.stern.voll { color: #f5b301; filter: drop-shadow(0 3px 6px rgba(245, 179, 1, .45)); }
.stern.voll svg { fill: currentColor; }

.feier-zahl { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--feier-farbe); font-variant-numeric: tabular-nums; }

@keyframes feier-ein { from { opacity: 0; } to { opacity: 1; } }
@keyframes feier-karte { from { opacity: 0; transform: translateY(28px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes feier-huepfen { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes feier-wackeln { 0% { transform: scale(0); } 30% { transform: scale(1) rotate(0); } 45% { transform: rotate(-8deg); } 60% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } 100% { transform: rotate(0); } }
@keyframes feier-schweben { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes feier-strahlen-ein { to { opacity: 1; } }
@keyframes feier-drehen { to { rotate: 360deg; } }
@keyframes feier-pokal { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-6deg) scale(1.06); } 50% { transform: rotate(0) scale(1); } 75% { transform: rotate(6deg) scale(1.06); } }
@keyframes feier-stern { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1) rotate(0); } }

@media (prefers-reduced-motion: reduce) {
    .feier, .feier *, .feier *::before { animation: none !important; }
    .stern { transform: none; }
    .strahlen { opacity: .6 !important; }
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
