/* Deckz Duell: Grundstile.

   Leitbild ist die Karteikarte: kühles Papier, königsblaue Tinte als einzige Akzentfarbe,
   und die Kopflinie der Karte als wiederkehrendes Zeichen. Schrift des Systems.
   Zuerst für 360 bis 430 Pixel Breite, hell und dunkel nach Einstellung des Geräts.
   Keine fremden Schriften, keine Bewegung, die Zeit kostet (Bauplan 7, Gestaltung). */

:root {
  color-scheme: light dark;

  --papier: #f4f5f8;
  --karte: #ffffff;
  --tinte: #161a26;
  --tinte-leise: #575e73;
  --linie: #d3d8e4;
  --akzent: #2b3f9e;
  --akzent-tinte: #ffffff;
  --fehler: #b3261e;
  --gut: #1a6b3c;
  --fast: #7a5200;

  --breite: 30rem;
  --leiste: 3.75rem;
  --tastflaeche: 2.9rem; /* gut 49 Pixel, also über den verlangten 44 */
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #0f121b;
    --karte: #181c29;
    --tinte: #e9ebf3;
    --tinte-leise: #a0a7bb;
    --linie: #2d3346;
    --akzent: #a9b8ff;
    --akzent-tinte: #0f121b;
    --fehler: #ffb4ab;
    --gut: #86d9a5;
    --fast: #f0c66b;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Was das Attribut hidden trägt, ist weg, gleich welche Anordnung eine Klasse verlangt. */
[hidden] {
  display: none !important;
}

html {
  font-size: 106.25%; /* 17 Pixel: Die App besteht aus Text, der gelesen werden muss. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--papier);
  color: var(--tinte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: break-word;
}

h1,
h2,
p,
ul {
  margin: 0;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
}

h2 {
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 700;
}

a {
  color: var(--akzent);
  text-underline-offset: 0.15em;
}

/* H+ und CO2 sollen die Zeile nicht auseinanderdrücken. */
sub,
sup {
  line-height: 0;
}

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

/* ---- Seite ------------------------------------------------------------------- */

.seite {
  max-width: var(--breite);
  margin-inline: auto;
  padding: max(1.5rem, env(safe-area-inset-top)) 1rem 2rem;
}

.seite--mit-reitern {
  padding-bottom: calc(var(--leiste) + env(safe-area-inset-bottom) + 1.5rem);
}

.seite > * + * {
  margin-top: 1rem;
}

.sprung {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--karte);
  border: 1.5px solid var(--akzent);
  border-radius: 0.4rem;
}

.sprung:focus {
  top: 0.5rem;
}

/* Der Name der App auf den Seiten vor der Anmeldung. */
.marke {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.seite > .vorspann {
  margin-top: 0.35rem;
  color: var(--tinte-leise);
}

.leise {
  color: var(--tinte-leise);
  font-size: 0.875rem;
}

/* ---- Karte ------------------------------------------------------------------- */

.karte {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 0.4rem;
  padding: 1rem;
}

.karte > * + * {
  margin-top: 0.75rem;
}

/* Die Kopflinie der Karteikarte. */
.karte > h2 {
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--akzent);
}

/* Zeilen wie auf liniertem Papier. */
.liste {
  list-style: none;
  padding: 0;
}

.liste li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--linie);
}

.liste li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.marke-klein {
  flex: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tinte-leise);
  border: 1px solid var(--tinte-leise);
  border-radius: 0.3rem;
  padding: 0 0.4rem;
}

/* Zeilen, die als Ganzes ein Verweis sind. */
.liste--verweise li {
  display: block;
  padding: 0;
}

.liste--verweise a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--tastflaeche);
  padding: 0.6rem 0;
  color: inherit;
  text-decoration: none;
}

.liste--verweise a > :first-child {
  text-decoration: underline;
  text-decoration-color: var(--linie);
  text-underline-offset: 0.2em;
}

.liste--verweise a > :last-child {
  flex: none;
}

.karte > h3 {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tinte-leise);
}

.karte > h3 + .liste {
  margin-top: 0.15rem;
}

.zurueck {
  font-size: 0.875rem;
}

.zurueck a::before {
  content: "‹ ";
}

.seite > .zurueck + h1 {
  margin-top: 0.25rem;
}

