/* LearnIT – Aufgaben: Karte, Aufgabentypen, Auswertung, Hörtext-Player.
   Klassen-Präfixe: .q- (Karte/Typen/Review), .opt (Antwort-Optionen), .ex- (KI/Selbstbewertung), .tts- (Sprachausgabe).
   Farben ausschließlich über die Variablen aus app.css (Hell/Dunkel). */

/* Raster-Container: Spalte darf schrumpfen (breite Tabellen/Code sprengen sonst die Karte) */
.q-rev, .q-feedback, .q-res-body, .q-parts, .q-part, .q-cat, .q-cat-rev, .q-match, .q-match-right, .q-choice, .q-order-wrap, .q-order, .q-free, .ex-ai, .ex-self, .ex-self-row, .tts-player, .tts-main, .opts:not(.tf) { grid-template-columns: minmax(0, 1fr); }

/* ---------- Aufgaben-Karte ---------- */
.q-card { display: flex; flex-direction: column; gap: 14px; padding: 16px 14px 18px; border-top: 4px solid color-mix(in srgb, var(--c) 70%, transparent); transition: border-color .25s ease; }
@media (min-width: 620px) { .q-card { padding: 22px 24px 24px; gap: 16px; } }
.q-card.is-ok { border-top-color: var(--ok); } .q-card.is-partial { border-top-color: var(--warn); } .q-card.is-bad { border-top-color: var(--bad); }
.q-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.q-actions .spacer { flex: 1; }
.q-meta { flex: none; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.q-no { flex: none; font-size: .76rem; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.q-topic { display: inline-block; flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.q-pts { font-size: .84rem; font-weight: 900; color: var(--muted); white-space: nowrap; }
.q-diff i { width: 8px; height: 8px; }
.q-prompt { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.q-prompt > .md { font-size: 1.05rem; } .q-prompt > .md > p { font-weight: 650; }
.q-input, .q-review, .q-feedback-slot { min-width: 0; } .q-feedback-slot:empty { display: none; }
.q-note { font-size: .84rem; font-weight: 600; color: var(--muted); }
.q-check-note { color: var(--warn); font-weight: 700; } .q-check-note .md { font-size: inherit; }
.q-hint { margin: 0; }
.q-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.q-check { min-width: 150px; }
.q-check.loading .spinner { width: 18px; height: 18px; border-width: 2.5px; border-color: color-mix(in srgb, var(--accent-ink) 30%, transparent); border-top-color: var(--accent-ink); }
@media (max-width: 480px) { .q-check, .q-next { flex: 1 1 auto; } }

/* ---------- Feedback nach dem Prüfen ---------- */
.q-feedback { display: grid; gap: 14px; padding: 14px; border-radius: 18px; border: 1.5px solid var(--border-strong); background: var(--surface-2); min-width: 0; }
.q-feedback.ok { border-color: var(--ok); background: var(--ok-soft); }
.q-feedback.partial { border-color: var(--warn); background: var(--warn-soft); }
.q-feedback.bad { border-color: var(--bad); background: var(--bad-soft); }
.q-feedback .callout { margin: 0; } .q-feedback .q-explain { background: var(--surface); }
.q-fb-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.q-fb-head .earny-say { flex: 1 1 210px; min-width: 0; } .q-fb-text { flex: 1 1 210px; font-weight: 800; }
.q-fb-score { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; margin-left: auto; text-align: right; }
.q-fb-label { font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.q-fb-score b { font-size: 1.15rem; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.q-feedback.ok .q-fb-label, .q-feedback.ok .q-fb-score b { color: var(--ok); }
.q-feedback.partial .q-fb-label, .q-feedback.partial .q-fb-score b { color: var(--warn); }
.q-feedback.bad .q-fb-label, .q-feedback.bad .q-fb-score b { color: var(--bad); }
.q-xp { font-size: .84rem; font-weight: 900; color: var(--xp); white-space: nowrap; }
.q-foot { justify-content: flex-end; }

/* ---------- Optionen (mc, multi, tf) ---------- */
.q-choice { display: grid; gap: 8px; }
.opts { display: grid; gap: 10px; }
.opt { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 11px 14px; text-align: left; border-radius: 16px; border: 1.5px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-weight: 650; cursor: pointer; transition: transform .1s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease; }
button.opt:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent-2) 60%, transparent); }
button.opt:active:not(:disabled) { transform: scale(.985); }
button.opt:disabled { cursor: default; opacity: .8; }
.opt-key { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--muted); font-size: .82rem; font-weight: 900; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.opts.multi .opt-key { border-radius: 9px; }
.opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.opt.selected { border-color: var(--accent-2); background: var(--accent-2-soft); box-shadow: 0 0 0 3px var(--accent-2-soft); }
.opt.selected .opt-key { background: var(--accent-2); border-color: var(--accent-2); color: var(--surface); }
.opts.tf { grid-template-columns: 1fr 1fr; }
.tf-btn { justify-content: center; min-height: 64px; font-size: 1.05rem; font-weight: 800; }
.tf-btn .opt-text { flex: none; }
.tf-btn.yes:not(.selected) .opt-key { color: var(--ok); } .tf-btn.no:not(.selected) .opt-key { color: var(--bad); }
/* read-only (review) */
.opt.ro { cursor: default; min-height: 46px; padding: 8px 12px; flex-wrap: wrap; font-weight: 600; }
.opt.ro .opt-text { flex: 1 1 130px; }
.opt.ro.plain { background: transparent; border-color: var(--border); color: var(--muted); }
.opt.ro.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.ro.correct .opt-key { background: var(--ok); border-color: var(--ok); color: var(--accent-ink); }
.opt.ro.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.ro.wrong .opt-key { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.opt.ro.missed { border-color: var(--ok); border-style: dashed; background: transparent; }
.opt.ro.missed .opt-key { border-color: var(--ok); color: var(--ok); }
.opt-tag { flex: none; margin-left: auto; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.opt.correct .opt-tag, .opt.missed .opt-tag { color: var(--ok); } .opt.wrong .opt-tag { color: var(--bad); }

/* ---------- Kurzantwort ---------- */
.q-short { display: flex; align-items: center; gap: 10px; }
.q-short .input { flex: 1; min-width: 0; min-height: 52px; font-size: 1.05rem; font-weight: 700; }
.q-unit { font-weight: 800; color: var(--muted); white-space: nowrap; }

/* ---------- Lückentext ---------- */
.q-fill { font-size: 1.02rem; line-height: 3.2; overflow-wrap: anywhere; }
.q-fill.code { line-height: normal; overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-2); }
.q-fill.code pre { margin: 0; padding: 8px 14px; font-family: var(--mono); font-size: .9rem; line-height: 3.3; white-space: pre; tab-size: 4; }
.input.q-blank { display: inline-block; width: auto; max-width: 100%; min-height: 44px; margin: 0 3px; padding: 6px 10px; vertical-align: middle; line-height: 1.3; font-size: 1rem; font-weight: 700; }
select.input.q-blank { max-width: min(100%, 280px); padding-right: 34px; }
.q-blank-wrap { white-space: nowrap; }
.q-fill-extra { line-height: 3.2; }
.q-fill.ro { line-height: 2.4; } .q-fill.code.ro pre { line-height: 2.4; }
/* Lückentext mit Markdown-Tabelle: Lücken stehen in den Zellen */
.q-fill.block { line-height: 1.55; } .q-fill.block p { margin: 0; line-height: 3.2; } .q-fill.block.ro p { line-height: 2.4; }
.q-fill.block .table-wrap { margin: .4em 0; } .q-fill.block .table td { vertical-align: middle; }
.q-fill.block .table .input.q-blank { margin: 0; min-width: 9ch; } .q-fill.block .table .q-blank-rev { margin: 0; }
.q-blank-rev { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 0 2px; vertical-align: middle; line-height: 1.35; white-space: normal; }
.q-given { display: inline-block; padding: 2px 9px; border-radius: 8px; border: 1.5px solid var(--border-strong); font-weight: 800; }
.q-blank-rev.ok .q-given { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.q-blank-rev.bad .q-given { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); text-decoration: line-through; }
.q-blank-rev .q-given.empty { text-decoration: none; }
.q-sol { display: inline-block; padding: 2px 9px; border-radius: 8px; border: 1.5px dashed var(--ok); background: var(--ok-soft); color: var(--ok); font-weight: 800; overflow-wrap: anywhere; }
.q-rev-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .74rem; color: var(--muted); }
.q-rev-legend .q-given { border-color: var(--bad); color: var(--bad); text-decoration: line-through; }

/* ---------- Zuordnen ---------- */
.q-match { display: grid; gap: 10px; }
.q-match-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface-2); transition: border-color .15s ease, background .15s ease; }
.q-match-row.filled { border-color: color-mix(in srgb, var(--accent-2) 60%, transparent); background: var(--accent-2-soft); }
.q-match-left { font-weight: 800; overflow-wrap: anywhere; }
.q-match-arrow { display: none; color: var(--faint); }
.q-match-sel { min-height: 48px; font-weight: 650; }
@media (min-width: 620px) { .q-match-row { grid-template-columns: minmax(0, 2fr) auto minmax(0, 3fr); align-items: center; } .q-match-arrow { display: inline-flex; } }
.q-match.ro .q-match-row.ok { border-color: var(--ok); background: var(--ok-soft); }
.q-match.ro .q-match-row.bad { border-color: var(--bad); background: var(--bad-soft); }
.q-match-right { display: grid; gap: 6px; min-width: 0; }
.q-match-given { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 650; overflow-wrap: anywhere; }

/* ---------- Reihenfolge ---------- */
.q-order-wrap { display: grid; gap: 8px; }
.q-order { position: relative; display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: q-order; }
.q-order.sorting { user-select: none; -webkit-user-select: none; }
.q-order-item { counter-increment: q-order; position: relative; display: flex; align-items: center; gap: 4px; min-height: 58px; padding: 6px 6px 6px 2px; border-radius: 16px; border: 1.5px solid var(--border-strong); background: var(--surface-2); }
.q-order-text { flex: 1; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.q-order-text::before { content: counter(q-order) "."; margin-right: 8px; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
.q-order-handle { flex: none; width: 44px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--faint); cursor: grab; touch-action: none; }
.q-order-handle:active { cursor: grabbing; } .q-order-handle:disabled { opacity: .35; cursor: default; }
.q-order-btns { flex: none; display: flex; gap: 2px; }
.q-order-btns .btn.icon { width: 44px; min-height: 46px; }
.q-order-item.dragging { z-index: 5; border-color: var(--accent-2); background: var(--surface-3); box-shadow: var(--shadow); }
.q-order-item.moved { animation: q-flash .55s ease; }
@keyframes q-flash { 0% { border-color: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-2-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
.q-order.ro .q-order-item { min-height: 46px; padding: 8px 12px; gap: 8px; }
.q-order.ro .q-order-item.ok { border-color: var(--ok); background: var(--ok-soft); }
.q-order.ro .q-order-item.bad { border-color: var(--bad); background: var(--bad-soft); }
.q-order.ro.sol .q-order-item { border-color: var(--ok); border-style: dashed; background: transparent; }

/* ---------- Einsortieren ---------- */
.q-cat { display: grid; gap: 12px; }
.q-cat-pool { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; min-height: 64px; padding: 10px; border-radius: 16px; border: 1.5px dashed var(--border-strong); background: var(--bg-2); transition: border-color .15s ease; }
.q-cat-pool.target { border-color: var(--accent-2); cursor: pointer; }
.q-cat-empty { padding: 8px 4px; font-size: .86rem; color: var(--muted); }
.q-cat-item { max-width: 100%; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 700; text-align: left; overflow-wrap: anywhere; cursor: pointer; transition: transform .1s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.q-cat-item.selected { border-color: var(--accent-2); background: var(--accent-2-soft); box-shadow: 0 0 0 3px var(--accent-2-soft); transform: translateY(-1px); }
.q-cat-item:disabled { cursor: default; opacity: .85; }
.q-cat-buckets { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.q-cat-bucket { display: flex; flex-direction: column; gap: 8px; min-height: 104px; padding: 10px; border-radius: 16px; border: 1.5px solid var(--border-strong); background: var(--surface-2); transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.q-cat-bucket.target { border-color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 9%, var(--surface-2)); cursor: pointer; }
.q-cat-bucket.target:hover { box-shadow: 0 0 0 3px var(--accent-2-soft); }
.q-cat-bucket { position: relative; }
.q-cat-title { display: flex; align-items: center; gap: 8px; padding-right: 22px; font-weight: 900; }
.q-cat-title .opt-key { width: 24px; height: 24px; border-radius: 8px; font-size: .74rem; }
.q-cat-name { flex: 1; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 619px) { .q-cat-title .opt-key { display: none; } .q-cat-name { font-size: .95rem; } }
.q-cat-count { position: absolute; top: 8px; right: 8px; padding: 1px 8px; border-radius: 999px; background: var(--surface); font-size: .76rem; font-weight: 800; color: var(--muted); }
.q-cat-body { display: flex; flex-wrap: wrap; gap: 6px; }
.q-cat-body .q-cat-item { padding: 6px 10px; font-size: .92rem; }
.q-cat-rev { display: grid; gap: 8px; }
.q-cat-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2); }
.q-cat-row.ok { border-color: var(--ok); background: var(--ok-soft); } .q-cat-row.bad { border-color: var(--bad); background: var(--bad-soft); }
.q-cat-text { flex: 1 1 170px; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.q-cat-res { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.q-cat-res .chip { white-space: normal; }

/* ---------- Teilaufgaben (Hörverstehen) ---------- */
.q-parts { display: grid; gap: 14px; }
.q-part { display: grid; gap: 10px; min-width: 0; padding: 14px 12px; border-radius: 16px; border: 1.5px solid var(--border); background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.q-part-head { display: flex; align-items: flex-start; gap: 10px; }
.q-part-head .md { flex: 1; min-width: 0; font-weight: 700; }
.q-part-no { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: var(--bg); font-size: .8rem; font-weight: 900; }
.q-part-pts { flex: none; font-size: .8rem; font-weight: 900; color: var(--muted); white-space: nowrap; }
.q-part.ok { border-color: var(--ok); } .q-part.partial { border-color: var(--warn); } .q-part.bad { border-color: var(--bad); }
.q-part.ok .q-part-pts { color: var(--ok); } .q-part.partial .q-part-pts { color: var(--warn); } .q-part.bad .q-part-pts { color: var(--bad); }
.q-part-explain { padding-left: 10px; border-left: 3px solid var(--border-strong); font-size: .9rem; color: var(--muted); }

/* ---------- Freitext ---------- */
.q-free-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.q-situation { padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px dashed var(--border-strong); background: var(--surface-2); }
.q-situation-label { margin-bottom: 4px; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.q-free { display: grid; gap: 6px; }
textarea.input.q-free-input { min-height: 200px; font-size: 1rem; }
.q-free-count { font-size: .82rem; font-weight: 800; color: var(--muted); text-align: right; }
.q-free-count.low { color: var(--warn); } .q-free-count.ok { color: var(--ok); } .q-free-count.over { color: var(--bad); }
.q-free-rev { gap: 14px; }
.q-free-text { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); font-size: .96rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.q-free-text.sol { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: var(--ok-soft); }

/* ---------- Review allgemein ---------- */
.q-rev { display: grid; gap: 10px; min-width: 0; }
.q-rev-label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 5px; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.q-rev-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2); }
.q-rev-row .q-rev-label { margin: 0; }
.q-rev-row.ok { border-color: var(--ok); background: var(--ok-soft); }
.q-rev-row.bad { border-color: var(--bad); background: var(--bad-soft); }
.q-rev-row.sol { border-color: var(--ok); border-style: dashed; background: transparent; } .q-rev-row.sol .q-rev-val { color: var(--ok); }
.q-rev-val { flex: 1 1 60px; min-width: 0; font-weight: 800; overflow-wrap: anywhere; }
.q-val.mono { font-family: var(--mono); font-size: .95em; }
.q-rev-alt { font-size: .82rem; color: var(--muted); }
.q-mark { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.q-mark.ok { background: var(--ok); color: var(--accent-ink); } .q-mark.bad { background: var(--bad); color: var(--surface); }
.q-details { border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); min-width: 0; }
.q-details > summary { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; font-weight: 800; cursor: pointer; list-style: none; }
.q-details > summary::-webkit-details-marker { display: none; }
.q-details > summary::before { content: ""; flex: none; width: 8px; height: 8px; margin-right: 12px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; }
.q-details[open] > summary::before { transform: rotate(45deg); }
.q-details > :not(summary) { margin: 0 12px 12px; }
.q-details .q-free-text { background: var(--surface); } .q-details .q-free-text.sol { background: var(--ok-soft); }

/* ---------- Auswertungs-Box (Prüfungsergebnis, Ausbilder) ---------- */
.q-result { overflow: hidden; border-left: 5px solid var(--border-strong); }
.q-result.ok { border-left-color: var(--ok); } .q-result.partial { border-left-color: var(--warn); } .q-result.bad { border-left-color: var(--bad); }
.q-res-head { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 14px; }
summary.q-res-head { cursor: pointer; list-style: none; } summary.q-res-head::-webkit-details-marker { display: none; }
summary.q-res-head::after { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 3px 2px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted); transform: rotate(45deg); transition: transform .15s ease; }
details.q-result[open] > summary.q-res-head::after { transform: rotate(-135deg); margin-bottom: -3px; }
.q-res-status { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .86rem; line-height: 1; }
.q-result.ok .q-res-status { background: var(--ok); color: var(--accent-ink); }
.q-result.partial .q-res-status { background: var(--warn); color: var(--bg); }
.q-result.bad .q-res-status { background: var(--bad); color: var(--surface); }
.q-res-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; color: var(--muted); }
.q-res-title b { color: var(--text); }
.q-res-pts { flex: none; font-weight: 900; white-space: nowrap; }
.q-result.ok .q-res-pts { color: var(--ok); } .q-result.partial .q-res-pts { color: var(--warn); } .q-result.bad .q-res-pts { color: var(--bad); }
.q-res-body { display: grid; gap: 14px; min-width: 0; padding: 4px 14px 16px; }
.q-res-body .callout { margin: 0; }
@media (min-width: 620px) { .q-res-head { padding: 12px 18px; } .q-res-body { padding: 4px 18px 18px; } }

/* ---------- KI-Erklärung, Raster, Selbstbewertung ---------- */
.ex-ai { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.ex-ai-out { width: 100%; min-width: 0; } .ex-ai-out:empty { display: none; } .ex-ai .callout { margin: 0; }
.ex-ai-loading { display: flex; align-items: center; gap: 12px; }
.callout.ex-earny { --cc: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--accent-2-soft)); }
.ex-ai-btn { white-space: normal; text-align: left; }
.ex-rubric.table-wrap { margin: 0; }
.ex-rubric .table td:first-child { min-width: 140px; }
.ex-rubric-sum td { background: var(--surface-2); }
.ex-self { display: grid; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); }
.ex-self h4, .ex-self p { margin: 0; }
.ex-self-row { display: grid; gap: 6px; }
.ex-self-crit { font-size: .94rem; font-weight: 700; }
.ex-self-seg button { min-width: 44px; min-height: 44px; }
.ex-self-seg button.active { background: var(--accent); color: var(--accent-ink); }
.ex-self-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.ex-self-foot b { color: var(--text); }

/* ---------- Hörtext-Player ---------- */
.tts-player { display: grid; gap: 10px; padding: 12px; border-radius: 18px; border: 1px solid var(--border-strong); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--surface-2)), var(--surface-2)); min-width: 0; }
.tts-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tts-play.btn.icon { flex: none; width: 52px; min-height: 52px; border-radius: 50%; }
.tts-stop { flex: none; }
.tts-main { flex: 1 1 140px; min-width: 0; display: grid; gap: 8px; }
.tts-info { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; font-size: .9rem; font-weight: 800; }
.tts-ico { display: inline-flex; color: var(--c); }
.tts-status { flex: 1 1 90px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tts-bar i { transition: width .25s linear; }
.tts-rate { flex: none; margin-left: auto; }
.tts-rate button { min-width: 52px; min-height: 44px; padding: 6px 10px; }
.tts-player[data-state="playing"] .tts-ico { animation: tts-pulse .9s ease-in-out infinite alternate; }
@keyframes tts-pulse { from { transform: scale(.85); opacity: .6; } to { transform: scale(1.15); opacity: 1; } }
.tts-player.no-tts .tts-row { display: none; }
.tts-extra:empty { display: none; } .tts-fallback { margin: 0; }
.tts-transcript p { margin: 0 0 .5em; } .tts-transcript p:last-child { margin-bottom: 0; }
.tts-transcript b { color: var(--c); }
