/* Tab „Lernen“: Hub, Lesen, Dialoge, Sprechen */
.learn-seg { margin-bottom: 10px; flex-wrap: nowrap; }
.learn-seg button { padding: 10px 2px; font-size: 14px; min-height: 40px; overflow: hidden; text-overflow: ellipsis; }
.learn-pane.hidden { display: none; }

/* ——— Lesen ——— */
.rd-card { padding: 14px 16px 18px; }
.rd-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rd-listen { min-height: 40px; }
.rd-listen.on { background: var(--accent); color: var(--accent-ink); }
.rd-hint { font-size: 13px; color: var(--muted); flex: 1; min-width: 120px; }
.rd-text { font-size: 19px; line-height: 1.65; overflow-wrap: anywhere; }
.rd-text p { margin: 0 0 14px; }
.rd-w { border-radius: 4px; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; padding: 1px 0; }
.rd-w:active, .rd-w.sel { background: var(--warn-bg); box-shadow: 0 0 0 2px var(--warn-bg); }
.rd-pop {
  position: fixed; z-index: 300; background: var(--surface); color: var(--text); border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 6px 28px rgb(0 0 0 / .28); border: 1px solid var(--line); box-sizing: border-box;
}
.rd-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rd-pop-head b { font-size: 19px; }
.rd-pop-x { border: 0; background: none; color: var(--muted); font-size: 18px; width: 36px; height: 36px; margin: -6px -8px -6px 0; }
.rd-pop-tr { font-size: 17px; margin: 4px 0 2px; }
.rd-pop-none { color: var(--muted); font-size: 15px; }
.rd-pop-src { font-size: 12px; color: var(--muted); }
.rd-pop-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rd-pop-btns .btn { min-height: 42px; flex: 1; white-space: nowrap; }
.rd-pop-btns .btn.added { background: var(--ok-bg); color: var(--ok); opacity: 1; }
.rd-qn { font-size: 13px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }

/* ——— Dialoge ——— */
.dg-hint { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 10px; }
.dg-chat { display: flex; flex-direction: column; gap: 10px; }
.dg-row { display: flex; }
.dg-row.me { justify-content: flex-end; }
.dg-b {
  max-width: 82%; padding: 9px 13px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow);
  border: 1px solid var(--line); touch-action: manipulation; animation: dgIn .25s ease-out;
}
.dg-row.them .dg-b { border-bottom-left-radius: 5px; }
.dg-row.me .dg-b { border-bottom-right-radius: 5px; background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.dg-who { font-size: 11px; opacity: .65; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1px; }
.dg-t { font-size: 17px; line-height: 1.35; overflow-wrap: anywhere; }
.dg-tr { font-size: 14px; opacity: .8; margin-top: 5px; padding-top: 5px; border-top: 1px solid currentColor; border-top-color: rgb(128 128 128 / .35); }
.dg-choices { margin-top: 16px; display: grid; gap: 8px; }
.dg-pick { font-size: 13px; color: var(--muted); text-align: center; }
.dg-opt {
  padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-size: 17px; font-weight: 600; text-align: left; min-height: 52px; touch-action: manipulation;
}
.dg-opt:active { background: var(--press); }
.dg-opt.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); opacity: .85; }
.dg-opt.shake { animation: dgShake .45s; }
.dg-why { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 15px; line-height: 1.4; }
.dg-why-tr { font-size: 13px; opacity: .85; margin-top: 4px; }
@keyframes dgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes dgShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .dg-b, .dg-opt.shake { animation: none; } }

/* ——— Sprechen ——— */
.sp-card { padding: 18px 16px 20px; text-align: center; }
.sp-warn { padding: 14px 16px; margin-bottom: 10px; background: var(--warn-bg); color: var(--warn); }
.sp-warn p { margin: 6px 0 0; font-size: 14px; line-height: 1.45; }
.sp-title { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.sp-sent { font-size: 24px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.sp-tr { font-size: 16px; color: var(--muted); margin: 8px 0 14px; }
.sp-listen { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.sp-listen .btn { min-height: 44px; }
.sp-mic {
  width: 92px; height: 92px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink);
  font-size: 40px; line-height: 1; box-shadow: 0 4px 16px rgb(0 0 0 / .22); touch-action: manipulation;
}
.sp-mic.rec { animation: spPulse 1.1s ease-in-out infinite; background: var(--bad); }
@keyframes spPulse { 0% { box-shadow: 0 0 0 0 rgb(220 60 40 / .55); } 70% { box-shadow: 0 0 0 22px rgb(220 60 40 / 0); } 100% { box-shadow: 0 0 0 0 rgb(220 60 40 / 0); } }
@media (prefers-reduced-motion: reduce) { .sp-mic.rec { animation: none; } }
.sp-status { font-size: 15px; color: var(--muted); margin-top: 10px; min-height: 22px; }
.sp-status.live { color: var(--accent); font-weight: 600; }
.sp-status.err { color: var(--bad); }
.sp-result { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sp-words { font-size: 22px; line-height: 1.5; }
.sp-words span { font-weight: 650; }
.sp-words .ok { color: var(--ok); }
.sp-words .bad { color: var(--bad); text-decoration: underline wavy; text-underline-offset: 4px; }
.sp-pct { font-size: 17px; font-weight: 650; margin-top: 8px; }
.sp-pct.ok { color: var(--ok); }
.sp-pct.bad { color: var(--bad); }
.sp-heard { font-size: 14px; color: var(--muted); margin-top: 4px; }
.sp-stats { text-align: center; font-size: 13px; color: var(--muted); }
