/* Vocabulary extends the existing exercise screen; no translation help before grading. */
.vocabulary-mode { max-width: 760px; margin: 0 auto; }
.vocabulary-mode .page-heading { margin-bottom: 24px; }
.vocabulary-intro { margin: 16px 0 26px; font-size: 17px; line-height: 1.6; }
.vocabulary-meta { font-size: 12px; color: var(--exercise-muted); line-height: 1.7; }
.vocabulary-intro .vocabulary-meta { margin-top: 8px; }
.vocabulary-settings { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.vocabulary-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.vocabulary-fields label { display: grid; gap: 8px; font-size: 12px; font-weight: 600; }
.vocabulary-fields select { width: 100%; min-width: 0; min-height: 46px; border: 1px solid var(--answer-border); border-radius: 8px; background: var(--answer-surface); color: var(--ink); padding: 10px; font: 13px 'DM Sans','Trebuchet MS',sans-serif; }
.vocabulary-fields select:focus-visible { outline: 3px solid #9c85ec; outline-offset: 3px; }
.vocabulary-settings .auto-label { display: flex; gap: 8px; min-height: 36px; align-items: center; color: var(--exercise-muted); font-size: 12px; }
.vocabulary-settings .primary { min-height: 46px; margin: 16px 0 10px; }
.vocabulary-rules { padding: 22px 0 8px; font-size: 13px; line-height: 1.8; max-width: 65ch; }
.vocabulary-rules p + p { margin-top: 12px; color: var(--exercise-muted); }
.vocabulary-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 18px; }
.vocabulary-scores { display: flex; gap: 24px; align-items: baseline; font-size: 12px; color: var(--exercise-muted); font-variant-numeric: tabular-nums; }
.vocabulary-scores strong { color: var(--ink); font-size: 20px; font-weight: 600; }
.vocabulary-scores > span:last-child strong { font-size: 14px; }
.vocabulary-toolbar .text-button { min-height: 40px; }
.vocabulary-tools { display: flex; align-items: center; gap: 16px; }
.vocabulary-milestone { display: grid; gap: 9px; margin-bottom: 20px; font-size: 12px; color: var(--exercise-muted); }
.vocabulary-milestone progress { width: 100%; height: 5px; border: none; appearance: none; border-radius: 4px; background: var(--line); color: var(--purple); overflow: hidden; }
.vocabulary-milestone progress::-webkit-progress-bar { background: var(--line); }
.vocabulary-milestone progress::-webkit-progress-value { background: var(--purple); border-radius: 4px; }
.vocabulary-milestone progress::-moz-progress-bar { background: var(--purple); }
.vocabulary-card .card-banner { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.vocabulary-card .card-banner h2 { font-size: 17px; font-weight: 600; line-height: 1.5; }
.vocabulary-card .card-banner > span { color: var(--exercise-muted); font-size: 12px; white-space: nowrap; }
.vocabulary-prompt { min-height: 90px; display: flex; align-items: center; gap: 14px; padding: 4px 0 20px; font-size: clamp(28px,4vw,40px); line-height: 1.4; font-weight: 500; letter-spacing: -.6px; overflow-wrap: anywhere; }
.vocabulary-prompt[lang="de"] { font-family: Georgia,'Times New Roman',serif; }
.vocabulary-prompt[lang="en"] { font-size: clamp(23px,3vw,32px); }
.vocabulary-card .answers { margin: 0; }
.vocabulary-card .answer { min-height: 60px; text-align: left; }
.vocabulary-card .answer-text { overflow-wrap: anywhere; line-height: 1.6; }
.vocabulary-card .answer.is-correct { background: var(--correct-surface); border-color: var(--correct-border); }
.vocabulary-card .answer.is-wrong { background: var(--wrong-surface); border-color: var(--wrong-border); }
.vocabulary-feedback { margin-top: 24px; padding: 16px 18px; border-radius: 9px; background: var(--correct-surface); border: 1px solid var(--correct-border); font-size: 13px; line-height: 1.8; }
.vocabulary-feedback.incorrect { background: var(--wrong-surface); border-color: var(--wrong-border); }
.vocabulary-feedback p { margin-top: 5px; }
.vocabulary-feedback .vocab { font-weight: 600; }
.vocabulary-mistake { color: var(--ink); font-size: 12px; }
.vocabulary-dictionary { display: inline-block; margin-top: 8px; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.vocabulary-word-help { margin-top: 14px; font-size: 12px; color: var(--exercise-muted); }
.vocabulary-word-help summary { min-height: 36px; align-content: center; cursor: pointer; }
.vocabulary-word-help dl { margin: 8px 0; display: grid; gap: 12px; }
.vocabulary-word-help dl > div { display: grid; grid-template-columns: minmax(100px,1fr) 2fr; gap: 16px; line-height: 1.7; }
.vocabulary-word-help dt,.vocabulary-word-help dd { margin: 0; }
.vocabulary-keyboard { font-size: 12px; color: var(--exercise-muted); margin-top: 22px; }
.vocabulary-actions { display: flex; gap: 18px; align-items: center; min-height: 50px; margin-top: 20px; }
.vocabulary-actions button { min-height: 44px; }
.vocabulary-paused { display: grid; gap: 6px; margin-top: 20px; font-size: 13px; line-height: 1.6; }
.vocabulary-paused span { color: var(--exercise-muted); }
.vocabulary-card .card-footer { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.vocabulary-card .card-footer .auto-label { display: flex; gap: 8px; align-items: center; min-height: 36px; }
.vocabulary-footer-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px; }
.vocabulary-footer-controls .vocabulary-auto-option { border-inline-start: 1px solid var(--answer-border); padding-inline-start: 16px; }
.vocabulary-prompt-word { min-width: 0; }
.vocabulary-listen { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--answer-border); border-radius: 10px; background: var(--answer-surface); color: var(--ink); font: 20px/1 sans-serif; cursor: pointer; vertical-align: middle; }
.vocabulary-listen:hover:not(:disabled) { border-color: var(--purple); }
.vocabulary-listen:focus-visible { outline: 3px solid #9c85ec; outline-offset: 3px; }
.vocabulary-listen:disabled { opacity: .45; cursor: not-allowed; }
.vocabulary-feedback-word { display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; }
.vocabulary-audio-status { flex-basis: 100%; font-size: 11px; line-height: 1.6; color: var(--exercise-muted); }
.vocabulary-audio-status[hidden] { display: none; }
.vocabulary-stop { min-height: 44px; margin-top: 10px; }
.vocabulary-summary p { line-height: 2; margin: 16px 0 24px; }
.vocabulary-summary button { min-height: 44px; margin: 6px; }
.vocabulary-sources { margin-top: 22px; color: var(--exercise-muted); font-size: 12px; line-height: 1.8; }
.vocabulary-sources summary { cursor: pointer; min-height: 36px; align-content: center; }
.vocabulary-sources p { margin: 12px 0; max-width: 75ch; }
.vocabulary-sources a { text-decoration: underline; text-underline-offset: 3px; }
html[data-theme="dark"] .vocabulary-settings { background: #202430; }
button[data-nav="vocabulary"] { --nav-day: #8b4b89; --nav-night: #e5ace0; }
.sidebar { overflow-y: auto; }
@media (max-width: 600px) {
  .vocabulary-fields { grid-template-columns: 1fr; gap: 16px; }
  .vocabulary-settings { padding: 20px; }
  .vocabulary-scores { gap: 16px; }
  .vocabulary-toolbar { flex-wrap: wrap; gap: 4px; margin-top: 4px; }
  .vocabulary-tools { margin-left: auto; }
  .vocabulary-scores strong { font-size: 18px; }
  .vocabulary-card .card-banner { padding: 18px 20px; gap: 8px; }
  .vocabulary-card .card-banner h2 { font-size: 15px; }
  .vocabulary-card .card-banner > span { font-size: 11px; }
  .vocabulary-card .card-body { padding: 22px 20px; }
  .vocabulary-card .card-footer { padding: 12px 20px; }
  .vocabulary-feedback { padding: 13px; }
}
@media (prefers-reduced-motion: reduce) { .vocabulary-mode * { scroll-behavior: auto; transition: none; } }