/* ---- Die Karteikarte mit Musterantwort und Schubladen --------------------------- */

.lernkarte__art {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lernkarte__antwort > * + * {
  margin-top: 0.6rem;
}

.punkte {
  padding-left: 1.4rem;
}

.punkte li + li {
  margin-top: 0.5rem;
}

.punkte li::marker {
  color: var(--akzent);
  font-weight: 700;
}

.versuch {
  margin: 0;
}

.versuch dt {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tinte-leise);
}

.versuch dd {
  margin: 0 0 0.6rem;
}

.versuch dd:last-child {
  margin-bottom: 0;
}

/* Breite Tabellen rollen in ihrer Schublade, nicht die ganze Seite. */
.schublade__inhalt {
  overflow-x: auto;
}

.vergleich,
.schublade__inhalt table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}

.vergleich th,
.vergleich td,
.schublade__inhalt th,
.schublade__inhalt td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--linie);
  text-align: left;
  vertical-align: top;
}

.vergleich thead th,
.schublade__inhalt thead th {
  border-bottom: 2px solid var(--akzent);
}

.vergleich {
  table-layout: fixed;
}

/* Das Kriterium steht als Zeile über seinen beiden Zellen. */
.vergleich tbody th {
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tinte-leise);
}

.vergleich tbody:last-child td {
  border-bottom: 0;
}

.bild {
  margin: 0.75rem 0 0;
}

.bild img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--linie);
  border-radius: 0.3rem;
  /* Folien und Schemata haben meist weißen Grund. So bleiben sie auch dunkel lesbar. */
  background: #ffffff;
}

.bild a {
  display: block;
  cursor: zoom-in;
}

.bild figcaption {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--tinte-leise);
}

.schubladen {
  border-top: 1px solid var(--linie);
}

.schublade {
  border-bottom: 1px solid var(--linie);
}

.schublade:last-child {
  border-bottom: 0;
}

.schublade summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tastflaeche);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.schublade summary::-webkit-details-marker {
  display: none;
}

/* Zu: ein Pluszeichen. Offen: ein Minuszeichen. Form, nicht nur Farbe. */
.schublade summary::before {
  content: "+";
  flex: none;
  width: 1.1rem;
  color: var(--akzent);
  font-weight: 700;
  text-align: center;
}

.schublade[open] summary::before {
  content: "−";
}

.schublade__inhalt {
  padding: 0 0 0.9rem 1.6rem;
}

.schublade__inhalt > * {
  margin: 0;
}

.schublade__inhalt > * + * {
  margin-top: 0.6rem;
}

.schublade__inhalt ul,
.schublade__inhalt ol {
  padding-left: 1.2rem;
}

.schublade__inhalt blockquote {
  margin-inline: 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--linie);
  color: var(--tinte-leise);
}

/* Die Lupe: ein Bild groß ansehen. */
.lupe {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--papier);
  color: var(--tinte);
}

.lupe::backdrop {
  background: var(--papier);
}

.lupe__rahmen {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 4.25rem 0.5rem 1rem;
}

.lupe img {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
  cursor: zoom-in;
}

/* Zweites Antippen: das Bild in doppelter Breite, zum Verschieben mit dem Finger. */
.lupe--nah img {
  width: 200%;
  max-width: none;
  cursor: zoom-out;
}

.lupe__zu {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: 0.75rem;
  background: var(--karte);
}

/* ---- Formulare --------------------------------------------------------------- */

.formular {
  display: grid;
  gap: 1rem;
}

.formular > * + * {
  margin-top: 0;
}

.feld {
  display: grid;
  gap: 0.3rem;
}

.feld label {
  font-weight: 600;
}

.feld input {
  width: 100%;
  min-width: 0;
  min-height: var(--tastflaeche);
  padding: 0.5rem 0.7rem;
  font: inherit;
  color: inherit;
  background: var(--papier);
  border: 1.5px solid var(--tinte-leise);
  border-radius: 0.4rem;
}

.feld--fehler input {
  border-color: var(--fehler);
}

.feld legend {
  margin-bottom: 0.4rem;
  padding: 0;
  font-weight: 600;
}

/* Ein Haken mit Beschriftung, die Zeile als Ganzes antippbar. */
.haken label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--tastflaeche);
  font-weight: 600;
  cursor: pointer;
}

