/* ============================================================================
   English Reboot — Lern-App-Ansichten
   Ergänzt style.css um die App-spezifischen Bereiche.
   ============================================================================ */

.app-body { background: var(--bg-hell); min-height: 100dvh; }

.ansicht { min-height: 100dvh; display: flex; flex-direction: column; }
.ansicht[hidden] { display: none; }

/* ------------------------------------------------------------------- Auth -- */
.auth {
  max-width: 25rem; margin: auto; padding: 3rem 1.5rem 4rem; width: 100%;
}
.auth-mark { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.brand-mark.gross { width: 52px; height: 52px; font-size: 1.1rem; border-radius: 6px; }
.auth-titel { font-size: 1.9rem; text-align: center; margin-bottom: .4rem; }
.auth-unter { text-align: center; color: var(--text-leise); font-size: .95rem; margin-bottom: 2rem; }

.auth-tabs {
  display: flex; gap: .3rem; padding: .25rem; margin-bottom: 1.6rem;
  background: var(--bg-karte); border: 1px solid var(--linie); border-radius: var(--radius);
}
.auth-tab {
  flex: 1; padding: .55rem; border: 0; border-radius: 3px; cursor: pointer;
  background: transparent; font-size: .93rem; font-family: var(--sans);
  color: var(--text-leise); transition: background .15s, color .15s;
}
.auth-tab.aktiv { background: var(--akzent); color: #fff; }

.feld { margin-bottom: 1rem; }
.feld label {
  display: block; font-size: .83rem; font-weight: 600; margin-bottom: .35rem;
  color: var(--text-leise); letter-spacing: .02em;
}
.feld input {
  width: 100%; padding: .72rem .9rem; font-size: 1rem; font-family: var(--sans);
  border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--bg-karte); color: var(--text);
}
.feld input:focus { outline: 2px solid var(--akzent); outline-offset: -1px; border-color: transparent; }

.btn-breit { width: 100%; margin-top: .5rem; }
.auth-hinweis { margin-top: .9rem; font-size: .88rem; color: #a8563f; min-height: 1.2em; }
.auth-klein {
  margin-top: 2rem; padding-top: 1.3rem; border-top: 1px solid var(--linie);
  font-size: .82rem; color: var(--text-leise); line-height: 1.5;
}

/* --------------------------------------------------------------- App-Bar -- */
.app-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1.1rem;
  background: rgba(247,245,241,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linie);
}
.app-zurueck, .app-icon {
  flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center;
  background: none; border: 1px solid var(--linie); border-radius: var(--radius);
  font-size: 1.05rem; cursor: pointer; color: var(--text);
}
.app-icon { font-size: .95rem; }
.app-titel { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }

.app-fortschritt { flex: 1; display: flex; align-items: center; gap: .7rem; }
.app-balken {
  flex: 1; height: 6px; border-radius: 3px; overflow: hidden; background: var(--linie);
}
.app-balken-fuell {
  height: 100%; width: 0; background: var(--akzent);
  transition: width .35s ease;
}
.app-zaehler {
  font-family: var(--mono); font-size: .78rem; color: var(--text-leise);
  white-space: nowrap;
}

/* ------------------------------------------------------------- Lernbereich -- */
.lern-bereich {
  flex: 1; width: 100%; max-width: 34rem; margin: 0 auto;
  padding: 1.4rem 1.1rem 6rem;
}

.karte-gross {
  background: var(--bg-karte); border-radius: var(--radius);
  border-top: 4px solid var(--kat-farbe, var(--akzent));
  box-shadow: var(--schatten); overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 24rem;
}
.karte-kopf {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: .9rem 1.2rem; border-bottom: 1px solid var(--linie);
}
.karte-kat {
  font-size: .7rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--kat-farbe, var(--akzent));
}
.karte-funktion { font-size: .78rem; color: var(--text-leise); }

.karte-buehne {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 2rem 1.4rem; text-align: center;
}

.frage-label {
  font-size: .74rem; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-leise); margin-bottom: 1.1rem;
}
.frage-gross {
  font-family: var(--serif); font-size: clamp(1.5rem, 5vw, 2.1rem);
  line-height: 1.25;
}
.situation-text {
  font-family: var(--serif); font-size: 1.25rem; font-style: italic;
  line-height: 1.5; color: var(--text);
}

