/* ===== Kostenlose Werkzeuge · Live-Abstimmung (Paket live, 28.10.2026) =====
   Nur für /tools/abstimmung. Baut auf tools.css auf (Bühne, Knöpfe, Karten, Hell/Dunkel, Großansicht).
   Farben der Antworten: App-Farben (Blau, Terrakotta, Grün …), keine Fach-Farben. Balken hell/dunkel je eigene Töne
   (Kontrast ≥ 3:1 zur Spur), Knöpfe auf den Schülergeräten immer weiße Schrift auf kräftiger Fläche (≥ 4,5:1).
   Kein waagerechtes Scrollen ab 320 px: Raster mit minmax(0,…), lange Antworten umbrechen. */

:root{
  /* Balken (folgen hell/dunkel) */
  --ab-f0:#2F6A91;--ab-f1:#B85C36;--ab-f2:#1f7d4d;--ab-f3:#6d4c9f;--ab-f4:#8a5a00;--ab-f5:#a8322a;--ab-f6:#55636f;
  --ab-spur:#e7f0f6;
  /* Antwort-Knöpfe auf den Schülergeräten (fest, weiße Schrift) */
  --ab-k0:#2F6A91;--ab-k1:#B85C36;--ab-k2:#1f7d4d;--ab-k3:#6d4c9f;--ab-k4:#8a5a00;--ab-k5:#a8322a;--ab-k6:#55636f;
}
.wz-gross[data-thema="hell"]{--ab-f0:#2F6A91;--ab-f1:#B85C36;--ab-f2:#1f7d4d;--ab-f3:#6d4c9f;--ab-f4:#8a5a00;--ab-f5:#a8322a;--ab-f6:#55636f;--ab-spur:#e7f0f6}
.wz-gross[data-thema="dunkel"]{--ab-f0:#7db3dc;--ab-f1:#f0a27f;--ab-f2:#8fd8ad;--ab-f3:#c3a6e8;--ab-f4:#f5d08a;--ab-f5:#f6a9a1;--ab-f6:#b8c6d1;--ab-spur:#2d3b47}

/* ── Kopf: Code eingeben (für Schüler:innen, die die Adresse von Hand öffnen) ── */
.ab-beitreten{margin-top:16px;max-width:31rem;background:var(--weiss);border:1px solid var(--rand);border-radius:16px;padding:12px 14px}
.ab-beitreten .wz-label{font-size:.97rem}
.ab-beitreten-zeile{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.wz-seite .ab-beitreten-zeile input[type="text"]{flex:1 1 9rem;min-width:0;width:auto;text-transform:uppercase;letter-spacing:.12em;font-weight:700}
.wz-seite .ab-beitreten-zeile input[type="text"]::placeholder{text-transform:none;letter-spacing:normal;font-weight:400}
.ab-beitreten .wz-meldung{margin-top:6px}

/* ── Bühne ── */
.ab-buehne{min-height:380px}
.ab-inhalt{width:100%;gap:16px}
.ab-frage{margin:0;max-width:38em;font-family:'Baloo 2',system-ui,sans-serif;font-weight:700;font-size:clamp(1.3rem,2.6vw,1.8rem);line-height:1.25;color:var(--text);overflow-wrap:anywhere}
.ab-start{display:flex;flex-direction:column;align-items:center;gap:12px;max-width:30rem}
.ab-start-bild{display:grid;place-items:center;width:84px;height:84px;border-radius:24px;background:var(--wz-ton);color:var(--wz-ton-text)}
.ab-start-bild svg{width:46px;height:46px}
.ab-start-text{margin:0;color:var(--text-leicht);font-size:1.05rem;line-height:1.5}

/* Beitritt: QR-Code, Adresse, Code */
.ab-beitritt{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:16px 30px;max-width:100%}
.ab-qr-rahmen{background:#fff;border:1px solid var(--rand);border-radius:16px;padding:10px;line-height:0}
.ab-qr-rahmen canvas{display:block;width:min(200px,62vw);height:auto;aspect-ratio:1/1}
.ab-beitritt-text{min-width:0;max-width:100%;text-align:left}
.ab-schritt{margin:0;color:var(--text-leicht);font-weight:600;font-size:1rem}
.ab-adresse{margin:2px 0 12px;color:var(--text);font-weight:700;font-size:1.08rem;overflow-wrap:anywhere}
.ab-code{margin:2px 0 0;font-family:'Baloo 2',system-ui,sans-serif;font-weight:800;font-size:clamp(2.2rem,8vw,3.4rem);line-height:1.05;letter-spacing:.08em;
  color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap}
.ab-mitmachen{margin:0;color:var(--text-leicht);font-size:.98rem;line-height:1.45;overflow-wrap:anywhere}
.ab-mitmachen b{color:var(--text);letter-spacing:.04em}

/* Verbindung (klein in der Leiste) */
.ab-verbindung{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-size:.9rem;font-weight:700;color:var(--wz-gut-text)}
.ab-verbindung::before{content:"";width:10px;height:10px;border-radius:50%;background:currentColor;flex:0 0 auto}
.ab-verbindung[data-stand="weg"]{color:var(--wz-warn-text)}

/* Balken */
.ab-balken{list-style:none;margin:0;padding:0;width:100%;max-width:46rem;display:grid;grid-template-columns:max-content minmax(0,1fr) max-content;gap:12px 14px}
.ab-balken.ab-hand{grid-template-columns:max-content minmax(0,1fr) max-content max-content}
/* Jede Zeile nutzt die Spalten der Liste (subgrid) – so beginnen alle Balken an derselben Stelle; ältere Browser: eigene Spalten */
.ab-balken li{grid-column:1/-1;display:grid;grid-template-columns:minmax(4.5rem,max-content) minmax(0,1fr) max-content;grid-template-columns:subgrid;
  grid-template-areas:"name spur zahl";align-items:center;gap:6px 14px;text-align:left;min-width:0}
.ab-balken.ab-hand li{grid-template-columns:minmax(4.5rem,max-content) minmax(0,1fr) max-content max-content;grid-template-columns:subgrid;grid-template-areas:"name spur zahl hand"}
.ab-b-name{grid-area:name;min-width:0;max-width:12em;font-weight:800;color:var(--text);overflow-wrap:break-word;hyphens:auto;font-size:1.05rem}
.ab-b-spur{grid-area:spur;height:26px;border-radius:999px;background:var(--ab-spur);overflow:hidden;min-width:0}
.ab-b-fuellung{display:block;height:100%;width:0;border-radius:999px;background:var(--ab-f0)}
.ab-b-zahl{grid-area:zahl;min-width:5.4em;text-align:right;font-weight:800;color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap}
.ab-b-zahl span{color:var(--text-leicht);font-weight:600}
.ab-b-hand{grid-area:hand;display:flex;gap:6px}
.ab-balken li[data-farbe="1"] .ab-b-fuellung{background:var(--ab-f1)}
.ab-balken li[data-farbe="2"] .ab-b-fuellung{background:var(--ab-f2)}
.ab-balken li[data-farbe="3"] .ab-b-fuellung{background:var(--ab-f3)}
.ab-balken li[data-farbe="4"] .ab-b-fuellung{background:var(--ab-f4)}
.ab-balken li[data-farbe="5"] .ab-b-fuellung{background:var(--ab-f5)}
.ab-balken li[data-farbe="6"] .ab-b-fuellung{background:var(--ab-f6)}
.ab-verdeckt{margin:0;padding:14px 18px;border:2px dashed var(--wz-ton-rand);border-radius:16px;color:var(--text-leicht);font-weight:700}
@media (max-width:560px){
  .ab-balken{grid-template-columns:minmax(0,1fr) max-content}
  .ab-balken.ab-hand{grid-template-columns:minmax(0,1fr) max-content}
  .ab-balken li{grid-template-columns:minmax(0,1fr) max-content;grid-template-columns:subgrid;grid-template-areas:"name zahl" "spur spur"}
  .ab-balken.ab-hand li{grid-template-columns:minmax(0,1fr) max-content;grid-template-columns:subgrid;grid-template-areas:"name zahl" "spur hand"}
  .ab-b-zahl{min-width:0}
}
@media (prefers-reduced-motion: no-preference){
  .ab-b-fuellung{transition:width .35s ease}
}
.ab-zaehler{font-variant-numeric:tabular-nums}

/* Großansicht (Beamer) – Schriften und Balken richten sich auch nach der Höhe (vh): Prüfung 29.10.2026 maß bei langer
   Frage (160 Zeichen) und 6 Antworten 150 px (1920×1080) bzw. 217 px (1280×800) Überstand – der Hauptknopf lag unter dem Rand. */
.wz-buehne.wz-gross .ab-frage{font-size:clamp(1.35rem,min(3.2vw,4.4vh),3.4rem);max-width:min(92vw,75rem)}
.wz-buehne.wz-gross .ab-start-text{font-size:clamp(1.1rem,2vw,1.7rem)}
.wz-buehne.wz-gross .ab-qr-rahmen canvas{width:min(46vh,36vw)}
.wz-buehne.wz-gross .ab-schritt{font-size:clamp(1rem,1.8vw,1.6rem)}
.wz-buehne.wz-gross .ab-adresse{font-size:clamp(1.2rem,2.4vw,2.3rem)}
.wz-buehne.wz-gross .ab-code{font-size:clamp(3rem,9vw,7.5rem)}
.wz-buehne.wz-gross .ab-mitmachen{font-size:clamp(1rem,1.7vw,1.5rem)}
.wz-buehne.wz-gross .ab-balken{max-width:min(92vw,82rem);row-gap:clamp(8px,1.6vh,24px)}
.wz-buehne.wz-gross .ab-b-name,.wz-buehne.wz-gross .ab-b-zahl{font-size:clamp(1.1rem,min(2.4vw,3.6vh),2.3rem)}
.wz-buehne.wz-gross .ab-b-spur{height:clamp(22px,4.4vh,56px)}
.wz-buehne.wz-gross .ab-zaehler{font-size:clamp(1.05rem,min(2.6vw,3.6vh),2rem)}

/* Druck (Strg+P, Prüfung 29.10.2026): Ergebnis schwarz auf weiß – auch wenn das Gerät dunkel eingestellt ist (vorher hellgraue
   Schrift auf weißem Papier); Steuerknöpfe und Verbindungsanzeige fallen weg, Balken auch ohne „Hintergrundgrafiken“ sichtbar. */
@media print{
  .ab-steuer,.ab-verbindung,.ab-beitreten,#abMeldung{display:none!important}
  .ab-frage,.ab-b-name,.ab-b-zahl,.ab-zaehler,.ab-mitmachen,.ab-mitmachen b,.ab-start-text,.ab-schritt,.ab-adresse,.ab-code,.ab-verdeckt{color:#000!important}
  .ab-b-zahl span{color:#333!important}
  .ab-b-spur{background:#fff!important;border:1pt solid #000}
  .ab-b-fuellung{background:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* ── Einstellungen ── */
.ab-modus{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,11.5rem),1fr));gap:8px;margin-bottom:8px}
.ab-modus-hilfe{margin-top:4px}
.ab-formate{display:flex;flex-wrap:wrap;gap:8px}
.ab-anzahl{margin-top:12px}
.wz-seite .ab-anzahl select{width:auto;max-width:100%}
.ab-liste{margin:0;padding-left:1.2em;color:var(--text);line-height:1.5}
.ab-liste li{margin:0 0 6px}
.ab-ende-info{margin-top:8px}

/* ── Schüleransicht (/tools/abstimmung?c=CODE): nur die Karte, nichts anderes ── */
body.ab-als-schueler .wz-kopf,body.ab-als-schueler .brot,body.ab-als-schueler main > section:not(.ab-schueler-bereich){display:none!important}
/* Schülergeräte: keine Werbung für Lehrkraft-Konten (Kostenlos testen, Menü, Preis-Zeile) – Logo und Rechtliches bleiben */
body.ab-als-schueler .sk-cta,body.ab-als-schueler .sk-toggle,body.ab-als-schueler .sk-menue,body.ab-als-schueler .sf-teaser{display:none!important}
.ab-schueler-bereich{padding:18px 0 40px}
.ab-s-karte{max-width:34rem;margin:0 auto;background:var(--weiss);border:1px solid var(--rand);border-radius:22px;box-shadow:var(--schatten-klein);padding:18px 18px 16px;text-align:center}
.ab-s-kopf{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;margin:0 0 16px;font-weight:700;color:var(--text-leicht);font-size:.95rem}
.ab-s-marke{display:inline-flex;align-items:center;gap:6px;color:var(--wz-ton-text)}
.ab-s-marke svg{width:1.3em;height:1.3em}
.ab-s-code b{color:var(--text);letter-spacing:.08em}
.block .ab-s-titel,.ab-s-titel{margin:0 0 6px;font-family:'Baloo 2',system-ui,sans-serif;font-weight:800;font-size:1.6rem;line-height:1.2;color:var(--text)}
.ab-s-titel:focus{outline:none}
.ab-s-text{margin:0 auto 14px;max-width:28rem;color:var(--text-leicht);line-height:1.5}
.ab-s-knoepfe{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin:6px 0 10px}
.ab-s-knoepfe.ab-kurz{grid-template-columns:repeat(2,minmax(0,1fr))}
.ab-s-knoepfe:empty{display:none}
.ab-s-knopf{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:68px;margin:0;padding:12px 16px;border:0;border-radius:18px;
  background:var(--ab-k0);color:#fff;font-family:'Baloo 2',system-ui,sans-serif;font-weight:700;font-size:1.4rem;line-height:1.2;cursor:pointer;overflow-wrap:anywhere;min-width:0}
.ab-s-knoepfe.ab-kurz .ab-s-knopf{min-height:92px;font-size:2rem}
.ab-s-knopf svg{width:1em;height:1em;flex:0 0 auto}
.ab-s-knopf[data-farbe="1"]{background:var(--ab-k1)}
.ab-s-knopf[data-farbe="2"]{background:var(--ab-k2)}
.ab-s-knopf[data-farbe="3"]{background:var(--ab-k3)}
.ab-s-knopf[data-farbe="4"]{background:var(--ab-k4)}
.ab-s-knopf[data-farbe="5"]{background:var(--ab-k5)}
.ab-s-knopf[data-farbe="6"]{background:var(--ab-k6)}
.ab-s-knopf:disabled{cursor:default}
.ab-s-knopf:disabled:not([aria-pressed="true"]){background:var(--wz-ton);color:var(--text-leicht)}
.ab-s-knopf[aria-pressed="true"]{box-shadow:0 0 0 4px var(--weiss),0 0 0 7px var(--text)}
.ab-s-weiter:empty{display:none}
.ab-s-privat{display:flex;gap:8px;align-items:flex-start;justify-content:center;margin:12px 0 0;color:var(--text-leicht);font-size:.9rem;line-height:1.45;text-align:left}
.ab-s-privat svg{flex:0 0 auto;width:1.15em;height:1.15em;margin-top:.12em;color:var(--wz-ton-text)}
@media (prefers-reduced-motion: no-preference){
  .ab-s-knopf{transition:transform .12s ease}
  .ab-s-knopf:not(:disabled):active{transform:scale(.97)}
}
