@charset "UTF-8";
/* Klassenspiele (pages/werkzeuge/klassenspiele.php): Vollbild für den Beamer, bewusst dunkel und kontrastreich.
   Rahmen (Grund, Karten, Symbolknöpfe, Wasserzeichen) in den Farben der 3D-Modelle (assets/css/modelle.css). */
/* Rot, Blau und Grün tragen weisse Schrift mit mindestens 4,5 : 1 (auch kleine Knöpfe auf dem Handy) */
:root { --rot: #DC2626; --blau: #2563EB; --gras: #2E8B4E; --gras2: #2A7F47; --ink: #0F172A; --muted: #64748B; --gelb: #FFD24A; --gruen: #15803D;
  --grund: #0C1116; --linie: rgba(255,255,255,.85);
  --karte: #141B23; --strich-2: rgba(255,255,255,.16); --hell: #E8EEF3; --grau: #8C9BAA; --cyan: #7FDBFF; --amber: #FFB547;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--grund); color: #fff; }
body.im-spiel { overflow: hidden; }
body.fussball { background: #0C1A12; }
button { font: inherit; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
kbd { font-family: var(--mono); font-size: .92em; font-weight: 600; padding: 0 5px; border-radius: 5px; border: 1px solid rgba(255,255,255,.24); }

/* ---------- Übersicht: Titel oben links, acht Spielfelder im Kleinen, unten Wasserzeichen und «Alle Werkzeuge» ---------- */
/* Vier Spalten (Beamer, Browserfenster): Die Karten sind höchstens --zeile hoch (Spielfeld etwa 4 : 3; --zeile: Breite
   einer Spalte × 0,78 plus rund 80 px für Name und Stufe). Fehlt Platz, werden die Spielfelder flacher, bis 64 px, erst dann
   scrollt die Seite. Zwei Spalten (Handy, Tablet hochkant): Spielfelder 16 : 9, die Seite scrollt. */
.hub { --rand: clamp(16px, 2.6vw, 40px); --luecke: clamp(10px, 1.2vw, 20px); --zeile: calc(((min(100vw, 2400px) - 2 * var(--rand) - 3 * var(--luecke)) / 4 - 16px) * .78 + 80px);
  height: 100vh; height: 100dvh; max-width: 2400px; margin: 0 auto; display: flex; flex-direction: column; justify-content: space-between; gap: clamp(16px, 3.4vh, 36px);
  padding: max(18px, env(safe-area-inset-top)) var(--rand) max(18px, env(safe-area-inset-bottom)); }
.kicker { font-weight: 800; font-size: 16px; line-height: 1; letter-spacing: .01em; text-transform: uppercase; }
.titel { font-weight: 800; font-size: clamp(30px, 3.4vw, 56px); line-height: .95; letter-spacing: -.02em; text-transform: uppercase; color: var(--cyan); margin: 4px 0 12px; }
.hub-text { color: #C9D3DC; font-size: clamp(14px, 1.1vw, 18px); line-height: 1.5; max-width: 62em; text-wrap: pretty; }
.hub-karten { flex: 0 1 calc(2 * (var(--zeile) + var(--luecke))); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--luecke); }
.hub-karte { display: flex; flex-direction: column; min-width: 0; padding: 8px 8px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.17); background: var(--karte); color: var(--hell); text-decoration: none; transition: background .12s, border-color .12s; }
.hub-karte:hover { background: #1A222C; border-color: rgba(255,255,255,.34); }
.hub-karte:hover h2, .hub-karte:focus-visible h2 { color: var(--cyan); }   /* am Projektor sieht man den helleren Grund kaum */
/* Spielfeld im Kleinen; das Bild bleibt ganz und mittig (viewBox mit «meet»), sein Grund reicht über den Rand */
.vorschau { position: relative; flex: 1 0 auto; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--grund); }
.vorschau svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-karte h2 { margin: 12px 6px 3px; font-size: clamp(15px, 1.2vw, 22px); font-weight: 700; line-height: 1.2; transition: color .12s; }
.hub-karte .satz { margin: 0 6px 5px; font-size: clamp(12.5px, .9vw, 16px); line-height: 1.4; color: #C9D3DC; text-wrap: pretty; }
.hub-karte .stufe { margin: 0 6px; font-size: clamp(12px, .85vw, 15px); line-height: 1.4; color: var(--grau); }
.stufe > span + span::before { content: ' \00B7  '; }
/* Spielfeld, Name und Stufe stehen in allen Karten einer Zeile auf gleicher Höhe, auch wenn ein Name umbricht
   (ohne subgrid: Spielfeld wächst in der Karte) */
@supports (grid-template-rows: subgrid) { @media (min-width: 600px) {
  .hub-karten { grid-auto-rows: minmax(auto, 1fr) auto auto auto; row-gap: 0; }
  .hub-karte { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; margin-bottom: var(--luecke); }
  .vorschau { align-self: stretch; width: 100%; aspect-ratio: auto; min-height: 64px; }   /* Höhe aus der Zeile, Breite fest */
  .hub-karte h2, .hub-karte .satz, .hub-karte .stufe { align-self: start; }
} }
@media (max-width: 1199px) { .stufe > span { display: block; } .stufe > span + span::before { content: none; } }   /* Stufe und Merkmal untereinander */
.hub-fuss { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.hub-hinweis { color: var(--grau); font-size: clamp(12.5px, .85vw, 16px); line-height: 1.45; text-wrap: pretty; }
.wz-zeichen { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 9px; color: #9FB0BF; font-size: clamp(12.5px, .85vw, 16px); font-weight: 600; letter-spacing: .02em; text-decoration: none; transition: color .12s; }
.wz-zeichen img { width: 18px; height: 18px; display: block; }
.wz-zeichen:hover { color: var(--hell); }
.hub-zurueck { justify-self: end; display: inline-flex; align-items: center; height: clamp(40px, 2.8vw, 52px); padding: 0 clamp(14px, 1vw, 20px); border-radius: 14px; border: 1px solid rgba(255,255,255,.17); background: var(--karte); color: #9FB0BF; font-size: clamp(13.5px, .95vw, 17px); font-weight: 600; text-decoration: none; transition: background .12s, border-color .12s, color .12s; }
.hub-zurueck:hover { background: #1A222C; border-color: var(--strich-2); color: var(--hell); }
@media (max-width: 1100px) and (orientation: portrait), (max-width: 599px) { .hub-karten { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vorschau { aspect-ratio: 16 / 9; } }
@media (max-width: 599px) {
  .kicker { font-size: 13px; }
  .hub-karte { padding: 6px 6px 10px; border-radius: 12px; }
  .vorschau { border-radius: 7px; }
  .hub-karte h2 { margin: 9px 4px 2px; font-size: 14px; }
  .hub-karte .stufe { margin: 0 4px; font-size: 11.5px; }
  .hub-karte .satz { display: none; }
  .hub-fuss { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; }
  .hub-hinweis { grid-column: 1 / -1; }
  .wz-zeichen { justify-self: start; padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .hub-karte, .hub-zurueck, .wz-zeichen { transition: none; } }

/* ---------- Spiel-Rahmen ---------- */
.spiel { --teams-abstand: clamp(8px, 2.2vh, 22px); position: fixed; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: clamp(6px, 1.5vh, 14px); padding: clamp(8px, 2vh, 22px) clamp(12px, 3vw, 40px); }
.leiste { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.leiste-titel { min-width: 0; display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: clamp(16px, 2.2vw, 28px); }
.leiste-rechts { display: flex; gap: 8px; }
/* Symbolknöpfe wie die Symbolleiste der 3D-Modelle: Kartengrund, feiner Rahmen, Symbol mit Strich */
.icon { width: clamp(40px, 3.6vw, 48px); height: clamp(40px, 3.6vw, 48px); display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--strich-2); background: rgba(16,22,29,.72); color: var(--hell); flex: none; transition: background .12s, border-color .12s; }
.icon svg { width: 46%; height: 46%; }
.icon:hover { background: #1F2833; border-color: rgba(255,255,255,.28); }
.buehne { min-height: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(8px, 2vh, 20px); align-content: stretch; }
.tasten { text-align: center; font-size: clamp(11px, 1.2vw, 14px); color: rgba(255,255,255,.6); min-height: 1em; }

/* Punktezeile der Teams unter der Leiste (Fussball und die Spiele für zwei Teams) */
.teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; padding-top: var(--teams-abstand); }   /* Abstand zur Kopfzeile, auch für den Rahmen des Teams am Zug */
.team { display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: clamp(14px, min(2.6vw, 4.4vh), 34px); min-width: 0; border-radius: 18px; padding: 6px 10px; margin: -6px -10px; transition: box-shadow .25s, background .25s; justify-self: start; max-width: 100%; }
.team.rechts { justify-content: flex-end; justify-self: end; }
.team .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team.dran { background: rgba(255,255,255,.1); box-shadow: 0 0 0 3px #fff; }
.tore { font-size: clamp(22px, min(6vw, 9vh), 80px); line-height: 1; font-variant-numeric: tabular-nums; min-width: 1.2em; text-align: center; border-radius: 14px; padding: .05em .25em; }
.team.rot .tore { background: var(--rot); } .team.blau .tore { background: var(--blau); }

/* ---------- Aufgabe ---------- */
/* nicht markierbar: Die Lösung steht schon durchsichtig im Platzhalter, markiert würde sie sichtbar (Doppelklick, Strg+A) */
.aufgabe { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(6px, 1.5vh, 18px); text-align: center; min-height: 0; min-width: 0; overflow: hidden; -webkit-user-select: none; user-select: none; }
.aufgabe > * { flex: none; max-width: 100%; }
.zug { font-weight: 800; font-size: calc(clamp(14px, min(2.4vw, 3.6vh), 30px) * var(--s, 1)); padding: .2em .8em; border-radius: 999px; }
.zug.rot { background: var(--rot); } .zug.blau { background: var(--blau); }
.frage { font-weight: 700; font-size: calc(clamp(16px, min(3vw, 4.6vh), 40px) * var(--s, 1)); color: #CFE9D7; max-width: 30em; line-height: 1.25; }
.zeile { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.5vw, 34px); flex-wrap: nowrap; }
.zahl { font-weight: 800; font-size: calc(clamp(28px, min(9vw, 14vh), 150px) * var(--s, 1)); line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.op { font-weight: 800; font-size: calc(clamp(24px, min(7.5vw, 11vh), 120px) * var(--s, 1)); line-height: 1; color: #CFE9D7; }
.txt { font-weight: 700; font-size: calc(clamp(18px, min(4vw, 6vh), 60px) * var(--s, 1)); color: #E2E8F0; white-space: nowrap; }
.wort { font-weight: 800; font-size: calc(clamp(18px, min(4vw, 6vh), 64px) * var(--s, 1)); white-space: normal; max-width: 18em; overflow-wrap: anywhere; line-height: 1.15; }
.platz { min-width: 2.2em; padding: .05em .3em; border: 4px dashed rgba(255,255,255,.5); border-radius: 18px; font-weight: 800; font-size: calc(clamp(26px, min(8vw, 12.5vh), 130px) * var(--s, 1)); line-height: 1.1; font-variant-numeric: tabular-nums; color: transparent; white-space: nowrap; transition: color .25s, background .25s, border-color .25s; }
.platz.zeigen { color: var(--ink); background: var(--gelb); border-color: var(--gelb); }
/* Bruch: Zähler über Nenner */
.bruch { display: inline-flex; align-items: center; gap: .25em; font-weight: 800; font-size: calc(clamp(24px, min(7vw, 10vh), 110px) * var(--s, 1)); line-height: 1; font-variant-numeric: tabular-nums; }
.bruch .bz { display: inline-grid; justify-items: center; }
.bruch .bz span:first-child { border-bottom: .07em solid currentColor; padding: 0 .15em .04em; }
.bruch .bz span:last-child { padding: .04em .15em 0; }
.bruch.platz { color: transparent; }
.bruch.platz .bz span { border-color: transparent; }
.bruch.platz.zeigen { color: var(--ink); }
.bruch.platz.zeigen .bz span:first-child { border-color: var(--ink); }
.bruch .lz { min-width: 1.4em; border: 4px dashed rgba(255,255,255,.5); border-radius: 12px; color: transparent; text-align: center; transition: color .25s, background .25s; }
.bruch .lz.zeigen { color: var(--ink); background: var(--gelb); border-color: var(--gelb); }
/* Das Bild nimmt, was übrig bleibt (schrumpft vor Frage und Lösung) */
.aufgabe > .bild { flex: 0 1 auto; height: 44vh; min-height: 70px; width: min(100%, 1150px); display: flex; justify-content: center; }
.bild svg { height: 100%; width: auto; max-width: 100%; }
/* Mit Bild: Zahlen und Antworten kleiner, damit das Bild gross bleibt */
.aufgabe.mit-bild > .bild { min-height: calc(28vh * var(--s, 1)); }
.mit-bild .zahl, .mit-bild .platz { font-size: calc(clamp(24px, 7vh, 96px) * var(--s, 1)); }
.mit-bild .bruch { font-size: calc(clamp(20px, 5vh, 64px) * var(--s, 1)); }
.mit-bild .op { font-size: calc(clamp(20px, 6vh, 80px) * var(--s, 1)); }
.mit-bild .auswahl .opt { font-size: calc(clamp(14px, min(3.4vh, 4.2vw), 42px) * var(--s, 1)); padding: .25em .6em; }
.paar { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 5vw, 80px); flex-wrap: nowrap; }
.paar > .wert { padding: .05em .3em; border-radius: 18px; transition: background .25s, color .25s; }
.paar > .wert.gross { background: var(--gelb); color: var(--ink); }
.paar > .wert.gross .bz span:first-child { border-color: var(--ink); }
.paar .oder { font-size: calc(clamp(16px, min(3vw, 4.5vh), 36px) * var(--s, 1)); font-weight: 700; color: #CFE9D7; }
.auswahl { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 1.6vw, 20px); }
.auswahl .opt { border: 3px solid rgba(255,255,255,.35); background: rgba(255,255,255,.06); border-radius: 18px; padding: .35em .8em; font-weight: 800; font-size: calc(clamp(18px, min(3.4vw, 5.5vh), 50px) * var(--s, 1)); transition: background .25s, color .25s, border-color .25s, opacity .25s; }
.auswahl .opt b { color: #93C5FD; margin-right: .35em; }
.auswahl.geloest .opt { opacity: .4; }
.auswahl.geloest .opt.richtig { opacity: 1; background: var(--gelb); color: var(--ink); border-color: var(--gelb); }
.auswahl.geloest .opt.richtig b { color: var(--ink); }
.hinweis-mehrere { font-size: calc(clamp(12px, min(1.4vw, 2.2vh), 18px) * var(--s, 1)); color: #94A3B8; }

/* ---------- Wandtafel-Fussball ---------- */
.feld { position: relative; height: clamp(54px, 18vh, 210px); border-radius: 18px; background: repeating-linear-gradient(90deg, var(--gras) 0 calc(100% / var(--n)), var(--gras2) 0 calc(200% / var(--n))); box-shadow: inset 0 0 0 4px var(--linie); overflow: hidden; }
.feld .mitte { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--linie); }
.feld .kreis { position: absolute; left: 50%; top: 50%; width: clamp(50px, 9vh, 110px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 4px solid var(--linie); border-radius: 50%; }
.feld .tor { position: absolute; top: 18%; bottom: 18%; width: calc(100% / var(--n) * .55); border: 4px solid #fff; background: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 4px, transparent 4px 12px); }
.feld .tor.links { left: 0; border-left: 0; border-radius: 0 10px 10px 0; box-shadow: inset 6px 0 0 var(--rot); }
.feld .tor.rechts { right: 0; border-right: 0; border-radius: 10px 0 0 10px; box-shadow: inset -6px 0 0 var(--blau); }
.ball { position: absolute; top: 50%; width: clamp(30px, 8vh, 90px); aspect-ratio: 1; transform: translate(-50%, -50%); transition: left .45s cubic-bezier(.3, 1.4, .5, 1); filter: drop-shadow(0 6px 6px rgba(0,0,0,.35)); }
.ball svg { width: 100%; height: 100%; display: block; }
.ball.tor-jubel { animation: huepfen .6s ease 2; }
@keyframes huepfen { 50% { transform: translate(-50%, -80%); } }
.richtung { position: absolute; top: 6px; font-size: clamp(11px, 1.4vw, 15px); font-weight: 700; color: rgba(255,255,255,.85); }
.richtung.l { left: 12px; } .richtung.r { right: 12px; }

/* Knopfzeilen */
.steuerung { display: grid; grid-template-columns: 1fr auto auto 1fr; gap: clamp(8px, 1.5vw, 16px); }
.steuerung.zwei { grid-template-columns: 1fr 1fr; }
.steuerung.mitte { display: flex; flex-wrap: wrap; justify-content: center; }
.steuerung button, .knopf { border: 0; border-radius: 16px; padding: clamp(7px, 2vh, 18px) 16px; font-weight: 800; font-size: clamp(14px, min(2vw, 3.4vh), 24px); color: #fff; }
.steuerung button:disabled, .knopf:disabled { opacity: .45; cursor: not-allowed; }
.b-rot { background: var(--rot); } .b-blau { background: var(--blau); } .b-gruen { background: var(--gruen); } .b-falsch { background: #6B7280; }
.b-grau { background: rgba(255,255,255,.14); }
.b-grau:hover:not(:disabled) { background: rgba(255,255,255,.24); }
.b-rot:hover:not(:disabled), .b-blau:hover:not(:disabled), .b-gruen:hover:not(:disabled), .b-gelb:hover:not(:disabled), .b-falsch:hover:not(:disabled) { filter: brightness(1.08); }

/* ---------- Zahlen-Würfelspiel ---------- */
.wuerfel-ziel { font-weight: 800; font-size: clamp(16px, min(3.4vw, 5vh), 46px); color: #CFE9D7; text-align: center; }
.wuerfel-ziel b { color: var(--gelb); }
.wuerfel-mitte { display: grid; place-items: center; gap: clamp(6px, 3vh, 34px); align-content: center; }
.wuerfel { width: clamp(70px, 20vh, 220px); aspect-ratio: 1; border-radius: 28px; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 900; font-size: clamp(44px, 14vh, 150px); box-shadow: 0 16px 40px -12px rgba(0,0,0,.7), inset 0 -8px 0 rgba(15,23,42,.12); }
.wuerfel.rollt { animation: rollen .5s ease; }
@keyframes rollen { 0% { transform: rotate(0) scale(.85); } 60% { transform: rotate(320deg) scale(1.08); } 100% { transform: rotate(360deg) scale(1); } }
.ziffern { display: flex; gap: clamp(6px, 1.2vw, 14px); justify-content: center; flex-wrap: wrap; }
.ziffern span { width: clamp(34px, min(7vw, 10vh), 92px); height: clamp(42px, min(8.5vw, 12vh), 110px); border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: clamp(22px, min(5.4vw, 8vh), 70px); background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 3px rgba(255,255,255,.25); }
.loesung-gross { font-weight: 800; font-size: clamp(28px, min(8vw, 11vh), 120px); font-variant-numeric: tabular-nums; color: var(--gelb); text-align: center; }

/* ---------- Zahlendetektive ---------- */
.detektiv { display: grid; align-content: center; gap: clamp(6px, 3vh, 34px); justify-items: center; }
.detektiv .fragen-zahl { font-weight: 800; font-size: clamp(15px, min(2.6vw, 4vh), 34px); color: #CFE9D7; }
.strahl-box { width: 100%; }
.strahl-box svg { width: 100%; height: auto; max-height: 20vh; display: block; }
.detektiv .antwort { min-height: 1.3em; font-weight: 800; font-size: clamp(18px, min(5vw, 7vh), 72px); text-align: center; }
.detektiv .antwort.ja { color: #86EFAC; } .detektiv .antwort.nein { color: #FCA5A5; } .detektiv .antwort.treffer { color: var(--gelb); }
.frage-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: clamp(16px, min(2.6vw, 4.4vh), 32px); }
.frage-zeile input { width: 7.5em; font: inherit; font-weight: 800; text-align: center; padding: .25em .4em; border-radius: 14px; border: 3px solid rgba(255,255,255,.4); background: rgba(255,255,255,.08); color: #fff; }
.frage-zeile input:focus { outline: none; border-color: #fff; }

/* ---------- Sprünge bis zum Ziel ---------- */
.spruenge { display: grid; align-content: center; gap: clamp(6px, 3vh, 34px); }
.spruenge .stand { text-align: center; font-weight: 800; font-size: clamp(36px, min(12vw, 16vh), 180px); line-height: 1; font-variant-numeric: tabular-nums; }
.spruenge .stand.verdeckt { color: transparent; border: 5px dashed rgba(255,255,255,.4); border-radius: 26px; justify-self: center; padding: 0 .4em; min-width: 3em; }
.spruenge .unter { text-align: center; color: #CFE9D7; font-weight: 700; font-size: clamp(14px, min(2.2vw, 3.6vh), 28px); }
.sprung-knoepfe { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 1.6vw, 18px); }
.sprung-knoepfe button { min-width: 4.2em; }

/* ---------- Einmaleins-Blockade ---------- */
.blockade { display: grid; grid-template-columns: auto auto; grid-template-rows: minmax(0, 1fr); justify-content: center; gap: clamp(16px, 3vw, 48px); align-items: center; min-height: 0; height: 100%; }
.tafel { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: repeat(10, minmax(0, 1fr)); gap: clamp(2px, .4vh, 5px); height: 100%; max-height: calc(100vw - 520px); aspect-ratio: 1; justify-self: center; align-self: center; }
.tafel button { min-width: 0; min-height: 0; padding: 0; overflow: hidden; border: 0; border-radius: clamp(3px, .8vh, 10px); background: rgba(255,255,255,.1); font-weight: 800; font-size: clamp(7px, min(2.3vh, 2.6vw), 30px); font-variant-numeric: tabular-nums; position: relative; }
.tafel button.eins { background: rgba(147,197,253,.22); }
.tafel button.gesperrt { background: rgba(255,255,255,.03); color: rgba(255,255,255,.25); cursor: not-allowed; }
.tafel button.rot { background: var(--rot); color: #fff; box-shadow: inset 0 0 0 3px #fff; }
.tafel button.blau { background: var(--blau); color: #fff; box-shadow: inset 0 0 0 3px #fff; }
.tafel button.wackeln { animation: wackeln .35s; }
@keyframes wackeln { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.blockade-seite { display: grid; gap: 14px; width: clamp(200px, 26vw, 380px); }
.blockade-seite .info { font-weight: 700; font-size: clamp(13px, min(1.8vw, 3vh), 22px); color: #CFE9D7; line-height: 1.35; }
.blockade-seite .rechnungen { font-weight: 800; font-size: clamp(15px, min(2.6vw, 4.4vh), 34px); color: var(--gelb); min-height: 1.3em; }

/* ---------- Wettrennen ---------- */
.bahnen { display: grid; gap: clamp(3px, 1vh, 10px); }
.bahn { display: grid; grid-template-columns: minmax(0, clamp(70px, 14vw, 220px)) minmax(0, 1fr); align-items: center; gap: clamp(6px, 1.4vw, 16px); border-radius: 14px; padding: 3px 8px; transition: background .25s, box-shadow .25s; }
.bahn.dran { background: rgba(255,255,255,.1); box-shadow: 0 0 0 3px #fff; }
.bname { font-weight: 800; font-size: clamp(13px, min(2vw, 3.2vh), 26px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spur { position: relative; height: clamp(24px, 6vh, 64px); border-radius: 12px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.12) 0 calc(100% / (var(--n) + 1) - 3px), transparent 0 calc(100% / (var(--n) + 1))); }
.figur { position: absolute; top: 50%; width: min(calc(100% / (var(--n) + 1) - 4px), clamp(18px, 4.7vh, 50px)); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(0,0,0,.4); transition: left .45s cubic-bezier(.3, 1.4, .5, 1); z-index: 1; }
/* Zielfeld: das letzte Feld der Bahn kariert wie eine Zielflagge */
.zielfahne { position: absolute; right: 3px; top: 0; bottom: 0; width: calc(100% / (var(--n) + 1) - 3px); border-radius: 0 12px 12px 0;
  background: repeating-conic-gradient(rgba(255,255,255,.75) 0 25%, transparent 0 50%) 0 0 / clamp(8px, 2vh, 20px) clamp(8px, 2vh, 20px); }
.bahn.rot .figur { background: var(--rot); } .bahn.blau .figur { background: var(--blau); } .bahn.gruen .figur { background: var(--gruen); } .bahn.gelb .figur { background: var(--gelb); }
.zug.gruen { background: var(--gruen); } .zug.gelb { background: var(--gelb); color: var(--ink); }
.b-gelb { background: var(--gelb); color: var(--ink) !important; }
.steuerung.team-knoepfe { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.team-knoepfe button { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.namen input.rot { border-color: var(--rot); } .namen input.blau { border-color: var(--blau); } .namen input.gruen { border-color: var(--gruen); } .namen input.gelb { border-color: #D4A20C; }

/* ---------- Einmaleins-Bingo ---------- */
.bingo-kopf { text-align: center; font-weight: 800; color: #CFE9D7; font-size: clamp(14px, min(2.4vw, 3.6vh), 30px); }
.gezogen { text-align: center; font-weight: 700; font-size: clamp(13px, min(1.8vw, 3vh), 22px); color: #E2E8F0; line-height: 1.5; max-height: 22vh; overflow: auto; }
.gezogen b { color: var(--gelb); }
#druck { display: none; }

/* ---------- Zielzahlen ---------- */
.wuerfel-reihe { display: flex; flex-wrap: wrap; gap: clamp(6px, 1vw, 12px); min-height: clamp(34px, min(5vw, 7vh), 64px); align-items: center; }
.mini-wuerfel { width: clamp(34px, min(5vw, 7vh), 64px); aspect-ratio: 1; border-radius: 12px; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 900; font-size: clamp(18px, min(3vw, 4.4vh), 38px); box-shadow: inset 0 -4px 0 rgba(15,23,42,.12); }

/* ---------- Jubel und Einstellungen ---------- */
/* Jubel: Karte wie die Dialoge der 3D-Modelle, der Strich unter dem Wort in der Farbe des Teams (data-team) */
.jubel { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(5, 8, 12, .86); z-index: 20; opacity: 0; visibility: hidden; transition: opacity .2s; text-align: center; padding: 16px; }
.jubel.an { opacity: 1; visibility: visible; }
.jubel > div { min-width: min(100%, 440px); max-width: 100%; padding: clamp(20px, 5vh, 52px) clamp(22px, 5vw, 64px); border-radius: 18px; border: 1px solid var(--strich-2); background: var(--karte); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.jubel .gross { font-size: clamp(36px, min(10vw, 15vh), 150px); font-weight: 800; line-height: .95; letter-spacing: -.02em; text-transform: uppercase; overflow-wrap: anywhere; }
.jubel .gross::after { content: ''; display: block; width: 1.3em; height: max(5px, .07em); margin: .3em auto 0; border-radius: 99px; background: var(--jubel-farbe, var(--gelb)); }
.jubel[data-team="rot"] { --jubel-farbe: var(--rot); } .jubel[data-team="blau"] { --jubel-farbe: var(--blau); }
.jubel[data-team="gruen"] { --jubel-farbe: var(--gruen); } .jubel[data-team="gelb"] { --jubel-farbe: var(--gelb); }
.jubel .klein { font-size: clamp(17px, min(2.6vw, 4.4vh), 34px); font-weight: 700; margin-top: clamp(10px, 2.4vh, 22px); color: #C9D3DC; }
.jubel button { margin-top: clamp(16px, 4vh, 32px); border: 0; border-radius: 12px; padding: 13px 28px; font-weight: 800; font-size: clamp(16px, 2vw, 22px); background: var(--amber); color: #1D1300; }
/* Einstellungen und Spielanleitung: weisse Karte (gut lesbar am Beamer, bewusst hell) */
.einst { position: fixed; inset: 0; z-index: 30; display: grid; justify-items: center; align-items: start; background: rgba(5, 12, 20, .8); padding: 16px; overflow: auto; }
.karte { width: min(760px, 100%); background: #fff; color: var(--ink); border-radius: 20px; padding: clamp(18px, 3vw, 30px); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); margin: auto; }
.einst-zurueck { border: 0; background: none; color: #1D4ED8; font-weight: 700; font-size: 15px; padding: 4px 0; margin-bottom: 8px; }
.einst-zurueck:hover { text-decoration: underline; text-underline-offset: 3px; }
.karte h2 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 4px; }
.karte .unter { color: var(--muted); margin-bottom: 18px; line-height: 1.45; }
.gruppe { margin-bottom: 16px; }
.gruppe > span { display: block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.wahl button { border: 2px solid #E2E8F0; background: #F8FAFC; color: var(--ink); border-radius: 12px; padding: 8px 12px; font-weight: 700; font-size: 15px; }
.wahl button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.wahl button:disabled { opacity: .35; cursor: not-allowed; }
.wahl.reihen button { min-width: 44px; }
.namen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.namen input { width: 100%; font: inherit; font-weight: 700; padding: 10px 12px; border-radius: 12px; border: 2px solid #E2E8F0; color: var(--ink); }
.hinweis { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.los { width: 100%; margin-top: 8px; border: 0; border-radius: 14px; padding: 15px; font-weight: 800; font-size: 18px; background: var(--gras2); color: #fff; }
/* Spielanleitung («?») */
.anleitung .ziel { font-size: clamp(17px, 1.7vw, 21px); font-weight: 600; line-height: 1.45; margin: 6px 0 4px; }
.anleitung h3 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.anleitung ol { padding-left: 1.4em; display: grid; gap: 8px; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.5; }
.einst-anleitung { margin: -12px 0 14px; }
.tasten-hilfe { color: var(--muted); font-size: 15px; line-height: 2.1; margin-bottom: 8px; }
.karte kbd { background: #E2E8F0; border-color: #CBD5E1; color: var(--ink); }
.karte :focus-visible { outline-color: #1D4ED8; }   /* auf Weiss sichtbarer als Amber */
.link-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; margin-top: 10px; }
.link-knopf { border: 0; background: none; color: #1D4ED8; font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.link-knopf:hover { color: #1E3A8A; }
#linkInfo { font-size: 13px; color: var(--muted); text-align: center; }
.link-feld { width: 100%; margin-top: 8px; font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 10px; border: 2px solid #E2E8F0; color: var(--ink); background: #F8FAFC; }

@media (max-width: 700px) {
  .steuerung { grid-template-columns: 1fr 1fr; }
  .steuerung .b-rot, .steuerung .b-gruen { order: 1; } .steuerung .b-blau, .steuerung .b-falsch { order: 2; }
  .steuerung .b-grau { order: 3; }
  .tasten, .feld .richtung { display: none; }
  .team { gap: 6px; padding: 4px 6px; margin: -4px -6px; } .team .name { font-size: 14px; } .tore { font-size: 26px; }
  .teams { gap: 8px; }
  .mini-wuerfel { width: 30px; font-size: 18px; border-radius: 8px; }
  .wuerfel-reihe { min-height: 30px; }
  .namen { grid-template-columns: 1fr; }
  .aufgabe.mit-bild > .bild { min-height: calc(18vh * var(--s, 1)); }
  .steuerung.team-knoepfe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steuerung.team-knoepfe > * { order: 0; }
}
/* Hundertertafel (Blockade, Zielzahlen): quer bis 900 px kleine Knöpfe, die Tafel bekommt die Breite neben der Seitenleiste;
   hochkant steht sie über der Seitenleiste und füllt die Höhe, die bleibt, höchstens so breit wie der Bildschirm */
@media (max-width: 900px) {
  .blockade-seite button { padding: 8px 6px; font-size: 14px; }
  .tafel { max-height: calc(100vw - 2 * clamp(12px, 3vw, 40px) - clamp(16px, 3vw, 48px) - clamp(200px, 26vw, 380px)); }
}
@media (orientation: portrait) {
  .blockade { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; justify-content: stretch; }
  .blockade-seite { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .blockade-seite .info, .blockade-seite .rechnungen, .blockade-seite .wuerfel-reihe { grid-column: 1 / -1; }
  .blockade-seite .steuerung.zwei { display: contents; }
  .blockade-seite .knopf { order: 4; }
  .tafel { max-height: calc(100vw - 2 * clamp(12px, 3vw, 40px)); }
}
@media (max-height: 560px) {
  .tasten { display: none; }
  .spiel { gap: 4px; padding-top: 6px; padding-bottom: 6px; }
  .buehne { gap: 6px; }
  .icon { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .ball, .figur { transition: none; } .ball.tor-jubel, .wuerfel.rollt, .tafel button.wackeln { animation: none; } }

/* Bingokarten drucken: nur die Karten, vier pro A4-Seite */
@page { size: A4; margin: 12mm; }
@media print {
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; color: #000 !important; }
  body > *:not(#druck) { display: none !important; }
  #druck { display: block; }
  .druck-seite { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; break-after: page; }
  .druck-seite:last-child { break-after: auto; }
  .druck-karte { border: .6mm solid #000; border-radius: 4mm; padding: 4mm; break-inside: avoid; }
  .druck-kopf { display: flex; justify-content: space-between; align-items: baseline; font-size: 11pt; margin-bottom: 3mm; }
  .druck-raster { display: grid; grid-template-columns: repeat(var(--g), 1fr); border: .4mm solid #000; }
  .druck-raster span { aspect-ratio: 1; display: grid; place-items: center; border: .3mm solid #000; font-weight: 800; font-size: calc(30mm / var(--g)); font-variant-numeric: tabular-nums; }
  .druck-fuss { margin-top: 2mm; font-size: 7pt; color: #555; text-align: right; }
}
