/*
 * qspeedy – gemeinsame Gestaltung (V1, Oktober 2026)
 *
 * 1. Farben und Schriften als Variablen. Die älteren Seiten (Verwaltung,
 *    Klassenwettkampf, Live-Ansicht, Statistik) hatten je eigene Werte unter
 *    eigenen Namen; die stehen unten als Aliase und zeigen alle auf dieselbe
 *    Palette. Wer eine Farbe ändert, ändert sie hier.
 * 2. Grundregeln und die Wortmarke (.logo).
 * 3. Bausteine der neuen Seiten (Start, Solo, Duell) mit Präfix qs-, damit
 *    sie nicht mit den .btn/.card-Regeln der älteren Seiten zusammenstoßen.
 *
 * Schriften: assets/fonts.css (Outfit für Text, JetBrains Mono für Zahlen).
 */

:root {
    color-scheme: dark;

    --bg: #0a0a0f;
    --bg2: #111118;
    --card: #1a1a24;
    --card2: #232331;
    --input: #14141c;
    --line: rgba(255, 255, 255, .07);

    --text: #f4f4f8;
    --text2: #a3a3c2;
    --text3: #8a8aa8;            /* vorher #5a5a7a – zu wenig Kontrast */

    --orange: #ff6b2c;
    --gelb: #f7c948;
    --cyan: #38d4f5;
    --ok: #22c55e;
    --falsch: #ef4444;
    --fire: linear-gradient(135deg, #ff6b2c, #f7c948);

    --solo: var(--orange);
    --duell: var(--cyan);
    --klasse: var(--gelb);

    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --body: 'Outfit', system-ui, sans-serif;
    --r: 16px;

    /* ---- Aliase der älteren Seiten ---- */
    --bg-card: var(--card);
    --bg-input: var(--input);
    --bg-primary: var(--bg);
    --bg-secondary: var(--bg2);
    --bg-card-hover: var(--card2);
    --bg-dark: var(--bg);
    --text-primary: var(--text);
    --text-secondary: var(--text2);
    --text-muted: var(--text3);
    --accent: var(--orange);
    --accent2: var(--gelb);
    --accent-primary: var(--orange);
    --accent-secondary: var(--gelb);
    --accent-orange: var(--orange);
    --accent-cyan: var(--cyan);
    --accent-green: var(--ok);
    --accent-red: var(--falsch);
    --success: var(--ok);
    --error: var(--falsch);
    --warning: #f59e0b;
    --info: #3b82f6;
    --accent-blue: #3b82f6;
    --accent-gold: #ffd700;          /* Live-Ansicht: Plätze 1–3 */
    --accent-silver: #c0c0c0;
    --accent-bronze: #cd7f32;
    --gradient-fire: var(--fire);
    --font-mono: var(--mono);
    --font-body: var(--body);
    --font-sans: var(--body);
    --font-display: var(--mono);
}

/* ---- Grundregeln ---- */
html { background: var(--bg); }
body { background: var(--bg); color: var(--text); font-family: var(--body); }
:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }
.hidden { display: none !important; }
/* hidden-Attribut gilt immer – auch bei Bausteinen mit display:flex/grid */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Kopfleiste: Symbol der qteach-Familie (assets/symbol.svg) + Wortmarke ---- */
.qs-marke { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.qs-marke img { display: block; border-radius: 7px; flex: none; }

/* ---- Wortmarke (V2 B): „q“ weiß, „speedy“ im Verlauf, leicht schräg ---- */
.logo, a.logo {
    display: inline-block;
    font-family: var(--body);
    font-size: 1.45rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -.02em;
    line-height: 1.1;
    color: var(--text);
    -webkit-text-fill-color: currentColor;
    background: none;
    text-decoration: none;
    transform: skewX(-6deg);
}
.logo b {
    font-weight: 800;
    background: var(--fire);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* ======================================================================
 * Bausteine der neuen Seiten (qs-)
 * ==================================================================== */

.qs-body {
    margin: 0;
    min-height: 100vh;
    line-height: 1.5;
    background-image:
        radial-gradient(ellipse at 15% 0%, rgba(255, 107, 44, .10), transparent 45%),
        radial-gradient(ellipse at 90% 100%, rgba(56, 212, 245, .06), transparent 45%);
    background-attachment: fixed;
}
.qs-body *, .qs-body *::before, .qs-body *::after { box-sizing: border-box; }
.qs-wrap { max-width: 520px; margin: 0 auto; padding: 0 16px 24px; }
.qs-wrap.breit { max-width: 900px; }

.qs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 8px; }
.qs-top .rechts { display: flex; gap: 8px; align-items: center; }

.qs-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 48px; padding: 12px 22px;
    border: 0; border-radius: 14px; cursor: pointer;
    background: var(--fire); color: #0a0a0f;
    font: inherit; font-size: 17px; font-weight: 800; text-decoration: none;
    touch-action: manipulation;
}
.qs-btn:active { transform: scale(.97); }
.qs-btn.zwei { background: var(--card2); color: var(--text); border: 1px solid var(--line); font-weight: 700; }
.qs-btn.klein { min-height: 38px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }
.qs-btn.voll { width: 100%; }
.qs-btn[disabled] { opacity: .5; cursor: default; }
.qs-link { color: var(--text2); background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; padding: 6px 0; }