.haken input {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  accent-color: var(--akzent);
}

.feld__zeile {
  display: flex;
  gap: 0.5rem;
}

.feld__hinweis {
  color: var(--tinte-leise);
  font-size: 0.875rem;
}

.errorlist {
  list-style: none;
  padding: 0;
  color: var(--fehler);
  font-size: 0.9rem;
  font-weight: 600;
}

.errorlist li {
  border-left: 3px solid var(--fehler);
  padding-left: 0.5rem;
}

.errorlist li + li {
  margin-top: 0.3rem;
}

/* ---- Knöpfe ------------------------------------------------------------------ */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tastflaeche);
  padding: 0.5rem 1.1rem;
  font: inherit;
  font-weight: 600;
  color: var(--tinte);
  background: transparent;
  border: 1.5px solid var(--tinte-leise);
  border-radius: 0.55rem;
  text-decoration: none;
  cursor: pointer;
}

.knopf--haupt {
  width: 100%;
  color: var(--akzent-tinte);
  background: var(--akzent);
  border-color: var(--akzent);
}

.knopf--klein {
  flex: none;
  padding-inline: 0.8rem;
  font-size: 0.875rem;
}

/* ---- Die fünf Reiter ----------------------------------------------------------- */

.reiter {
  position: fixed;
  inset: auto 0 0 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-inline: max(0px, calc((100vw - var(--breite)) / 2));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--karte);
  border-top: 1px solid var(--linie);
}

.reiter a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: var(--leiste);
  margin-top: -1px;
  border-top: 3px solid transparent;
  color: var(--tinte-leise);
  font-size: 0.72rem;
  text-decoration: none;
}

/* Der gewählte Reiter: Balken und fette Schrift, nicht nur Farbe. */
.reiter a[aria-current="page"] {
  color: var(--akzent);
  font-weight: 700;
  border-top-color: var(--akzent);
}

.reiter a:focus-visible {
  outline-offset: -3px;
}

.zeichen {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.knopf--sicher {
  color: var(--akzent);
  border-color: var(--akzent);
}

.unsichtbar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* ---- Frage und Auflösung: Kopf und Aktionsleiste -------------------------------- */

/* Statt der Reiter steht unten die Hauptaktion. */
.seite--mit-aktionen {
  padding-bottom: calc(var(--tastflaeche) + 2.75rem + env(safe-area-inset-bottom));
}

.aktionen {
  position: fixed;
  inset: auto 0 0 0;
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem max(1rem, calc((100vw - var(--breite)) / 2 + 1rem));
  padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
  background: var(--karte);
  border-top: 1px solid var(--linie);
}

.aktionen .knopf {
  flex: 1;
}

.aktionen .knopf--haupt {
  flex: 2;
  width: auto;
}

.aktionen .knopf--neben {
  flex: none;
  padding-inline: 0.8rem;
  font-size: 0.9rem;
}

.spielkopf {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1rem;
  align-items: baseline;
  font-size: 0.875rem;
  color: var(--tinte-leise);
}

.spielkopf__wo {
  font-weight: 700;
  color: var(--tinte);
}

.spielkopf > progress,
.spielkopf__thema,
.uhr {
  grid-column: 1 / -1;
}

.fortschritt {
  display: block;
  width: 100%;
  height: 0.35rem;
  appearance: none;
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--linie);
}

.fortschritt::-webkit-progress-bar {
  background: var(--linie);
}

.fortschritt::-webkit-progress-value {
  background: var(--akzent);
}

.fortschritt::-moz-progress-bar {
  background: var(--akzent);
}

.uhr {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.uhr strong {
  color: var(--tinte);
}

.fortschritt--uhr::-webkit-progress-value {
  background: var(--tinte-leise);
}

.fortschritt--uhr::-moz-progress-bar {
  background: var(--tinte-leise);
}

.frage {
  display: grid;
  gap: 1rem;
}

.frage > * {
  margin: 0;
}

.frage__stamm {
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: 0;
}

/* ---- Die Formen zum Antippen ---------------------------------------------------- */

.wahlen {
  display: grid;
  gap: 0.6rem;
}

.wahl {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.8rem 0.85rem;
  background: var(--karte);
  border: 1.5px solid var(--linie);
  border-radius: 0.55rem;
  cursor: pointer;
}

/* Der Knopf des Browsers bleibt sichtbar: gewählt ist, was den Punkt trägt. */
.wahl input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  accent-color: var(--akzent);
}

