/* Italiano v0.1 – hell, luftig, eine Akzentfarbe. Mobil zuerst (390 px). */
:root {
  --bg: #FBF7F3;
  --flaeche: #FFFFFF;
  --text: #222222;
  --grau: #717171;
  --grau-hell: #EFEAE5;
  --akzent: #E4572E;
  --akzent-dunkel: #C9461F;
  --akzent-weich: rgba(228, 87, 46, 0.10);
  --gut: #2E8B57;
  --gut-weich: rgba(46, 139, 87, 0.12);
  --fehl: #C23B2B;
  --fehl-weich: rgba(194, 59, 43, 0.10);
  --schatten: 0 6px 16px rgba(0, 0, 0, 0.08);
  --schatten-leicht: 0 2px 8px rgba(0, 0, 0, 0.06);
  --r: 20px;
  --r-klein: 16px;
  --kurve: cubic-bezier(.2, 0, 0, 1);
  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
  --seitenrand: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
/* Dezenter Himmel in der Akzentfarbe */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 320px;
  background: linear-gradient(180deg, rgba(228, 87, 46, 0.13) 0%, rgba(240, 150, 110, 0.06) 45%, rgba(251, 247, 243, 0) 100%);
  pointer-events: none;
  z-index: 0;
}
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; margin: 0; line-height: 1.2; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, a, select { touch-action: manipulation; font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
.icon { flex: none; display: block; }
.grau { color: var(--grau); }
.klein { font-size: 14px; }
.mittig { text-align: center; justify-content: center; }
.verborgen { display: none !important; }
.versteckt { display: none; }

/* Druck-Feedback */
.knopf, .rund, .note, .pille, .blase, .reiter, .lektion-karte, .laut-karte, .brocken-zeile,
.it-de-knopf, .mikro, .grosser-laut, .paar-wort, .bild-tipp {
  transition: transform 180ms var(--kurve), background-color 180ms var(--kurve), box-shadow 180ms var(--kurve);
}
.knopf:active, .rund:active, .note:active, .pille:active, .blase:active, .reiter:active, .lektion-karte:active,
.laut-karte:active, .brocken-zeile:active, .it-de-knopf:active, .mikro:active, .grosser-laut:active,
.paar-wort:active, .bild-tipp:active { transform: scale(.97); }
:focus-visible { outline: 3px solid rgba(228, 87, 46, .45); outline-offset: 2px; }

/* Seite */
.seite {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--oben) + 18px) var(--seitenrand) calc(96px + var(--unten));
  display: flex;
  flex-direction: column;
  gap: 16px;
  outline: none;
}
.kopf { padding: 14px 2px 6px; display: flex; flex-direction: column; gap: 6px; }
.unterzeile { color: var(--grau); font-size: 15px; }
.zurueck { color: var(--grau); font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; align-self: flex-start; }

/* Flächen */
.flaeche { background: var(--flaeche); border-radius: var(--r); box-shadow: var(--schatten); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.abschnitt { margin-top: 10px; padding: 0 2px; }
.abschnitt-zeile { margin-top: -12px; padding: 0 2px; }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  background: var(--flaeche); box-shadow: var(--schatten-leicht);
}
.knopf-primaer { background: var(--akzent); color: #fff; box-shadow: 0 6px 16px rgba(228, 87, 46, 0.28); }
.knopf-primaer:active { background: var(--akzent-dunkel); }
.knopf-leise { background: transparent; box-shadow: none; color: var(--grau); }
.knopf-klein { min-height: 44px; padding: 0 16px; font-size: 15px; font-weight: 500; }
.knopf.breit { width: 100%; }
.mittig-block { align-self: center; }
.knopfzeile { display: flex; gap: 10px; flex-wrap: wrap; }
.knopfzeile > .knopf { flex: 1 1 0; min-width: 0; }
.rund {
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--akzent-weich); color: var(--akzent);
}
.rund.leise { background: transparent; color: var(--text); }
.rund.klein { width: 44px; height: 44px; }
.rund.gross-laut { width: 72px; height: 72px; align-self: center; }
.link { color: var(--grau); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; align-self: center; font-size: 15px; }
.hoerknoepfe { display: flex; gap: 10px; justify-content: center; }