.qs-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.qs-label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text3); margin-bottom: 8px; }
.qs-muted { color: var(--text2); font-size: 14px; }
.qs-fehler { color: #fca5a5; font-size: 14px; margin-top: 8px; }
.qs-ok-text { color: #6ee7a0; font-size: 14px; margin-top: 8px; }

.qs-input {
    width: 100%; min-height: 48px; padding: 10px 14px;
    background: var(--bg); color: var(--text);
    border: 2px solid var(--line); border-radius: 12px;
    font: inherit; font-size: 17px;
}
.qs-input:focus { outline: none; border-color: var(--gelb); }
.qs-input.code { font-family: var(--mono); font-size: 22px; letter-spacing: .08em; text-align: center; }
.qs-feld { margin-bottom: 12px; }
.qs-feld label { display: block; font-size: 14px; color: var(--text2); margin-bottom: 6px; }

/* ---- Startseite ---- */
.qs-modi { display: grid; gap: 10px; margin-top: 8px; }
.qs-modus {
    display: flex; align-items: center; gap: 14px;
    background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c, var(--orange));
    border-radius: 16px; padding: 16px 14px; color: var(--text); text-decoration: none;
}
.qs-modus:hover { background: var(--card2); }
.qs-modus .ic {
    width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 24px;
    background: color-mix(in srgb, var(--c, var(--orange)) 18%, transparent);
}
.qs-modus b { display: block; font-size: 19px; }
.qs-modus span span { display: block; font-size: 14px; color: var(--text2); }

.qs-code { margin-top: 14px; background: var(--card); border: 2px solid rgba(247, 201, 72, .45); border-radius: 18px; padding: 16px; }
.qs-code h2 { font-size: 18px; margin: 0 0 2px; }
.qs-code p { margin: 0 0 10px; }
.qs-code-zeile { display: flex; gap: 8px; }
.qs-code-zeile .qs-input { flex: 1; min-width: 0; }
.qs-code-zeile .qs-btn { flex: none; }

/* Drei große Kacheln (Solo, Duell, Mit Code mitspielen) – Oktober 2026.
   Handy: untereinander, Symbol neben dem Titel. Ab 760 px: drei Spalten,
   Symbol über dem Titel, alle gleich hoch. Die Kachelfarbe kommt aus --c. */
.qs-start3 { display: grid; gap: 14px; margin-top: 10px; }
.qs-kachel, .qs-kachel.qs-code {
    display: flex; flex-direction: column; gap: 8px; margin: 0;
    background: linear-gradient(160deg, color-mix(in srgb, var(--c) 17%, var(--card)), var(--card) 65%);
    border: 2px solid color-mix(in srgb, var(--c) 45%, transparent);
    border-radius: 22px; padding: 20px; color: var(--text); text-decoration: none;
    transition: transform .12s, border-color .12s;
}
a.qs-kachel:hover, a.qs-kachel:focus-visible { border-color: var(--c); transform: translateY(-2px); }
.qs-kachel .kopf { display: flex; align-items: center; gap: 14px; }
.qs-kachel .ic {
    width: 60px; height: 60px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 32px;
    background: color-mix(in srgb, var(--c) 24%, transparent);
}
.qs-kachel .ic.ziffern { font-family: var(--mono); font-size: 19px; font-weight: 800; color: var(--c); letter-spacing: .02em; }
.qs-kachel b, .qs-kachel h2, .qs-kachel.qs-code h2 { display: block; margin: 0; font-size: 26px; font-weight: 800; line-height: 1.1; }
.qs-kachel .txt { font-size: 16px; color: var(--text2); line-height: 1.4; }
.qs-kachel .pfeil { margin-top: auto; padding-top: 4px; font-weight: 800; font-size: 17px; color: var(--c); }
.qs-kachel .qs-code-zeile { margin-top: auto; padding-top: 4px; }
.qs-kachel .qs-fehler { margin: 0; }
@media (min-width: 760px) {
    .qs-start3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
    .qs-kachel, .qs-kachel.qs-code { padding: 26px 24px 24px; min-height: 300px; }
    .qs-kachel .kopf { flex-direction: column; align-items: flex-start; gap: 16px; }
    .qs-kachel .ic { width: 76px; height: 76px; border-radius: 20px; font-size: 40px; }
    .qs-kachel .ic.ziffern { font-size: 23px; }
    .qs-kachel b, .qs-kachel h2, .qs-kachel.qs-code h2 { font-size: 30px; }
    .qs-kachel .txt { font-size: 17px; }
    .qs-kachel .qs-code-zeile .qs-btn { padding: 12px 18px; }
}

.qs-best { display: flex; gap: 8px; margin-top: 12px; }
.qs-best a, .qs-best div {
    flex: 1; min-width: 0; text-align: center; text-decoration: none; color: var(--text);
    background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px;
}
.qs-best b { display: block; font-family: var(--mono); font-size: 19px; color: var(--gelb); white-space: nowrap; }
.qs-best small { display: block; font-size: 12px; color: var(--text2); line-height: 1.2; }

.qs-fuss { text-align: center; font-size: 13px; color: var(--text3); padding: 22px 0 8px; }
.qs-fuss a, .qs-fuss button { color: var(--text3); }

/* ---- Spielfläche (Solo und Duell) ---- */
.qs-spiel { display: flex; flex-direction: column; min-height: calc(100vh - 70px); min-height: calc(100dvh - 70px); }
.qs-zeit { height: 10px; border-radius: 999px; background: var(--card2); overflow: hidden; }
.qs-zeit i { display: block; height: 100%; width: 100%; background: var(--fire); transition: width .25s linear; }
.qs-zeit.knapp i { background: var(--falsch); }
.qs-zeit.offen i { width: 100%; background: var(--card2); }
.qs-gstats { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.qs-pkt { font-family: var(--mono); font-size: 30px; font-weight: 700; line-height: 1.05; }
.qs-pkt small { display: block; font-family: var(--body); font-size: 12px; font-weight: 400; color: var(--text2); }
.qs-pkt.rechts { text-align: right; }
.qs-combo { font-family: var(--mono); font-weight: 800; font-size: 18px; padding: 6px 12px; border-radius: 999px; background: var(--card2); color: var(--text3); transition: transform .15s; }
.qs-combo.an { background: var(--fire); color: #0a0a0f; }
.qs-combo.pop { transform: scale(1.25); }

.qs-aufgabe {
    margin: 16px 0 8px; border-radius: 20px; background: var(--card); border: 2px solid transparent;
    padding: 26px 10px 18px; text-align: center; transition: border-color .15s, background .15s;
}
.qs-aufgabe.ok { border-color: var(--ok); background: rgba(34, 197, 94, .10); }
.qs-aufgabe.falsch { border-color: var(--falsch); background: rgba(239, 68, 68, .10); animation: qs-wackel .3s; }
@keyframes qs-wackel { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.qs-term { font-family: var(--mono); font-size: clamp(30px, 10vw, 46px); font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.qs-term .op { color: var(--orange); padding: 0 .12em; }
.qs-antwort { margin: 12px auto 0; min-height: 54px; width: 70%; border-bottom: 3px solid var(--gelb); font-family: var(--mono); font-size: 40px; font-weight: 700; color: var(--gelb); }
.qs-hinweis { font-size: 13px; color: var(--text3); text-align: center; margin-bottom: 8px; min-height: 1.4em; }
.qs-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; padding-bottom: 8px; }
.qs-pad button {
    height: 60px; border-radius: 14px; border: 1px solid var(--line); background: var(--card2); color: var(--text);
    font-family: var(--mono); font-size: 26px; font-weight: 700; cursor: pointer; touch-action: manipulation;
}
.qs-pad button:active { transform: scale(.95); background: var(--card); }
.qs-pad .del { color: var(--falsch); }
.qs-pad .clr { color: var(--cyan); }

/* ---- Stufenleiter ---- */
.qs-leiter { display: flex; flex-direction: column-reverse; gap: 6px; }
.qs-st {
    display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px;
    width: 100%; text-align: left; color: var(--text); font: inherit; cursor: pointer;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px;
}
.qs-st .nr { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-family: var(--mono); font-weight: 800; background: var(--card2); color: var(--text2); }
.qs-st b { display: block; font-size: 15px; }
.qs-st small { display: block; font-size: 13px; color: var(--text2); font-family: var(--mono); }
.qs-st .m { font-size: 12px; color: var(--text3); white-space: nowrap; text-align: right; }
.qs-st .m em { display: block; font-style: normal; color: var(--gelb); font-family: var(--mono); }
.qs-st.ok .nr { background: rgba(34, 197, 94, .18); color: #6ee7a0; }
.qs-st.jetzt { border: 2px solid var(--gelb); background: color-mix(in srgb, var(--gelb) 9%, var(--card)); }
.qs-st.jetzt .nr { background: var(--fire); color: #0a0a0f; }
.qs-st.jetzt .m { color: var(--gelb); font-weight: 700; }
.qs-st.frei { opacity: .8; }
.qs-st.gewaehlt { outline: 2px dashed var(--cyan); outline-offset: 2px; }
.qs-leiter-info { font-size: 14px; color: var(--text2); margin: 10px 0 12px; min-height: 42px; }

/* ---- Solo am PC (Entwurf B, Oktober 2026): Bühne links, Stufen als Turm rechts ----
   Gleiches HTML wie am Handy (single.php); erst ab 900 px Breite wird umgestellt.
   Spiel und Ergebnis bleiben schmal. Die Bühne füllt solo.js (zeichneBuehne). */
.nur-pc { display: none; }
.qs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.qs-chip { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 15px; color: var(--text2); }
.qs-chip b { color: var(--text); font-family: var(--mono); }
.qs-chip.gelb { border-color: color-mix(in srgb, var(--gelb) 50%, transparent); color: var(--gelb); }
.qs-chip.gelb b { color: var(--gelb); }

@media (min-width: 900px) {
    .qs-wrap.solo { max-width: 1180px; padding: 0 28px 20px; }
    .qs-wrap.solo > section:not(.qs-solo) { max-width: 520px; margin-inline: auto; }
    .nur-pc { display: block; }

    .qs-solo:not([hidden]) {
        display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 360px;
        grid-template-areas: "kopf kopf ." "buehne buehne turm" "spieler abz turm";
        column-gap: 28px; align-items: start;
    }
    .qs-solo-kopf { grid-area: kopf; display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px; }
    .qs-solo-kopf h1 { font-size: 30px !important; margin: 0 !important; }
    .qs-solo-kopf p { margin: 0 !important; }

    /* Bühne */
    .qs-buehne {
        grid-area: buehne; display: flex; flex-direction: column; align-items: flex-start;
        border-radius: 24px; padding: 20px 28px;
        background: linear-gradient(150deg, color-mix(in srgb, var(--orange) 16%, var(--card)), var(--card) 60%);
        border: 2px solid color-mix(in srgb, var(--gelb) 55%, transparent);
    }
    .qs-buehne > .nur-pc { width: 100%; }
    .qs-buehne-stufe { font-family: var(--mono); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--gelb); }
    .qs-buehne-titel { font-size: 34px; margin: 2px 0 0; line-height: 1.15; }
    .qs-buehne-bsp { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 0; }
    .qs-buehne-bsp .qs-term { font-size: 58px; font-weight: 800; }
    .qs-buehne .qs-chips { margin: 6px 0 16px; }
    .qs-buehne-bsp small { font-family: var(--mono); font-size: 20px; color: var(--text3); font-weight: 600; }
    .qs-buehne #losBtn { order: 1; width: auto; min-height: 64px; font-size: 22px; padding: 14px 40px; border-radius: 16px; }
    .qs-buehne .qs-leiter-info { order: 2; min-height: 0; margin: 12px 0 0; font-size: 15px; }

    /* Spieler und Abzeichen darunter, nebeneinander */
    .qs-solo #spielerKarte { grid-area: spieler; margin: 16px 0 0 !important; }
    .qs-solo #spielerKarte p { font-size: 14px; }
    .qs-solo #spielerKarte .qs-btn.klein { min-height: 34px; padding: 5px 11px; font-size: 13px; }
    .qs-solo #abzKarte { grid-area: abz; margin: 16px 0 0; }
    .qs-solo .qs-badges { display: flex; flex-wrap: wrap; gap: 8px; }
    .qs-solo .qs-badge { padding: 0; background: none; border: 0; }
    .qs-solo .qs-badge > span:last-child { display: none; }   /* Name und Text stehen im title */

    /* Turm */
    .qs-turm { grid-area: turm; }
    .qs-turm-kopf { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
    .qs-turm-kopf .qs-label { margin: 0; }
    .qs-turm-kopf span:last-child { font-size: 13px; color: var(--text3); }
    .qs-turm .qs-leiter { align-items: center; gap: 7px; }
    .qs-turm .qs-st {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        height: 56px; padding: 0 14px; border: 2px solid var(--line); border-radius: 12px; opacity: 1;
    }
    .qs-turm .qs-st:nth-child(1) { width: 100%; }
    .qs-turm .qs-st:nth-child(2) { width: 93%; }
    .qs-turm .qs-st:nth-child(3) { width: 86%; }
    .qs-turm .qs-st:nth-child(4) { width: 79%; }
    .qs-turm .qs-st:nth-child(5) { width: 72%; }
    .qs-turm .qs-st:nth-child(6) { width: 65%; }
    .qs-turm .qs-st:nth-child(7) { width: 58%; }
    .qs-turm .qs-st .nr { width: auto; height: auto; background: none; font-size: 22px; color: inherit; }
    .qs-turm .qs-st > span:nth-child(2) { flex: 1; min-width: 0; text-align: center; }
    .qs-turm .qs-st b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .qs-turm .qs-st small { display: none; }
    .qs-turm .qs-st .m { font-size: 0; min-width: 22px; }
    .qs-turm .qs-st .m em { font-size: 13px; color: var(--text2); }
    .qs-turm .qs-st:hover { border-color: var(--cyan); }
    .qs-turm .qs-st.ok { background: color-mix(in srgb, #22c55e 18%, var(--card)); border-color: color-mix(in srgb, #22c55e 45%, transparent); }
    .qs-turm .qs-st.ok .nr { background: none; color: #6ee7a0; }
    .qs-turm .qs-st.jetzt { background: var(--fire); border-color: transparent; color: #0a0a0f; box-shadow: 0 0 28px rgba(255, 107, 44, .45); }
    .qs-turm .qs-st.jetzt .nr, .qs-turm .qs-st.jetzt .m em { background: none; color: #0a0a0f; }
    .qs-turm .qs-st.frei { border-style: dashed; color: var(--text2); }
}

/* ---- Ergebnis ---- */
.qs-erg { text-align: center; display: flex; flex-direction: column; gap: 14px; padding-top: 10px; }
.qs-neu { align-self: center; background: var(--fire); color: #0a0a0f; font-weight: 800; border-radius: 999px; padding: 6px 14px; font-size: 15px; }
.qs-gross { font-family: var(--mono); font-size: 72px; font-weight: 800; line-height: 1; }
.qs-gross small { display: block; font-family: var(--body); font-size: 15px; font-weight: 400; color: var(--text2); margin-top: 6px; }
.qs-zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qs-zahlen div { background: var(--card); border-radius: 12px; padding: 10px 4px; }
.qs-zahlen b { display: block; font-family: var(--mono); font-size: 22px; }
.qs-zahlen small { font-size: 12px; color: var(--text2); }
.qs-knoepfe { display: flex; gap: 8px; }
.qs-knoepfe .qs-btn { flex: 1; padding-left: 8px; padding-right: 8px; }

/* ---- Abzeichen ---- */
.qs-abz { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.qs-abz span {
    width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 23px;
    background: var(--card2); filter: grayscale(1); opacity: .35;
}
.qs-abz span.hat { filter: none; opacity: 1; background: color-mix(in srgb, var(--gelb) 20%, var(--card2)); box-shadow: 0 0 0 2px var(--gelb) inset; }
.qs-abz span.frisch { animation: qs-pop .6s ease-out; }
@keyframes qs-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
.qs-badges { display: grid; gap: 8px; }
.qs-badge { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.qs-badge .ic { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--card2); filter: grayscale(1); opacity: .45; }
.qs-badge.hat .ic { filter: none; opacity: 1; background: color-mix(in srgb, var(--gelb) 18%, var(--card2)); }
.qs-badge b { display: block; }
.qs-badge span { font-size: 13px; color: var(--text2); }

/* ---- Duell ---- */
.qs-gegner { display: flex; gap: 8px; margin-top: 10px; }
.qs-gegner div { flex: 1; background: var(--card); border-radius: 12px; padding: 8px 10px; border: 2px solid transparent; }
.qs-gegner div.dran { border-color: var(--duell); }
.qs-gegner div.raus { opacity: .5; }
.qs-gegner small { display: block; font-size: 13px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-gegner b { font-family: var(--mono); font-size: 24px; }
.qs-banner { text-align: center; font-size: 15px; color: var(--duell); margin-top: 8px; min-height: 1.4em; }
.qs-bigcode { font-family: var(--mono); font-size: 40px; font-weight: 800; letter-spacing: .12em; text-align: center; color: var(--gelb); }
.qs-qr { display: flex; justify-content: center; margin: 8px 0; }
.qs-qr img { background: #fff; padding: 8px; border-radius: 12px; width: 180px; height: 180px; }
.qs-gast { background: var(--card2); border-radius: 14px; padding: 14px; border-left: 5px solid var(--duell); margin: 10px 0; }
.qs-gast b { font-size: 19px; }
.qs-stand { display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: 800; }
.qs-stand .nm { font-size: 16px; color: var(--text2); font-weight: 600; max-width: 35%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-stand .z { font-family: var(--mono); font-size: 44px; }
.qs-angebot { background: color-mix(in srgb, var(--duell) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--duell) 45%, transparent); border-radius: 14px; padding: 12px; font-size: 15px; text-align: center; }
.qs-wahl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.qs-wahl button {
    min-height: 56px; border-radius: 12px; border: 2px solid var(--line); background: var(--card2); color: var(--text);
    font: inherit; font-weight: 700; cursor: pointer; padding: 8px;
}
.qs-wahl button small { display: block; font-weight: 400; font-size: 12px; color: var(--text2); }
.qs-wahl button.an { border-color: var(--gelb); background: color-mix(in srgb, var(--gelb) 10%, var(--card2)); }
.qs-wahl.drei { grid-template-columns: repeat(3, 1fr); }
.qs-sb { display: flex; justify-content: space-between; align-items: center; background: var(--card); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; border: 2px solid transparent; }
.qs-sb.sieg { border-color: var(--gelb); }
.qs-sb b { font-family: var(--mono); font-size: 26px; }
.qs-sb small { display: block; color: var(--text2); font-size: 13px; }

/* ---- Overlay (Start, Ende) ---- */
.qs-overlay { position: fixed; inset: 0; background: rgba(10, 10, 15, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; z-index: 50; }
.qs-overlay[hidden] { display: none; }

/* ---- Hinweis (Toast) ---- */
.qs-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--card2); color: var(--text); border-radius: 12px; padding: 10px 16px; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); z-index: 60; max-width: calc(100% - 32px); }
.qs-toast[hidden] { display: none; }

/* ---- Spielercode ---- */
.qs-spielercode { font-family: var(--mono); font-size: 28px; font-weight: 800; letter-spacing: .1em; color: var(--gelb); text-align: center; background: var(--bg); border-radius: 12px; padding: 10px; margin: 8px 0; }

/* ---- Zugangsdaten am Beamer (Dashboard, renderCreds in verwaltung.js) ----
   Code und Team-PINs auf einen Blick; im Vollbild wachsen die Größen mit dem Bildschirm. */
#credsModal .modal { max-width: 980px; }
.creds-steuer { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.creds-tafel {
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "kopf qr" "teams teams";
    gap: 18px 24px; align-items: center;
}
.creds-kopf { grid-area: kopf; text-align: center; }
.creds-qr { grid-area: qr; }
.creds-qr img { width: 200px; height: 200px; display: block; }
.creds-wo { font-size: 17px; color: var(--text2); margin-bottom: 6px; }
.creds-label { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text3); }
.creds-code { font-family: var(--mono); font-weight: 800; font-size: clamp(48px, 9vw, 92px); line-height: 1.05; letter-spacing: .08em; color: var(--klasse); white-space: nowrap; }
.creds-name { font-size: 15px; color: var(--text2); margin-top: 4px; }
.creds-teams { grid-area: teams; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.creds-team {
    background: var(--card2); border: 1px solid var(--line); border-top: 8px solid var(--c, var(--gelb));
    border-radius: 16px; padding: 12px 10px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.creds-tname { font-weight: 800; font-size: 19px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creds-pin { font-family: var(--mono); font-weight: 800; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: .1em; color: var(--text); }
.creds-link { display: flex; gap: 8px; align-items: center; margin-top: 16px; font-size: 13px; color: var(--text3); }
.creds-link code { flex: 1; word-break: break-all; }
.creds-qrs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.creds-klein { font-family: var(--mono); font-size: 14px; color: var(--text2); margin-top: 4px; }
.creds-klein b { color: var(--text); font-size: 18px; }
@media (max-width: 640px) {
    .creds-tafel { grid-template-columns: 1fr; grid-template-areas: "kopf" "teams" "qr"; }
    .creds-qr { justify-self: center; }
}

/* Vollbild (Klasse .voll, dazu wenn möglich echtes Vollbild): Kopfzeile, Link weg, alles nach Bildschirmhöhe. */
#credsModal .modal.voll { position: fixed; inset: 0; z-index: 2000; transform: none; max-width: none; max-height: none; width: 100vw; height: 100vh; border-radius: 0; background: var(--bg); overflow: auto; display: flex; flex-direction: column; justify-content: center; padding: 3vh 4vw; }
#credsModal .modal.voll .modal-header,
#credsModal .modal.voll .creds-link { display: none; }
#credsModal .modal.voll .creds-steuer { position: fixed; top: 12px; right: 12px; margin: 0; opacity: .6; }
#credsModal .modal.voll .creds-steuer:hover { opacity: 1; }
#credsModal .modal.voll .creds-tafel { gap: 4vh 4vw; }
#credsModal .modal.voll .creds-wo { font-size: 3vh; }
#credsModal .modal.voll .creds-label { font-size: 1.8vh; }
#credsModal .modal.voll .creds-code { font-size: 17vh; }
#credsModal .modal.voll .creds-name { font-size: 2.6vh; }
#credsModal .modal.voll .creds-qr img { width: 32vh; height: 32vh; }
#credsModal .modal.voll .creds-teams { grid-template-columns: repeat(auto-fit, minmax(22vw, 1fr)); gap: 2.5vh; }
#credsModal .modal.voll .creds-tname { font-size: 3.6vh; }
#credsModal .modal.voll .creds-pin { font-size: 10vh; }
#credsModal .modal.voll .creds-qrs .creds-team img { width: 26vh; height: 26vh; }
