/* Sprechen – overview, Teil 5/6/7, simulation, plus the shared speaking widgets (speak button, recorder,
   transcript, photo picker, examiner questions, situation sheet, rubric) that Probetest and Karten embed. */

/* ---------- shared bits */
.sp-toolbar { align-items: flex-end; gap: var(--s-3); margin: 0 0 var(--s-5); }
.sp-toolbar .field { min-width: min(100%, 260px); margin: 0; }
.sp-toolbar .sp-check { min-height: 44px; }
.sp-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); margin: 0 0 var(--s-4); }
.sp-section-head h2 { margin: 0; }
.sp-section-head .sub { margin: 4px 0 0; max-width: 64ch; }
.sp-empty::before { display: none; }
.sp-empty-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-sunken); color: var(--ink-3); }
.sp-empty-icon .icon { width: 22px; height: 22px; }
.sp-tip { margin: var(--s-3) 0 0; font-size: 0.92rem; }
.sp-model .model { margin: 0 0 10px; }
.sp-models details.reveal:last-of-type { margin-bottom: 0; }
.sp-row { margin-bottom: 0; }
.sp-check label { display: inline-flex; align-items: center; gap: 6px; }
.sp-check label .icon { width: 16px; height: 16px; color: var(--ink-3); }

/* ---------- speak button (TTS) – live state while the voice plays */
.btn.speak-btn.speaking { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.btn.speak-btn.speaking .icon { color: var(--accent-strong); animation: blink-dot 1.1s ease-in-out infinite; }

/* ---------- hidden text (listen first, read second) */
.spoiler { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; font: inherit; font-size: 0.9rem; font-weight: 560; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-md); cursor: pointer; text-align: left;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
.spoiler .icon { width: 16px; height: 16px; color: var(--ink-3); }
.spoiler:hover { background: var(--surface-hover); border-color: var(--ink-3); color: var(--ink); }
.spoiler.shown { display: block; min-height: 0; padding: 0; border: 0; background: none; color: var(--ink); font-size: 1.05rem; font-weight: 560; line-height: 1.45; cursor: text; animation: fade-in var(--t-mid) var(--ease-out); }
.sp-question .spoiler.shown { font-size: clamp(1.15rem, 1.02rem + 0.55vw, 1.45rem); font-weight: 600; letter-spacing: -0.012em; line-height: 1.35; text-wrap: balance; }
@media (pointer: coarse) { .spoiler { min-height: 44px; } }

/* ---------- conversation turns (examiner left, candidate right) */
.sp-turn { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 var(--s-4); animation: rise-in var(--t-slow) var(--ease-out) both; }
.sp-turn.candidate, .turn.candidate { flex-direction: row-reverse; }
.sp-avatar { position: relative; isolation: isolate; display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--l-sprechen); color: var(--surface); font-family: var(--mono); font-size: 0.85rem; font-weight: 700; }
.sp-avatar .icon { width: 17px; height: 17px; }
.sp-avatar.me { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.sp-avatar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--l-sprechen); opacity: 0; z-index: -1; }
.speaking > .sp-avatar::after { animation: pulse-ring 1.6s var(--ease-out) infinite; }
.sp-bubble { position: relative; min-width: 0; max-width: min(100%, 720px); padding: 12px 16px 14px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; }
.candidate > .sp-bubble { background: var(--surface); border-color: var(--line-strong); border-radius: 16px 4px 16px 16px; }
.sp-turn.candidate > .sp-bubble { flex: 1; max-width: min(100%, 640px); }
.sp-who { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: var(--fs-eyebrow); font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.sp-who-hint { font-size: var(--fs-caption); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.sp-who-hint::before { content: "·"; margin-right: 8px; }
.sp-bubble .btn.secondary { background: var(--surface); }
.sp-bubble .btn.secondary:hover { background: var(--surface-hover); }
.sp-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sp-wave { display: inline-flex; align-items: center; gap: 2px; height: 12px; opacity: 0; transition: opacity var(--t-mid) var(--ease-out); }
.sp-wave i { display: block; width: 3px; height: 12px; border-radius: 2px; background: var(--l-sprechen); transform: scaleY(0.3); }
.speaking .sp-wave { opacity: 1; }
.speaking .sp-wave i { animation: sp-wave 0.9s ease-in-out infinite; }
.sp-wave i:nth-child(2) { animation-delay: 0.15s; }
.sp-wave i:nth-child(3) { animation-delay: 0.3s; }
.sp-wave i:nth-child(4) { animation-delay: 0.45s; }
@keyframes sp-wave { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

/* ---------- recorder */
.recorder { margin: var(--s-3) 0 0; }
.rec-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.rec-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 999px;
  transition: background-color var(--t-mid) var(--ease-out), border-color var(--t-mid) var(--ease-out); }
.rec-pill .btn { border-radius: 999px; }
.rec-btn { background: var(--surface); }
.rec-btn .icon { color: var(--bad); }
.rec-stop .icon, .dlg-stop .icon { width: 14px; height: 14px; }
.rec-status { display: inline-flex; align-items: center; gap: 8px; padding: 0 4px; font-size: var(--fs-caption); color: var(--ink-2); }
.rec-time { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.95rem; font-weight: 600; color: var(--bad); letter-spacing: -0.01em; }
.rec-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink-dot 1.2s ease-in-out infinite; }
.rec-status .rec-dot { color: var(--bad); }
.recorder.recording .rec-pill { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.recorder.recording .rec-btn:disabled { opacity: 1; cursor: default; background: var(--bad); border-color: var(--bad); color: var(--surface); }
.recorder.recording .rec-stop:not(:disabled) { background: var(--btn-primary); border-color: var(--btn-primary); color: var(--btn-primary-ink); }
.rec-privacy, .rec-note, .stt-note { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; font-size: var(--fs-caption); line-height: 1.45; color: var(--ink-3); }
.rec-privacy .icon, .rec-note .icon, .stt-note .icon { width: 14px; height: 14px; margin-top: 2px; }
.recorder.unavailable .rec-note { margin: 0; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.rec-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rec-list:empty { display: none; }
.rec-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; animation: rise-in var(--t-slow) var(--ease-out) both; }
.rec-take { display: flex; flex-direction: column; line-height: 1.2; font-size: var(--fs-caption); color: var(--ink-3); white-space: nowrap; }
.rec-take strong { font-size: 0.82rem; color: var(--ink); }
.rec-item audio { width: 100%; height: 36px; min-width: 0; }

/* ---------- transcript (speech-to-text) */
.stt { margin: var(--s-3) 0 0; }
.stt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 8px; }
.stt-title { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-size: var(--fs-eyebrow); font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.stt-title .icon { width: 14px; height: 14px; }
.stt textarea { margin: 0 0 8px; }
.stt-note a { color: var(--ink-2); }

/* ---------- overview */
.sp-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.sp-parts { padding: 22px 24px 6px; margin: 0; }
.sp-parts-head h2 { margin: 0; }
.sp-parts-head .sub { margin: 4px 0 0; }
.sp-route { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.sp-stop { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 18px; padding: 18px 0 22px; }
.sp-stop:not(:last-child)::before { content: ""; position: absolute; left: 15.5px; top: 52px; bottom: -18px; width: 3px; border-radius: 3px; background: var(--l-sprechen); }
.sp-stop + .sp-stop .sp-stop-body { border-top: 1px solid var(--line); margin-top: -18px; padding-top: 18px; }
.sp-stop-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 3px solid var(--l-sprechen); color: var(--ink); font-size: 0.85rem; font-weight: 700; }
.sp-stop-body { min-width: 0; }
.sp-stop-top { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.sp-stop-min { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-caption); color: var(--ink-3); }
.sp-stop-min .icon { width: 13px; height: 13px; }
.sp-stop h2 { display: flex; flex-direction: column; font-size: 1.3rem; letter-spacing: -0.02em; margin: 0 0 6px; }
.sp-en { margin-top: 2px; font-size: var(--fs-caption); font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.sp-desc { max-width: 56ch; margin: 0 0 12px; color: var(--ink-2); font-size: 0.93rem; }
.sp-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 14px; padding: 0; }
.sp-facts li { display: flex; align-items: baseline; gap: 6px; font-size: var(--fs-small); color: var(--ink-3); }
.sp-facts .mono { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.sp-stop-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-side { position: static; top: 24px; display: flex; flex-direction: column; gap: var(--s-4); }
.sp-sim { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-2); }
.sp-sim .eyebrow .icon { width: 15px; height: 15px; color: var(--l-sprechen); }
.sp-sim h2 { font-size: 1.4rem; letter-spacing: -0.02em; margin: 2px 0 6px; }
.sp-sim .sub { margin: 0; }
.sp-oralbar { display: flex; gap: 4px; margin: 20px 0 18px; }
.sp-seg { display: flex; flex-direction: column; gap: 8px; flex-basis: 0; min-width: 0; }
.sp-seg-bar { height: 8px; border-radius: 999px; background: var(--l-sprechen); transform-origin: left center; animation: sp-grow 700ms var(--ease-out) both; }
.sp-seg:nth-child(2) .sp-seg-bar { animation-delay: 90ms; }
.sp-seg:nth-child(3) .sp-seg-bar { animation-delay: 180ms; }
@keyframes sp-grow { from { transform: scaleX(0); } to { transform: none; } }
.sp-seg-label { display: flex; flex-direction: column; line-height: 1.3; font-size: var(--fs-caption); color: var(--ink-3); }
.sp-seg-label strong { color: var(--ink); font-weight: 600; }
.sp-sim-last { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sp-sim-last .stat-label { flex-basis: 100%; }
.sp-sim-score { font-size: 1.75rem; font-weight: 550; letter-spacing: -0.03em; line-height: 1.2; }
.sp-sim-of { font-size: 1rem; color: var(--ink-3); }
.sp-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink-2); font-size: var(--fs-small); line-height: 1.5; }
.sp-note .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--ink-3); }
.sp-note p { margin: 0; }
.sp-note strong { color: var(--ink); }
@media (min-width: 900px) and (max-width: 1023px), (min-width: 1180px) {
  .sp-overview { grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); }
  .sp-side { position: sticky; }
}
@media (max-width: 767px) {
  .sp-parts { padding: 18px 16px 4px; }
  .sp-stop { gap: 14px; }
}

