/* Werkzeug, kein Prospekt: dichte Zeilen, ruhige Flaechen, und genau eine
   Farbe, die zieht. Die Semantik der Voten (angenommen / verworfen) laeuft
   bewusst NEBEN dem Akzent, damit ein Urteil nicht wie ein Knopf aussieht. */

:root {
    color-scheme: light;

    --grund:    #f6f6f3;
    --flaeche:  #ffffff;
    --erhoben:  #eceae4;
    --linie:    #dddbd4;
    --linie-zart: #e9e7e1;
    --text:     #1a1c20;
    --leise:    #6b6f77;
    --sehr-leise: #9a9ea6;

    --akzent:      #8a6524;
    --akzent-hell: #f3ead6;

    --ja:        #2f6b4f;
    --ja-hell:   #e2efe7;
    --nein:      #9b3a34;
    --nein-hell: #f6e4e2;

    --radius: 6px;
    --schrift-ui: "IBM Plex Sans", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
    --schrift-text: "Source Serif 4", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --grund:    #15171b;
        --flaeche:  #1c1f25;
        --erhoben:  #252931;
        --linie:    #2f343c;
        --linie-zart: #262a31;
        --text:     #e3e5e9;
        --leise:    #949aa4;
        --sehr-leise: #6b7078;

        --akzent:      #cda45c;
        --akzent-hell: #33291a;

        --ja:        #6fba93;
        --ja-hell:   #1c2b23;
        --nein:      #dd8d85;
        --nein-hell: #2e1f1e;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --grund:    #15171b;
    --flaeche:  #1c1f25;
    --erhoben:  #252931;
    --linie:    #2f343c;
    --linie-zart: #262a31;
    --text:     #e3e5e9;
    --leise:    #949aa4;
    --sehr-leise: #6b7078;

    --akzent:      #cda45c;
    --akzent-hell: #33291a;

    --ja:        #6fba93;
    --ja-hell:   #1c2b23;
    --nein:      #dd8d85;
    --nein-hell: #2e1f1e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--grund);
    color: var(--text);
    font-family: var(--schrift-ui);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--akzent); }

/* ---- Info-Kasten: erklaerender Absatz hinter einem "i"-Knopf, auf allen
   Reitern gleich. <details>/<summary> statt eigenem JS - der Browser regelt
   Auf/Zu von selbst, und ein Screenreader kennt das Muster schon. */
.info-kasten { margin: 0 0 14px; }
.info-knopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--linie);
    background: var(--erhoben);
    color: var(--leise);
    font: 600 12px/1 var(--schrift-ui);
    font-style: italic;
    cursor: pointer;
    user-select: none;
}
.info-knopf::-webkit-details-marker { display: none; }
.info-knopf::marker { content: ""; }
.info-knopf:hover { color: var(--akzent); border-color: var(--akzent); }
.info-kasten[open] > .info-knopf { color: var(--akzent); border-color: var(--akzent); }
.info-kasten > :not(summary) { margin-top: 8px; }

/* ---- Kopfleiste ---- */

.kopfleiste {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 22px;
    height: 52px;
    background: var(--flaeche);
    border-bottom: 1px solid var(--linie);
}

