/* Folien und Diagramme. Alles lebt auf einer Leinwand von 1600 × 900 und wird als Ganzes skaliert –
   so sieht die Vorschau im Editor exakt aus wie der Beamer. */
.leinwand {
  --d-bg: #ffffff; --d-text: #1d1d1b; --d-text2: #5b5f6b; --d-spur: #eceef2; --d-grau: #c9ccd3; --d-karte: #f5f6f8;
  width: 1600px; height: 900px; position: relative; overflow: hidden;
  background: var(--d-bg); color: var(--d-text); font-size: 26px; transform-origin: 0 0;
  font-family: var(--schrift);
}
.leinwand.thema-dunkel { --d-bg: var(--dunkel); --d-text: #f4f5f8; --d-text2: #b5b9c6; --d-spur: rgba(255,255,255,.1); --d-grau: rgba(255,255,255,.28); --d-karte: rgba(255,255,255,.07); }
.leinwand.thema-marke {
  --d-bg: var(--dunkel); --d-text: #fff; --d-text2: rgba(255,255,255,.75); --d-spur: rgba(255,255,255,.12); --d-grau: rgba(255,255,255,.3); --d-karte: rgba(255,255,255,.09);
  background: radial-gradient(1200px 700px at 110% -10%, color-mix(in srgb, var(--akzent) 55%, transparent), transparent 60%),
              radial-gradient(900px 600px at -10% 110%, color-mix(in srgb, var(--akzent) 25%, transparent), transparent 60%), var(--dunkel);
}
.skalierer { position: relative; overflow: hidden; }
.skalierer > .leinwand { position: absolute; left: 0; top: 0; }

.fl { position: absolute; inset: 0; padding: 120px 90px 70px; display: flex; flex-direction: column; }
.fl-kopf { margin-bottom: 36px; }
.fl-frage { font-size: 2.35em; font-weight: 750; line-height: 1.12; letter-spacing: -.02em; max-width: 1350px; text-wrap: balance; }
.fl-platzhalter { color: var(--d-grau); }
.fl-beschr { margin: .5em 0 0; color: var(--d-text2); font-size: 1.05em; max-width: 1200px; }
.fl-koerper { flex: 1; display: flex; gap: 50px; min-height: 0; }
.fl-ergebnis { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.fl-bild { width: 420px; height: 100%; max-height: 560px; object-fit: cover; border-radius: 22px; flex: none; align-self: center; }
.d-leer { color: var(--d-text2); text-align: center; font-size: 1.1em; }

/* Säulen */
.d-saeulen { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(18px, calc(200px / var(--n)), 60px); height: 100%; max-height: 560px; align-items: end; padding: 0 20px; }
.d-saeule { display: flex; flex-direction: column; height: 100%; min-width: 0; transition: opacity .4s; }
.d-saeule.falsch { opacity: .55; }
.d-saeule-spur { flex: 1; display: flex; align-items: flex-end; border-bottom: 3px solid var(--d-spur); }
.d-saeule-fuell { width: 100%; min-height: 6px; border-radius: 14px 14px 4px 4px; position: relative; transition: height .7s cubic-bezier(.2, .9, .25, 1.05); }
.d-saeule-wert { position: absolute; bottom: 100%; left: 0; right: 0; text-align: center; font-weight: 800; font-size: 1.35em; padding-bottom: 8px; color: var(--d-text); font-variant-numeric: tabular-nums; }
.d-saeule-text { text-align: center; padding-top: 14px; font-weight: 600; font-size: .95em; line-height: 1.2; min-height: 2.6em; overflow-wrap: anywhere; }
.d-haken { color: var(--gruen); font-weight: 900; }

/* Balken */
.d-balken { display: grid; gap: 22px; width: 100%; }
.d-balken-zeile { display: grid; grid-template-columns: minmax(200px, 34%) 1fr 110px; gap: 22px; align-items: center; }
.d-balken-text { font-weight: 600; font-size: .98em; line-height: 1.2; }
.d-balken-text small, .d-ranking-text small { display: block; font-weight: 500; color: var(--d-text2); font-size: .72em; margin-top: 3px; }
.d-balken-spur { height: 34px; background: var(--d-spur); border-radius: 99px; overflow: hidden; position: relative; }
.d-balken-spur.stufen { background: repeating-linear-gradient(90deg, var(--d-spur) 0 calc(100% / var(--stufen) - 3px), transparent 0 calc(100% / var(--stufen))); }
.d-balken-fuell { height: 100%; border-radius: 99px; transition: width .7s cubic-bezier(.2, .9, .25, 1.05); min-width: 4px; }
.d-balken-wert { font-weight: 800; font-size: 1.15em; text-align: right; font-variant-numeric: tabular-nums; }

/* Torte / Ring */
.d-kreis { display: flex; align-items: center; gap: 80px; justify-content: center; height: 100%; }
.d-kreis-svg { height: min(100%, 520px); aspect-ratio: 1; flex: none; }
.d-kreis-svg circle { transition: stroke-dasharray .7s ease, stroke-dashoffset .7s ease; }
.d-kreis-mitte { font-size: 38px; font-weight: 800; fill: var(--d-text); }
.d-legende { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; min-width: 360px; }
.d-legende li { display: grid; grid-template-columns: 26px 1fr auto; gap: 14px; align-items: center; font-weight: 600; }
.d-legende i { width: 26px; height: 26px; border-radius: 8px; }
.d-legende b { font-size: 1.15em; font-variant-numeric: tabular-nums; }

/* Wortwolke */
.d-wolke { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; align-content: center; gap: .15em .6em; height: 100%; line-height: 1.05; padding: 0 30px; }
.d-wolke span { transition: font-size .6s ease; letter-spacing: -.01em; animation: aufploppen .5s ease-out; }
@keyframes aufploppen { from { opacity: 0; transform: scale(.6); } }

/* Skala */
.d-skala { display: grid; gap: 30px; position: relative; }
.d-skala-kopf { display: flex; justify-content: space-between; margin-left: calc(34% + 22px); color: var(--d-text2); font-size: .8em; font-weight: 600; }
.d-skala-zeile { display: grid; grid-template-columns: 34% 1fr; gap: 22px; align-items: center; }
.d-skala-text { font-weight: 600; }
.d-skala-spur { height: 8px; background: var(--d-spur); border-radius: 99px; position: relative; margin: 0 26px; }
.d-skala-spur i { position: absolute; top: -6px; width: 3px; height: 20px; background: var(--d-spur); transform: translateX(-50%); }
.d-skala-punkt { position: absolute; top: 50%; width: 58px; height: 58px; border-radius: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .8em; box-shadow: 0 6px 18px rgba(0,0,0,.18); transition: left .8s cubic-bezier(.2, .9, .25, 1.05); }
.d-skala-achse { position: relative; height: 1.2em; margin-left: calc(34% + 22px + 26px); margin-right: 26px; color: var(--d-text2); font-size: .8em; }
.d-skala-achse span { position: absolute; transform: translateX(-50%); }

/* Offene Antworten */
.d-wand { columns: 3; column-gap: 22px; height: 100%; overflow: hidden; }
.d-liste { display: grid; gap: 14px; overflow: hidden; height: 100%; align-content: start; }
.d-karte {
  break-inside: avoid; margin-bottom: 22px; padding: 22px 26px; border-radius: 20px; background: var(--d-karte);
  font-size: .95em; line-height: 1.3; font-weight: 550; animation: aufploppen .45s ease-out;
  border-left: 8px solid hsl(calc(var(--i) * 55 + 20) 70% 55%);
}
.d-liste .d-karte { margin: 0; }
.d-karte small { display: block; margin-top: 8px; color: var(--d-text2); font-size: .75em; font-weight: 600; }
.d-karte.st-wartet, .d-frage.st-wartet { opacity: .55; outline: 2px dashed var(--d-grau); }
.d-karte.st-verborgen, .d-frage.st-verborgen { opacity: .35; text-decoration: line-through; }

/* Fragen aus dem Publikum */
.d-fragen { display: grid; gap: 16px; align-content: start; height: 100%; overflow: hidden; }
.d-frage { display: flex; gap: 22px; align-items: center; padding: 18px 26px; background: var(--d-karte); border-radius: 20px; animation: aufploppen .45s ease-out; }
.d-frage.beantwortet { opacity: .45; }
.d-stimmen { display: grid; place-items: center; min-width: 70px; padding: 6px 0; border-radius: 14px; background: color-mix(in srgb, var(--akzent) 16%, transparent); color: var(--akzent); line-height: 1; }
.d-stimmen b { font-size: 1.3em; }
.d-stimmen span { font-size: .6em; }
.d-frage-text { font-weight: 600; font-size: 1em; }
.d-frage-text small { display: block; color: var(--d-text2); font-size: .7em; margin-top: 4px; }

/* Ranking */
.d-ranking { display: grid; gap: 20px; }
.d-ranking-zeile { display: grid; grid-template-columns: 64px 1fr; gap: 22px; align-items: center; }
.d-platz { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font-weight: 800; font-size: 1.2em; color: #fff; }
.d-ranking-inhalt { display: grid; gap: 8px; }
.d-ranking-text { font-weight: 650; }
.d-ranking .d-balken-spur { height: 16px; }

/* Ampel */
.d-ampel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; align-items: center; height: 100%; }
.d-ampel-teil { display: grid; justify-items: center; gap: 22px; }
.d-ampel-kreis { width: 300px; height: 300px; border-radius: 50%; display: grid; place-items: center; transform: scale(var(--s)); transition: transform .7s cubic-bezier(.2, .9, .25, 1.1); color: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.15); }
.d-ampel-kreis b { font-size: 2.6em; font-weight: 800; }
.a-gruen .d-ampel-kreis { background: var(--gruen); }
.a-gelb .d-ampel-kreis { background: var(--gelb); color: #1d1d1b; }
.a-rot .d-ampel-kreis { background: var(--rot); }
.d-ampel-text { text-align: center; font-weight: 700; font-size: 1.15em; }
.d-ampel-text small { display: block; color: var(--d-text2); font-weight: 500; font-size: .7em; }

/* Reifegrad */
.d-reife { display: grid; grid-template-columns: 380px 1fr; gap: 60px; align-items: center; }
.d-reife-tacho svg { width: 100%; }
.d-reife-bogen { transition: stroke-dasharray .8s ease; }
.d-reife-zahl { font-size: 40px; font-weight: 800; fill: var(--d-text); }
.d-reife-unter { text-align: center; color: var(--d-text2); font-weight: 600; font-size: .85em; }
.d-reife .d-balken { gap: 18px; }
.d-reife-liste { display: grid; gap: 20px; }
.d-reife-liste .d-balken-zeile { grid-template-columns: minmax(200px, 40%) 1fr 90px; }

/* Quiz */
.d-quiz-karten { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.d-quiz-karte { color: #fff; padding: 30px 34px; border-radius: 20px; font-weight: 700; font-size: 1.1em; display: flex; gap: 20px; align-items: center; min-height: 120px; }
.d-form { font-size: 1.3em; opacity: .9; }
.d-quiz-fazit { text-align: center; font-weight: 700; color: var(--d-text2); margin-top: 22px; font-size: .9em; }
.d-verborgen { text-align: center; color: var(--d-text2); font-size: 1.05em; }
.d-verborgen-zahl { font-size: 5em; font-weight: 800; color: var(--d-text); line-height: 1; margin-bottom: 12px; }

/* Rangliste */
.d-rangliste { position: absolute; inset: 0; padding: 100px 260px; }
.d-rangliste h1 { text-align: center; margin-bottom: 40px; }
.d-rangliste ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.d-rangliste li { display: grid; grid-template-columns: 70px 1fr auto; gap: 20px; align-items: center; padding: 14px 28px; border-radius: 18px; background: var(--d-karte); font-size: 1.05em; animation: hereinrutschen .5s ease-out both; animation-delay: calc(var(--v) * 80ms); }
.d-rangliste li:first-child { background: color-mix(in srgb, var(--akzent) 22%, var(--d-karte)); font-size: 1.25em; }
.d-rang { font-weight: 800; text-align: center; font-size: 1.2em; }
.d-rang-name { font-weight: 700; }
.d-rang-punkte { font-weight: 800; font-variant-numeric: tabular-nums; }
@keyframes hereinrutschen { from { opacity: 0; transform: translateY(20px); } }

/* Inhaltsfolie */
.fl-inhalt { flex-direction: row; align-items: center; gap: 70px; }
.fl-inhalt-text { flex: 1; }
.fl-inhalt .fl-text { font-size: 1.15em; color: var(--d-text2); margin-top: 26px; line-height: 1.5; max-width: 1100px; }
.fl-inhalt .fl-text p { margin: 0 0 .7em; }
.fl-inhalt.lay-zentriert { text-align: center; justify-content: center; }
.fl-inhalt.lay-zentriert .fl-frage, .fl-inhalt.lay-zentriert .fl-text { margin-left: auto; margin-right: auto; }
.fl-inhalt.lay-gross .fl-frage { font-size: 3.6em; }
.fl-inhalt .fl-bild { width: 520px; height: 620px; max-height: none; }

/* Branding auf der Folie */
.leinwand.mit-hg::before { content: ""; position: absolute; inset: 0; background: var(--hg) center / cover no-repeat; opacity: .14; pointer-events: none; }
.leinwand.thema-dunkel.mit-hg::before, .leinwand.thema-marke.mit-hg::before { opacity: .28; }
.logo-ecke { position: absolute; left: 44px; top: 30px; height: 60px; max-width: 320px; z-index: 5; display: flex; align-items: center; }
.logo-ecke.rechts { left: auto; right: 44px; }
.logo-ecke img { height: 100%; width: auto; max-width: 320px; object-fit: contain; object-position: left center; }
.logo-ecke.rechts img { object-position: right center; }
.fusszeile { position: absolute; left: 44px; bottom: 24px; font-size: .62em; color: var(--d-text2); font-weight: 600; z-index: 5; max-width: 900px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beitritt { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; padding: 10px 26px 10px 12px; border-radius: 99px; background: var(--d-karte); font-size: .8em; color: var(--d-text2); white-space: nowrap; z-index: 5; max-width: 880px; }
.beitritt img { width: 58px; height: 58px; border-radius: 10px; background: #fff; padding: 3px; }
.beitritt b { color: var(--d-text); font-size: 1.1em; }
.beitritt .code { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* Lange Fragen und viele Optionen */
.fl-frage.lang-2 { font-size: 1.85em; }
.fl-frage.lang-3 { font-size: 1.5em; }
.fl-ergebnis > * { max-width: 100%; }
.d-saeule-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 0; }
.d-saeulen { max-height: none; height: 100%; }
.d-balken-text, .d-legende span, .d-ranking-text, .d-skala-text, .d-quiz-karte { overflow-wrap: anywhere; }
.d-balken-text, .d-skala-text, .d-legende span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.d-quiz-karte { line-height: 1.25; }
.d-ampel-text { max-width: 420px; overflow-wrap: anywhere; }
.fl-kopf { flex: none; }
.fl-koerper { overflow: hidden; }

/* Bildauswahl */
.d-bilder { display: grid; grid-template-columns: repeat(min(var(--n), 4), minmax(0, 1fr)); gap: 26px; align-content: center; }
.d-bildkarte { display: grid; gap: 10px; }
.d-bildrahmen { aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--d-karte); display: grid; place-items: center; }
.d-bildrahmen img { width: 100%; height: 100%; object-fit: cover; }
.d-bild-leer { font-size: 3em; font-weight: 800; color: var(--d-grau); }
.d-bild-text { font-weight: 650; font-size: .9em; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-bildkarte .d-balken-spur { height: 18px; }
.d-bild-wert { font-weight: 800; font-size: 1.1em; }

/* Schätzfrage */
.d-schaetzung { display: grid; gap: 14px; }
.d-histo { position: relative; height: 380px; display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; border-bottom: 3px solid var(--d-spur); margin-top: 50px; }
.d-histo-saeule { height: 100%; display: flex; align-items: flex-end; }
.d-histo-saeule div { width: 100%; border-radius: 10px 10px 3px 3px; min-height: 3px; transition: height .7s cubic-bezier(.2, .9, .25, 1.05); opacity: .85; }
.d-marke { position: absolute; top: -46px; bottom: 0; width: 0; border-left: 4px dashed var(--d-text); transition: left .7s ease; }
.d-marke span { position: absolute; top: 0; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--d-text); color: var(--d-bg); padding: 4px 12px; border-radius: 99px; font-size: .7em; font-weight: 800; }
.d-marke.loesung { border-left-color: var(--gruen); border-left-style: solid; }
.d-marke.loesung span { background: var(--gruen); color: #fff; top: 38px; }
.d-histo-achse { display: flex; justify-content: space-between; color: var(--d-text2); font-weight: 600; font-size: .8em; }
.d-schaetz-kennzahlen { display: flex; gap: 40px; justify-content: center; color: var(--d-text2); font-size: .9em; }
.d-schaetz-kennzahlen b { color: var(--d-text); }

/* 2×2-Matrix */
.d-matrix { display: grid; place-items: center; height: 100%; }
.d-matrix-feld { position: relative; width: min(100%, 980px); height: min(100%, 560px); aspect-ratio: 16 / 9;
  background: linear-gradient(var(--d-spur), var(--d-spur)) 50% 0 / 3px 100% no-repeat, linear-gradient(var(--d-spur), var(--d-spur)) 0 50% / 100% 3px no-repeat, var(--d-karte);
  border-radius: 20px; }
.d-achse { position: absolute; font-size: .7em; font-weight: 700; color: var(--d-text2); text-transform: uppercase; letter-spacing: .04em; }
.d-achse.y-oben { top: 12px; left: 50%; transform: translateX(-50%); }
.d-achse.y-unten { bottom: 12px; left: 50%; transform: translateX(-50%); }
.d-achse.x-links { left: 14px; top: 50%; transform: translateY(-50%); background: var(--d-karte); padding: 2px 8px; border-radius: 6px; }
.d-achse.x-rechts { right: 14px; top: 50%; transform: translateY(-50%); background: var(--d-karte); padding: 2px 8px; border-radius: 6px; }
.d-achse.y-oben, .d-achse.y-unten { background: var(--d-karte); padding: 2px 8px; border-radius: 6px; }
.d-matrix-punkt { position: absolute; transform: translate(-50%, 50%); display: flex; align-items: center; gap: 10px; transition: left .8s ease, bottom .8s ease; }
.d-matrix-punkt i { width: 30px; height: 30px; border-radius: 50%; background: var(--f); box-shadow: 0 0 0 6px color-mix(in srgb, var(--f) 25%, transparent); flex: none; }
.d-matrix-punkt span { font-weight: 700; font-size: .8em; background: var(--d-bg); padding: 3px 10px; border-radius: 8px; white-space: nowrap; }
.d-bildrahmen { position: relative; }
.d-bildrahmen img { position: absolute; inset: 0; }
.d-bildkarte { min-height: 0; min-width: 0; }
/* Bildkarten füllen die verfügbare Höhe – so passen auch 8 Bilder ohne Überlauf */
.d-bilder { height: 100%; grid-auto-rows: minmax(0, 1fr); align-content: stretch; }
.d-bildkarte { display: flex; flex-direction: column; gap: 8px; max-height: 520px; align-self: center; height: 100%; }
.d-bildrahmen { aspect-ratio: auto; flex: 1; min-height: 60px; }
.d-bild-text { flex: none; }
.d-bildkarte .d-balken-spur, .d-bild-wert { flex: none; }