/* ---------- Teil 5: examiner mode */
.sp-tab-count { font-size: 0.72rem; font-weight: 600; padding: 0 6px; border-radius: 999px; background: var(--surface-sunken); color: var(--ink-3); }
.tabs a.active .sp-tab-count { color: var(--ink-2); }
.question-card { padding: 20px 24px 6px; }
.qc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; }
.qc-count { font-size: var(--fs-caption); color: var(--ink-3); }
.sp-question { margin: 2px 0 0; }
.sp-followup:empty { display: none; }
.sp-answer .recorder { margin-top: 4px; }
.t5-own-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 var(--s-4); padding: 14px 18px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.t5-own-empty .sp-empty-icon { width: 40px; height: 40px; }
.t5-own-empty .sp-empty-icon .icon { width: 19px; height: 19px; }
.t5-own-empty p { flex: 1; min-width: 220px; margin: 0; color: var(--ink-2); font-size: 0.93rem; }
.t5-own-empty strong { color: var(--ink); }
.own-answer .model { margin: 0 0 var(--s-3); }

/* ---------- Teil 5: Meine Antworten */
.t5-bank { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
.t5-bank h2 { margin: 0 0 6px; }
.t5-intro { color: var(--ink-2); font-size: 0.93rem; max-width: 62ch; }
.t5-meter { margin: var(--s-4) 0 6px; }
.t5-meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.t5-big { font-size: 1.65rem; font-weight: 550; letter-spacing: -0.03em; }
.t5-of { color: var(--ink-3); font-size: var(--fs-small); }
.t5-ready-count { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-small); color: var(--good); font-weight: 560; }
.t5-ready-count .icon { width: 15px; height: 15px; }
.t5-info { margin: 0; font-size: var(--fs-caption); color: var(--ink-3); }
.t5-export { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: var(--s-4) 0 0; border-top: 1px solid var(--line); }
.t5-export .eyebrow { margin: 0; }
.t5-export .eyebrow .icon { width: 14px; height: 14px; }
.t5-export .hint { margin: 0; }
.t5-export code { font-size: 0.82em; word-break: break-all; }
.t5-shown { white-space: nowrap; line-height: 44px; }
.t5-list { display: flex; flex-direction: column; gap: var(--s-3); }
.t5-list > .card { margin: 0; }
.answer-card { transition: border-color var(--t-mid) var(--ease-out); }
@media (min-width: 768px) { .answer-card { padding: 18px 20px 16px; } }
.answer-card[data-status="ready"] { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.t5-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 12px; }
.t5-card-q { min-width: 0; }
.t5-card-q label { display: block; font-size: 1.08rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; cursor: pointer; }
.t5-card-q .sub { margin: 3px 0 0; }
.t5-card-side { display: flex; align-items: center; gap: 8px; flex: none; }
.t5-status { padding: 2px 9px; }
.answer-card textarea { min-height: 110px; display: block; }
.t5-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 0; }
.t5-ready { min-height: 40px; padding: 0 14px 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 560; font-size: 0.9rem; transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
.t5-ready:has(input:checked) { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 40%, transparent); color: var(--good); }
.t5-ready:has(input:checked) input { accent-color: var(--good); }
.t5-ready:has(input:disabled) { opacity: 0.55; }
.t5-ready:has(input:disabled) label { cursor: not-allowed; }
.t5-ready-hint { font-weight: 450; color: var(--ink-3); }
.t5-saved { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-caption); color: var(--ink-3); }
.t5-saved:not(:empty) { animation: fade-in var(--t-mid) var(--ease-out); }
.t5-saved .icon { width: 13px; height: 13px; color: var(--good); }
.t5-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.answer-card details.reveal { margin: 12px 0 0; }
.answer-card details.reveal > summary { padding: 9px 14px; font-size: 0.9rem; }
.answer-card details.reveal > summary .icon { width: 16px; height: 16px; color: var(--ink-3); }
.t5-models p { margin: 0 0 10px; }
.t5-model-label { display: inline-block; min-width: 3.2em; margin-right: 8px; padding: 0 6px; border-radius: var(--r-xs); background: var(--surface-sunken); color: var(--ink-2); font-size: 0.72rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 1px; }
@media (min-width: 900px) and (max-width: 1023px), (min-width: 1180px) {
  .t5-bank { grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); gap: var(--s-5); }
  .t5-export { padding: 0 0 0 var(--s-5); border-top: 0; border-left: 1px solid var(--line); }
}
@media (max-width: 599px) {
  .t5-ready-hint { display: none; }
  .t5-actions { width: 100%; }
  .t5-actions .btn { flex: 1 1 auto; }
  .sp-tabs { display: flex; width: 100%; }
  .sp-tabs a { flex: 1 1 auto; justify-content: center; padding: 0 10px; }
  .sp-tabs a > .icon { display: none; }
  .sp-turn { gap: 8px; }
  .sp-turn > .sp-avatar { width: 30px; height: 30px; font-size: 0.78rem; }
  .sp-turn > .sp-avatar .icon { width: 15px; height: 15px; }
  .sp-bubble { padding: 10px 12px 12px; }
}