.wahl:has(input:checked) {
  border-color: var(--akzent);
  box-shadow: inset 0 0 0 1px var(--akzent);
}

.wahl:has(input:focus-visible) {
  outline: 3px solid var(--akzent);
  outline-offset: 2px;
}

.wahl input:focus-visible {
  outline: 0;
}

.aussage {
  padding: 0.85rem;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 0.4rem;
}

.aussage legend {
  float: left;
  width: 100%;
  margin-bottom: 0.7rem;
  padding: 0;
}

.schalter {
  clear: both;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.5rem;
}

.schalter label {
  position: relative;
}

.schalter input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.schalter span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tastflaeche);
  padding: 0.4rem 0.5rem;
  border: 1.5px solid var(--tinte-leise);
  border-radius: 0.55rem;
  font-weight: 600;
  text-align: center;
}

/* Gewählt: gefüllt und mit Haken. Form und Farbe. */
.schalter input:checked + span {
  color: var(--akzent-tinte);
  background: var(--akzent);
  border-color: var(--akzent);
}

.schalter input:checked + span::before {
  content: "✓\00a0";
}

.schalter input:focus-visible + span {
  outline: 3px solid var(--akzent);
  outline-offset: 2px;
}

.folge {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
}

.folge__schritt,
.paare__zeile {
  display: grid;
  gap: 0.3rem;
}

.paare__auswahl {
  display: grid;
  gap: 0.75rem;
}

.folge__schritt select,
.paare__zeile select {
  width: 100%;
  min-height: var(--tastflaeche);
  padding: 0.4rem 0.6rem;
  font: inherit;
  color: inherit;
  background: var(--karte);
  border: 1.5px solid var(--tinte-leise);
  border-radius: 0.4rem;
}

.tippfeld {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  min-height: var(--tastflaeche);
  padding: 0.7rem 0.75rem;
  font: inherit;
  color: inherit;
  text-align: left;
  background: var(--karte);
  border: 1.5px solid var(--linie);
  border-radius: 0.55rem;
  cursor: pointer;
}

.tippfeld__nummer {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border: 1.5px dashed var(--tinte-leise);
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tippfeld--gewaehlt {
  border-color: var(--akzent);
}

.tippfeld--gewaehlt .tippfeld__nummer {
  color: var(--akzent-tinte);
  background: var(--akzent);
  border: 1.5px solid var(--akzent);
}

.tippfeld--offen {
  border-color: var(--akzent);
  box-shadow: inset 0 0 0 1.5px var(--akzent);
}

.paare__spalten {
  display: grid;
  grid-template-columns: minmax(6.5rem, 2fr) 3fr;
  gap: 0.6rem;
  align-items: start;
}

.paare__spalte {
  display: grid;
  gap: 0.6rem;
}

/* Ein Paar bekommt dieselbe Nummer und dieselbe Farbe: fünf Textmarker. */
.tippfeld.marker-1 .tippfeld__nummer {
  background: #ffe169;
  border-color: #ffe169;
}

.tippfeld.marker-2 .tippfeld__nummer {
  background: #a8e6a1;
  border-color: #a8e6a1;
}

.tippfeld.marker-3 .tippfeld__nummer {
  background: #ffb3c7;
  border-color: #ffb3c7;
}

.tippfeld.marker-4 .tippfeld__nummer {
  background: #a9d4ff;
  border-color: #a9d4ff;
}

.tippfeld.marker-5 .tippfeld__nummer {
  background: #ffc48a;
  border-color: #ffc48a;
}

.tippfeld[class*="marker-"] .tippfeld__nummer {
  color: #161a26;
}

/* ---- Die Auflösung --------------------------------------------------------------- */

.ergebnis {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
}

.ergebnis__zeichen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 700;
}

.ergebnis--voll {
  color: var(--gut);
}

.ergebnis--teil {
  color: var(--fast);
}

.ergebnis--falsch {
  color: var(--fehler);
}

.ergebnis__punkte {
  margin-left: auto;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--tinte);
}