.marke {
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.marke span { color: var(--akzent); }

/* Die Menueleiste scrollt notfalls in sich, statt die ganze Seite breiter zu
   machen - mit vier Bereichen passte die Kopfleiste auf dem Handy nicht mehr
   und die Seite liess sich seitlich verschieben. */
.bereiche {
    display: flex;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.bereiche::-webkit-scrollbar { display: none; }

.bereiche a,
.bereiche span {
    display: block;
    flex: none;
    white-space: nowrap;
    padding: 5px 11px;
    border-radius: var(--radius);
    font-size: 13.5px;
    text-decoration: none;
    color: var(--leise);
}
.bereiche a:hover { background: var(--erhoben); color: var(--text); }
.bereiche .aktiv { background: var(--akzent-hell); color: var(--akzent); font-weight: 500; }
.bereiche .spaeter { color: var(--sehr-leise); cursor: default; }

.stand {
    margin-left: auto;
    flex: none;
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--leise);
}
.stand b { font-weight: 600; color: var(--text); }
.stand .ist-ja b { color: var(--ja); }
.stand .ist-nein b { color: var(--nein); }

/* ---- Filterzeile ---- */

.filter {
    position: sticky;
    top: 52px;
    z-index: 15;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: var(--grund);
    border-bottom: 1px solid var(--linie-zart);
}

.filter label {
    font-size: 12px;
    color: var(--sehr-leise);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: -2px;
}

.filter select {
    font: inherit;
    font-size: 13.5px;
    padding: 4px 8px;
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
}

.filter .treffer {
    margin-left: auto;
    font-size: 13px;
    color: var(--leise);
    font-variant-numeric: tabular-nums;
}

.zuruecksetzen {
    font-size: 13px;
    text-decoration: none;
    color: var(--leise);
    padding: 4px 8px;
    border-radius: var(--radius);
}
.zuruecksetzen:hover { background: var(--erhoben); color: var(--text); }

.alles-schalter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--leise);
    cursor: pointer;
}
.alles-schalter input { accent-color: var(--akzent); width: 14px; height: 14px; }

/* ---- Set erstellen ---- */

.setbau {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 22px;
}
.setbau-leiste {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
}
.setbau-leiste[hidden] { display: none; }

.setbau-knopf {
    font: inherit;
    font-size: 13px;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--akzent);
    background: var(--akzent-hell);
    border: 1px solid var(--akzent);
    border-radius: var(--radius);
}
.setbau-knopf:hover { filter: brightness(1.06); }

.setbau-leiste select {
    font: inherit;
    font-size: 13.5px;
    padding: 6px 9px;
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
}

.setbau-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgb(0 0 0 / 45%);
}
.setbau-overlay[hidden] { display: none; }

.setbau-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 22px 24px;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgb(0 0 0 / 22%);
}
.setbau-modal h3 {
    margin: 0 24px 10px 0;
    font-family: var(--schrift-text);
    font-size: 17px;
    font-weight: 600;
}
.setbau-modal input {
    font: inherit;
    font-size: 13.5px;
    width: 100%;
    padding: 7px 9px;
    margin-top: 10px;
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
}
.setbau-modal-knoepfe {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}
.setbau-modal-knoepfe button {
    font: inherit;
    font-size: 13px;
    padding: 6px 13px;
    cursor: pointer;
    border-radius: var(--radius);
}
.knopf-abbrechen {
    color: var(--leise);
    background: var(--flaeche);
    border: 1px solid var(--linie);
}
.knopf-abbrechen:hover { color: var(--text); border-color: var(--sehr-leise); }
.knopf-start {
    color: var(--flaeche);
    background: var(--akzent);
    border: none;
}
.knopf-start:hover { filter: brightness(1.08); }
.knopf-start:disabled { opacity: 0.6; cursor: default; }

.setbau-schliessen {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 20px;
    line-height: 1;
    padding: 2px 6px;
    cursor: pointer;
    color: var(--sehr-leise);
    background: none;
    border: none;
}
.setbau-schliessen:hover { color: var(--text); }
.setbau-hinweis {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--leise);
}
.setbau-fehler {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--nein);
}

.setbau-status {
    position: relative;
    padding: 12px 38px 12px 14px;
    margin: 10px 0;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 9px;
}
.setbau-statuskopf {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13.5px;
    color: var(--leise);
}
.setbau-statuskopf b { color: var(--akzent); }
.setbau-log-details { margin-top: 6px; }
.setbau-log-details summary {
    font-size: 12px;
    color: var(--sehr-leise);
    cursor: pointer;
    list-style: none;
}
.setbau-log-details summary::-webkit-details-marker { display: none; }
.setbau-log-details summary::before { content: "▸ "; }
.setbau-log-details[open] summary::before { content: "▾ "; }
.setbau-log-details summary:hover { color: var(--leise); }
.setbau-log {
    max-height: 260px;
    overflow-y: auto;
    margin: 8px 0 0;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--text);
    background: var(--grund);
    border: 1px solid var(--linie-zart);
    border-radius: var(--radius);
}