.antwort-gross {
  font-family: var(--serif); font-size: clamp(1.6rem, 5.5vw, 2.2rem);
  color: var(--kat-farbe, var(--akzent)); margin-bottom: .6rem;
}
.antwort-deutsch { font-size: 1.05rem; color: var(--text); margin-bottom: .4rem; }
.antwort-bedeutung { font-size: .93rem; color: var(--text-leise); margin-bottom: 1.2rem; }
.antwort-block {
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--linie);
  text-align: left;
}
.antwort-label {
  display: block; font-size: .7rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-leise); margin-bottom: .35rem;
}
.antwort-block p { font-size: .95rem; line-height: 1.5; }
.variation { color: var(--akzent); font-size: .92rem; }

.karte-fuss {
  padding: 1rem 1.2rem 1.2rem; border-top: 1px solid var(--linie);
}
.karte-fuss .btn { width: 100%; }

.bewertung { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.bewertung button {
  padding: .72rem .5rem; border-radius: var(--radius); cursor: pointer;
  font-family: var(--sans); font-size: .9rem; font-weight: 500;
  border: 1px solid var(--linie); background: var(--bg-karte); color: var(--text);
  transition: background .15s, border-color .15s;
}
.bew-wieder { border-color: #d8a99a; color: #a8563f; }
.bew-wieder:hover { background: #fdf2ee; }
.bew-gut { border-color: #9dc4bb; color: var(--akzent); }
.bew-gut:hover { background: #f0f7f5; }
.bew-leicht { border-color: #b9a8e0; color: #6b4fc4; }
.bew-leicht:hover { background: #f5f2fd; }

.lern-hinweis {
  margin-top: 1.1rem; text-align: center; font-size: .82rem; color: var(--text-leise);
}

/* ------------------------------------------------------------- App-Nav -- */
.app-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(247,245,241,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--linie);
  padding-bottom: env(safe-area-inset-bottom);
}
.app-nav-item {
  padding: 1rem .5rem; border: 0; background: none; cursor: pointer;
  font-family: var(--sans); font-size: .85rem; color: var(--text-leise);
}
.app-nav-item.aktiv { color: var(--akzent); font-weight: 600; }

/* ---------------------------------------------------------- Fortschritt -- */
.metriken {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem;
  margin-bottom: 2rem;
}
.metrik-klein {
  padding: 1rem .6rem; text-align: center; background: var(--bg-karte);
  border: 1px solid var(--linie); border-radius: var(--radius);
}
.metrik-klein span {
  display: block; font-family: var(--serif); font-size: 1.6rem; line-height: 1.1;
}
.metrik-klein label {
  display: block; font-size: .74rem; color: var(--text-leise); margin-top: .25rem;
}

.abschnitt-titel {
  font-family: var(--sans); font-size: .82rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--text-leise);
  margin: 2rem 0 .9rem;
}

.fs-item { margin-bottom: .9rem; }
.fs-kopf {
  display: flex; justify-content: space-between; font-size: .92rem;
  margin-bottom: .35rem;
}
.fs-zahl { font-family: var(--mono); font-size: .8rem; color: var(--text-leise); }
.fs-balken { height: 5px; border-radius: 3px; overflow: hidden; background: var(--linie); }
.fs-fuell { height: 100%; background: var(--kat-farbe, var(--akzent)); transition: width .3s; }

/* ---------------------------------------------------------------- Liste -- */
.filter {
  display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .9rem;
  margin-bottom: 1rem; scrollbar-width: none;
}
.filter::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: .45rem .85rem; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--linie); background: var(--bg-karte);
  font-family: var(--sans); font-size: .82rem; color: var(--text-leise);
  white-space: nowrap;
}
.chip.aktiv { background: var(--text); color: #fff; border-color: var(--text); }

.liste-item {
  display: flex; align-items: center; gap: .9rem;
  padding: .8rem .9rem; margin-bottom: .5rem;
  background: var(--bg-karte); border-radius: var(--radius);
  border-left: 3px solid var(--kat-farbe, var(--akzent));
  box-shadow: var(--schatten);
}
.liste-item.gelernt { background: #f2f8f6; }
.liste-item.teilweise { background: #fdfaf3; }
.liste-rang {
  flex: 0 0 2.2rem; font-family: var(--mono); font-size: .78rem;
  color: var(--text-leise); text-align: right;
}
.liste-text { flex: 1; min-width: 0; }
.liste-text strong { display: block; font-size: .98rem; font-weight: 500; }
.liste-sub { display: block; font-size: .76rem; color: var(--text-leise); }
.liste-box {
  flex: 0 0 auto; font-family: var(--mono); font-size: .72rem; color: var(--text-leise);
}

/* --------------------------------------------------------------- Profil -- */
.profil-box {
  padding: 1.4rem; margin-bottom: 1.2rem;
  background: var(--bg-karte); border: 1px solid var(--linie); border-radius: var(--radius);
}
.profil-name { font-family: var(--serif); font-size: 1.4rem; margin-bottom: .2rem; }
.profil-mail { font-size: .92rem; color: var(--text-leise); margin-bottom: .6rem; }
.profil-seit, .profil-stat { font-size: .85rem; color: var(--text-leise); }
.btn-breit + .btn-breit { margin-top: .6rem; }

@media (max-width: 420px) {
  .metriken { grid-template-columns: repeat(2, 1fr); }
  .karte-buehne { padding: 1.5rem 1.1rem; }
}

/* ============================================================================
   Wichtig: `hidden` muss display-Regeln ueberschreiben.
   Ohne diese Regel blieben `.bewertung` (display:grid) und andere Elemente
   mit explizitem display trotz `hidden` sichtbar — die Bewertungsknoepfe
   standen gleichzeitig mit "Aufdecken" auf dem Schirm.
   ============================================================================ */
[hidden] { display: none !important; }

/* Dialoge in Beispiel- und Situationsblöcken */
.dialog-zeile {
  padding-left: .9rem; border-left: 2px solid var(--linie);
  margin-bottom: .4rem; font-size: .94rem; line-height: 1.45;
}
.dialog-zeile:last-child { margin-bottom: 0; }

/* ============================================================================
   Handy-Korrekturen
   Auf kleinen Bildschirmen lief der Karteninhalt unter die feste untere
   Navigation (VARIATION war abgeschnitten). Ausserdem braucht der
   Lernbereich unten genug Platz, damit die Knoepfe immer erreichbar sind.
   ============================================================================ */
.lern-bereich {
  /* Hoehe der unteren Navigation + Sicherheitsabstand (iOS-Notch) */
  padding-bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px));
}

/* Die Karte darf nicht hoeher als der sichtbare Bereich werden —
   sonst rutschen Aufdecken/Bewerten aus dem Bild. */
.karte-gross { min-height: 0; }

@media (max-width: 430px) {
  .karte-buehne { padding: 1.3rem 1.1rem; }
  .antwort-gross { font-size: 1.6rem; }
  .antwort-block { margin-top: .8rem; padding-top: .8rem; }
  .dialog-zeile { font-size: .9rem; margin-bottom: .3rem; }
  .karte-fuss { padding: .85rem 1rem 1rem; }
  /* Der Lernbereich bekommt unten den Platz, den die Navigation braucht */
  .lern-bereich { padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
}

/* Kurze Bildschirme (iPhone SE): kompakter, damit die Knoepfe sichtbar bleiben */
@media (max-height: 700px) {
  .lern-bereich { padding: 1rem .9rem calc(5.6rem + env(safe-area-inset-bottom, 0px)); }
  .karte-buehne { padding: 1.1rem 1rem; }
  .frage-gross { font-size: 1.35rem; }
  .situation-text { font-size: 1.1rem; }
}

/* ============================================================================
   Übungs-Mechanik
   Statt "Aufdecken" echte Aufgaben: Auswahl, Eingabe, Lückentext, Situation.
   ============================================================================ */

.frage-hinweis {
  margin-top: .9rem; font-size: .92rem; color: var(--text-leise);
  font-style: italic;
}

/* --- Multiple Choice --- */
.optionen { display: grid; gap: .5rem; margin-top: 1.4rem; }
.option {
  padding: .8rem 1rem; text-align: left; cursor: pointer;
  border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--bg-karte); font-family: var(--sans); font-size: .97rem;
  color: var(--text); transition: border-color .12s, background .12s;
}
.option:hover:not(:disabled) { border-color: var(--kat-farbe, var(--akzent)); }
.option:disabled { cursor: default; }
.option.richtig {
  border-color: #2E7D6F; background: #edf7f4; color: #1d5b50;
  font-weight: 500;
}
.option.falsch {
  border-color: #c0705c; background: #fdf1ed; color: #8f4433;
  text-decoration: line-through;
}

/* --- Zuordnen (zwei Spalten, nur klicken) --- */
.zuordnen {
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  margin-top: 1.2rem;
}
.zspalte { display: grid; gap: .5rem; align-content: start; }
.zkarte {
  padding: .75rem .7rem; cursor: pointer; text-align: center;
  border: 1px solid var(--linie); border-radius: var(--radius);
  background: var(--bg-karte); font-family: var(--sans);
  font-size: .92rem; color: var(--text); line-height: 1.3;
  transition: border-color .12s, background .12s, transform .1s;
  word-break: break-word;
}
.zkarte:active:not(:disabled) { transform: scale(.97); }
.zkarte.gewaehlt {
  border-color: var(--kat-farbe, var(--akzent));
  border-width: 2px; padding: calc(.75rem - 1px) calc(.7rem - 1px);
}
.zkarte.geloest {
  border-color: #2E7D6F; background: #edf7f4; color: #1d5b50;
  opacity: .55; cursor: default;
}
.zkarte.falschpaar {
  border-color: #c0705c; background: #fdf1ed;
  animation: wackeln .3s;
}
@keyframes wackeln {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.aufgabe-hinweis {
  margin-top: 1rem; font-size: .88rem; color: var(--text-leise);
  font-style: italic;
}

/* --- Kartenfuß --- */
.fuss-reihe { display: flex; gap: .5rem; justify-content: center; }
.btn-klein { padding: .55rem 1rem; font-size: .88rem; }
.weiter-reihe { display: flex; align-items: center; gap: .8rem; }
.weiter-reihe .btn-breit { flex: 1; }
.serie-badge {
  flex: 0 0 auto; padding: .4rem .7rem; border-radius: 100px;
  background: #fdf2dc; color: #92610a; font-size: .78rem; font-weight: 600;
  white-space: nowrap;
}

/* --- Rückmeldung --- */
.rueckmeldung {
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem .9rem; margin-bottom: 1.1rem; border-radius: var(--radius);
  font-size: .95rem;
}
.rueckmeldung.gut { background: #edf7f4; color: #1d5b50; }
.rueckmeldung.schlecht { background: #fdf1ed; color: #8f4433; }
.rueckmeldung.neutral { background: #f4f1ec; color: var(--text-leise); }
.rm-zeichen { font-weight: 700; font-size: 1.1rem; }
.rm-text { flex: 1; }
.rm-punkte {
  font-family: var(--mono); font-size: .85rem; font-weight: 600;
  padding: .15rem .5rem; border-radius: 3px; background: rgba(46,125,111,.14);
}
.rm-vergleich {
  margin: -.6rem 0 1rem; font-size: .9rem; color: #8f4433;
}
.rm-vergleich s { text-decoration-thickness: 1px; }

/* --- Punkte in der App-Bar --- */
.app-punkte {
  flex: 0 0 auto; min-width: 42px; padding: .35rem .6rem;
  border: 1px solid var(--linie); border-radius: var(--radius);
  text-align: center;
}
.punkte-zahl {
  font-family: var(--mono); font-size: .88rem; font-weight: 600;
  color: var(--akzent);
}

/* --- Statistik im Fortschritt --- */
.spiel-stat {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .7rem; margin-bottom: 2rem;
}
.spiel-kachel {
  padding: 1rem .7rem; text-align: center; background: var(--bg-karte);
  border: 1px solid var(--linie); border-radius: var(--radius);
}
.spiel-kachel span {
  display: block; font-family: var(--serif); font-size: 1.7rem; line-height: 1.1;
  color: var(--akzent);
}
.spiel-kachel label {
  display: block; font-size: .74rem; color: var(--text-leise); margin-top: .25rem;
}