.geloest {
  display: grid;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
}

.geloest > li {
  padding: 0.75rem 0.85rem;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-left: 4px solid var(--linie);
  border-radius: 0.4rem;
}

.geloest > li > * + * {
  margin-top: 0.4rem;
}

.geloest > li > p:first-child {
  display: flex;
  gap: 0.6rem;
}

.geloest__zeichen {
  flex: none;
  width: 1.3rem;
  font-weight: 700;
  text-align: center;
}

.geloest > .ist-richtig {
  border-left-color: var(--gut);
}

.ist-richtig .geloest__zeichen {
  color: var(--gut);
}

.geloest > .ist-falsch {
  border-left-color: var(--fehler);
}

.ist-falsch .geloest__zeichen {
  color: var(--fehler);
}

.geloest__marken,
.geloest__urteil {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  padding-left: 1.9rem;
  font-size: 0.925rem;
}

.warum {
  margin-left: 1.9rem;
  font-size: 0.925rem;
}

details.warum summary {
  display: flex;
  align-items: center;
  min-height: 2.4rem;
  color: var(--akzent);
  font-weight: 600;
  cursor: pointer;
}

.merkhilfe {
  padding: 0.7rem 0.85rem;
  border: 1px dashed var(--tinte-leise);
  border-radius: 0.4rem;
  font-size: 0.925rem;
}

.seite > .abschnitt {
  margin-top: 1.75rem;
  font-size: 0.95rem;
  color: var(--tinte-leise);
}

.seite > .abschnitt + * {
  margin-top: 0.5rem;
}

/* ---- Heute ------------------------------------------------------------------------ */

.balken {
  display: block;
  width: 100%;
  height: 0.7rem;
  border-radius: 1rem;
}

.balken--klein {
  height: 0.3rem;
  margin-bottom: 0.6rem;
}

.liste--mit-balken li {
  border-bottom: 0;
}

.liste--mit-balken a {
  padding-bottom: 0.3rem;
}

.aktionen form {
  display: flex;
  flex: none;
}

.balken__sitzt {
  fill: var(--akzent);
}

.balken__wackelt {
  fill: var(--akzent);
  opacity: 0.45;
}

.balken__luecke {
  fill: var(--tinte-leise);
  opacity: 0.55;
}

.balken__neu {
  fill: var(--linie);
}

.legende {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.15rem 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

/* Die Probe zeigt dieselbe Füllung wie der Balken. Was sie bedeutet, sagt das Wort daneben. */
.legende__probe {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  margin-right: 0.45rem;
  border-radius: 0.2rem;
  vertical-align: -0.05rem;
  background: var(--linie);
}

.legende__probe--sitzt {
  background: var(--akzent);
}

.legende__probe--wackelt {
  background: var(--akzent);
  opacity: 0.45;
}

.legende__probe--luecke {
  background: var(--tinte-leise);
  opacity: 0.55;
}

.attrappe {
  padding: 0.3rem 0.6rem;
  border: 1px dashed var(--tinte-leise);
  border-radius: 0.3rem;
  font-size: 0.8rem;
  color: var(--tinte-leise);
}

/* ---- Das Duell -------------------------------------------------------------------- */

/* Der Spielstand: je Seite der Name über der Zahl, darunter die Kopflinie. */
.spielstand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--akzent);
}

.spielstand__seite {
  display: grid;
  gap: 0.15rem;
}

.spielstand__seite--gegner {
  text-align: right;
}

.spielstand__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tinte-leise);
  font-size: 0.9rem;
  font-weight: 600;
}

.spielstand__zahl,
.spielstand__zu {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.spielstand__zu {
  color: var(--tinte-leise);
}

.seite > .spielstand__hinweis {
  margin-top: 0.35rem;
}

/* Das Raster der Runden: je Runde eine Zeile wie auf liniertem Papier. */
.raster {
  margin: 1rem 0 0;
  padding: 0 1rem;
  list-style: none;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: 0.4rem;
}

.raster__runde {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--linie);
}

.raster__runde:last-child {
  border-bottom: 0;
}

