/* Fragona - klar, ruhig, wenige Farben. Die Figur steht nur im Kopf und auf der Anmeldeseite. */
:root {
  --violett: #380930;
  --orange: #FC5109;
  --creme: #FFEDD5;
  --gelb: #F8C018;
  --hell: #FFF9F0;
  --weiss: #FFFFFF;
  --text: #2A1626;
  --grau: #6B5A67;
  --linie: #E4D5CF;
  --fehler: #A4161A;
  --ok: #1E6B45;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--hell);
  color: var(--text);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Kopf ---------- */
.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: var(--violett);
  border-bottom: 4px solid var(--orange);
}
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marke-kopf { width: 40px; height: 40px; }
.marke-text { height: 30px; width: auto; }
.kopf nav { display: flex; align-items: center; gap: 20px; }
.kopf nav a, .kopf nav .link { color: var(--creme); font-weight: 600; }

/* ---------- Inhalt ---------- */
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 20px 48px; }
body.schueler main { max-width: 460px; }

h1 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 20px; color: var(--violett); }
h2 { font-size: 1.05rem; margin: 32px 0 10px; color: var(--violett); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 14px; }
a { color: var(--violett); }
code, pre.code { font-family: ui-monospace, Consolas, "Courier New", monospace; }
pre.code { background: var(--creme); padding: 12px; overflow-x: auto; font-size: .85rem; white-space: pre-wrap; word-break: break-all; }

.karte { background: var(--weiss); border: 1px solid var(--linie); padding: 24px; margin: 28px 0; }
.karte h1, .karte h2 { margin-top: 0; }
.karte.schmal { max-width: 420px; margin-left: auto; margin-right: auto; }
.karte.mitte { text-align: center; }
.karte.akzent { border-left: 6px solid var(--orange); background: var(--creme); }