.erweitert-knopf {
    font: inherit;
    font-size: 12.5px;
    padding: 6px 11px;
    cursor: pointer;
    color: var(--leise);
    background: transparent;
    border: 1px dashed var(--linie);
    border-radius: var(--radius);
}
.erweitert-knopf:hover { color: var(--text); border-color: var(--sehr-leise); }
.erweitert-knopf[aria-expanded="true"] { color: var(--akzent); border-color: var(--akzent); border-style: solid; }

.erweitert {
    margin-top: 4px;
    padding: 10px 12px 2px;
    border-top: 1px dashed var(--linie);
}
.erweitert[hidden] { display: none; }
.erweitert-hinweis {
    margin: 0 0 6px;
    font-size: 12px;
    color: var(--sehr-leise);
}

.cupbau-kategorien {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 4px 10px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}
.cupbau-kategorien li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 8px;
    font-size: 12.5px;
    color: var(--sehr-leise);
    background: var(--grund);
    border: 1px solid var(--linie-zart);
    border-radius: var(--radius);
}
.cupbau-kategorien li[data-zustand="laeuft"] { color: var(--akzent); border-color: var(--akzent); }
.cupbau-kategorien li[data-zustand="fertig"] { color: var(--ja); }
.cupbau-kategorien li[data-zustand="fehler"] { color: var(--nein); border-color: var(--nein); }
.cupbau-kat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cupbau-kat-status { flex: none; font-variant-numeric: tabular-nums; }

/* ---- Liste ---- */

.liste {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px 22px 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.karte {
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 9px;
    overflow: hidden;
    scroll-margin-top: 110px;
}
.karte[data-votum="hoch"]   { border-color: color-mix(in srgb, var(--ja) 45%, var(--linie)); }
.karte[data-votum="runter"] { border-color: color-mix(in srgb, var(--nein) 40%, var(--linie)); opacity: 0.72; }
.karte[data-votum="runter"]:hover { opacity: 1; }
.karte.dran { box-shadow: 0 0 0 2px var(--akzent); }

.karte-kopf {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--linie-zart);
    background: var(--erhoben);
}

/* Nur sichtbar, wenn ueberhaupt mehr als eine Kohorte im Blick ist (View
   "alle") - taucht eine Frage nicht als "aktuell" gefuehrt auf, markiert das
   auf einen Blick, aus welcher fruehen Generation sie stammt. */
.archiv-marke {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 1.5px 7px;
    border-radius: 99px;
    background: var(--erhoben);
    color: var(--sehr-leise);
    border: 1px solid var(--linie);
    white-space: nowrap;
}

.stufe {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--leise);
    white-space: nowrap;
}
.stufe b { color: var(--text); font-size: 14px; }

.balken { display: flex; gap: 2px; }
.balken i {
    width: 7px; height: 13px;
    border-radius: 1.5px;
    background: var(--linie);
}
.balken i.voll { background: var(--akzent); }