/* Reiterleiste */
.reiterleiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + var(--unten));
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.05);
}
.reiter {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 52px; color: var(--grau); font-size: 11px; font-weight: 500;
}
.reiter.aktiv { color: var(--akzent); font-weight: 600; }
body.in-sitzung .reiterleiste { display: none; }
body.in-sitzung { overflow: hidden; }

/* Heute */
.held h2 { font-size: 24px; }
.bloecke { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.block-zeile, .bald { display: flex; align-items: center; gap: 14px; min-height: 56px; }
.bald { flex-direction: row; }
.block-zeile.gedimmt { opacity: .55; }
.block-symbol { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--grau-hell); color: var(--text); flex: none; }
.block-text { display: flex; flex-direction: column; min-width: 0; }
.bald { opacity: .5; box-shadow: var(--schatten-leicht); cursor: not-allowed; }
.kennzahl { gap: 2px; padding: 16px; }
.kennzahl strong { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.kennzahl-symbol { color: var(--akzent); margin-bottom: 6px; }

/* Sitzung (Vollbild) */
.sitzung {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; flex-direction: column;
  padding: calc(var(--oben) + 8px) 0 0;
}
.sitzung::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 260px; pointer-events: none;
  background: linear-gradient(180deg, rgba(228, 87, 46, 0.10), rgba(251, 247, 243, 0));
}
.sitzung > * { position: relative; }
.sitzung-kopf { display: flex; align-items: center; gap: 10px; padding: 0 16px 0 8px; }
.segmente { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.segment { height: 6px; border-radius: 999px; background: var(--grau-hell); overflow: hidden; }
.segment.leer { opacity: .5; }
.segment-fuellung { height: 100%; width: 0; background: var(--akzent); border-radius: inherit; transition: width 300ms var(--kurve); }
.sitzung-block { text-align: center; color: var(--grau); font-size: 14px; padding: 8px 0 0; }
.sitzung-inhalt { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px var(--seitenrand) 24px; }
.sitzung-aktionen {
  padding: 12px var(--seitenrand) calc(14px + var(--unten));
  background: linear-gradient(180deg, rgba(251, 247, 243, 0), var(--bg) 30%);
}
.sitzung-aktionen .knopfzeile > .knopf { flex: 1 1 0; }
.aktionen-stapel { display: flex; flex-direction: column; gap: 10px; }
.schritt { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.etikett {
  align-self: center; font-size: 13px; font-weight: 600; color: var(--akzent);
  background: var(--akzent-weich); border-radius: 999px; padding: 4px 12px;
}
.aufgabe { text-align: center; color: var(--grau); font-size: 16px; }
.bild { font-size: 96px; line-height: 1.1; text-align: center; min-height: 110px; display: grid; place-items: center; }
.bild-tipp { width: 100%; }
.grosser-laut {
  width: 132px; height: 132px; border-radius: 50%; align-self: center;
  display: grid; place-items: center; background: var(--flaeche); color: var(--akzent); box-shadow: var(--schatten);
}
.it-gross { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; text-align: center; line-height: 1.2; }
.de-gross { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; text-align: center; }
.de { color: var(--grau); }
.intro-text { display: flex; flex-direction: column; gap: 10px; }

/* Italienisch mit Deutsch direkt darunter */
.it-de { display: flex; flex-direction: column; gap: 2px; text-align: left; min-height: 44px; justify-content: center; }
.it-de .it { font-weight: 500; }
.de-unter { color: var(--grau); font-size: 14px; font-weight: 400; line-height: 1.3; }
.it-de .de-unter { font-size: 15px; }
.it-de.gross { align-items: center; text-align: center; padding: 8px; gap: 6px; }
.it-de.gross .it { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.it-de.gross .de-unter { font-size: 17px; }

.beispiel { display: flex; align-items: center; gap: 12px; background: var(--flaeche); border-radius: var(--r-klein); padding: 10px 14px; box-shadow: var(--schatten-leicht); }
.beispiel .it { font-weight: 500; }

/* Bewertung */
.noten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.note {
  min-height: 60px; border-radius: 18px; background: var(--flaeche); box-shadow: var(--schatten-leicht);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px;
}
.note-name { font-size: 15px; font-weight: 600; }
.note-zeit { font-size: 12px; color: var(--grau); }
.note-haupt { background: var(--akzent); color: #fff; box-shadow: 0 6px 16px rgba(228, 87, 46, 0.28); }
.note-haupt .note-zeit { color: rgba(255, 255, 255, .85); }

/* Muster */
.muster-zeile { display: flex; align-items: center; gap: 12px; padding: 4px 0; border-radius: 12px; transition: background-color 200ms var(--kurve); }
.muster-zeile .it { font-weight: 500; }
.muster-zeile.spielt, .blase.spielt { background: var(--akzent-weich); }
.regel { background: var(--akzent-weich); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.regel .etikett { align-self: flex-start; background: #fff; }
.regel p { font-size: 17px; font-weight: 500; }
.muster-karte strong { font-size: 17px; font-weight: 600; }

/* Dialog */
.chat { display: flex; flex-direction: column; gap: 10px; }
.blase {
  max-width: 86%; align-self: flex-start; text-align: left;
  background: var(--flaeche); box-shadow: var(--schatten-leicht);
  border-radius: 18px 18px 18px 6px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-height: 44px;
}
.blase-tom { align-self: flex-end; background: var(--akzent-weich); box-shadow: none; border-radius: 18px 18px 6px 18px; }
.blase .wer { font-size: 12px; font-weight: 600; color: var(--grau); }
.blase .it { font-size: 17px; }
.blase .de { font-size: 14px; }

/* Frage */
.frage-box { flex-direction: row; align-items: center; gap: 14px; }
.frage-box .it-de .it { font-size: 19px; }
.tipp { background: var(--grau-hell); border-radius: var(--r-klein); padding: 12px 16px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 500; }
.chip-ja { background: var(--gut-weich); color: var(--gut); }
.chip-nein { background: var(--fehl-weich); color: var(--fehl); }
.antwort-ergebnis, .nachsprech-ergebnis { display: flex; flex-direction: column; gap: 10px; }

/* Nachsprechen */
.nachsprechen { display: flex; flex-direction: column; gap: 10px; }
.mikro-zeile { display: flex; align-items: center; gap: 14px; justify-content: center; }
.mikro-zeile.senkrecht { flex-direction: column; gap: 8px; }
.mikro {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--flaeche); color: var(--akzent); box-shadow: var(--schatten);
}
.mikro.gross { width: 88px; height: 88px; }
.mikro.aktiv { background: var(--akzent); color: #fff; animation: puls 1.2s var(--kurve) infinite; }
@keyframes puls { 0% { box-shadow: 0 0 0 0 rgba(228, 87, 46, .45); } 100% { box-shadow: 0 0 0 18px rgba(228, 87, 46, 0); } }
.mikro-status { color: var(--grau); font-size: 15px; }
.woerter { font-size: 20px; font-weight: 600; text-align: center; line-height: 1.6; }
.woerter span { border-radius: 8px; padding: 0 2px; }
.getroffen { color: var(--gut); background: var(--gut-weich); }
.verfehlt { color: var(--fehl); background: var(--fehl-weich); text-decoration: underline wavy rgba(194, 59, 43, .5); text-underline-offset: 4px; }
.erkannt { color: var(--grau); font-size: 14px; text-align: center; }
.urteil { font-size: 15px; text-align: center; border-radius: var(--r-klein); padding: 10px 14px; }
.urteil-super { background: var(--gut-weich); color: var(--gut); }
.urteil-fast { background: #FFF3E6; color: #8A5A1C; }
.urteil-nochmal { background: var(--fehl-weich); color: var(--fehl); }
.selbst { display: flex; flex-direction: column; gap: 10px; }
.selbst-noten { grid-template-columns: repeat(3, 1fr); }
.selbst-noten .note { min-height: 50px; }
.vergleich-zeile { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.vergleich-zeile .knopf { min-width: 128px; }
.knopf-du { color: var(--akzent); }
.mikro-hinweis { background: #FFF3E6; color: #8A5A1C; border-radius: var(--r-klein); padding: 12px 14px; font-size: 14px; line-height: 1.4; text-align: left; }
.paar-sprechen .mikro-hinweis { font-size: 12px; padding: 8px 10px; }
.paar-sprechen .selbst-noten { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.paar-sprechen .selbst-noten .note { min-height: 44px; }
.paar-sprechen .vergleich-zeile .knopf { min-width: 0; width: 100%; }
.version { text-align: center; color: var(--grau); font-size: 13px; padding: 4px 0 8px; }

/* Ende */
.ende { text-align: center; }
.liste-kompakt { gap: 0; padding: 6px 18px; text-align: left; }
.liste-kompakt .zeile { display: flex; justify-content: space-between; min-height: 44px; align-items: center; }
.liste-kompakt .zeile + .zeile { box-shadow: 0 -1px 0 var(--grau-hell); }

/* Lernen */
.lektionen, .laute { display: flex; flex-direction: column; gap: 12px; }
.lektion-karte { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; }
.lektion-bild { font-size: 34px; width: 56px; height: 56px; border-radius: 16px; background: var(--grau-hell); display: grid; place-items: center; flex: none; }
.lektion-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.lektion-text strong { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.lektion-stand { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.lektion-stand .balken { flex: 1; }
.balken { height: 6px; border-radius: 999px; background: var(--grau-hell); overflow: hidden; }
.balken-fuellung { height: 100%; background: var(--akzent); border-radius: inherit; }
.liste { padding: 4px 8px; gap: 0; }
.brocken-zeile { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px; text-align: left; border-radius: 12px; }
.brocken-zeile + .brocken-zeile { box-shadow: 0 -1px 0 var(--grau-hell); }
.brocken-bild { font-size: 26px; width: 36px; text-align: center; flex: none; }
.brocken-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.brocken-text .it { font-weight: 500; }
.punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); flex: none; }

/* Aussprache */
.laute { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.laut-karte { gap: 6px; padding: 16px; min-height: 132px; }
.laut-karte strong { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.laut-zeichen { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.laut-zeichen.gross { font-size: 34px; }
.tipp-karte p { font-size: 16px; }
.pillen { display: flex; flex-wrap: wrap; gap: 10px; }
.pille { min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--flaeche); box-shadow: var(--schatten-leicht); font-size: 16px; font-weight: 500; }
.pille.gross { min-height: 56px; min-width: 120px; font-size: 20px; font-weight: 600; }
.pille.mit-de { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 6px 18px; line-height: 1.25; }
.pille.mit-de .de-unter { font-size: 12px; }
.pille.gross.mit-de .de-unter { font-size: 13px; }
.pille.richtig { background: var(--gut-weich); color: var(--gut); }
.pille.falsch { background: var(--fehl-weich); color: var(--fehl); }
.paar { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px 14px; }
.paar-seite { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; }
.paar-trenner { color: var(--grau); align-self: center; transform: rotate(90deg); line-height: 1; }
.paar-wort { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 999px; background: var(--akzent-weich); color: var(--akzent); font-size: 20px; font-weight: 600; }
.paar-wort span { color: var(--text); }
.paar-sprechen { width: 100%; }
.paar-sprechen .woerter { font-size: 18px; }
.paar-sprechen .mikro { width: 52px; height: 52px; }
.paar-sprechen .mikro-zeile { flex-direction: column; gap: 4px; }
.hoertest { text-align: center; align-items: stretch; }
.hoertest-ergebnis { font-size: 18px; }

/* Fortschritt */
.grosse-zahl { align-items: center; text-align: center; gap: 4px; padding: 26px 18px; }
.grosse-zahl strong { font-size: 76px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--akzent); }
.grosse-zahl > span:nth-child(2) { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.niveau-skala { display: flex; justify-content: space-between; font-weight: 600; color: var(--grau); }
.niveau-skala .aktiv { color: var(--akzent); }
.wochenbalken { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; }
.tag { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.tag-wert { min-height: 18px; font-size: 12px; }
.tag-saeule { flex: 1; width: 100%; max-width: 30px; border-radius: 10px; background: var(--grau-hell); display: flex; align-items: flex-end; overflow: hidden; }
.tag-fuellung { width: 100%; background: rgba(228, 87, 46, .45); border-radius: 10px; min-height: 0; }
.tag.heute .tag-fuellung { background: var(--akzent); }
.tag-name { font-size: 12px; color: var(--grau); }
.tag.heute .tag-name { color: var(--akzent); font-weight: 600; }
.auswahl {
  min-height: 48px; border-radius: 14px; border: 0; background: var(--grau-hell); padding: 0 14px; font-size: 16px;
  appearance: none; -webkit-appearance: none; width: 100%;
}

/* Meldung */
.meldung {
  position: fixed; left: 50%; bottom: calc(92px + var(--unten)); z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; max-width: calc(100% - 40px);
  background: #222; color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 15px;
  transition: opacity 250ms var(--kurve), transform 250ms var(--kurve);
}
.meldung.sichtbar { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 40px 20px; text-align: center; }

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