.pfad { font-size: .9rem; color: var(--grau); margin-bottom: 6px; }
.hinweis { font-size: .9rem; color: var(--grau); }
.leer { color: var(--grau); padding: 20px 0; }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=password], input[type=number], input[type=date], input:not([type]) {
  width: 100%;
  padding: 12px;
  font: inherit;
  color: var(--text);
  background: var(--weiss);
  border: 2px solid var(--violett);
  border-radius: 0;
}
button, .knopf {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 22px;
  min-height: 48px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  color: var(--creme);
  background: var(--violett);
  border: 2px solid var(--violett);
  border-radius: 0;
  cursor: pointer;
}
button:hover, .knopf:hover { background: #561447; border-color: #561447; }
button.zweit, .knopf.zweit { color: var(--violett); background: transparent; }
button.zweit:hover, .knopf.zweit:hover { background: var(--creme); border-color: var(--violett); }
button.klein { margin-top: 0; padding: 6px 12px; min-height: 40px; font-size: .9rem; }
button.link { margin: 0; padding: 0; min-height: 0; border: 0; background: none; color: inherit; font-weight: 600; text-decoration: underline; }
.karte.mitte button.link { margin-top: 22px; color: var(--grau); font-weight: 400; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.reihe { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.reihe form { margin: 0; }

/* ---------- Meldungen ---------- */
.meldung { padding: 12px 16px; margin: 0 0 20px; border-left: 6px solid var(--ok); background: var(--weiss); }
.meldung.fehler { border-left-color: var(--fehler); color: var(--fehler); font-weight: 600; }

/* ---------- Listen und Tabellen ---------- */
.liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.liste li { border-bottom: 1px solid var(--linie); }
.liste a { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 4px; text-decoration: none; }
.liste a:hover { background: var(--creme); }
.liste span { color: var(--grau); font-size: .9rem; }

.tabelle { width: 100%; border-collapse: collapse; margin: 24px 0 8px; background: var(--weiss); }
.tabelle th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); padding: 8px 12px; border-bottom: 2px solid var(--violett); }
.tabelle td { padding: 8px 12px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle form { margin: 0; }
.zahl { width: 3.5em; font-variant-numeric: tabular-nums; color: var(--grau); }
.rechts { text-align: right; }
.marke-neu { display: inline-block; margin-left: 8px; padding: 1px 8px; font-size: .75rem; font-weight: 700; background: var(--gelb); color: var(--violett); }

/* ---------- Batterien ---------- */
textarea { width: 100%; padding: 12px; font: .9rem/1.4 ui-monospace, Consolas, "Courier New", monospace; color: var(--text); background: var(--weiss); border: 2px solid var(--violett); border-radius: 0; resize: vertical; }
input[type=file] { width: 100%; padding: 10px; font: inherit; background: var(--weiss); border: 2px dashed var(--violett); }
.meldung ul { margin: 6px 0 0; padding-left: 20px; font-weight: 400; }
.meldung p { margin: 0; }

.fakten { margin: 0 0 8px; border-top: 1px solid var(--linie); }
.fakten div { display: flex; gap: 16px; padding: 8px 4px; border-bottom: 1px solid var(--linie); }
.fakten dt { flex: 0 0 9.5em; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); padding-top: 3px; }
.fakten dd { margin: 0; }

.schalter { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0 0 16px; }
.schalter input { width: 22px; height: 22px; accent-color: var(--violett); }

/* Eine Frage, wie sie die Schueler sehen */
.frage { background: var(--weiss); border: 1px solid var(--linie); border-top: 6px solid var(--violett); padding: 20px; margin: 0 0 24px; }
.frage.bonus { border-top-color: var(--orange); }
.frage header { display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); margin-bottom: 12px; }
.frage-text { font-size: 1.15rem; margin-bottom: 18px; }
.optionen { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.option { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 14px; min-height: 52px; border: 2px solid var(--violett); }
.buchstabe { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; font-weight: 700; color: var(--creme); background: var(--violett); }
.option-text { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; overflow-wrap: anywhere; padding-bottom: .08em; }
.option.weiss-nicht { justify-content: center; border-style: dashed; color: var(--grau); }
.loesung { display: none; }
.mit-loesung .loesung { display: block; }
.mit-loesung .option.richtig { border-color: var(--ok); background: #EAF5EE; }
.mit-loesung .option.richtig .buchstabe { background: var(--ok); color: var(--weiss); }
.marke-richtig { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ok); }
.fehlertyp { flex: 1 0 100%; padding-left: 44px; font-size: .85rem; color: var(--grau); }
.erklaerung { margin-top: 16px; padding: 12px 14px; background: var(--creme); border-left: 6px solid var(--gelb); }
.erklaerung p { margin: 4px 0 0; }
.katex { font-size: 1.1em; }
.katex-error { color: var(--fehler) !important; background: #FBE9E9; }
.formel-fehler { outline: 3px solid var(--fehler); outline-offset: 3px; }
.kopf nav { flex-wrap: wrap; justify-content: flex-end; gap: 6px 20px; }

/* ---------- Schuelerseite ---------- */
.figur { width: 96px; height: 96px; }
.figur.gross { width: 248px; max-width: 70%; height: auto; }
.klein-ueber { margin: 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--grau); }
.nickname { font-size: 2.2rem; margin: 4px 0 20px; }
.warten { padding: 16px; background: var(--creme); }
.code-eingabe { text-align: center; font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 1.6rem; letter-spacing: .12em; text-transform: uppercase; }
body.schueler form button[type=submit]:not(.link) { width: 100%; }

.nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Hilfe fuer Schueler ---------- */
.hilfe-knopf {
  margin: 0 0 0 auto; padding: 0; width: 38px; min-height: 38px; height: 38px; flex: 0 0 auto;
  font-size: 1.3rem; line-height: 1; border-radius: 50%;
  color: var(--violett); background: var(--creme); border: 2px solid var(--creme);
}
.hilfe-knopf:hover { background: var(--gelb); border-color: var(--gelb); }
.hilfe-knopf[hidden] { display: none; }
.hilfe {
  width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0 22px 22px;
  border: 0; border-top: 6px solid var(--orange); background: var(--weiss); color: var(--text);
}
.hilfe::backdrop { background: rgba(56, 9, 48, .55); }
.hilfe-kopf {
  position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 -22px 4px; padding: 14px 22px 10px; background: var(--weiss); border-bottom: 1px solid var(--linie);
}
.hilfe-kopf h2 { margin: 0; text-transform: none; letter-spacing: 0; font-size: 1.25rem; }
button.hilfe-zu {
  margin: 0; padding: 0; width: 40px; min-height: 40px; font-size: 1.6rem; line-height: 1;
  color: var(--violett); background: transparent; border: 0;
}
button.hilfe-zu:hover { background: var(--creme); }
.hilfe h3 { margin: 18px 0 6px; font-size: 1rem; color: var(--violett); }
.hilfe ul { margin: 0; padding-left: 20px; }
.hilfe li { margin: 0 0 6px; }
button.hilfe-ok { width: 100%; margin-top: 22px; }

/* ---------- Fuss ---------- */
.fuss { padding: 16px 20px; text-align: center; font-size: .8rem; color: var(--grau); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .kopf { padding: 8px 14px; }
  .marke-kopf { width: 34px; height: 34px; }
  .marke-text { height: 24px; }
  main { padding: 20px 14px 40px; }
  .karte { padding: 18px; }
  .tabelle th, .tabelle td { padding: 8px 6px; }
}

/* ---------- Runde starten ---------- */
select { width: 100%; padding: 12px; font: inherit; color: var(--text); background: var(--weiss); border: 2px solid var(--violett); border-radius: 0; }
.wahl { margin: 20px 0 0; padding: 0; border: 0; }
.wahl legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.wahl label { display: block; font-weight: 600; margin: 0; padding: 12px; border: 2px solid var(--violett); }
.wahl label + label { border-top: 0; }
.wahl label.aus { color: var(--grau); border-color: var(--linie); }
.wahl input { width: 20px; height: 20px; margin-right: 8px; vertical-align: -3px; accent-color: var(--violett); }
.wahl .hinweis { display: block; font-weight: 400; margin-left: 32px; }

/* ---------- Laufende Sitzung: Lehrer und Schueler ---------- */
.s-kopf { display: flex; justify-content: space-between; gap: 12px; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--violett); margin-bottom: 8px; }
.uhr { height: 10px; background: var(--linie); margin-bottom: 4px; }
.uhr-balken { height: 100%; width: 0; background: var(--violett); transition: width .2s linear; }
.uhr-balken.knapp { background: var(--orange); }
.uhr-text { margin: 0 0 12px; text-align: right; font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--violett); min-height: 1.5em; }
.l-uhr { font-size: 1.3rem; font-variant-numeric: tabular-nums; }