.pfad {
    font-size: 12.5px;
    color: var(--leise);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pfad b { font-weight: 500; color: var(--text); }

/* Der Rand allein trug das Urteil nicht - im Dunkelmodus ist ein getoenter
   Ein-Pixel-Rand beim Ueberfliegen schlicht nicht zu sehen. Darum ein Wort. */
.zustand {
    margin-left: auto;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.karte[data-votum=""] .zustand { display: none; }
.karte[data-votum="hoch"]   .zustand { color: var(--ja); }
.karte[data-votum="hoch"]   .zustand::before { content: "✓ angenommen"; }
.karte[data-votum="runter"] .zustand { color: var(--nein); }
.karte[data-votum="runter"] .zustand::before { content: "✕ verworfen"; }

.voten { display: flex; gap: 4px; margin-left: 12px; }
.karte[data-votum=""] .voten { margin-left: auto; }

.voten button {
    font: inherit;
    font-size: 13px;
    line-height: 1;
    padding: 6px 11px;
    cursor: pointer;
    color: var(--leise);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
}
.voten button:hover { color: var(--text); border-color: var(--sehr-leise); }
.voten button:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.karte[data-votum="hoch"]   .voten .ja   { background: var(--ja);   border-color: var(--ja);   color: var(--flaeche); }
.karte[data-votum="runter"] .voten .nein { background: var(--nein); border-color: var(--nein); color: var(--flaeche); }

/* ---- Fragekoerper ---- */

.koerper { padding: 15px 18px 14px; }

.fragetext {
    font-family: var(--schrift-text);
    font-size: 17.5px;
    line-height: 1.52;
    margin: 0 0 12px;
    max-width: 66ch;
    white-space: pre-wrap;
}

.antwortzeile {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-top: 11px;
    border-top: 1px dashed var(--linie);
}
.antwortzeile .marke-a {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sehr-leise);
}
/* .spoiler traegt die Aufdecken-Mechanik; .antwort/.startartikel-wert nur
   noch die Typografie. Getrennt, weil der Startartikel denselben Schutz
   braucht wie die Antwort selbst - er verrieth sie sonst schon vorher. */
.antwort { font-family: var(--schrift-text); font-size: 16px; font-weight: 600; color: var(--akzent); }
.startartikel-wert { font-family: var(--schrift-text); font-size: 15px; font-weight: 500; color: var(--text); }

.spoiler.verdeckt {
    /* Ohne inline-block greifen width/height auf einem <span> (display:
       inline per Default) ueberhaupt nicht - die Box orientierte sich
       bislang unbemerkt am unsichtbaren Text selbst, in Breite UND Hoehe. */
    display: inline-block;
    vertical-align: middle;
    position: relative;
    color: transparent;
    background: var(--erhoben);
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
    /* Feste Breite UND Hoehe, nicht die des Textes: ein mitwachsender Kasten
       verraet schon vor dem Aufdecken, wie lang der Inhalt ist - bei fester
       Breite sonst zumindest noch ueber die Anzahl umgebrochener Zeilen. */
    width: 12em;
    height: 32px;
    line-height: 32px;
    overflow: hidden;
    white-space: nowrap;
}
.spoiler.verdeckt::after {
    /* Im Kasten, nicht daneben: sonst haengt der Hinweis an der Kante der
       Antwort und verraet ueber seine Lage schon deren Laenge. */
    content: "aufdecken";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--schrift-ui);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--sehr-leise);
}

/* Entstehungsgeschichte UND Kommentare bleiben gesperrt, bis die Antwort
   aufgedeckt ist - die Versuche zeigen auch verworfene, aber verwandte
   Frage/Antwort-Paare zum selben Thema, und Kommentare beziehen sich fast
   immer auf die Antwort. Durchgesetzt wird das per JS (preventDefault auf
   dem Klick); hier nur die Optik, die das auch zeigt. */
.karte:has(.antwort.verdeckt) .geschichte > summary,
.karte:has(.antwort.verdeckt) .kommentare > summary {
    cursor: not-allowed;
    opacity: 0.6;
}
.karte:has(.antwort.verdeckt) .geschichte > summary::after,
.karte:has(.antwort.verdeckt) .kommentare > summary::after {
    content: "— erst Antwort aufdecken";
    margin-left: 6px;
    color: var(--nein);
    font-style: italic;
}

/* "Alles anzeigen" (Schalter oben im Filter): loest die Sperre rein optisch
   auf, ohne die "verdeckt"-Klasse selbst anzufassen - Schalter aus zeigt
   sofort wieder den echten Zustand jedes einzelnen Spoilers. */