/* ---------- Teil 6: photo picker + detail */
.t6-choose-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 16px; margin: 0 0 var(--s-4); }
.t6-choose-head h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.t6-choose-head .sub { margin: 4px 0 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin: 0 0 var(--s-4); counter-reset: photo; }
.photo-thumb { counter-increment: photo; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 8px 8px 10px; font: inherit; text-align: left; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); cursor: pointer;
  transition: transform var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out), border-color var(--t-fast); }
.photo-thumb:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.photo-thumb:active { transform: translateY(-1px); }
.photo-thumb:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--r-lg); }
.photo-frame { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--surface-sunken); }
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.photo-thumb:hover .photo-frame img { transform: scale(1.035); }
.photo-pick { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 9px; border-radius: 999px; background: var(--btn-primary); color: var(--btn-primary-ink); font-size: 0.8rem; font-weight: 600; box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(6px); transition: opacity var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out); }
.photo-pick .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.photo-thumb:hover .photo-pick, .photo-thumb:focus-visible .photo-pick { opacity: 1; transform: none; }
@media (hover: none) { .photo-pick { opacity: 1; transform: none; } }
.photo-label { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0 4px; font-weight: 600; line-height: 1.3; }
.photo-letter { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: var(--r-xs); background: var(--ink); color: var(--surface); font-size: 0.75rem; font-weight: 700; }
.photo-letter::before { content: counter(photo, upper-alpha); }
.photo-topic { min-width: 0; }
.photo-credit { display: block; padding: 0 4px; font-size: 0.7rem; line-height: 1.3; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; padding: 14px; color: var(--ink-2); font-size: 0.85rem; line-height: 1.45; text-align: center; }
.photo-placeholder .icon { width: 22px; height: 22px; color: var(--ink-3); }
.photo-placeholder.big { aspect-ratio: 4 / 3; height: auto; padding: 24px; background: var(--surface-sunken); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--ink); font-size: 1.02rem; }
.photo-placeholder.big p { margin: 0; max-width: 46ch; }
figure.photo { margin: 0; }
figure.photo img { display: block; width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface-sunken); }
figure.photo figcaption { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 0.74rem; line-height: 1.45; color: var(--ink-3); }
figure.photo figcaption .icon { width: 13px; height: 13px; margin-top: 2px; }
figure.photo figcaption a { color: inherit; text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; }
figure.photo figcaption a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.t6-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); align-items: start; margin: 0 0 var(--s-5); }
.t6-photo { position: static; top: 24px; }
.t6-detail.compact { margin-bottom: 0; }
.t6-detail.compact .t6-photo { position: static; }
.t6-task > * + * { margin-top: var(--s-4); }
.t6-task details.reveal { margin-bottom: 0; }
.t6-task details.reveal + details.reveal { margin-top: 10px; }
.t6-sheet .eyebrow { margin: 0 0 4px; }
.t6-sheet h2 { margin: 0 0 10px; font-size: 1.35rem; letter-spacing: -0.02em; }
.t6-lead { margin: 0 0 6px; font-weight: 600; }
.t6-prompts { list-style: none; display: grid; gap: 4px; margin: 0; padding: 0; }
.t6-prompts li { display: flex; align-items: baseline; gap: 10px; }
.t6-prompts li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--l-sprechen); transform: translateY(-2px); }
.sp-practice { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.sp-practice > .eyebrow { margin: 0 0 12px; }
.sp-practice > .eyebrow .icon { width: 14px; height: 14px; }
.sp-practice > .timer { display: flex; width: 100%; box-shadow: none; margin: 0 0 2px; }
.sp-practice > .timer .timer-label { flex: 1; min-width: 0; white-space: nowrap; }
.sp-practice { container-type: inline-size; }
@container (max-width: 360px) {
  .sp-practice > .timer .timer-label { flex: none; font-size: 0; }
  .sp-practice > .timer .timer-display { flex: 1; }
}
.card .sp-practice { margin-top: var(--s-4); background: var(--surface-sunken); }
.card .sp-practice .rec-pill { background: var(--surface); }
.sp-phrases { list-style: none; margin: 0; padding: 0; }
.sp-phrases li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sp-phrases li:last-child { border-bottom: 0; padding-bottom: 0; }
.sp-phrases li:first-child { padding-top: 0; }
.sp-phrases li > span:first-child { font-weight: 560; }
.sp-vocab { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.sp-vocab li { padding: 3px 10px; border-radius: 999px; background: var(--surface-sunken); border: 1px solid var(--line); font-size: 0.9rem; }
.sp-model-answers { margin: 0; padding-left: 1.3em; }
.sp-model-answers li { margin: 0 0 var(--s-4); }
.sp-model-answers li:last-child { margin-bottom: 0; }
.sp-model-answers li::marker { color: var(--ink-3); font-family: var(--mono); font-size: 0.85em; }
.sp-model-answers .model { margin: 6px 0 8px; }
@media (min-width: 900px) and (max-width: 1023px), (min-width: 1180px) {
  .t6-detail { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .t6-detail.compact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .t6-photo { position: sticky; }
}
@media (max-width: 1023px) { .t6-photo { top: calc(var(--topbar-h) + 12px); } }
@media (max-width: 767px) {
  .photo-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .photo-frame { aspect-ratio: 16 / 10; }
}

/* ---------- examiner questions (Teil 6/7, simulation, Probetest) */
.exq-top { display: flex; align-items: center; gap: 12px; margin: 0 0 var(--s-3); }
.exq-dots { list-style: none; display: flex; align-items: center; gap: 14px; margin: 0; padding: 0; }
.exq-dots li { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); transition: background-color var(--t-mid) var(--ease-out), border-color var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-out); }
.exq-dots li + li::before { content: ""; position: absolute; right: calc(100% + 2px); top: 50%; width: 14px; height: 2px; margin-top: -1px; background: var(--line-strong); }
.exq-dots li.done { background: var(--l-sprechen); border-color: var(--l-sprechen); }
.exq-dots li.done + li::before, .exq-dots li.done + li.done::before { background: var(--l-sprechen); }
.exq-dots li.current { background: var(--accent); border-color: var(--ink); transform: scale(1.25); }
.exq-count { font-size: var(--fs-caption); color: var(--ink-3); }
.examiner-q .sp-turn { margin-bottom: 0; }
.exq-idle { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--ink-2); font-size: 0.92rem; }
.exq-idle .icon { width: 18px; height: 18px; color: var(--ink-3); }
.exq-actions { margin-top: var(--s-4); }

