/* =============================================================================
   Basis-Styles für das Live-Feedback-System
   Bewusst schlank und ohne Framework. In Schritt 9 folgt der Feinschliff.
   ============================================================================= */

:root {
    --farbe-primaer:   #2563eb;   /* Blau */
    --farbe-primaer-d: #1d4ed8;
    --farbe-gruen:     #16a34a;
    --farbe-rot:       #dc2626;
    --farbe-grau:      #6b7280;
    --farbe-bg:        #f3f4f6;
    --farbe-karte:     #ffffff;
    --farbe-text:      #111827;
    --farbe-rand:      #e5e7eb;   /* dezente Umrandung */
    --radius:          12px;
    --radius-klein:    8px;
    --schatten:        0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
    --schatten-hover:  0 4px 12px rgba(16,24,40,.10), 0 2px 4px rgba(16,24,40,.06);
    --fokus-ring:      0 0 0 3px rgba(37,99,235,.35);
    --uebergang:       .15s ease;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--farbe-bg);
    color: var(--farbe-text);
    line-height: 1.5;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.app-header { text-align: center; margin-bottom: 1.5rem; }
.app-header h1 { margin: 0 0 .25rem; font-size: 1.75rem; }
.subtitle { color: var(--farbe-grau); margin: 0; }

.card {
    background: var(--farbe-karte);
    border: 1px solid var(--farbe-rand);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 1.5rem;
}
.card.center { text-align: center; }