.alles-sichtbar .spoiler.verdeckt {
    display: inline;
    vertical-align: baseline;
    position: static;
    color: inherit;
    background: none;
    border-radius: 0;
    cursor: text;
    user-select: text;
    width: auto;
    height: auto;
    line-height: inherit;
    overflow: visible;
    white-space: normal;
}
.alles-sichtbar .spoiler.verdeckt::after { content: none; }
.alles-sichtbar .karte:has(.antwort.verdeckt) .geschichte > summary,
.alles-sichtbar .karte:has(.antwort.verdeckt) .kommentare > summary {
    cursor: pointer;
    opacity: 1;
}
.alles-sichtbar .karte:has(.antwort.verdeckt) .geschichte > summary::after,
.alles-sichtbar .karte:has(.antwort.verdeckt) .kommentare > summary::after {
    content: none;
}

/* ---- Entstehungsgeschichte & Kommentare ---- */

.geschichte, .kommentare { border-top: 1px solid var(--linie-zart); }

.geschichte > summary, .kommentare > summary {
    padding: 8px 18px;
    font-size: 12.5px;
    color: var(--leise);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.geschichte > summary::-webkit-details-marker, .kommentare > summary::-webkit-details-marker { display: none; }
.geschichte > summary::before, .kommentare > summary::before { content: "▸"; color: var(--sehr-leise); }
.geschichte[open] > summary::before, .kommentare[open] > summary::before { content: "▾"; }
.geschichte > summary:hover, .kommentare > summary:hover { color: var(--text); background: var(--erhoben); }

.geschichte-inhalt {
    padding: 4px 18px 18px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.block > h4 {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sehr-leise);
}

.werte {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 4px 20px;
}
.werte div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dotted var(--linie-zart); padding: 2px 0; }
.werte dt { color: var(--leise); }
.werte dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }

.anker {
    font-family: var(--schrift-text);
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--leise);
    border-left: 2px solid var(--linie);
    padding-left: 12px;
    margin: 0;
}

.versuch {
    border: 1px solid var(--linie-zart);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 8px;
}
.versuch-kopf {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}
.versuch-nummer { font-weight: 600; color: var(--leise); }

.urteil {
    display: inline-block;
    padding: 1.5px 7px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 500;
}
.urteil.gut     { background: var(--ja-hell);   color: var(--ja); }
.urteil.schlecht { background: var(--nein-hell); color: var(--nein); }

.versuch .fragezeile { font-family: var(--schrift-text); font-size: 14.5px; margin: 0 0 8px; }
.versuch .fragezeile b { color: var(--akzent); font-weight: 600; }

/* Verworfene Startartikel: eigens eingerueckt und eingeklappt, damit der
   erfolgreiche Versuch beim Aufklappen der Geschichte weiter zuerst ins Auge
   faellt - "verworfen" heisst hier wirklich nachrangig, nicht gleichrangig. */
details.vorrunde {
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 2px solid var(--nein);
}
details.vorrunde > summary {
    cursor: pointer;
    list-style: none;
    font-size: 12.5px;
    color: var(--nein);
    padding: 2px 0;
}
details.vorrunde > summary::-webkit-details-marker { display: none; }
details.vorrunde > summary::before { content: "▸ "; color: var(--sehr-leise); }
details.vorrunde[open] > summary::before { content: "▾ "; }
details.vorrunde > summary b { color: var(--text); font-weight: 600; }
details.vorrunde .versuch { margin-top: 8px; }