/* ---------- Teil 7: situation sheet, pros/cons, dialogue */
@media (min-width: 1180px) { .t7-timer { margin-top: calc(-1 * (var(--s-5) + 52px)); margin-bottom: var(--s-5); } }
.t7-sheet { margin: 0 0 var(--s-5); padding: 22px 24px; }
.t7-sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; margin: 0 0 10px; }
.t7-sheet-head .eyebrow { margin: 0; }
.t7-meta { font-size: var(--fs-caption); color: var(--ink-3); }
.t7-situation p { margin: 0 0 0.6em; }
.t7-task { margin: 0 0 var(--s-4); font-weight: 600; }
.oral-part .t7-sheet { margin: 0 0 var(--s-4); padding: 18px 20px; }
.proscons { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); }
.pc-col { padding: 12px 14px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--pc); --pc: var(--good); }
.pc-col.con { --pc: var(--bad); }
.pc-col h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--pc); font-size: var(--fs-eyebrow); font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.pc-sign { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pc); color: var(--surface); }
.pc-sign .icon { width: 14px; height: 14px; stroke-width: 2.8; }
.pc-col ul { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.pc-col li { display: flex; align-items: flex-start; gap: 9px; padding: 6px 10px; border-radius: 9px; background: color-mix(in srgb, var(--pc) 9%, var(--surface)); font-size: 0.98rem; line-height: 1.5; }
.pc-col li > .icon { flex: none; width: 14px; height: 14px; margin-top: 5px; color: var(--pc); stroke-width: 2.6; }
.proscons.compact li { font-size: 0.93rem; }
@media (max-width: 599px) { .proscons { grid-template-columns: minmax(0, 1fr); } .t7-sheet { padding: 18px 16px; } }
.dialogue-card .reveal { margin: var(--s-4) 0 0; }
.dlg-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.dlg-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s-3) 0 0; }
.dlg-modes .sp-check { min-height: 40px; padding: 0 14px 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; transition: background-color var(--t-fast), border-color var(--t-fast); }
.dlg-modes .sp-check:has(input:checked) { background: var(--surface-sunken); border-color: var(--ink-3); }
.dlg-mode-hint { color: var(--ink-3); font-weight: 400; }
.sp-voices { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; }
.sp-voices .icon { width: 14px; height: 14px; margin-top: 2px; }
.dialogue { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: var(--s-4) 0 0; padding: 0; }
.turn { display: flex; align-items: flex-start; gap: 10px; }
.turn .sp-avatar { width: 32px; height: 32px; font-size: 0.8rem; }
.turn .sp-avatar .icon { width: 15px; height: 15px; }
.turn .sp-bubble { max-width: min(82%, 640px); padding: 10px 14px 12px; transition: box-shadow var(--t-mid) var(--ease-out); }
.turn .sp-who { margin-bottom: 4px; }
.turn.active .sp-bubble { box-shadow: 0 0 0 2px var(--accent); }
.turn-text { display: block; line-height: 1.55; }
.hide-candidate .candidate .turn-text { filter: blur(6px); user-select: none; }
.hide-candidate .candidate.active .turn-text { filter: none; }
.shadow-prompt { position: sticky; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin: var(--s-3) 0 0; padding: 12px 12px 12px 16px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 14px; box-shadow: var(--shadow-2); animation: rise-in var(--t-mid) var(--ease-out); }
.shadow-prompt-text { display: flex; align-items: flex-start; gap: 8px; font-size: 0.93rem; }
.shadow-prompt-text .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--accent-strong); }
.shadow-prompt kbd { margin-left: 4px; background: transparent; color: inherit; border-color: currentColor; opacity: 0.7; }
@media (max-width: 1023px) { .shadow-prompt { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); } }
@media (max-width: 599px) {
  .turn .sp-bubble { max-width: calc(100% - 42px); }
  .dlg-mode-hint { display: none; }
}