button.option { width: 100%; margin: 0; text-align: left; font-weight: 400; color: var(--text); background: var(--weiss); border: 2px solid var(--violett); border-radius: 0; cursor: pointer; }
button.option:hover:not(:disabled) { background: var(--creme); border-color: var(--violett); }
button.option:disabled { cursor: default; opacity: 1; }
button.option.weiss-nicht { border-style: dashed; color: var(--grau); }
.option.gewaehlt { border-width: 4px; background: var(--creme); }
.option.richtig:not(li) { border-color: var(--ok); background: #EAF5EE; }
.option.richtig:not(li) .buchstabe { background: var(--ok); color: var(--weiss); }
.option.falsch { border-color: var(--fehler); background: #FBE9E9; }
.option.falsch .buchstabe { background: var(--fehler); color: var(--weiss); }
.s-marke { flex: 1 0 100%; padding-left: 44px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.weiss-nicht .s-marke { padding-left: 0; text-align: center; }
.option.richtig .s-marke { color: var(--ok); }
.option.falsch .s-marke { color: var(--fehler); }
.s-urteil { margin: 0 0 14px; padding: 14px; text-align: center; font-size: 1.2rem; font-weight: 700; background: var(--creme); border-left: 6px solid var(--grau); }
.s-urteil.ok { border-left-color: var(--ok); color: var(--ok); background: #EAF5EE; }
.s-urteil.fehler { border-left-color: var(--fehler); color: var(--fehler); background: #FBE9E9; }
.s-hinweis { text-align: center; padding: 12px; background: var(--creme); }
.s-titel { color: var(--grau); margin-bottom: 16px; }
.s-ergebnis { margin: 6px 0 4px; font-size: 4rem; line-height: 1; font-weight: 800; color: var(--violett); }
.s-ergebnis span { font-size: 1.2rem; font-weight: 400; color: var(--grau); }
.s-liste { list-style: none; margin: 16px 0 0; padding: 0; text-align: left; border-top: 1px solid var(--linie); }
.s-liste li { display: flex; justify-content: space-between; padding: 10px 4px; border-bottom: 1px solid var(--linie); }
.s-liste .richtig strong { color: var(--ok); }
.s-liste .falsch strong { color: var(--fehler); }
.s-liste .wn strong, .s-liste .keine strong { color: var(--grau); font-weight: 400; }
#abmelden { text-align: center; }
#abmelden .link { color: var(--grau); font-weight: 400; }
body.schueler .frage { padding: 16px; margin-bottom: 14px; }

.l-zaehler { font-size: 1.1rem; margin: 16px 0 8px; }
.l-zaehler strong { font-size: 1.5rem; color: var(--violett); }
.l-n { flex: 0 0 auto; min-width: 2.2em; padding: 2px 8px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--creme); color: var(--violett); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; }
.chips li { padding: 4px 12px; background: var(--weiss); border: 1px solid var(--linie); }
.steuerung { position: sticky; bottom: 0; padding: 12px 0 14px; margin-top: 8px; background: var(--hell); border-top: 2px solid var(--violett); }
.steuerung button, .steuerung .knopf { margin-top: 0; }
.steuerung a.knopf { margin-left: auto; }
.meldung:not(.fehler):not(.ok) { border-left-color: var(--gelb); }
.tabelle th.rechts { text-align: right; }

/* ---------- Selbsttempo ---------- */
.st-balken { margin: 0 0 14px; display: grid; gap: 6px; }
.st-zeile { display: grid; grid-template-columns: 4.2em 1fr 5.4em; align-items: center; gap: 10px; font-size: .85rem; }
.st-zeile > span { color: var(--grau); text-transform: uppercase; letter-spacing: .05em; font-size: .75rem; }
.st-zeile .uhr { margin: 0; height: 12px; }
.st-zeile strong { text-align: right; font-variant-numeric: tabular-nums; color: var(--violett); }
.uhr-balken.st-fragen { background: var(--ok); transition: width .3s ease; }
.s-weiter { width: 100%; margin-top: 12px; }
.frage.bonus .buchstabe { background: var(--orange); }
.option.richtig .buchstabe, .option.falsch .buchstabe { color: var(--weiss); }

.l-rahmen { overflow-x: auto; }
.l-fortschritt th.zelle, .l-fortschritt td.zelle { width: 2.2em; padding: 6px 2px; text-align: center; font-weight: 700; border-left: 1px solid var(--linie); }
.l-fortschritt th.bonus { color: var(--orange); }
.l-fortschritt td.richtig { background: #EAF5EE; color: var(--ok); }
.l-fortschritt td.falsch { background: #FBE9E9; color: var(--fehler); }
.l-fortschritt td.wn { background: var(--creme); color: var(--grau); }
.l-fortschritt tr.fertig td:nth-child(2) { font-weight: 600; }

/* ---------- Abschluss, Besprechung, vergangene Sitzungen ---------- */
.mitte { text-align: center; }
div.s-liste { margin: 0 0 20px; border-top: 1px solid var(--linie); }
.s-liste details { border-bottom: 1px solid var(--linie); }
.s-liste summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 4px; min-height: 48px; cursor: pointer; list-style: none; }
.s-liste summary::-webkit-details-marker { display: none; }
.s-liste summary span::before { content: '▸ '; color: var(--grau); }
.s-liste details[open] summary span::before { content: '▾ '; }
.s-liste details.richtig summary strong { color: var(--ok); }
.s-liste details.falsch summary strong { color: var(--fehler); }
.s-liste details.wn summary strong, .s-liste details.keine summary strong { color: var(--grau); font-weight: 400; }
.s-liste details .frage { margin-bottom: 10px; }
.s-liste details .erklaerung { margin: 0 0 16px; }

.l-fortschritt td.keine { color: var(--grau); }
.l-fortschritt tfoot th, .l-fortschritt tfoot td { padding: 8px 2px; border-top: 2px solid var(--violett); font-size: .75rem; font-weight: 700; color: var(--violett); text-align: center; }
.l-fortschritt tfoot th { text-align: left; padding-left: 12px; text-transform: uppercase; letter-spacing: .06em; }
.l-fortschritt th.zelle, .l-fortschritt td.zelle { min-width: 2.2em; }

.l-fragen { border-top: 1px solid var(--linie); margin-bottom: 20px; }
.l-frage { border-bottom: 1px solid var(--linie); }
.l-frage summary { display: flex; gap: 16px; padding: 12px 4px; cursor: pointer; list-style: none; }
.l-frage summary::-webkit-details-marker { display: none; }
.l-fname { flex: 0 0 5.5em; font-weight: 700; color: var(--violett); }
.l-fname::before { content: '▸ '; color: var(--grau); }
.l-frage[open] .l-fname::before { content: '▾ '; }
.l-fzahlen { font-size: .95rem; }
.l-frage .frage { margin: 4px 0 16px; }

.l-wahl { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; }
.l-wahl button { margin: 0; padding: 8px 12px; min-height: 48px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .85rem; font-weight: 400; }
.l-wahl button strong { font-size: 1rem; }
.l-wahl button.aktiv { background: var(--violett); color: var(--creme); }

.s-zeile-link { display: block; }

/* ---------- Gesperrte Knoepfe: sichtbar ausgegraut ---------- */
/* Antwortoptionen (.option) sind ausgenommen: Sie bleiben nach der Abgabe voll lesbar. */
button:disabled:not(.option) { opacity: .35; cursor: not-allowed; }
button:disabled:not(.option):not(.zweit):not(.link):hover { background: var(--violett); border-color: var(--violett); }
button.zweit:disabled:hover { background: transparent; }

/* ---------- Bild zur Frage ---------- */
.fragebild { margin: 0 0 18px; }
.fragebild img { display: block; max-width: 100%; max-height: 45vh; width: auto; height: auto; border: 1px solid var(--linie); background: #fff; }
.bild-fehlt { margin: 0 0 12px; padding: 10px 14px; background: var(--creme); border-left: 6px solid var(--orange); font-weight: 600; }
.bild-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.bild-form input[type=file] { flex: 1 1 220px; width: auto; padding: 6px; }
.warnmarke { display: inline-block; margin-left: 8px; padding: 1px 8px; font-size: .75rem; font-weight: 700; background: var(--orange); color: #fff; }
.gefahr { border-top: 1px solid var(--linie); margin-top: 32px; padding-top: 20px; }

/* ---------- Filter und pflegbare Tabellen ---------- */
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.filter label { margin: 0; font-size: .85rem; }
.filter select { width: auto; min-width: 9em; padding: 8px 10px; }
.filter button { padding: 8px 16px; }
.tabelle.pflege input, .tabelle.pflege select { width: 100%; min-width: 7em; padding: 8px 10px; margin: 0; }
.tabelle.pflege button { padding: 8px 14px; white-space: nowrap; }
.tabelle tr.ort th { background: var(--creme); color: var(--violett); font-size: .95rem; letter-spacing: 0; text-transform: none; border-bottom: 2px solid var(--violett); padding-top: 14px; }
.tabelle.pflege td.ein { padding-left: 28px; }
@media (max-width: 640px) {
  .tabelle.pflege thead { display: none; }
  .tabelle.pflege tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--linie); }
  .tabelle.pflege td, .tabelle.pflege tr.ort th { display: block; border: 0; padding: 4px 8px; }
  .tabelle.pflege td.ein { padding-left: 8px; }
}
.meldung.warnung { border-left-color: var(--orange); }
.tabelle.pflege td a { white-space: nowrap; }

/* ---------- Batterien als Tabelle ---------- */
.kopfzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.kopfzeile h1 { margin: 0; }
.tabelle.batterien td.titel a { font-weight: 700; }
.tabelle.batterien td.titel .hinweis { display: block; }
.tabelle.batterien td.titel .warnmarke { margin: 4px 0 0; }
.tabelle.batterien td.aktion { text-align: right; white-space: nowrap; }
.tabelle.batterien td.aktion .knopf, .tabelle.batterien td.aktion button { padding: 8px 14px; font-size: .9rem; }
@media (max-width: 720px) {
  .tabelle.batterien thead { display: none; }
  .tabelle.batterien tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--linie); }
  .tabelle.batterien td { display: inline-block; border: 0; padding: 2px 8px; }
  .tabelle.batterien td.titel { display: block; }
  .tabelle.batterien td[data-titel]::before { content: attr(data-titel) ": "; color: var(--grau); font-size: .85rem; }
  .tabelle.batterien td.aktion { display: block; text-align: left; padding-top: 8px; }
}
.tabelle.batterien td[data-titel=Zeit] { white-space: nowrap; }

/* ---------- Automatisch weiter (getaktet) ---------- */
.weiter { margin: 12px 0; padding: 10px 14px; background: var(--creme); text-align: center; font-weight: 700; color: var(--violett); font-variant-numeric: tabular-nums; }
.weiter .uhr { margin: 0 0 8px; }
.weiter .uhr-balken, .weiter .uhr-balken.knapp { background: var(--orange); }
.weiter.pausiert { font-weight: 600; color: var(--grau); }

/* ---------- Figur (Fragona) auf dem Handy ---------- */
.s-figur { display: block; width: 220px; max-width: 70%; height: auto; margin: 0 auto 12px; }
.s-ergebnis-zeile { display: flex; align-items: center; justify-content: center; gap: 10px; }
.s-zeigt { width: 104px; height: auto; flex: 0 0 auto; }

/* ---------- Meine Runden und Ueben (Schueler) ---------- */
.s-nav { margin: 0 0 8px; }
.s-nav .link { font-weight: 600; color: var(--violett); }
.s-h1 { margin: 4px 0 16px; }
.s-runden button.s-runde { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; margin: 0; padding: 14px 4px; min-height: 48px; text-align: left; color: var(--text); background: none; border: 0; font-weight: 400; }
.s-runden button.s-runde:hover { background: var(--creme); }
.s-runden button.s-runde strong { color: var(--violett); }
.s-runden button.s-runde span { color: var(--grau); font-size: .9rem; }
.karte .s-weiter + .hinweis { margin: 10px 0 0; }

/* ---------- Hausaufgabe ---------- */
.l-fortschritt td.nichts { color: var(--grau); font-weight: 400; }
.l-fortschritt tr.nicht-angefangen td { color: var(--grau); }
#frist-feld { margin-top: 16px; }
#frist-feld input, form.reihe input[type=date] { width: auto; min-width: 12em; }
.s-frist { display: inline-block; margin: 0 0 6px; padding: 2px 10px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--violett); background: var(--gelb); }
.s-runden .s-frist { margin: 0; }
.s-unterbrechen { margin: 18px 0 0; text-align: center; }
.s-unterbrechen .link { color: var(--grau); font-weight: 400; }
.s-kopf span:last-child { white-space: nowrap; }

/* ---------- Nachzuegler, geuebt ---------- */
sup.nachz { font-size: .7em; font-weight: 700; color: var(--orange); cursor: help; }
.l-fortschritt td.verpasst { color: var(--grau); font-weight: 700; }
.l-fortschritt td.geuebt.null { color: var(--grau); }

/* ---------- Filter in "Sitzungen" ---------- */
.filterleiste { display: flex; flex-direction: column; gap: 10px; margin: 0 0 20px; }
.knopfreihe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.knopfreihe .filter-titel { min-width: 7em; margin: 0; font-size: .85rem; font-weight: 600; }
.knopfreihe select { width: auto; min-width: 12em; padding: 8px 10px; }
a.chip { display: inline-block; padding: 6px 14px; font-size: .9rem; font-weight: 600; color: var(--violett); text-decoration: none; background: var(--weiss); border: 2px solid var(--violett); }
a.chip:hover { background: var(--creme); }
a.chip.aktiv { color: var(--creme); background: var(--violett); }
.l-fortschritt td.quote { white-space: nowrap; }

/* Testen: Knopf klappt die Modi als kleines Menue auf */
details.testen { position: relative; display: inline-block; }
details.testen > summary { list-style: none; cursor: pointer; }
details.testen > summary::-webkit-details-marker { display: none; }
details.testen > summary::after { content: ' ▾'; font-size: .8em; }
details.testen[open] > summary { background: var(--creme); }
.test-wahl { position: absolute; right: 0; z-index: 20; display: flex; flex-direction: column; gap: 6px; min-width: 15em; margin-top: 4px; padding: 12px; background: #fff; border: 2px solid var(--violett); text-align: left; white-space: normal; }
.reihe:not(.knapp) details.testen .test-wahl { right: auto; left: 0; }
.test-wahl .hinweis { margin: 0 0 4px; }
.test-wahl button { margin: 0; width: 100%; }
.test-wahl .meldung { margin: 6px 0 0; }
.reihe.knapp { gap: 8px; justify-content: flex-end; flex-wrap: nowrap; }
.tabelle.batterien td.aktion .reihe.knapp > * { margin-top: 0; }
@media (max-width: 720px) { .reihe.knapp { justify-content: flex-start; } }
.reihe.knapp summary { margin-top: 0; }
.l-test { display: inline-block; margin-left: 8px; padding: 2px 8px; font-size: .8rem; font-weight: 700; color: var(--violett); background: var(--gelb); vertical-align: middle; }
.filter input[type=search] { width: auto; min-width: 14em; min-height: 42px; padding: 8px 10px; font-size: 1rem; border: 2px solid var(--violett); }
.tabelle.batterien tr[hidden] { display: none; }
