/* Mathe-Survivor – Quiz-Survivor (Beamer: quiz-leitung.html, Handy: quiz.html) */
:root {
  --qz-bg1: #2a1457; --qz-bg2: #120a2e; --qz-karte: #ffffff; --qz-text: #1d1633; --qz-hell: #f4f0ff;
  --qz-akzent: #ffb703; --qz-lila: #6b3fd4; --qz-lila-d: #46238f; --qz-gruen: #26890c; --qz-rot: #e21b3c;
  --qz-blau: #1368ce; --qz-gelb: #d89e00; --qz-grau: #6d6888; --qz-rand: #e3defa;
  --qz-schatten: 0 4px 0 rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; color: var(--qz-hell);
  background: radial-gradient(ellipse at 50% -10%, #4b2a96 0%, var(--qz-bg1) 35%, var(--qz-bg2) 100%) fixed;
  min-height: 100vh; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
.qz-seite { min-height: 100vh; display: flex; flex-direction: column; }

/* Kopf */
.qz-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; }
.qz-logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; letter-spacing: .5px; }
.qz-logo small { display: block; font-size: 12px; font-weight: 600; opacity: .7; letter-spacing: 0; }
.qz-logo-zeichen { font-size: 30px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }

/* Knöpfe */
.qz-knopf {
  border: 0; border-radius: 8px; padding: 12px 22px; font-weight: 800; font-size: 17px; cursor: pointer;
  background: var(--qz-akzent); color: #2b1a00; box-shadow: var(--qz-schatten); transition: transform .08s, filter .15s;
}
.qz-knopf:hover { filter: brightness(1.07); }
.qz-knopf:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.qz-knopf:disabled { opacity: .5; cursor: default; }
.qz-knopf.zweit { background: #fff; color: var(--qz-text); }
.qz-knopf.dunkel { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }
.qz-knopf.rot { background: var(--qz-rot); color: #fff; }
.qz-knopf.gross { font-size: 22px; padding: 16px 34px; }
.qz-knopf.klein { font-size: 14px; padding: 7px 12px; }

/* Karten / Formulare */
.qz-karte { background: var(--qz-karte); color: var(--qz-text); border-radius: 10px; padding: 22px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.qz-mitte { margin: auto; width: min(440px, calc(100% - 32px)); text-align: center; }
.qz-feld { width: 100%; border: 2px solid var(--qz-rand); border-radius: 8px; padding: 12px 14px; font-size: 18px; color: var(--qz-text); background: #fff; }
.qz-feld:focus { outline: none; border-color: var(--qz-lila); }
.qz-fehler { color: var(--qz-rot); font-weight: 700; min-height: 1.2em; margin: 10px 0 0; }
.qz-hinweis { color: var(--qz-grau); font-size: 14px; }
label.qz-label { display: block; text-align: left; font-weight: 700; font-size: 14px; margin: 12px 0 4px; color: var(--qz-grau); }

/* Antwort-Formen */
.qz-form svg { width: 1em; height: 1em; fill: #fff; display: block; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.qz-a0 { background: var(--qz-rot); } .qz-a1 { background: var(--qz-blau); } .qz-a2 { background: var(--qz-gelb); } .qz-a3 { background: var(--qz-gruen); }

/* ================================================================ HANDY */
.hd-pin { font-size: 30px; text-align: center; letter-spacing: 6px; font-weight: 900; }
.hd-titel { font-size: 26px; font-weight: 900; margin: 0 0 6px; }
.hd-oben { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-weight: 800; background: rgba(0,0,0,.25); }
.hd-oben .hd-punkte { background: rgba(255,255,255,.15); border-radius: 6px; padding: 4px 10px; }
.hd-held-gross { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 10px auto; }
.hd-name { font-weight: 900; font-size: 22px; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.hd-mitte { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px; gap: 10px; }
.hd-gross { font-size: 30px; font-weight: 900; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.hd-klein { opacity: .8; font-size: 16px; }
.hd-frage-text { font-size: 20px; font-weight: 800; background: #fff; color: var(--qz-text); border-radius: 8px; padding: 12px 14px; margin: 10px 12px 0; text-align: center; }
.hd-knoepfe { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
.hd-knoepfe.zwei { grid-template-columns: 1fr; }
.hd-knopf {
  border: 0; border-radius: 8px; color: #fff; font-weight: 800; font-size: 18px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; padding: 10px; min-height: 110px; box-shadow: var(--qz-schatten); cursor: pointer;
  text-shadow: 0 1px 0 rgba(0,0,0,.3); word-break: break-word;
}
.hd-knopf .qz-form { font-size: 52px; }
.hd-knopf.mit-text .qz-form { font-size: 30px; }
.hd-knopf:active { transform: translateY(3px); box-shadow: none; }
.hd-tippen { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hd-ring { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; font-weight: 900;
  background: conic-gradient(var(--qz-akzent) var(--anteil, 100%), rgba(255,255,255,.15) 0); }
.hd-ring span { width: 96px; height: 96px; border-radius: 50%; background: var(--qz-bg1); display: grid; place-items: center; }
.hd-ergebnis { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 20px; }
.hd-ergebnis.richtig { background: linear-gradient(#2f9e17, #1f6d0e); }
.hd-ergebnis.falsch { background: linear-gradient(#d22a46, #8d1023); }
.hd-ergebnis .hd-symbol { font-size: 70px; line-height: 1; }
.hd-plus { background: rgba(0,0,0,.3); border-radius: 8px; padding: 8px 18px; font-size: 26px; font-weight: 900; }
.hd-serie { font-weight: 800; }
.hd-platz { font-size: 64px; font-weight: 900; line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
.hd-belohnung { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hd-belohnung span { background: rgba(255,255,255,.15); border-radius: 8px; padding: 8px 14px; font-weight: 800; font-size: 20px; }
.hd-figurwahl { display: flex; gap: 8px; }
.hd-figurwahl button { flex: 1; border: 2px solid var(--qz-rand); background: #fff; border-radius: 8px; padding: 8px; font-weight: 700; cursor: pointer; }
.hd-figurwahl button.aktiv { border-color: var(--qz-lila); background: #efe9ff; }

/* ================================================================ BEAMER */
.bm-inhalt { padding: 10px 24px 30px; max-width: 1200px; margin: 0 auto; width: 100%; }
.bm-reihe { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.bm-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.bm-quiz { display: flex; flex-direction: column; gap: 10px; }
.bm-quiz h3 { margin: 0; font-size: 19px; }
.bm-quiz .bm-info { color: var(--qz-grau); font-size: 14px; }
.bm-quiz .bm-reihe { margin-top: auto; }
.bm-leer { text-align: center; padding: 40px; opacity: .8; }
h1.bm-h { font-size: 26px; margin: 10px 0; }

/* Editor */
.ed-frage { margin-top: 14px; position: relative; }
.ed-kopf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.ed-nr { background: var(--qz-lila); color: #fff; border-radius: 6px; padding: 4px 10px; font-weight: 900; }
.ed-kopf select { border: 2px solid var(--qz-rand); border-radius: 6px; padding: 6px 8px; background: #fff; }
.ed-kopf .ed-rechts { margin-left: auto; display: flex; gap: 4px; }
.ed-mini { border: 0; background: #f1eefb; border-radius: 6px; padding: 6px 9px; cursor: pointer; font-size: 15px; }
.ed-mini:hover { background: #e1daf8; }
.ed-text { width: 100%; min-height: 56px; resize: vertical; font-size: 18px; font-weight: 700; }
.ed-antworten { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ed-antwort { display: flex; align-items: center; gap: 8px; border-radius: 8px; padding: 6px 8px 6px 6px; }
.ed-antwort .qz-form { font-size: 24px; padding: 4px; }
.ed-antwort input[type=text] { flex: 1; border: 0; border-radius: 6px; padding: 9px; font-size: 16px; min-width: 0; }
.ed-richtig { display: flex; align-items: center; gap: 4px; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ed-richtig input { width: 20px; height: 20px; accent-color: #fff; }
.ed-wahr { display: flex; gap: 10px; margin-top: 10px; }
.ed-wahr label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-weight: 800; border-radius: 8px; padding: 14px; cursor: pointer; opacity: .55; }
.ed-wahr label.an { opacity: 1; outline: 4px solid var(--qz-akzent); }
.ed-wahr input { display: none; }
.ed-loesungen { margin-top: 10px; }
.ed-leiste { position: sticky; top: 0; z-index: 5; background: rgba(18,10,46,.92); backdrop-filter: blur(6px); padding: 10px 0; }
.ed-titel { font-size: 22px; font-weight: 800; flex: 1; min-width: 200px; }

/* Dialog */
.qz-dialog { border: 0; border-radius: 10px; padding: 0; max-width: min(520px, calc(100% - 32px)); width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.qz-dialog::backdrop { background: rgba(10,5,30,.7); }
.qz-dialog .qz-karte { box-shadow: none; }
.qz-dialog h2 { margin: 0 0 6px; }
.qz-schalter { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin: 12px 0; cursor: pointer; }
.qz-schalter input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--qz-lila); flex: none; }
.qz-schalter small { display: block; color: var(--qz-grau); }

/* ---------- Spiel am Beamer ---------- */
.sp { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; z-index: 10;
  background: radial-gradient(ellipse at 50% -10%, #4b2a96 0%, var(--qz-bg1) 35%, var(--qz-bg2) 100%); }
.sp-kopf { display: flex; align-items: center; gap: 14px; padding: 1.2vh 2vw; font-weight: 800; font-size: clamp(14px, 1.6vw, 22px); }
.sp-kopf .sp-titel { flex: 1; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-fuss { display: flex; align-items: center; gap: 10px; padding: 1.2vh 2vw; }
.sp-fuss .sp-luecke { flex: 1; }
.sp-haupt { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 0 2vw; }

/* Lobby */
.lb-pin { display: flex; justify-content: center; margin-top: 1vh; }
.lb-pin-kasten { background: #fff; color: var(--qz-text); border-radius: 12px; display: flex; align-items: stretch; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.lb-adresse { padding: 1.6vh 2.4vw; font-size: clamp(16px, 2.1vw, 34px); font-weight: 700; display: flex; flex-direction: column; justify-content: center; border-right: 3px solid var(--qz-rand); }
.lb-adresse b { font-size: 1.15em; }
.lb-pinzahl { padding: 1vh 2.6vw; display: flex; flex-direction: column; justify-content: center; }
.lb-pinzahl small { font-size: clamp(14px, 1.6vw, 26px); font-weight: 700; }
.lb-pinzahl b { font-size: clamp(44px, 7vw, 120px); font-weight: 900; letter-spacing: .04em; line-height: 1; }
.lb-qr { padding: 1vh 1.2vw; display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 3px solid var(--qz-rand); }
.lb-qr-bild { display: block; width: clamp(120px, 21vh, 260px); height: auto; image-rendering: pixelated; }
.lb-qr small { font-size: clamp(12px, 1.3vw, 20px); font-weight: 800; margin-top: -.3vh; }
.lb-mitte { display: flex; align-items: center; justify-content: space-between; margin: 2.2vh 0 1vh; gap: 12px; }
.lb-zahl { background: rgba(0,0,0,.3); border-radius: 8px; padding: .6vh 1.2vw; font-size: clamp(18px, 2.2vw, 36px); font-weight: 900; }
.lb-spieler { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 1.4vh 1vw; overflow-y: auto; padding-bottom: 2vh; }
.lb-kind { display: flex; flex-direction: column; align-items: center; cursor: pointer; animation: rein .5s cubic-bezier(.2,1.6,.4,1); border-radius: 10px; padding: 4px 6px; }
.lb-kind:hover { background: rgba(255,255,255,.1); }
.lb-kind:hover .lb-name::after { content: ' ✕'; color: #ff8a9c; }
.lb-kind.weg { opacity: .4; }
.lb-name { background: rgba(0,0,0,.4); border-radius: 6px; padding: 3px 10px; font-weight: 800; font-size: clamp(13px, 1.3vw, 20px); margin-top: -4px; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-warte { margin: auto; text-align: center; opacity: .75; font-size: clamp(18px, 2vw, 30px); font-weight: 700; }
@keyframes rein { from { transform: scale(.2) translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Frage */
.fr-text { background: #fff; color: var(--qz-text); border-radius: 10px; text-align: center; font-weight: 800;
  font-size: clamp(22px, 3.4vw, 58px); padding: 2.2vh 2vw; box-shadow: 0 6px 0 rgba(0,0,0,.2); line-height: 1.2; }
.fr-vorschau { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4vh; }
.fr-vorschau .fr-text { font-size: clamp(28px, 4.6vw, 80px); padding: 5vh 3vw; }
.fr-balken { height: 14px; border-radius: 7px; background: rgba(255,255,255,.15); overflow: hidden; }
.fr-balken div { height: 100%; background: var(--qz-akzent); width: 100%; }
.fr-mitte { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 2vw; padding: 2vh 0; min-height: 0; }
.fr-uhr { width: clamp(90px, 11vw, 190px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--qz-akzent) var(--anteil, 100%), rgba(255,255,255,.12) 0); flex: none; }
.fr-uhr span { width: 82%; aspect-ratio: 1; border-radius: 50%; background: var(--qz-lila-d); display: grid; place-items: center; font-size: clamp(34px, 4.6vw, 80px); font-weight: 900; }
.fr-uhr.knapp span { color: #ffd0d7; animation: puls .5s infinite alternate; }
@keyframes puls { to { transform: scale(1.08); } }
.fr-bild { flex: 1; display: flex; justify-content: center; align-items: flex-end; height: 100%; gap: .5vw; overflow: hidden; }
.fr-zaehler { text-align: center; flex: none; min-width: clamp(90px, 11vw, 190px); }
.fr-zaehler b { display: block; font-size: clamp(40px, 5vw, 90px); line-height: 1; }
.fr-zaehler span { font-weight: 700; font-size: clamp(14px, 1.5vw, 24px); }
.fr-antworten { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2vh 1vw; padding-bottom: 1vh; }
.fr-antworten.zwei { grid-template-columns: 1fr 1fr; }
.fr-antwort { display: flex; align-items: center; gap: 1.4vw; border-radius: 8px; padding: 2vh 1.6vw; color: #fff; font-weight: 800;
  font-size: clamp(18px, 2.5vw, 42px); min-height: 11vh; box-shadow: var(--qz-schatten); text-shadow: 0 2px 0 rgba(0,0,0,.25); transition: opacity .3s, transform .3s; }
.fr-antwort .qz-form { font-size: 1.3em; flex: none; }
.fr-antwort .fr-haken { margin-left: auto; font-size: 1.2em; }
.fr-antwort.blass { opacity: .28; }
.fr-antwort.richtig { transform: scale(1.02); }
.fr-tippen { text-align: center; font-size: clamp(20px, 2.6vw, 44px); font-weight: 800; background: rgba(0,0,0,.25); border-radius: 10px; padding: 3vh; margin-bottom: 1vh; }
.fr-loesung { background: var(--qz-gruen); }
.fr-getippt { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 1.5vh; font-size: clamp(14px, 1.6vw, 26px); }
.fr-getippt span { background: rgba(255,255,255,.12); border-radius: 6px; padding: 4px 12px; }
.fr-getippt span.ok { background: rgba(38,137,12,.7); }

/* Verteilung */
.vt { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3vw; padding: 2vh 0 0; min-height: 13vh; }
.vt-saeule { width: clamp(60px, 9vw, 160px); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.vt-balken { width: 100%; border-radius: 6px 6px 0 0; min-height: 8px; transition: height .7s cubic-bezier(.2,.9,.3,1.2); box-shadow: var(--qz-schatten); }
.vt-zahl { font-size: clamp(20px, 2.6vw, 44px); font-weight: 900; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.vt-fuss { width: 100%; display: grid; place-items: center; padding: 6px 0; border-radius: 0 0 6px 6px; font-size: clamp(20px, 2.4vw, 40px); }
.vt-saeule.blass .vt-balken, .vt-saeule.blass .vt-fuss { opacity: .3; }

/* Rangliste */
.rl { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.2vh; width: min(1000px, 100%); margin: 0 auto; }
.rl h2 { text-align: center; font-size: clamp(26px, 3.4vw, 56px); margin: 0 0 1vh; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
.rl-zeile { display: flex; align-items: center; gap: 1.2vw; background: #fff; color: var(--qz-text); border-radius: 8px; padding: .4vh 1.4vw .4vh .6vw;
  font-weight: 800; font-size: clamp(18px, 2.3vw, 38px); box-shadow: var(--qz-schatten); animation: zeile .6s both; }
.rl-zeile:nth-child(2) { animation-delay: .05s; } .rl-zeile:nth-child(3) { animation-delay: .15s; } .rl-zeile:nth-child(4) { animation-delay: .25s; }
.rl-zeile:nth-child(5) { animation-delay: .35s; } .rl-zeile:nth-child(6) { animation-delay: .45s; }
@keyframes zeile { from { transform: translateX(-60px); opacity: 0; } }
.rl-platz { width: 1.6em; text-align: center; color: var(--qz-lila); }
.rl-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-serie { font-size: .75em; color: #e85d04; }
.rl-plus { font-size: .7em; color: var(--qz-gruen); min-width: 4.5em; text-align: right; }
.rl-auf { font-size: .65em; color: var(--qz-gruen); }

/* Siegertreppchen */
.pd { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 1.5vw; padding-top: 2vh; min-height: 0; position: relative; }
.pd-platz { display: flex; flex-direction: column; align-items: center; width: clamp(150px, 20vw, 320px); animation: aufsteigen 1s both cubic-bezier(.2,.9,.3,1.1); }
.pd-platz.p1 { animation-delay: 2.2s; } .pd-platz.p2 { animation-delay: 1.2s; } .pd-platz.p3 { animation-delay: .3s; }
@keyframes aufsteigen { from { transform: translateY(60vh); opacity: 0; } }
.pd-name { font-weight: 900; font-size: clamp(18px, 2.4vw, 40px); text-shadow: 0 2px 0 rgba(0,0,0,.35); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-punkte { font-weight: 700; opacity: .85; font-size: clamp(14px, 1.5vw, 24px); margin-bottom: 6px; }
.pd-sockel { width: 100%; border-radius: 8px 8px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 1.5vh;
  font-size: clamp(34px, 5vw, 90px); font-weight: 900; color: rgba(255,255,255,.9); line-height: 1; text-shadow: 0 4px 0 rgba(0,0,0,.25); box-shadow: inset 0 -10px 0 rgba(0,0,0,.15); }
.p1 .pd-sockel { height: 24vh; background: linear-gradient(#ffd34d, #e0a100); }
.p2 .pd-sockel { height: 17vh; background: linear-gradient(#e4e8ef, #a9b1bf); }
.p3 .pd-sockel { height: 11vh; background: linear-gradient(#e7a36b, #b8692e); }
.pd-gold { font-size: clamp(13px, 1.3vw, 22px); font-weight: 800; color: #3b2600; text-shadow: none; margin-bottom: .8vh; background: rgba(255,255,255,.8); border-radius: 6px; padding: 2px 8px; }
.pd-rest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 1vh 0; font-weight: 700; font-size: clamp(13px, 1.3vw, 20px); }
.pd-rest span { background: rgba(255,255,255,.12); border-radius: 6px; padding: 3px 10px; }
.konfetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.konfetti i { position: absolute; top: -20px; width: 10px; height: 16px; animation: fallen linear forwards; }
@keyframes fallen { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 640px) {
  .ed-antworten { grid-template-columns: 1fr; }
  .bm-inhalt { padding: 10px 12px 30px; }
}
a.qz-knopf { text-decoration: none; display: inline-block; }

/* Leben-Modus */
.qz-modi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qz-modus { display: block; cursor: pointer; position: relative; }
.qz-modus input { position: absolute; opacity: 0; }
.qz-modus span { display: block; border: 2px solid var(--qz-rand); border-radius: 8px; padding: 10px; height: 100%; }
.qz-modus small { display: block; color: var(--qz-grau); font-size: 13px; margin-top: 2px; }
.qz-modus input:checked + span { border-color: var(--qz-lila); background: #efe9ff; }
.qz-modus input:focus-visible + span { outline: 3px solid var(--qz-akzent); }
.hz { letter-spacing: 1px; white-space: nowrap; }
.lv-leiste { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; margin-top: 1.2vh; font-weight: 800; font-size: clamp(15px, 1.6vw, 26px); }
.lv-chip { display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,.3); border-radius: 8px; padding: 2px 10px 2px 2px; }
.lv-chip.raus { background: rgba(226,27,60,.45); }
.rl-zeile.raus { opacity: .55; filter: grayscale(.8); }
.rl-herzen { font-size: .7em; }
.hd-raus { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 20px; background: linear-gradient(#3a2d55, #1b1430); }
.hd-raus .qz-held { filter: grayscale(1); opacity: .7; }
.hd-leben { font-size: 22px; font-weight: 900; background: rgba(0,0,0,.3); border-radius: 8px; padding: 6px 14px; }

/* Stimmung, Waffen und Angriffe am Handy */
#hd-inhalt { position: relative; overflow: hidden; }
.hd-link { color: #fff; opacity: .8; font-weight: 700; margin-top: 6px; }
.hd-waffe { background: rgba(0,0,0,.35); border-radius: 10px; padding: 10px 12px; margin-top: 6px; width: min(100%, 360px); display: flex; flex-direction: column; gap: 6px; }
.hd-waffe-titel { font-size: 20px; font-weight: 900; }
.hd-waffe-knoepfe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hd-waffe-knoepfe button { border: 0; border-radius: 8px; padding: 10px 4px; font-weight: 800; font-size: 15px; background: var(--qz-akzent); color: #2b1a00; cursor: pointer; box-shadow: var(--qz-schatten); }
.hd-waffe-knoepfe button:disabled { opacity: .5; }
.hd-eis { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; touch-action: none; cursor: grab; }
.hd-klecks { position: absolute; z-index: 5; touch-action: none; transition: transform .35s cubic-bezier(.2,1.6,.4,1); }
.hd-klecks svg { width: 100%; height: 100%; fill: var(--f); filter: drop-shadow(0 3px 0 rgba(0,0,0,.25)); }
.hd-angriff-hinweis { position: absolute; z-index: 7; left: 50%; top: 10px; transform: translateX(-50%); background: #fff; color: var(--qz-text); font-weight: 900; border-radius: 8px; padding: 8px 14px; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
/* Beamer: Helden-Reihe im Ergebnis und Angriffs-Leiste */
.erg-helden { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 0 4px; margin-top: .6vh; }
.erg-held { display: flex; flex-direction: column; align-items: center; font-size: clamp(10px, .9vw, 14px); font-weight: 700; max-width: 7em; }
.erg-held span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; opacity: .85; }
.wf-leiste { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin-top: 1vh; font-weight: 800; font-size: clamp(15px, 1.6vw, 26px); }
.wf-leiste span { background: rgba(0,0,0,.35); border-radius: 8px; padding: 4px 12px; }
/* Start-Dialog: Waffen-Auswahl */
.dl-waffen { border: 2px solid var(--qz-rand); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.dl-waffen-kopf { display: flex; gap: 6px; align-items: center; font-weight: 700; color: var(--qz-grau); font-size: 14px; }
.dl-waffen-kopf span { flex: 1; }
.dl-waffen-liste { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; max-height: 38vh; overflow-y: auto; }
.dl-waffe { margin: 6px 0; font-size: 14px; }
.dl-waffe i { color: var(--qz-gruen); font-style: normal; font-size: 12px; }
.dl-waffe small { font-size: 12px; }
.qz-dialog { max-height: 94vh; }
@media (max-width: 560px) { .dl-waffen-liste { grid-template-columns: 1fr; } }
/* neue Waffen am Handy */
.hd-kopfueber { display: inline-block; transform: rotate(180deg); }
.hd-kopfstand { transform: rotate(180deg); }
.hd-dunkel { position: absolute; inset: 0; z-index: 8; pointer-events: none;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), transparent 0 60px, rgba(0,0,0,.97) 105px);
  animation: dunkel-weg 10s ease-in forwards; }
@keyframes dunkel-weg { 0%, 45% { opacity: 1; } 100% { opacity: 0; } }
.hd-dunkel-text { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); color: #fff; font-weight: 800; white-space: nowrap; opacity: .9; }
.hd-blase { position: absolute; z-index: 5; border-radius: 50%; touch-action: none; cursor: pointer;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.95) 0 9%, rgba(255,255,255,.15) 10% 55%, rgba(180,220,255,.45) 75%, rgba(255,160,230,.6) 100%);
  border: 2px solid rgba(255,255,255,.7); box-shadow: inset -6px -8px 18px rgba(120,200,255,.5); animation: blase-schweben 3s ease-in-out infinite alternate; }
.hd-blase.platzt { transform: scale(1.4); opacity: 0; transition: .2s; }
@keyframes blase-schweben { to { translate: 0 -18px; } }
.hd-nebel { position: absolute; inset: 0; z-index: 7; touch-action: none; backdrop-filter: blur(var(--b, 10px)); -webkit-backdrop-filter: blur(var(--b, 10px)); }
.hd-schnecke { position: absolute; inset: 0; z-index: 7; background: rgba(20,40,10,.88); touch-action: none; transition: opacity .3s; }
.hd-schnecke.weg { opacity: 0; }
.hd-schnecke-text { position: absolute; top: 30%; width: 100%; text-align: center; font-weight: 800; font-size: 20px; padding: 0 16px; }
.hd-schnecke-tier { position: absolute; top: 55%; left: -70px; font-size: 64px; animation: kriechen 3.6s linear forwards; transform: scaleX(-1); }
@keyframes kriechen { to { left: calc(100% + 10px); } }
.hd-knopf { transition: transform .35s; }
.hd-geist { opacity: .9; animation: geist-wackeln 2.4s ease-in-out infinite; }
@keyframes geist-wackeln { 50% { transform: translateY(-3px) rotate(-1deg); } }
.hd-knoepfe.gesperrt { pointer-events: none; filter: grayscale(.8); }

/* Beamer: Waffen-Szene */
.wa-buehne { flex: 1; position: relative; overflow: hidden; min-height: 0; }
.wa-titel { text-align: center; font-weight: 900; font-size: clamp(22px, 2.6vw, 44px); margin-top: 1vh; opacity: .9; }
.wa-titel span { font-size: .6em; opacity: .7; margin-left: .5em; }
.wa-text { text-align: center; font-weight: 800; font-size: clamp(22px, 3vw, 52px); margin-top: 2vh; padding: 0 2vw; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
.wa-ok { color: var(--qz-akzent); }
.wa-held { position: absolute; bottom: 8%; display: flex; flex-direction: column; align-items: center; }
.wa-links { left: 14%; } .wa-rechts { right: 14%; }
.wa-name { background: rgba(0,0,0,.4); border-radius: 8px; padding: 4px 14px; font-weight: 900; font-size: clamp(16px, 1.8vw, 30px); margin-top: -6px; }
.wa-geschoss { position: absolute; left: 0; top: 0; font-size: clamp(56px, 7vw, 120px); line-height: 1; margin: -.5em 0 0 -.5em; filter: drop-shadow(0 6px 6px rgba(0,0,0,.4)); pointer-events: none; }
.wa-knall, .wa-schutz { position: absolute; font-size: clamp(80px, 10vw, 170px); line-height: 1; margin: -.5em 0 0 -.5em; pointer-events: none; }
.wa-knall { animation: wa-knall .7s ease-out forwards; }
.wa-schutz { animation: wa-schutz .35s cubic-bezier(.2,1.6,.4,1) both; opacity: .92; }
@keyframes wa-knall { 0% { transform: scale(.2); opacity: 1; } 60% { transform: scale(1.5); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes wa-schutz { from { transform: scale(0); } }

/* Handy: Waffen-Szene */
.hd-szene { display: flex; flex-direction: column; gap: 6px; width: min(100%, 360px); }
.hd-szene-zeile { background: rgba(0,0,0,.3); border-radius: 8px; padding: 8px 12px; font-size: 17px; }
.hd-szene-zeile.ich { background: var(--qz-rot); }
.hd-im-visier { background: var(--qz-rot); border-radius: 10px; padding: 10px 14px; font-weight: 900; font-size: 20px; animation: puls .5s infinite alternate; }
.hd-im-visier.gut { background: var(--qz-gruen); animation: none; }

/* v2.54: 👥 Teams, ⭐ Sicher-Modus, 🐉 Drache */
.qz-team { display: inline-block; color: #fff; border-radius: 999px; padding: 2px 12px; font-weight: 900; white-space: nowrap; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.hd-team-gross .qz-team { font-size: 26px; padding: 6px 20px; }
.hd-team-erg { background: rgba(0,0,0,.25); border-radius: 8px; padding: 6px 12px; font-weight: 800; }
.hd-team-ende { background: rgba(0,0,0,.3); border-radius: 10px; padding: 10px 14px; font-weight: 900; font-size: 20px; text-align: center; }
.hd-team-ende.gut { background: var(--qz-gruen); }
.hd-sterne { width: min(100%, 380px); margin: 8px auto 0; text-align: center; }
.hd-sterne.klein { margin: 8px auto 0; padding: 0 12px; }
.hd-sterne-titel { font-weight: 800; margin-bottom: 6px; }
.hd-sterne-knoepfe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hd-sterne-knoepfe button { border: 3px solid transparent; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; padding: 6px 2px; cursor: pointer; font-weight: 800; }
.hd-sterne.klein .hd-sterne-knoepfe button { font-size: 15px; padding: 4px 2px; }
.hd-sterne-knoepfe button small { display: block; font-size: 12px; opacity: .85; font-weight: 700; }
.hd-sterne-knoepfe button.an { border-color: var(--qz-akzent); background: rgba(255,183,3,.3); }
.hd-sterne-erg { background: rgba(0,0,0,.3); border-radius: 8px; padding: 6px 12px; font-weight: 800; }
.hd-sterne-erg.gut { color: #fff3c4; }
.hd-drache { background: rgba(0,0,0,.3); border-radius: 10px; padding: 8px 12px; width: min(100%, 360px); display: flex; flex-direction: column; gap: 5px; font-size: 15px; }
.hd-drache-balken { position: relative; height: 22px; border-radius: 6px; background: rgba(0,0,0,.45); overflow: hidden; }
.hd-drache-balken i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#ff5a5a, #c0182e); }
.hd-drache-balken span { position: relative; font-weight: 900; font-size: 14px; line-height: 22px; }
.hd-drache-schlag { font-weight: 900; color: #ffd2a6; }
.hd-drache-schlag.gut { color: #c9ffb8; }

.lb-teams { display: flex; justify-content: center; gap: 1.6vw; margin-bottom: 1vh; font-size: clamp(16px, 1.8vw, 30px); }
.lb-teams b { margin-left: .4em; }
.erg-held em { font-style: normal; font-size: .85em; }
.rl-unter { text-align: center; margin: 1.4vh 0 .4vh; font-size: clamp(18px, 2vw, 32px); opacity: .85; }
.tm-wertung { display: flex; flex-direction: column; gap: 1vh; }
.tm-zeile { display: flex; align-items: center; gap: 1.2vw; background: var(--f); color: #fff; border-radius: 10px; padding: 1vh 1.6vw;
  font-weight: 900; font-size: clamp(22px, 2.8vw, 48px); text-shadow: 0 2px 0 rgba(0,0,0,.3); box-shadow: var(--qz-schatten); animation: rein .5s both; }
.tm-zeile .rl-platz { color: #fff; }
.tm-name { flex: 1; }
.tm-mitglieder { font-size: .6em; opacity: .9; }
.tm-zeile .rl-plus { color: #fff; opacity: .9; }
.end-banner { text-align: center; font-weight: 900; font-size: clamp(24px, 3.2vw, 54px); margin-top: 1vh; text-shadow: 0 3px 0 rgba(0,0,0,.3);
  display: flex; flex-direction: column; align-items: center; gap: .4vh; }
.end-banner .qz-team { font-size: 1em; }
.end-banner small { font-size: .42em; opacity: .9; }
.end-banner.traurig { opacity: .92; }
/* v2.56: Boss-Kasten des Drachen */
.dr-buehne { position: relative; display: flex; align-items: center; justify-content: center; gap: 1.6vw; margin: 1vh auto; width: min(980px, 96%);
  padding: .4vh 1.6vw .4vh .4vw; border-radius: 16px; border: 2px solid rgba(255, 150, 70, .45);
  background: radial-gradient(ellipse at 18% 70%, rgba(255, 110, 30, .22), transparent 55%), linear-gradient(180deg, rgba(50, 10, 10, .85), rgba(20, 6, 26, .85));
  box-shadow: 0 0 28px rgba(255, 90, 30, .25), inset 0 0 30px rgba(255, 80, 20, .12); }
.dr-buehne.wut { border-color: rgba(255, 60, 30, .8); animation: dr-wut 1.2s ease-in-out infinite; }
@keyframes dr-wut { 50% { box-shadow: 0 0 40px rgba(255, 40, 20, .55), inset 0 0 40px rgba(255, 40, 20, .25); } }
.dr-buehne.schlag { animation: dr-schlag .45s 3; }
.dr-buehne.schlag::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: dr-blitz 1.3s ease-out forwards;
  background: radial-gradient(ellipse at 30% 50%, rgba(255, 200, 80, .7), rgba(255, 60, 20, .5) 45%, transparent 80%); }
@keyframes dr-blitz { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes dr-schlag { 0%, 100% { transform: none; } 25% { transform: translateX(-12px) rotate(-.4deg); } 75% { transform: translateX(12px) rotate(.4deg); } }
.dr-tier { position: relative; flex: none; line-height: 0; }
.dr-info { flex: 1; display: flex; flex-direction: column; gap: .6vh; font-weight: 800; font-size: clamp(15px, 1.6vw, 28px); min-width: 0; }
.dr-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1vw; }
.dr-titel { font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #ffcf6e; text-shadow: 0 2px 0 #7a1406, 0 0 12px rgba(255, 120, 30, .6); }
.dr-hp-text { font-weight: 900; font-variant-numeric: tabular-nums; }
.dr-balken { position: relative; height: clamp(24px, 4.2vh, 46px); border-radius: 10px; background: #1b0507; overflow: hidden;
  border: 2px solid #f3b65a; box-shadow: 0 0 14px rgba(255, 120, 40, .35), inset 0 3px 6px rgba(0, 0, 0, .6); }
.dr-balken i { position: absolute; inset: 0 auto 0 0; }
.dr-hp { background: linear-gradient(180deg, #ff9a6a, #e3261b 50%, #8f0d12); transition: width .55s ease-out; z-index: 1; }
.dr-geist { background: linear-gradient(180deg, #fff8d8, #ffd27a); transition: width .9s ease-in .75s; }
.dr-striche { position: absolute; inset: 0; z-index: 2; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(0, 0, 0, .35) calc(10% - 2px) 10%);
  box-shadow: inset 0 6px 6px -4px rgba(255, 255, 255, .35); }
.dr-zeile { display: flex; justify-content: space-between; gap: 1vw; }
.dr-meldung { color: var(--qz-akzent); min-height: 1.2em; }
.dr-schaden { position: absolute; left: 35%; top: 10%; z-index: 3; font-weight: 900; font-size: clamp(34px, 4.6vw, 80px); line-height: 1; color: #fff;
  -webkit-text-stroke: 2px #8f0d12; text-shadow: 0 4px 0 #8f0d12, 0 0 18px rgba(255, 120, 30, .9); opacity: 0; pointer-events: none; }
.dr-schaden.an { animation: dr-zahl 1.5s ease-out forwards; }
@keyframes dr-zahl { 0% { opacity: 0; transform: translateY(20px) scale(.5); } 18% { opacity: 1; transform: scale(1.25); } 30% { transform: none; } 100% { opacity: 0; transform: translateY(-60px); } }
.fr-bild canvas.qz-drache { margin-left: 1vw; }
.end-banner canvas.qz-drache { display: block; }

/* ---------- v2.55: Flaggen in Fragen und Antworten („[flagge:at]“, js/quiz-flaggen.js) ---------- */
.qz-flagge { display: inline-block; vertical-align: middle; height: 1.2em; max-width: 100%; line-height: 0; background: #fff; border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 3px 10px rgba(0, 0, 0, .35); }
.qz-flagge svg, .qz-flagge img { display: block; width: 100%; height: 100%; }
.qz-flagge img { object-fit: fill; -webkit-user-drag: none; pointer-events: none; }
.fr-text .qz-flagge { display: block; height: min(24vh, 30vw); margin: 1.5vh auto 0; }
.fr-vorschau .fr-text .qz-flagge { height: min(40vh, 45vw); }
.fr-text.fr-erg .qz-flagge { height: min(13vh, 18vw); margin-top: 1vh; }
.fr-antwort .qz-flagge { height: min(10vh, 8vw); }
.hd-frage-text .qz-flagge { display: block; height: auto; width: min(80vw, 34vh); margin: 10px auto 0; }
.hd-knopf .qz-flagge { height: auto; width: min(34vw, 15vh); }
.hd-klein .qz-flagge { height: 1.8em; }
.ed-vorschau { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; font-size: 14px; opacity: .9; }
.ed-vorschau .qz-flagge { height: 40px; }
.ed-flagge-wahl { max-width: 150px; }

/* v2.55.1: kleiner Link zur Lehrer-Anmeldung unter der PIN-Eingabe */
.hd-lehrer-link { display: block; width: fit-content; margin: 18px auto 0; padding: 6px 12px; font-size: 14px; font-weight: 700;
  color: rgba(255, 255, 255, .7); text-decoration: none; border-radius: 999px; }
.hd-lehrer-link:hover, .hd-lehrer-link:focus-visible { color: #fff; background: rgba(255, 255, 255, .12); }