/* ---------- simulation + oral exam blocks (also used by Probetest) */
.sim-steps { list-style: none; counter-reset: sim; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 var(--s-5); padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.sim-steps li { counter-increment: sim; display: flex; align-items: center; gap: 10px; font-size: var(--fs-small); color: var(--ink-2); }
.sim-steps li::before { content: counter(sim); display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--surface); font-family: var(--mono); font-size: 0.75rem; font-weight: 650; }
.sim-steps strong { color: var(--ink); }
.oral-rec { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-3) var(--s-5); }
.oral-rec h2 { margin: 0; }
.oral-rec .sub { margin: 4px 0 0; }
.oral-rec .recorder { margin: 0; }
.oral-rec .rec-privacy { justify-content: flex-end; }
.oral-head { display: flex; align-items: center; gap: 14px; margin: 0 0 var(--s-4); }
.oral-no { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--l-sprechen); background: var(--surface); font-size: 0.88rem; font-weight: 700; }
.oral-title { flex: 1; min-width: 0; }
.oral-title h2 { margin: 0; }
.oral-title .sub { margin: 2px 0 0; }
.oral-min { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 4px 10px; border-radius: 999px; background: var(--surface-sunken); font-size: var(--fs-caption); color: var(--ink-2); }
.oral-min .icon { width: 13px; height: 13px; }
.oral-instr { margin: 0 0 var(--s-3); font-weight: 600; }
.oral-qs { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; }
.oral-q { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; background: var(--surface-sunken); border-radius: 12px; }
.oral-q .btn { flex: none; }
.oral-q .btn.secondary { background: var(--surface); }
.oral-q .btn.secondary:hover { background: var(--surface-hover); }
.oral-q .btn .sp-wave { display: none; }
.oral-q.speaking .btn .sp-wave { display: inline-flex; }
.oral-q.speaking .btn > .icon { display: none; }
.oral-q .spoiler { background: var(--surface); }
.oral-q .spoiler.shown { flex: 1; min-width: 200px; background: none; }
.sim-finish-row { margin: var(--s-5) 0; }
@media (max-width: 767px) {
  .oral-rec { grid-template-columns: minmax(0, 1fr); }
  .oral-rec .rec-privacy { justify-content: flex-start; }
  .oral-head { flex-wrap: wrap; }
  .oral-title { flex-basis: calc(100% - 50px); }
  .oral-min { margin-left: 50px; }
}