.raster__thema {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.raster__nummer {
  flex: none;
  min-width: 1.5rem;
  color: var(--akzent);
  font-variant-numeric: tabular-nums;
}

.raster__runde--offen .raster__thema {
  color: var(--tinte-leise);
  font-weight: 400;
}

.raster__reihen {
  display: grid;
  gap: 0.4rem;
  margin: 0.6rem 0 0 2.1rem;
}

.raster__reihen > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.raster__reihen dt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  color: var(--tinte-leise);
}

.raster__reihen dd {
  display: flex;
  gap: 0.4rem;
  margin: 0;
}

/* Eine Frage im Raster. Das Zeichen sagt, wie sie ausging; die Farbe hilft nur. */
.kaestchen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tastflaeche);
  height: var(--tastflaeche);
  border: 1.5px solid currentColor;
  border-radius: 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--tinte-leise);
}

.kaestchen--voll {
  color: var(--gut);
}

.kaestchen--teil {
  color: var(--fast);
}

.kaestchen--falsch {
  color: var(--fehler);
}

.kaestchen--offen {
  border-style: dashed;
  border-color: var(--linie);
  font-weight: 400;
}

.kaestchen--verdeckt {
  border-style: dotted;
}

.kaestchen--gestrichen {
  text-decoration: line-through;
  opacity: 0.6;
}

.kaestchen--klein {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.4rem;
  font-size: 0.8rem;
  vertical-align: middle;
}

.legende--raster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  color: var(--tinte-leise);
  font-size: 0.875rem;
}

/* Die Themen zur Wahl: jedes ein Knopf über die ganze Breite. */
.themen {
  display: grid;
  gap: 0.6rem;
}

.thema {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.9rem 1rem;
  font: inherit;
  text-align: left;
  color: var(--tinte);
  background: var(--karte);
  border: 1.5px solid var(--linie);
  border-left: 4px solid var(--akzent);
  border-radius: 0.4rem;
  cursor: pointer;
}

.thema__name {
  font-size: 1.1rem;
  line-height: 1.3;
}

.thema__bereich,
.thema__grund {
  font-size: 0.875rem;
  color: var(--tinte-leise);
}

.kurswahl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kurswahl a[aria-current="true"] {
  color: var(--akzent);
  border-color: var(--akzent);
  box-shadow: inset 0 0 0 1px var(--akzent);
}

.wahlen > legend {
  margin-bottom: 0.5rem;
  padding: 0;
}

.wahlen > legend.abschnitt {
  font-weight: 700;
}

/* Eine Schublade, die für sich steht (nicht unter einer Karte). */
.schublade--frei {
  border-top: 1px solid var(--linie);
}

.schublade--frei .schublade__inhalt {
  padding-left: 0;
}

/* ---- Hinweise der App, Durchsicht --------------------------------------------------- */

.hinweise {
  display: grid;
  gap: 0.4rem;
  padding: 0;
  list-style: none;
}

.hinweis {
  padding: 0.6rem 0.8rem;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-left: 4px solid var(--akzent);
  border-radius: 0.3rem;
}

.hinweis--error {
  border-left-color: var(--fehler);
}

/* Ein Verweis zum Abschreiben oder Kopieren. */
.verweis {
  padding: 0.6rem 0.7rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
  user-select: all;
  background: var(--papier);
  border: 1px dashed var(--tinte-leise);
  border-radius: 0.3rem;
}

.knopfreihe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.knopfreihe .knopf--haupt {
  width: auto;
}

.marken {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Einträge mit mehreren Zeilen, etwa Meldungen. */
.liste--block li {
  display: grid;
  gap: 0.2rem;
}

.liste__ruhig {
  display: block;
  padding: 0.6rem 0;
  color: var(--tinte-leise);
}

.feld textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font: inherit;
  color: var(--tinte);
  background: var(--karte);
  border: 1.5px solid var(--tinte-leise);
  border-radius: 0.5rem;
}

pre.quelltext {
  margin: 0;
  padding: 0.6rem 0.7rem;
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: 0.3rem;
}

pre.quelltext,
.feld textarea.quelltext {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre;
  overflow-x: auto;
}

/* ---- Fuß ---------------------------------------------------------------------- */

.rechtliches {
  display: flex;
  gap: 1.25rem;
  font-size: 0.875rem;
}

.rechtliches a {
  color: var(--tinte-leise);
  /* Tastfläche hoch genug, ohne die Zeile aufzublähen. */
  padding-block: 0.6rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
