/* lenguami.app: Aufbau der Seite. Bausteine (Karten, Knöpfe, Chips, Rückmeldung) stehen in ds.css aus dem
   Lenguami Design System, Farben und Maße in tokens.css. Hier nur, was die Seite zusätzlich braucht:
   Spalte, Leiste unten, Eingabefelder als echte Felder, Lücke im Satz, Tabellen in „Kurz erklärt“. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.seite { max-width: 600px; margin: 0 auto; padding: var(--space-l) var(--space-xl) calc(110px + env(safe-area-inset-bottom)); display: grid; gap: var(--space-xxl); }
.seite.einheit { padding-bottom: calc(96px + env(safe-area-inset-bottom)); gap: var(--space-l); }
.abschnitt { display: grid; gap: var(--space-m); min-width: 0; }
.abschnitt > .kopf { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-m); }
.reihe { display: flex; align-items: center; gap: var(--space-m); min-width: 0; }
.reihe.oben { align-items: flex-start; }
.reihe .wachsen { flex: 1; min-width: 0; }
.stapel { display: grid; gap: var(--space-s); min-width: 0; }
.stapel.eng { gap: var(--space-xs); }
.umbruch { white-space: pre-line; }
.ink { color: var(--ink); }
.tief { color: var(--companion-deep); }
.fett { font-weight: 600; }
.mittig { text-align: center; justify-items: center; }
.zentriert { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: var(--space-l); text-align: center; padding: var(--space-xl); }
.lm-row.klick { cursor: pointer; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; font: inherit; color: inherit; }
.lm-row.klick:first-child { border-top: 0; }

/* Wortmarke */
.lm-word.gross { font-size: 44px; }
.lm-word.mittel { font-size: 24px; }

/* Companion-Bild: das SVG aus dem Kern bringt Sonne und Ring selbst mit */
.bild { display: block; flex: none; border-radius: 50%; }
.bild svg { display: block; width: 100%; height: 100%; }
.bild.l { width: 152px; height: 152px; }
.bild.m { width: 88px; height: 88px; }
.bild.s { width: 40px; height: 40px; }
.bild.tab { width: 27px; height: 27px; }

/* Sprechzeile */
.lm-say .bub p + p { margin-top: var(--space-xs); }
.lm-say.klein { gap: var(--space-m); align-items: center; }
.lm-say.klein .bub { background: none; padding: 0; }

/* Eingabe */
.feld { width: 100%; height: var(--size-field); border: 0; border-radius: var(--radius-field); background: var(--background); box-shadow: inset 0 0 0 1.5px var(--line); padding: 0 14px; font: inherit; font-size: 20px; color: var(--ink); outline: none; }
.feld::placeholder { color: var(--mute); }
.feld:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.feld.ok { box-shadow: inset 0 0 0 2px var(--progress); }
.feld.fix { box-shadow: inset 0 0 0 2px var(--correction); }
.feld:disabled { opacity: 1; -webkit-text-fill-color: var(--ink); }

/* Lücke im Satz (Wörter, Formen, Kurz erklärt) */
.satz { font-size: 20px; line-height: 32px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.satz .luecke { display: inline-block; vertical-align: baseline; min-width: 110px; max-width: 100%; height: 36px; margin: 0 2px; padding: 0 8px; border: 0; border-radius: 8px 8px 0 0; background: var(--fill); box-shadow: inset 0 -3px 0 var(--companion); font: inherit; color: var(--ink); outline: none; }
.satz .luecke:focus-visible { box-shadow: inset 0 -3px 0 var(--ink); }
.satz .loesung { font-weight: 700; padding: 0 2px; box-shadow: inset 0 -3px 0 currentColor; }
.satz .loesung.ok { color: var(--progress-text); }
.satz .loesung.fix { color: var(--correction-text); }
.satz .strich { color: var(--companion-deep); font-weight: 700; }
.szene-wort { font-weight: 700; text-decoration: underline dotted 2px; text-underline-offset: 4px; }
.ok-text { color: var(--progress-text); }
.markiert { font-weight: 700; color: var(--companion-deep); text-decoration: underline 2px var(--companion-deep); text-underline-offset: 4px; }
.lm-diff.extra { text-decoration-line: line-through; }

/* Kopf der Einheit und der Schritte */
.kopfzeile { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-m); }
.fortschritt-runde { width: 120px; flex: none; padding-top: 9px; }
.sticky-unten { position: fixed; left: 0; right: 0; bottom: 0; padding: var(--space-s) var(--space-xl) calc(var(--space-m) + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--background) 70%, transparent); z-index: 5; }
.sticky-unten > div { max-width: 600px; margin: 0 auto; display: grid; gap: var(--space-s); }

/* Auswahl */
.wahl { display: grid; gap: var(--space-s); }
.wahl.zwei { grid-template-columns: 1fr 1fr; }
.wahl .lm-btn { height: auto; min-height: var(--size-button); padding: 10px 16px; line-height: 1.25; }
.wahl .lm-btn.richtig { box-shadow: inset 0 0 0 2px var(--progress); }
.lm-btn.second:disabled { background: var(--fill); color: var(--ink); opacity: .75; }
.lm-btn.rand { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }

/* Heute (D184): Karten je Lernmodus, Dein Weg, Hauptaktion über der Leiste */
.seite.mit-aktion { padding-bottom: calc(184px + env(safe-area-inset-bottom)); }
h2.headline, h2.subheadline, h2.footnote, h2.title3 { margin: 0; }
.modus { padding: 0; overflow: hidden; }
.modus-kopf { display: flex; align-items: flex-start; gap: var(--space-m); padding: var(--space-l); }
.modus .zeilen > .lm-row:first-child { border-top: 1px solid var(--line); }
.modus .warum { color: var(--companion-deep); }
.modus .heute-dabei { gap: var(--space-s); padding: 0 var(--space-l) var(--space-m); }
.modus .heute-dabei .lm-chip { cursor: pointer; }
.modus .warum .tx { color: var(--companion-deep); }
.aktion-unten { position: fixed; left: 0; right: 0; bottom: calc(12px + 62px + 10px + env(safe-area-inset-bottom)); padding: 0 var(--space-xl); z-index: 9; pointer-events: none; }
.aktion-unten > div { max-width: 600px; margin: 0 auto; pointer-events: auto; }
.weg { display: flex; align-items: flex-start; width: 100%; }
.weg .station { display: grid; justify-items: center; gap: 2px; flex: none; }
.weg .station b { font-weight: 700; width: 12px; text-align: center; overflow: visible; white-space: nowrap; display: flex; justify-content: center; }
.weg .strecke { flex: 1; min-width: 4px; height: 2px; margin-top: 10px; background: var(--line); }
.weg .strecke.fertig { background: var(--progress); }
.weg .punkt { display: block; width: 12px; height: 12px; margin: 5px 0; border-radius: 50%; }
.weg .punkt.fertig { background: var(--progress); }
.weg .punkt.bekannt { background: var(--progress-tint); box-shadow: inset 0 0 0 1.5px var(--progress); }
.weg .punkt.offen { background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.weg .punkt.jetzt { width: 22px; height: 22px; margin: 0; background: var(--companion); box-shadow: 0 0 0 4px var(--companion-ring); }
.weg .punkt.ziel { width: 11px; height: 11px; margin: 5.5px 0; background: var(--own); transform: rotate(45deg); border-radius: 0; }

/* Fortschritt (D185): vier Zahlen und die Woche */
.zahlen { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-s); }
.zahl { padding: var(--space-m); min-height: 92px; border-radius: var(--radius-field); background: color-mix(in srgb, var(--fill) 55%, transparent); display: grid; align-content: start; gap: 2px; }
.zahl .ziffer { font-variant-numeric: tabular-nums; }
.zahl .detail { color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zahl.woerter { background: var(--progress-tint); }
.zahl.woerter .ziffer, .zahl.woerter .detail { color: var(--progress-text); }
.woche { display: flex; }
.woche span { flex: 1; display: grid; justify-items: center; gap: var(--space-xs); font-size: 12px; color: var(--mute); }
.woche span.heute { color: var(--ink); }
.woche i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); }
.woche span.heute i { box-shadow: inset 0 0 0 1.5px var(--ink); }
.woche i.an { background: color-mix(in srgb, var(--ink) 75%, transparent); }

/* Tabellen in „Kurz erklärt“ */
.tabelle { display: grid; grid-template-columns: minmax(90px, 40%) 1fr; gap: 4px var(--space-m); padding: var(--space-m) var(--space-l) var(--space-l); }
.tabelle .verb { grid-column: 1 / -1; margin-bottom: 4px; }

/* Leiste unten */
.leiste { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100% - 32px)); z-index: 10; }
.leiste .lm-tab { border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.leiste .lm-tab.on { background: var(--companion-tint); }
.leiste .lm-tab:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }

/* Blatt (Pause, Kurz erklärt „Mehr dazu“, Spur bestätigen) */
.schleier { position: fixed; inset: 0; background: rgba(20, 14, 8, .32); z-index: 20; display: grid; align-items: end; justify-items: center; }
.schleier .lm-sheet { width: min(600px, 100%); max-height: 88vh; overflow: auto; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .schleier { align-items: center; } .schleier .lm-sheet { border-radius: var(--radius-sheet); } }

/* Laden */
.balken { width: 200px; }
.punkte::after { content: "…"; }

/* Fuß */
.fuss { display: flex; flex-wrap: wrap; gap: var(--space-m); justify-content: center; }
.fuss a { color: var(--mute); text-decoration: none; }
.fuss a:hover { text-decoration: underline; }

/* Anmeldung */
.anbieter { display: grid; gap: var(--space-m); width: min(340px, 100%); }
.anbieter .lm-btn svg { width: 20px; height: 20px; flex: none; }
.anbieter .apple { background: var(--ink); color: var(--background); }

@media (prefers-reduced-motion: no-preference) {
  .lm-btn, .lm-pill, .lm-chip, .lm-tab { transition: background-color .15s ease-out, box-shadow .15s ease-out; }
}

/* Ami (D192): Rundbild S auf Heute (A4), M in Über mich › Lenguami (A5) */
.ami-karte { gap: var(--space-m); }
.ami-karte .lm-wrap .lm-btn { width: auto; min-width: 96px; padding: 0 20px; }
.ami-kopf { gap: var(--space-m); align-items: center; }
.ami-bild { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: block; }
.ami-bild.m { width: 56px; height: 56px; }
.ami-bild svg { width: 100%; height: 100%; display: block; }
a.lm-row { color: inherit; text-decoration: none; }