label {
    display: block;
    font-weight: 600;
    margin: 1rem 0 .35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea {
    width: 100%;
    padding: .7rem .8rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--farbe-primaer);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

button, .btn {
    display: inline-block;
    margin-top: 1.25rem;
    padding: .75rem 1.25rem;
    background: var(--farbe-primaer);
    color: #fff;
    border: none;
    border-radius: var(--radius-klein);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background var(--uebergang), box-shadow var(--uebergang), transform var(--uebergang);
}
button:hover, .btn:hover { background: var(--farbe-primaer-d); box-shadow: var(--schatten); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { background: #9ca3af; cursor: not-allowed; box-shadow: none; transform: none; }

.hint { color: var(--farbe-grau); font-size: .9rem; margin-top: 1rem; }

.app-footer { text-align: center; margin-top: 1.5rem; }
.app-footer a { color: var(--farbe-primaer); text-decoration: none; }
.app-footer a:hover { text-decoration: underline; }

/* =============================================================================
   Admin-Backend
   ============================================================================= */

.admin-topbar {
    background: #111827;
    color: #fff;
}
.admin-topbar-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
}
.admin-topbar .brand { color: #fff; text-decoration: none; font-weight: 700; }
.admin-nav { display: flex; align-items: center; gap: 1rem; }
.admin-nav a { color: #cbd5e1; text-decoration: none; }
.admin-nav a:hover { color: #fff; }
.admin-nav .who { color: #e5e7eb; font-size: .9rem; }
.badge {
    background: var(--farbe-primaer);
    color: #fff;
    padding: .1rem .4rem;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 700;
    vertical-align: middle;
}

.admin-container { max-width: 960px; }

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.25rem 0;
}
.page-head h1 { margin: 0; font-size: 1.5rem; }

.card + .card { margin-top: 1.25rem; }

/* Messages / Flash */
.msg { padding: .75rem 1rem; border-radius: 8px; margin: 0 0 1rem; }
.msg-ok    { background: #dcfce7; color: #166534; }
.msg-error { background: #fee2e2; color: #991b1b; }
.msg-info  { background: #dbeafe; color: #1e40af; }
.msg-warn  { background: #fef9c3; color: #854d0e; }

/* Tabellen */
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td {
    text-align: left;
    padding: .6rem .5rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}
.tabelle th { font-size: .8rem; text-transform: uppercase; color: var(--farbe-grau); letter-spacing: .03em; }
.tabelle td.right, .right { text-align: right; }

/* Code-Darstellung */
.code-pill {
    background: #eef2ff;
    color: #3730a3;
    padding: .2rem .5rem;
    border-radius: 6px;
    font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
    letter-spacing: .1em;
}
.code-card { text-align: center; }
.code-gross {
    font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: .35em;
    color: var(--farbe-primaer);
    margin: .25rem 0 .5rem;
    /* letter-spacing schiebt rechts; optischer Ausgleich links */
    padding-left: .35em;
}
.code-actions { margin: 1rem 0 .25rem; }

/* Status-Etiketten */
.status { padding: .15rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.status-ok    { background: #dcfce7; color: #166534; }
.status-warn  { background: #fef9c3; color: #854d0e; }
.status-muted { background: #e5e7eb; color: #374151; }

.status-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Button-Varianten */
.btn-klein { margin-top: 0; padding: .45rem .8rem; font-size: .9rem; }
.btn-grau  { background: #6b7280; }
.btn-grau:hover { background: #4b5563; }
.btn-rot   { background: var(--farbe-rot); }
.btn-rot:hover { background: #b91c1c; }

/* Dialog (Neue Session) */
.dialog {
    border: none;
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 480px;
    width: 92%;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.dialog::backdrop { background: rgba(0,0,0,.4); }
.dialog h2 { margin-top: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }

.features { border: 1px solid #e5e7eb; border-radius: 8px; padding: .75rem 1rem; margin-top: 1rem; }
.features legend { font-weight: 600; padding: 0 .35rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; margin: .35rem 0; }
.check input { width: auto; }

/* =============================================================================
   Schüler-Beitritt
   ============================================================================= */
.code-input {
    text-transform: uppercase;
    letter-spacing: .25em;
    font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
    font-size: 1.5rem;
    text-align: center;
    font-weight: 700;
}
.join-form button { width: 100%; }

/* =============================================================================
   Verständnis-Feedback – Schüler-Buttons
   ============================================================================= */
.vst-buttons { display: flex; flex-direction: column; gap: .6rem; margin: 1rem 0 .5rem; }
.vst-btn {
    display: flex; align-items: center; gap: .6rem;
    padding: .9rem 1rem; font-size: 1.05rem; text-align: left;
    color: #1f2937;
    border: 2px solid #d1d5db; border-radius: 10px; background: #fff;
    cursor: pointer; transition: border-color .15s, background .15s, transform .05s;
}
.vst-btn:hover { color: #1f2937; }
.vst-btn:hover { background: #f9fafb; }
.vst-btn:active { transform: scale(.99); }
.vst-emoji { font-size: 1.3rem; }
.vst-btn.aktiv.vst-verstanden { border-color: #16a34a; background: #f0fdf4; }
.vst-btn.aktiv.vst-neutral    { border-color: #ca8a04; background: #fefce8; }
.vst-btn.aktiv.vst-nicht      { border-color: #dc2626; background: #fef2f2; }
.vst-status { min-height: 1.2em; margin-top: .4rem; }

/* =============================================================================
   Verständnis-Feedback – Dozentenansicht (live)
   ============================================================================= */
.vst-live-grid { display: flex; gap: 1rem; margin: 1rem 0; }
.vst-live-item {
    flex: 1; text-align: center; padding: 1rem .5rem;
    border-radius: 10px; background: #f9fafb; border: 1px solid #eef0f3;
}
.vst-live-item.vst-verstanden { background: #f0fdf4; }
.vst-live-item.vst-neutral    { background: #fefce8; }
.vst-live-item.vst-nicht      { background: #fef2f2; }
.vst-live-emoji { display: block; font-size: 1.6rem; }
.vst-live-zahl  { display: block; font-size: 2rem; font-weight: 700; line-height: 1.2; }
.vst-live-label { display: block; font-size: .85rem; color: #6b7280; }
.vst-live-balken {
    display: flex; height: 14px; border-radius: 7px; overflow: hidden;
    background: #eef0f3; margin: .5rem 0;
}
.vst-bar { height: 100%; width: 0; transition: width .4s ease; }
.vst-bar-gruen { background: #16a34a; }
.vst-bar-gelb  { background: #eab308; }
.vst-bar-rot   { background: #dc2626; }

/* =============================================================================
   Umfragen / Quiz
   ============================================================================= */
.form-row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin: .6rem 0; }
.form-row label { display: flex; align-items: center; gap: .4rem; font-weight: 400; cursor: pointer; }
.optionen-feld { border: 1px solid #e5e7eb; border-radius: 10px; padding: 1rem; margin: 1rem 0; }
.optionen-feld legend { font-weight: 700; padding: 0 .4rem; }
.option-zeile { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.option-zeile input[type="text"] { flex: 1; }
.richtig-box { width: 18px; height: 18px; flex: 0 0 auto; }

.umfrage-eintrag { border: 1px solid #e5e7eb; border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.umfrage-kopf { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.umfrage-meta { font-size: .85rem; color: #6b7280; margin-top: .25rem; }
.umfrage-aktionen { display: flex; gap: .4rem; flex-wrap: wrap; }

.umfrage-ergebnis { margin-top: .8rem; }
.erg-zeile { display: grid; grid-template-columns: 1fr 2fr auto; gap: .6rem; align-items: center; margin-bottom: .4rem; }
.erg-label { font-size: .95rem; }
.erg-balken-huelle { background: #eef0f3; border-radius: 6px; height: 16px; overflow: hidden; }
.erg-balken { background: var(--farbe-primaer); height: 100%; width: 0; transition: width .4s ease; border-radius: 6px; }
.erg-zahl { font-weight: 700; min-width: 2ch; text-align: right; }
.richtig-marke { color: #16a34a; font-size: .8rem; font-weight: 700; margin-left: .4rem; }

.status-badge { padding: .15rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.status-gruen { background: #dcfce7; color: #166534; }
.status-grau  { background: #e5e7eb; color: #374151; }

/* Umfrage-Optionen beim Schüler: Text dunkel halten (nicht weiß erben) */
.umfrage-option { color: #1f2937; }

/* =============================================================================
   Q&A mit Voting
   ============================================================================= */
.status-blau { background: #dbeafe; color: #1e40af; }

/* Schüler: Frage-Formular */
.qa-form { display: flex; flex-direction: column; gap: .6rem; margin: .8rem 0; }
.qa-form textarea { width: 100%; resize: vertical; font: inherit; padding: .6rem .7rem;
    border: 1px solid #cbd5e1; border-radius: 10px; color: #1f2937; }
.qa-form .vst-btn { align-self: flex-start; color: #1f2937; }

/* Schüler: Fragenliste */
.qa-eintrag { display: flex; gap: .8rem; align-items: flex-start;
    padding: .7rem 0; border-top: 1px solid #eef0f3; }
.qa-eintrag:first-child { border-top: none; }
.qa-vote { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
    min-width: 3rem; padding: .4rem .5rem; border: 1px solid #cbd5e1; border-radius: 10px;
    background: #fff; color: #1f2937; cursor: pointer; font-weight: 700; line-height: 1.1; }
.qa-vote span { font-size: .95rem; }
.qa-vote.aktiv { background: var(--farbe-primaer); border-color: var(--farbe-primaer); color: #fff; }
.qa-vote:disabled { opacity: .5; cursor: not-allowed; }
.qa-inhalt { flex: 1; }
.qa-text { margin: 0 0 .3rem; }
.qa-eigene { font-size: .8rem; color: #6b7280; margin-left: .4rem; }
.qa-beantwortet .qa-text { color: #475569; }

/* Dozent: Moderations-Liste */
.frage-eintrag { display: flex; gap: 1rem; align-items: flex-start;
    padding: .8rem 0; border-top: 1px solid #eef0f3; }
.frage-eintrag:first-child { border-top: none; }
.frage-votes { flex: 0 0 auto; text-align: center; min-width: 3.5rem; }
.frage-votes span { display: block; font-size: 1.3rem; font-weight: 800; color: var(--farbe-primaer); }
.frage-votes small { color: #6b7280; font-size: .75rem; }
.frage-inhalt { flex: 1; }
.frage-text { margin: 0 0 .35rem; }
.frage-meta { display: flex; gap: .6rem; align-items: center; font-size: .8rem; color: #6b7280; }
.frage-aktionen { display: flex; flex-wrap: wrap; gap: .35rem; align-items: flex-start; }
.frage-ausgeblendet { opacity: .55; }

/* =============================================================================
   Freitext-Feedback
   ============================================================================= */
/* Schüler: eigene gesendete Beiträge */
.ft-eigen-eintrag { background: #f8fafc; border: 1px solid #eef0f3; border-radius: 10px;
    padding: .6rem .7rem; margin-top: .5rem; }
.ft-eigen-eintrag .freitext-text { margin: 0; color: #475569; }

/* Dozent: Moderations-Liste */
.freitext-eintrag { display: flex; gap: 1rem; align-items: flex-start;
    padding: .8rem 0; border-top: 1px solid #eef0f3; }
.freitext-eintrag:first-child { border-top: none; }
.freitext-inhalt { flex: 1; }
.freitext-text { margin: 0 0 .35rem; white-space: pre-wrap; word-break: break-word; }
.freitext-meta { display: flex; gap: .6rem; align-items: center; font-size: .8rem; color: #6b7280; }
.freitext-aktionen { display: flex; flex-wrap: wrap; gap: .35rem; align-items: flex-start; }
.freitext-ausgeblendet { opacity: .55; }

/* =============================================================================
   Module freigeben/sperren (Schritt 9a)
   ============================================================================= */
.modul-liste { display: flex; flex-direction: column; gap: .4rem; }
.modul-zeile { display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: .65rem .8rem; background: #f8fafc; border: 1px solid #eef0f3;
    border-radius: 10px; }
.modul-info { display: flex; align-items: center; gap: .6rem; }
.modul-name { font-weight: 600; color: #1f2937; }
.modul-form { margin: 0; }

/* =============================================================================
   Vorlagen-Bibliothek (Schritt 9b)
   ============================================================================= */
.page-head-aktionen { display: flex; gap: .5rem; align-items: center; }
.form-inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.form-inline select { flex: 1; min-width: 220px; }
.vorlage-liste { display: flex; flex-direction: column; gap: .5rem; }
.vorlage-eintrag { display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; padding: .75rem .85rem; background: #f8fafc; border: 1px solid #eef0f3;
    border-radius: 10px; }
.vorlage-info { flex: 1; }
.vorlage-meta { font-size: .8rem; color: #6b7280; margin-top: .1rem; }
.vorlage-frage { color: #475569; margin-top: .35rem; }
/* Aktions-Buttons (Bearbeiten/Loeschen) nebeneinander bzw. gestapelt. */
.vorlage-aktionen { display: flex; flex-direction: column; gap: .4rem; align-items: stretch; }
.vorlage-aktionen .btn { text-align: center; white-space: nowrap; }
/* Kleine Statuskennzeichnung (freigegeben / Besitzer). */
.vorlage-badge { display: inline-block; margin-left: .4rem; padding: .05rem .5rem;
    font-size: .72rem; font-weight: 600; color: #475569; background: #eef2f7;
    border-radius: 999px; vertical-align: middle; }
.vorlage-badge-frei { color: #166534; background: #dcfce7; }
/* "Abbrechen"-Link neben dem Speichern-Button im Bearbeiten-Modus. */
.btn-abbrechen { margin-left: .6rem; color: #6b7280; text-decoration: none; }
.btn-abbrechen:hover { text-decoration: underline; }

/* =============================================================================
   Feinschliff (Schritt 9e) – Zugänglichkeit, Hover-Feedback, Responsive
   ============================================================================= */

/* Sichtbarer Fokus-Rahmen für Tastatur-Navigation (a11y). Nur bei :focus-visible,
   damit Mausklicks keinen dauerhaften Rahmen hinterlassen. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.vst-btn:focus-visible,
.qa-vote:focus-visible,
.btn-klein:focus-visible,
.projektion-btn:focus-visible {
    outline: none;
    box-shadow: var(--fokus-ring);
    border-radius: var(--radius-klein);
}

/* Erweiterung (Barrierefreiheit): Skip-Link – für Tastatur-/Screenreader-
   Nutzer sichtbar, sobald er fokussiert wird; sonst unsichtbar außerhalb
   des Sichtbereichs positioniert. */
.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 1000;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    overflow: visible;
    padding: .6rem 1rem;
    background: var(--farbe-primaer);
    color: #fff;
    border-radius: var(--radius-klein);
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--schatten-hover);
}

/* Erweiterung (Barrierefreiheit): Mindest-Touchziel 44×44px für kleine
   Schaltflächen, die sonst darunter liegen könnten. */
.btn-klein,
.qa-vote {
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
}

/* Karten heben sich beim Überfahren dezent an (nur Admin-Listenkarten). */
.admin-container .card { transition: box-shadow var(--uebergang); }
.admin-container .card:hover { box-shadow: var(--schatten-hover); }

/* Tabellenzeilen bekommen ein leises Hover-Feedback. */
.tabelle tbody tr { transition: background var(--uebergang); }
.tabelle tbody tr:hover { background: #f8fafc; }
.tabelle tbody tr:last-child td { border-bottom: none; }

/* Kleine Listenkacheln (Module, Vorlagen) leicht hervorheben. */
.modul-zeile, .vorlage-eintrag { transition: border-color var(--uebergang), box-shadow var(--uebergang); }
.modul-zeile:hover, .vorlage-eintrag:hover { border-color: #dbeafe; box-shadow: var(--schatten); }

/* Sekundär-Buttons (grau) mit gleichem, ruhigem Verhalten. */
.btn-grau:hover { box-shadow: var(--schatten); }

/* Links im Fließtext einheitlich. */
a { color: var(--farbe-primaer); }

/* Leerer-Zustand-Hinweis etwas freundlicher. */
.leer-hinweis { text-align: center; color: var(--farbe-grau); padding: 1.5rem .5rem; }

/* --- Responsive: schmale Bildschirme (Smartphone) ------------------------- */
@media (max-width: 640px) {
    .admin-topbar-inner { flex-direction: column; gap: .5rem; align-items: flex-start; }
    .admin-nav { flex-wrap: wrap; gap: .6rem; }
    .page-head { flex-direction: column; align-items: flex-start; gap: .75rem; }
    .page-head-aktionen { flex-wrap: wrap; }
    .vst-live-grid { flex-wrap: wrap; }
    .vst-live-item { flex: 1 1 40%; }
    .code-gross { font-size: 2.2rem; letter-spacing: .25em; }
    .container { padding: 1.25rem .9rem; }
    .card { padding: 1.15rem; }
    /* Breite Tabellen innerhalb der Karte horizontal scrollbar machen,
       statt aus der Karte herauszuragen. */
    .card .tabelle { display: block; overflow-x: auto; white-space: nowrap; }
}

/* --- Bewegung reduzieren, wenn vom System gewünscht (a11y) ----------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .001ms !important;
        animation-duration: .001ms !important;
    }
}

/* =========================================================================
   QR-Code & Beitritts-Layout (Session-Detailseite)
   ========================================================================= */
.code-qr-layout{
    display:flex;
    gap:1.5rem;
    align-items:center;
    flex-wrap:wrap;
    justify-content:space-between;
}
.code-qr-links{flex:1 1 320px;min-width:0;}
.code-qr-rechts{
    flex:0 0 auto;
    text-align:center;
}
.qr-box{
    display:inline-block;
    padding:.6rem;
    background:#fff;
    border:1px solid var(--farbe-rand);
    border-radius:var(--radius-klein);
    box-shadow:var(--schatten);
    line-height:0;               /* SVG bündig ohne Zeilenhöhe */
}
.qr-box svg{display:block;width:190px;height:190px;}
.qr-hint{margin:.4rem 0 0;}
.beitritt-url{word-break:break-all;}
.beitritt-url a{color:var(--farbe-primaer);}

@media (max-width:640px){
    .code-qr-layout{flex-direction:column;align-items:stretch;}
    .code-qr-rechts{margin-top:.5rem;}
}

/* =========================================================================
   Projektionsansicht (Vollbild für Beamer)
   ========================================================================= */
.projektion-body{
    background:#0f172a;           /* dunkler Hintergrund, beamer-freundlich */
    color:#f8fafc;
    margin:0;
}
.projektion{
    min-height:100vh;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:3vh 4vw;
    box-sizing:border-box;
    position:relative;
}
.projektion-schliessen{
    position:absolute;
    top:1.2rem;right:1.6rem;
    color:#94a3b8;
    text-decoration:none;
    font-size:2.2rem;
    line-height:1;
}
.projektion-schliessen:hover{color:#f8fafc;}
.projektion-titel{
    font-size:clamp(1.6rem,4vw,3rem);
    margin:0 0 .4rem;
    font-weight:700;
}
.projektion-anleitung{
    font-size:clamp(1rem,2vw,1.5rem);
    color:#cbd5e1;
    margin:0 0 4vh;
    max-width:min(90vw,60ch);   /* mehr Raum: Satz laeuft breiter, statt gedraengt */
    line-height:1.5;
    text-wrap:balance;          /* gleichmaessige Zeilenverteilung */
}
/* Die URL selbst nie mitten im Wort umbrechen. */
.projektion-anleitung strong{
    white-space:nowrap;
}
.projektion-inhalt{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:clamp(2rem,6vw,6rem);
    flex-wrap:wrap;
}
.projektion-code{
    font-family:"Courier New",monospace;
    font-weight:700;
    letter-spacing:.08em;
    font-size:clamp(4rem,16vw,13rem);
    line-height:1;
    color:#fff;
}
.projektion-qr{
    background:#fff;
    padding:1.4rem;
    border-radius:16px;
    line-height:0;
}
.projektion-qr svg{
    display:block;
    width:clamp(220px,32vw,420px);
    height:clamp(220px,32vw,420px);
}
.projektion-status{
    margin-top:4vh;
    font-size:clamp(1rem,2.2vw,1.6rem);
    color:#fbbf24;
    min-height:1.2em;
}
/* Erweiterung: Button-Leiste oben rechts (Vollbild), neben dem Schließen-Kreuz. */
.projektion-leiste{
    position:absolute;
    top:1.2rem;right:5.2rem;
    display:flex;
    gap:.6rem;
}
.projektion-btn{
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.25);
    color:#f8fafc;
    font-size:1rem;
    padding:.6rem 1.1rem;
    min-height:44px;
    border-radius:var(--radius-klein);
    cursor:pointer;
    transition:background var(--uebergang);
}
.projektion-btn:hover{background:rgba(255,255,255,.18);}
/* Erweiterung: Timer-Banner in der Beamer-Ansicht (hell auf dunkel, gut lesbar). */
.timer-banner{
    margin:0 0 3vh;
    padding:.8rem 1.6rem;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.25);
    border-radius:var(--radius);
    display:inline-flex;
    align-items:center;
    gap:1rem;
    flex-wrap:wrap;
    justify-content:center;
}
.timer-banner-label{
    font-size:clamp(1rem,2vw,1.4rem);
    color:#cbd5e1;
}
.timer-banner-zeit{
    font-family:"Courier New",monospace;
    font-weight:700;
    font-size:clamp(1.8rem,4.5vw,3.4rem);
    color:#fbbf24;
    letter-spacing:.04em;
}
.timer-banner[hidden]{display:none;}
@media print{
    .projektion-leiste{display:none;}
}
@media (max-width:760px){
    .projektion-inhalt{flex-direction:column;gap:2rem;}
    .projektion-leiste{position:static;justify-content:center;margin-bottom:1rem;}
}

/* =========================================================================
   Dozent-Verwaltung
   ========================================================================= */
.status-badge-gruen { background:#dcfce7; color:#166534; }
.status-badge-grau  { background:#e5e7eb; color:#374151; }
.status-badge-blau  { background:#dbeafe; color:#1e40af; }

.tabelle-aktionen{
    display:flex;
    gap:.4rem;
    flex-wrap:wrap;
    align-items:center;
}
.inline-form{display:inline;margin:0;}

.form-aktionen{
    display:flex;
    gap:.6rem;
    flex-wrap:wrap;
    align-items:center;
    margin-top:1rem;
}
.check-zeile{
    display:flex;
    align-items:center;
    gap:.5rem;
    margin:.6rem 0;
    font-weight:500;
}
.check-zeile input{width:auto;margin:0;}

/* Tabellenzelle mit In-Zeilen-Aktionen etwas Luft geben */
.tabelle td .tabelle-aktionen .btn-klein{white-space:nowrap;}

/* =========================================================================
   Verstanden-Board (Padlet-Art) – 2 Spalten, Karten           (Schritt 10)
   ========================================================================= */
.board-spalten {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: .5rem;
}
.board-spalte {
    background: var(--farbe-bg);
    border: 1px solid var(--farbe-rand);
    border-radius: var(--radius-klein);
    padding: .85rem;
    min-width: 0;
}
.board-spalte-titel {
    margin: 0 0 .6rem;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--farbe-text);
    word-break: break-word;
}
.board-form { margin-bottom: .75rem; }
.board-form textarea {
    width: 100%;
    resize: vertical;
    padding: .55rem .65rem;
    border: 1px solid var(--farbe-rand);
    border-radius: var(--radius-klein);
    font: inherit;
    margin-bottom: .5rem;
}
.board-liste { display: flex; flex-direction: column; gap: .55rem; }
.board-leer { margin: 0; }
.board-karte {
    background: var(--farbe-karte);
    border: 1px solid var(--farbe-rand);
    border-left: 3px solid var(--farbe-primaer);
    border-radius: var(--radius-klein);
    padding: .6rem .7rem;
    box-shadow: var(--schatten);
}
.board-karte-text { margin: 0; white-space: pre-wrap; word-break: break-word; }
.board-karte-aus { opacity: .55; border-left-color: var(--farbe-grau); }
.board-karte-fuss {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-top: .5rem;
}
.board-karte-zeit { font-size: .78rem; color: var(--farbe-grau); }
.board-karte-aktionen {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-left: auto;
}
/* Titel-Editor im Admin */
.board-titel-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.board-titel-felder .form-feld { display: flex; flex-direction: column; gap: .35rem; }
.board-titel-felder input {
    padding: .55rem .65rem;
    border: 1px solid var(--farbe-rand);
    border-radius: var(--radius-klein);
    font: inherit;
}

@media (max-width: 640px) {
    .board-spalten,
    .board-titel-felder { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Systemcheck / Integritätstest
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sc-badge {
    display: inline-block;
    min-width: 66px;
    text-align: center;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
}
.sc-ok      { background: var(--farbe-gruen); }
.sc-warnung { background: var(--farbe-warnung, #d97706); }
.sc-fehler  { background: var(--farbe-rot); }

.sc-gesamt {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.sc-gesamt-text { flex: 1; }
.sc-zaehler { margin-top: .35rem; color: var(--farbe-grau); font-size: .9rem; }
.sc-gesamt-ok      { border-left: 4px solid var(--farbe-gruen); }
.sc-gesamt-warnung { border-left: 4px solid var(--farbe-warnung, #d97706); }
.sc-gesamt-fehler  { border-left: 4px solid var(--farbe-rot); }

.sc-kat-titel { font-size: 1.05rem; margin: 0 0 .75rem; }

.sc-liste { list-style: none; margin: 0; padding: 0; }
.sc-zeile {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .6rem 0;
    border-top: 1px solid var(--farbe-rand);
}
.sc-zeile:first-child { border-top: 0; }
.sc-inhalt { display: flex; flex-direction: column; gap: .1rem; }
.sc-titel { font-weight: 600; }
.sc-text  { color: var(--farbe-text); font-size: .92rem; line-height: 1.45; }

@media (max-width: 640px) {
    .sc-gesamt { flex-direction: column; }
    .sc-zeile { flex-direction: column; gap: .35rem; }
}

/* --- Einstellungen: Formular mit Feld-Hinweisen --- */
.stack-form .feld { margin-bottom: 1.35rem; }
.stack-form .feld label { margin-top: 0; }
.stack-form .feld input[type="number"] { max-width: 12rem; }
.feld-hinweis {
    margin: .4rem 0 0;
    color: var(--farbe-text-schwach, #6b7280);
    font-size: .88rem;
    line-height: 1.45;
}

/* --- Eindeutige Modul-Kennzeichnung in der Schüler-Ansicht --- */
.modul-tag {
    display: inline-block;
    margin-left: .5rem;
    padding: .12rem .55rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .01em;
    vertical-align: middle;
    white-space: nowrap;
}
.modul-tag-zeile { margin: 0 0 .5rem; }
.modul-tag-zeile .modul-tag { margin-left: 0; }