.quoten { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.quote {
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    padding: 2px 7px;
    border-radius: var(--radius);
    background: var(--erhoben);
    color: var(--leise);
}
.quote.eigen { background: var(--akzent-hell); color: var(--akzent); font-weight: 600; }
.quote.rand { outline: 1px solid var(--nein); }

.begruendung {
    margin: 0 0 4px;
    color: var(--leise);
    line-height: 1.45;
}
.begruendung b { color: var(--text); font-weight: 500; }

/* ---- Kommentare ---- */

.kommentare-inhalt {
    padding: 4px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kommentar {
    padding: 8px 10px;
    background: var(--erhoben);
    border-radius: var(--radius);
}
.kommentar-kopf {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
    font-size: 12.5px;
}
.kommentar-kopf b { color: var(--text); }
.kommentar-zeit { color: var(--sehr-leise); font-size: 11px; }
.kommentar-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.kommentar-formular {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.kommentar-formular .kommentar-autor {
    align-self: flex-start;
    width: 12em;
}
.kommentar-formular input,
.kommentar-formular textarea {
    font: inherit;
    font-size: 13.5px;
    padding: 6px 9px;
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
}
.kommentar-formular textarea {
    min-height: 4.5em;
    resize: vertical;
    font-family: var(--schrift-text);
}
.kommentar-formular input:focus,
.kommentar-formular textarea:focus {
    outline: 2px solid var(--akzent);
    outline-offset: -1px;
}
.kommentar-formular button {
    align-self: flex-start;
    font: inherit;
    font-size: 13px;
    padding: 6px 13px;
    color: var(--flaeche);
    background: var(--akzent);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}
.kommentar-formular button:hover { filter: brightness(1.08); }

/* ---- Blaettern + Tastatur ---- */

.blaettern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 0 0;
    font-variant-numeric: tabular-nums;
}
.blaettern a, .blaettern span {
    padding: 5px 11px;
    font-size: 13px;
    text-decoration: none;
    border-radius: var(--radius);
    color: var(--leise);
}
.blaettern a:hover { background: var(--erhoben); color: var(--text); }
.blaettern .hier { color: var(--text); font-weight: 600; }

.tastatur {
    position: fixed;
    bottom: 14px;
    right: 16px;
    display: flex;
    gap: 12px;
    padding: 7px 12px;
    font-size: 12px;
    color: var(--leise);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 99px;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.07);
}
.tastatur kbd {
    font-family: var(--schrift-ui);
    font-size: 11px;
    padding: 1px 5px;
    border: 1px solid var(--linie);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: var(--erhoben);
    color: var(--text);
}

.leer {
    text-align: center;
    padding: 70px 20px;
    color: var(--leise);
}

@media (prefers-reduced-motion: no-preference) {
    .karte { transition: opacity .15s, border-color .15s, box-shadow .15s; }
    .voten button { transition: background .12s, color .12s, border-color .12s; }
}

@media (max-width: 720px) {
    /* Zwei Zeilen statt einer: oben das Menue, darunter die Zaehler. In einer
       Zeile quetschten die Zaehler das Menue auf einen einzigen Punkt
       zusammen, und die uebrigen Bereiche lagen unsichtbar im Scrollbereich -
       vom Handy aus kam man nicht mehr aus dem Fragenbestand heraus. Die
       Zaehler brechen von selbst um, sobald sie nicht mehr neben das Menue
       passen; der Speicherpunkt der Fragenschau passt und bleibt oben. */
    .kopfleiste {
        flex-wrap: wrap;
        height: auto;
        min-height: 52px;
        gap: 6px 10px;
        padding: 8px 12px;
    }
    .stand { gap: 10px; }
    .stand .lang { display: none; }
    /* Noch nicht fertige Bereiche und den Schriftzug weglassen. */
    .bereiche .spaeter { display: none; }
    .marke { display: none; }

    /* Die Filterzeile bricht auf dem Handy auf vier Zeilen um - klebend
       wuerde sie ein Drittel des Bildschirms dauerhaft belegen. Ausserdem
       ist die Kopfleiste jetzt verschieden hoch, top: 52px stimmt nicht mehr. */
    .filter { position: static; padding: 11px 12px; }

    /* Im Kartenkopf passten die Votum-Knoepfe nicht mehr neben Stufe und
       Pfad und wurden rechts abgeschnitten. Eigene Zeile, volle Breite -
       zugleich grosse Tippflaechen. */
    .karte-kopf { flex-wrap: wrap; row-gap: 8px; }
    .voten,
    .karte[data-votum=""] .voten { flex-basis: 100%; margin-left: 0; }
    .voten .ja, .voten .nein { flex: 1; padding: 9px 11px; }

    .liste { padding: 14px 12px 80px; }
    .tastatur { display: none; }
}