/* ---------- rubric (simulation + Probetest) */
.spr-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 var(--s-4); padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: var(--fs-small); color: var(--ink); }
.spr-note .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--warn); }
.spr-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 var(--s-3); }
.spr-who-label { font-size: var(--fs-caption); font-weight: 600; color: var(--ink-2); }
.sp-radios { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 12px; }
.sp-radio { position: relative; display: flex; }
.sp-radio input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sp-radio span { display: grid; place-items: center; width: 100%; min-width: 40px; min-height: 34px; padding: 0 10px; border-radius: 9px; font-family: var(--mono); font-size: 0.86rem; font-weight: 560; color: var(--ink-2); transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.sp-radios.text .sp-radio span { font-family: var(--font); padding: 0 14px; }
.sp-radio:hover span { color: var(--ink); }
.sp-radio input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 650; }
.sp-radio input:focus-visible + span { box-shadow: var(--focus-ring); }
:root[data-theme="dark"] .sp-radio input:checked + span { background: var(--surface-hover); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sp-radio input:checked + span { background: var(--surface-hover); } }
@media (pointer: coarse) { .sp-radio span { min-height: 40px; } }
.spr-list { border-top: 1px solid var(--line); }
.spr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spr-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.spr-label strong { font-weight: 600; }
.spr-max { font-size: var(--fs-caption); color: var(--ink-3); }
.spr-desc { flex-basis: 100%; color: var(--ink-2); font-size: var(--fs-small); }
.spr-levels { grid-column: 1 / -1; margin: 0; }
.spr-total { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 28px; margin: var(--s-4) 0 var(--s-3); padding: 16px 20px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 14px; }
.spr-score { display: flex; flex-direction: column; }
.spr-score-label { font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.spr-score-value { line-height: 1.15; }
.spr-num { font-size: 2.1rem; font-weight: 550; letter-spacing: -0.04em; }
.spr-of { font-size: 1rem; color: var(--ink-3); }
.spr-track { position: relative; }
.spr-track .progress { height: 8px; margin: 6px 0; }
.spr-pass { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--ink); }
.spr-meter-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin-top: 4px; }
@media (max-width: 767px) {
  .spr-row { grid-template-columns: minmax(0, 1fr); }
  .spr-scale { display: flex; flex-wrap: nowrap; width: 100%; }
  .spr-scale .sp-radio { flex: 1 1 0; min-width: 0; }
  .spr-scale .sp-radio span { min-width: 0; padding: 0 2px; }
  .spr-total { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
