/* ═══════════════════════════════════════════════════════
   exam-style-b2.css – Deutsch-Test für den Beruf B2
   ═══════════════════════════════════════════════════════ */

:root {
  --clr-primary: #1a3a5c;
  --clr-primary-light: #2a5a8c;
  --clr-accent: #e8a020;
  --clr-bg: #f5f5f0;
  --clr-card: #ffffff;
  --clr-text: #1a1a1a;
  --clr-text-light: #555;
  --clr-border: #d0d0d0;
  --clr-success: #2e7d32;
  --clr-error: #c62828;
  --clr-disabled: #bbb;
  --clr-highlight: #fff3cd;
  --clr-section-lv: #d6e4f0;
  --clr-section-ls: #d8d4ee;
  --clr-section-hv: #f0e0d0;
  --clr-section-hs: #ecddd2;
  --clr-section-sb: #dce0ea;
  --clr-section-sa: #f0e6f0;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  font-size: 19px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== TOP BAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--clr-primary);
  color: #fff;
  padding: 10px 20px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  gap: 12px;
}
.topbar-left { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.topbar-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-segment { font-size: 12px; color: rgba(255,255,255,0.65); white-space: nowrap; }
.topbar-segment { font-size: 12px; font-weight: 400; opacity: 0.7; margin-left: 8px; }
.topbar-timer {
  font-size: 22px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.topbar-timer.warning { color: var(--clr-accent); animation: pulse 1s infinite; }
.topbar-timer.critical { color: #ff4444; animation: pulse 0.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }
.topbar-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.btn-topbar {
  padding: 6px 14px; font-size: 15px; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.1);
  color: #fff; border-radius: var(--radius); cursor: pointer;
  transition: all 0.2s;
}
.btn-topbar:hover { background: rgba(255,255,255,0.25); }
.btn-topbar-logout { font-size: 16px; padding: 4px 10px; }

/* ===== NAVIGATION ===== */
.section-nav {
  position: sticky; top: 50px; z-index: 90;
  background: #fff;
  border-bottom: 1px solid var(--clr-border);
  padding: 0 16px;
  display: flex; gap: 0;
  overflow-x: auto;
}
.section-nav button {
  padding: 12px 20px;
  border: none; background: none;
  font-size: 17px; font-weight: 500;
  color: var(--clr-text-light);
  cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.section-nav button:hover { color: var(--clr-primary); }
.section-nav button.active {
  color: var(--clr-primary);
  border-bottom-color: var(--clr-primary);
  font-weight: 700;
}
.section-nav button .nav-count {
  font-size: 11px;
  background: var(--clr-border);
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 5px;
}
.section-nav button .nav-count.complete {
  background: var(--clr-success);
  color: #fff;
}

/* ===== MAIN ===== */
.main { max-width: 1600px; margin: 0 auto; padding: 20px 32px 100px; }
.section { display: none; }
.section.active { display: block; }

/* ===== SECTION HEADER ===== */
.section-header {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.section-header.lv { background: var(--clr-section-lv); }
.section-header.ls { background: var(--clr-section-ls); }
.section-header.hv { background: var(--clr-section-hv); }
.section-header.hs { background: var(--clr-section-hs); }
.section-header.sb { background: var(--clr-section-sb); }
.section-header.sa { background: var(--clr-section-sa); }
.section-header h2 { font-size: 24px; font-family: var(--font-display); }
.section-header .part-info { font-size: 16px; color: var(--clr-text-light); }

/* ===== TRANSKRIPT HINWEIS ===== */
.transkript-hinweis {
  background: #fef9e7;
  border: 1px solid #f0d060;
  border-left: 4px solid #e8a020;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 16px;
  font-size: 17px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ===== TEIL HEADER ===== */
.teil { margin-bottom: 32px; }
.teil-header {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--clr-border);
}
.teil-header h3 { font-size: 22px; color: var(--clr-primary); }
.teil-ziel { font-size: 16px; color: var(--clr-text-light); font-style: italic; }

/* ===== CARDS ===== */
.card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-number {
  display: inline-block;
  background: var(--clr-primary);
  color: #fff;
  font-size: 16px; font-weight: 700;
  width: 30px; height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
}
.card-header {
  display: flex; align-items: center;
  margin-bottom: 12px;
}
.card-label { font-weight: 600; font-size: 17px; }

/* ===== TASK INSTRUCTIONS ===== */
.task-instruction {
  margin-bottom: 18px;
  padding: 12px 16px;
  font-size: 16px;
  color: var(--clr-text);
  background: #fff;
  border: 1px solid var(--clr-border);
  border-left: 4px solid var(--clr-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  line-height: 1.65;
}
.task-instruction strong { color: var(--clr-primary); }

/* ===== READING TEXT ===== */
.reading-text {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.75;
  color: var(--clr-text);
  padding: 16px;
  background: #fafaf7;
  border-left: 4px solid var(--clr-primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 16px;
}
.reading-text p { margin-bottom: 10px; }
.reading-text p:last-child { margin-bottom: 0; }

/* ===== HV TRANSCRIPT ===== */
.hv-transcript {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.75;
  color: var(--clr-text);
  padding: 16px;
  background: #faf6f2;
  border-left: 4px solid #c8a882;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 16px;
}
.hv-transcript p { margin-bottom: 8px; }
.hv-transcript p:last-child { margin-bottom: 0; }

/* ===== AUDIO PLAYER ===== */
.audio-player-box {
  background: linear-gradient(135deg, #f0ebe5 0%, #e8e0d6 100%);
  border: 1px solid #d4c8b8;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.audio-player-teil {
  margin-bottom: 20px;
}
.audio-player-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--clr-primary);
}
.audio-icon {
  font-size: 24px;
  line-height: 1;
}
.audio-player-box audio {
  width: 100%;
  height: 44px;
  border-radius: 8px;
}

/* ===== COLLAPSIBLE TRANSCRIPT HELP ===== */

/* ===== HV2 ANSWER OPTIONS (Checkbox-Stil) ===== */
.hv2-card {
  margin-bottom: 16px;
}
.answer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 16px;
}
.answer-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border: 2px solid #ccc;
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.answer-option:hover {
  border-color: var(--clr-primary);
  background: #faf6f2;
}
.option-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid #aaa;
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  transition: all 0.15s;
}
.option-checkbox::after {
  content: '✕';
}
.option-letter {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--clr-text);
}
/* Ausgewählt */
.answer-option.selected {
  border-color: var(--clr-primary);
  background: #f0ebe5;
}
.answer-option.selected .option-checkbox {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
}
/* Anderswo vergeben → abgedimmt */
.answer-option.used-elsewhere {
  opacity: 0.35;
  pointer-events: none;
}
/* Pool-Chip durchgestrichen wenn vergeben */
.chip.used {
  opacity: 0.45;
  text-decoration: line-through;
}

/* ===== HV2 STICKY AUDIO + CHIPS ===== */
.hv2-sticky-header {
  position: sticky;
  top: 95px;
  z-index: 50;
  background: var(--clr-bg);
  padding-bottom: 8px;
  margin-left: -16px; margin-right: -16px;
  padding-left: 16px; padding-right: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 8px -4px rgba(0,0,0,0.1);
}
.hv2-sticky-header .audio-player-teil {
  margin-bottom: 8px;
}
.hv2-sticky-header .sticky-ref.hv2-ref {
  position: static;
  z-index: auto;
}

/* ===== COLLAPSIBLE TRANSCRIPT HELP (continued) ===== */
.transcript-help {
  margin-bottom: 12px;
  border-radius: var(--radius);
  overflow: hidden;
}
.transcript-help summary {
  cursor: pointer;
  padding: 12px 16px;
  background: #f5f0ea;
  border: 1px solid #ddd3c6;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--clr-text);
  user-select: none;
  transition: background 0.15s;
  list-style: none;
}
.transcript-help summary::-webkit-details-marker { display: none; }
.transcript-help summary::before {
  content: '▸ ';
  font-size: 14px;
  transition: transform 0.15s;
  display: inline-block;
}
.transcript-help[open] summary::before {
  transform: rotate(90deg);
}
.transcript-help summary:hover {
  background: #ede6dc;
}
.transcript-help[open] summary {
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
}
.transcript-help .hv-transcript {
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 0;
  border: 1px solid #ddd3c6;
  border-top: none;
}
.speaker-label {
  font-weight: 700;
  color: var(--clr-primary);
  font-family: var(--font-body);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== DROPDOWNS (Zuordnung) ===== */
.answer-select {
  font-size: 17px;
  padding: 8px 14px;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--clr-text);
  cursor: pointer;
  min-width: 200px;
  transition: border-color 0.2s;
}
.answer-select:focus { border-color: var(--clr-primary); outline: none; }
.answer-select.answered { border-color: var(--clr-success); background: #f0f8f0; }

/* ===== MC ===== */
.mc-options { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.mc-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 18px;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 17px;
  line-height: 1.5;
}
.mc-option:hover { border-color: var(--clr-primary-light); background: #f8f9ff; }
.mc-option.selected { border-color: var(--clr-primary); background: #e8f0fa; }
.mc-option input { margin-top: 3px; accent-color: var(--clr-primary); width: 18px; height: 18px; }
.mc-letter { font-weight: 700; color: var(--clr-primary); min-width: 18px; font-size: 18px; }

/* ===== RICHTIG/FALSCH ===== */
.rf-options { display: flex; gap: 12px; margin-top: 10px; }
.rf-option {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 17px;
  font-size: 17px; font-weight: 600;
  transition: all 0.2s;
  min-width: 110px;
}
.rf-option:hover { border-color: var(--clr-primary-light); background: #f8f9ff; }
.rf-option.selected-richtig { border-color: var(--clr-success); background: #e8f5e9; color: var(--clr-success); }
.rf-option.selected-falsch { border-color: var(--clr-error); background: #fef2f2; color: var(--clr-error); }
.rf-option input { accent-color: var(--clr-primary); }
.rf-symbol { font-size: 18px; font-weight: 700; }

/* ===== CHIP BOX ===== */
.chip-box {
  background: #fff;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}
.chip-box-title {
  font-size: 15px; font-weight: 600; color: var(--clr-text-light);
  grid-column: 1 / -1; margin-bottom: 4px;
}
.chip {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 14px;
  background: var(--clr-section-lv);
  border: 1px solid #b0c4de;
  border-radius: var(--radius);
  font-size: 17px; line-height: 1.45;
  transition: all 0.3s;
}
.chip strong { color: var(--clr-primary); font-size: 18px; flex-shrink: 0; }
.chip.used { background: #e8e8e8; color: var(--clr-disabled); text-decoration: line-through; border-color: #ccc; }

/* ===== STICKY REF ===== */
.sticky-ref {
  position: sticky; top: 95px; z-index: 50;
  background: var(--clr-bg);
  padding-bottom: 8px;
  margin-left: -16px; margin-right: -16px;
  padding-left: 16px; padding-right: 16px;
  box-shadow: 0 4px 8px -4px rgba(0,0,0,0.1);
}
.sticky-ref .sticky-toggle {
  display: none; width: 100%;
  padding: 10px 16px;
  background: var(--clr-section-lv);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 16px; font-weight: 600;
  cursor: pointer; text-align: left; margin-bottom: 8px;
}
.sticky-ref .sticky-toggle.sb-toggle { background: var(--clr-section-sb); }
.sticky-ref .sticky-toggle::after { content: ' ▼'; font-size: 11px; float: right; }
.sticky-ref .sticky-toggle.open::after { content: ' ▲'; }
.sticky-ref .sticky-content.collapsed { display: none; }

/* ===== WORD BANK ===== */
.word-bank {
  background: #fff;
  border: 2px solid #6b8e6b;
  border-radius: var(--radius);
  padding: 16px; margin-bottom: 20px;
}
.word-bank-title { font-size: 15px; font-weight: 700; color: #4a6a4a; margin-bottom: 10px; }
.word-chip {
  display: inline-block;
  padding: 6px 14px; margin: 4px;
  background: var(--clr-section-sb);
  border: 1px solid #8a8aad;
  border-radius: 4px;
  font-size: 16px; font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.3s;
}
.word-chip.used { background: #e0e0e0; color: var(--clr-disabled); text-decoration: line-through; border-color: #ccc; }

/* ===== CLOZE ===== */
.cloze-text {
  font-family: var(--font-display);
  font-size: 18px; line-height: 2.2;
  padding: 20px;
  background: #fafaf7;
  border-left: 4px solid #6b6b8e;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.cloze-text p { margin-bottom: 10px; }
.cloze-text ul { margin-left: 20px; margin-bottom: 10px; }
.cloze-select {
  font-size: 16px; padding: 3px 8px;
  border: 2px solid var(--clr-accent);
  border-radius: 4px;
  background: var(--clr-highlight);
  color: var(--clr-text);
  cursor: pointer; vertical-align: baseline;
}
.cloze-select.answered { border-color: var(--clr-success); background: #e8f5e9; }
.cloze-number { font-size: 11px; font-weight: 700; color: var(--clr-primary); vertical-align: super; }

/* ===== TWO-COLUMN LAYOUTS ===== */
.lv2-layout { display: flex; gap: 32px; }
.lv2-text-col { flex: 1; }
.lv2-questions-col { flex: 1; }

.lv3-layout { display: flex; gap: 32px; }
.lv3-situations-col { flex: 1; min-width: 0; }
.lv3-ads-col {
  flex: 0 0 480px;
  position: sticky; top: 95px;
  align-self: flex-start;
  max-height: calc(100vh - 110px);
  overflow-y: auto; padding-right: 4px;
}
.lv3-ads-col::-webkit-scrollbar { width: 5px; }
.lv3-ads-col::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.lv3-ads-header {
  font-size: 18px; font-weight: 700; color: var(--clr-primary);
  margin-bottom: 12px; padding-bottom: 6px;
  border-bottom: 2px solid var(--clr-section-lv);
  position: sticky; top: 0;
  background: var(--clr-bg); z-index: 2; padding-top: 4px;
}
.lv3-ad-toggle-btn {
  display: none; width: 100%;
  padding: 10px;
  background: var(--clr-section-lv);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: 16px; font-weight: 600;
  cursor: pointer; margin-bottom: 12px;
}
.lv3-ad-overlay {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200; background: rgba(0,0,0,0.5);
}
.lv3-ad-overlay-content {
  position: absolute;
  top: 60px; left: 8px; right: 8px; bottom: 60px;
  background: #fff; border-radius: var(--radius);
  padding: 20px; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* ===== MOBILE TEXT OVERLAY ===== */
.text-toggle-btn {
  display: none; width: 100%;
  padding: 10px;
  background: var(--clr-primary); color: #fff;
  border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 600;
  cursor: pointer; margin-bottom: 12px;
}
.text-overlay {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 200; background: rgba(0,0,0,0.5);
}
.text-overlay-content {
  position: absolute;
  top: 60px; left: 8px; right: 8px; bottom: 60px;
  background: #fff; border-radius: var(--radius);
  padding: 20px; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.text-overlay-close {
  position: absolute; top: 68px; right: 16px;
  background: var(--clr-primary); color: #fff;
  border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 24px;
  cursor: pointer; z-index: 201;
}

/* ===== WRITING ===== */
.writing-task-box {
  background: #fff;
  border: 2px solid #7b4a8a;
  border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px;
}
.writing-task-box h3 { color: #7b4a8a; font-size: 17px; margin-bottom: 10px; }
.writing-task-points { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.writing-task-point {
  background: #f9f0fc; border: 1px solid #d4b8e0;
  border-radius: 4px; padding: 6px 12px; font-size: 15px;
}
.writing-area {
  width: 100%; min-height: 280px;
  font-family: var(--font-body); font-size: 18px; line-height: 1.7;
  padding: 18px; border: 2px solid var(--clr-border);
  border-radius: var(--radius); resize: vertical; transition: border-color 0.2s;
}
.writing-area:focus { border-color: #7b4a8a; outline: none; }
.writing-area:disabled { background: #f5f5f0; color: #888; }
.writing-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; font-size: 15px; color: var(--clr-text-light);
}
.word-count { font-variant-numeric: tabular-nums; }
.word-count.low { color: var(--clr-error); }
.word-count.ok { color: var(--clr-success); }

/* ===== THEMENAUSWAHL ===== */
.themen-auswahl { display: flex; flex-direction: column; gap: 12px; }
.thema-option {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius);
  cursor: pointer; transition: all 0.2s;
}
.thema-option:hover { border-color: #7b4a8a; background: #faf5fc; }
.thema-option.selected { border-color: #7b4a8a; background: #f4eaf8; }
.thema-option input { margin-top: 4px; accent-color: #7b4a8a; }
.thema-box { flex: 1; }
.thema-box strong { font-size: 17px; }

/* ===== TELEFONNOTIZ ===== */
.telefonnotiz-form { background: #fffdf5; border: 2px solid #c8a882; }
.telefonnotiz-form h3 { color: var(--clr-primary); font-size: 18px; }
.notiz-label { display: block; font-size: 17px; margin-bottom: 6px; }
.notiz-label strong {
  display: inline-block;
  background: var(--clr-primary); color: #fff;
  font-size: 15px;
  width: 26px; height: 26px; line-height: 26px;
  text-align: center; border-radius: 50%; margin-right: 6px;
}
.notiz-input {
  width: 100%; padding: 10px 14px;
  font-size: 18px; border: 2px solid var(--clr-border);
  border-radius: var(--radius); font-family: var(--font-body);
  transition: border-color 0.2s;
}
.notiz-input:focus { border-color: #c8a882; outline: none; }
.notiz-textarea {
  width: 100%; min-height: 80px;
  padding: 10px 14px; font-size: 18px;
  font-family: var(--font-body); line-height: 1.6;
  border: 2px solid var(--clr-border);
  border-radius: var(--radius); resize: vertical;
  transition: border-color 0.2s; margin-top: 6px;
}
.notiz-textarea:focus { border-color: #c8a882; outline: none; }

/* ===== CONSENT BOX ===== */
.consent-box {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; background: #fef9e7;
  border: 1px solid #f0d060; border-radius: var(--radius);
  margin: 16px 0; font-size: 15px; line-height: 1.6;
}
.consent-box input { margin-top: 3px; accent-color: #7b4a8a; flex-shrink: 0; }

/* ===== BUTTONS ===== */
.btn {
  padding: 12px 28px; border: none;
  border-radius: var(--radius);
  font-size: 17px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-primary { background: var(--clr-primary); color: #fff; }
.btn-primary:hover { background: var(--clr-primary-light); }
.btn-accent { background: var(--clr-accent); color: #fff; }
.btn-accent:hover { background: #d09010; }
.btn-outline {
  padding: 10px 20px; border: 2px solid var(--clr-primary);
  background: #fff; color: var(--clr-primary);
  border-radius: var(--radius); font-size: 16px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-outline:hover { background: var(--clr-primary); color: #fff; }
.btn-outline:disabled { border-color: #ccc; color: #ccc; cursor: default; background: #fff; }
.btn-row { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }

/* ===== EVALUATION ===== */
.eval-section { display: none; }
.eval-section.active { display: block; }
.eval-card {
  background: #fff; border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.eval-score { font-size: 48px; font-weight: 700; color: var(--clr-primary); text-align: center; }
.eval-label { text-align: center; color: var(--clr-text-light); margin-top: 4px; }
.eval-result {
  text-align: center; font-size: 24px; font-weight: 700;
  padding: 16px; border-radius: var(--radius); margin-top: 16px;
}
.eval-result.pass { background: #e8f5e9; color: var(--clr-success); }
.eval-result.fail { background: #fbe9e7; color: var(--clr-error); }

/* Detail-Tabelle */
.eval-detail-table {
  width: 100%; border-collapse: collapse; font-size: 17px;
}
.eval-detail-table thead tr {
  background: var(--clr-primary); color: #fff;
}
.eval-detail-table th {
  padding: 10px 14px; text-align: left; font-weight: 600; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.eval-detail-table td {
  padding: 10px 14px; border-bottom: 1px solid #eee;
}
.eval-detail-table .col-nr { font-weight: 700; width: 50px; }
.eval-detail-table .col-section { color: var(--clr-text-light); font-size: 15px; }
.eval-detail-table .col-given { font-weight: 600; }
.eval-detail-table .col-pts { text-align: center; font-weight: 600; }
.eval-detail-table .row-wrong { background: #fef8f8; }
.eval-detail-table .row-correct { background: #f8fdf8; }
.eval-detail-table .row-notiz { background: #fdf8ed; }
.eval-breakdown {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 20px;
}
.eval-subtest {
  padding: 16px; background: #f8f8f5;
  border-radius: var(--radius); border-left: 4px solid var(--clr-primary);
}
.eval-subtest-name { font-weight: 600; font-size: 16px; }
.eval-subtest-score { font-size: 28px; font-weight: 700; color: var(--clr-primary); margin: 6px 0; }
.eval-subtest-detail { font-size: 15px; color: var(--clr-text-light); }

/* ===== KI BEWERTUNG ===== */
.ki-loading { text-align: center; padding: 40px 20px; color: var(--clr-text-light); }
.ki-loading .spinner {
  display: inline-block; width: 40px; height: 40px;
  border: 4px solid #e0e0e0; border-top-color: #7b4a8a;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ki-gesamt { text-align: center; padding: 24px; border-radius: var(--radius); margin-bottom: 20px; }
.ki-gesamt.pass { background: #e8f5e9; border: 2px solid var(--clr-success); }
.ki-gesamt.fail { background: #fbe9e7; border: 2px solid var(--clr-error); }
.ki-gesamt-score { font-size: 48px; font-weight: 700; }
.ki-gesamt.pass .ki-gesamt-score { color: var(--clr-success); }
.ki-gesamt.fail .ki-gesamt-score { color: var(--clr-error); }
.ki-gesamt-label { font-size: 16px; color: var(--clr-text-light); }

.ki-kriterium-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.ki-kriterium-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  border-left: 5px solid #7b4a8a; box-shadow: var(--shadow);
}
.ki-kriterium-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.ki-kriterium-name { font-weight: 700; font-size: 16px; }
.ki-kriterium-stufe {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  font-weight: 700; font-size: 18px; color: #fff;
}
.ki-kriterium-stufe.stufe-A { background: var(--clr-success); }
.ki-kriterium-stufe.stufe-B { background: #4a90d9; }
.ki-kriterium-stufe.stufe-C { background: var(--clr-accent); }
.ki-kriterium-stufe.stufe-D { background: var(--clr-error); }
.ki-kriterium-punkte { font-size: 15px; color: var(--clr-text-light); margin-bottom: 8px; }
.ki-kriterium-kommentar { font-size: 16px; line-height: 1.6; }

.ki-fehler-card {
  background: #fff; border-radius: var(--radius);
  border-left: 4px solid var(--clr-error);
  padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.ki-fehler-original { text-decoration: line-through; color: var(--clr-error); font-size: 16px; }
.ki-fehler-korrektur { color: var(--clr-success); font-weight: 600; font-size: 16px; margin-left: 8px; }

.ki-gesamtkommentar {
  background: #f8f8f5; border-radius: var(--radius); padding: 20px;
  margin-top: 20px; border-left: 4px solid #7b4a8a;
  font-size: 17px; line-height: 1.7;
}
.ki-error-msg {
  background: #fef2f2; border: 1px solid #f5c6cb; color: var(--clr-error);
  padding: 16px; border-radius: var(--radius); font-size: 16px; text-align: center;
}
.ki-hinweis {
  background: #f0f4ff; border: 1px solid #b0c4de; border-radius: var(--radius);
  padding: 12px 16px; font-size: 14px; color: #555; margin-top: 16px; line-height: 1.6;
}

/* ===== START SCREEN ===== */
.start-screen { max-width: 640px; margin: 0 auto; padding: 40px 20px 60px; }
.start-hero {
  text-align: center;
  padding: 48px 32px 36px;
  background: linear-gradient(135deg, #1a3a5c 0%, #2a5a8c 100%);
  border-radius: 12px 12px 0 0; color: #fff;
}
.start-hero-badge {
  display: inline-block;
  font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px; padding: 5px 16px; margin-bottom: 20px;
}
.start-hero h1 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.start-hero p { font-size: 17px; color: rgba(255,255,255,0.75); }
.start-body {
  background: #fff; border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08); padding: 28px 32px 32px;
}
.start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.start-cell { padding: 14px 16px; background: #f8f9fa; border-radius: 8px; border: 1px solid #eee; }
.start-cell-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--clr-text-light); margin-bottom: 4px;
}
.start-cell-value { font-size: 17px; font-weight: 600; line-height: 1.4; }
.start-cell.full { grid-column: 1 / -1; background: #fef9e7; border-color: #f0d060; }
.start-cell.full .start-cell-label { color: #9a7b20; }

/* Aufklappbare Bestehensbedingungen */
.bestehens-details { margin-top: 8px; }
.bestehens-details summary {
  font-size: 14px; color: var(--clr-accent, #7b4a8a); cursor: pointer;
  font-weight: 500; list-style: none; display: flex; align-items: center; gap: 4px;
}
.bestehens-details summary::-webkit-details-marker { display: none; }
.bestehens-details summary::before { content: '▸'; font-size: 11px; transition: transform 0.2s; }
.bestehens-details[open] summary::before { transform: rotate(90deg); }
.bestehens-details-body {
  margin-top: 8px; padding: 10px 12px; background: #fff; border-radius: 6px;
  border: 1px solid #e8e0ed; font-size: 12.5px; line-height: 1.6; font-weight: 400;
}
.bestehens-details-body p { margin: 0 0 6px; }
.bestehens-details-body ul { margin: 0; padding-left: 18px; }
.bestehens-details-body li { margin-bottom: 2px; }
.start-go { text-align: center; margin-top: 4px; }
.start-go .btn { font-size: 19px; padding: 16px 52px; border-radius: 8px; }
.start-footer-links { text-align: center; margin-top: 20px; font-size: 15px; color: #888; }
.start-footer-links a { color: var(--clr-primary); text-decoration: none; margin: 0 10px; }

/* ===== FOOTER ===== */
.legal-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.95); border-top: 1px solid #d0d0d0;
  text-align: center; padding: 8px; font-size: 14px; z-index: 80; color: #999;
}
.legal-footer a { color: #1a3a5c; text-decoration: none; margin: 0 12px; }

/* ===== MINOR UTILITY CLASSES ===== */
.pool-detail-card { border-left: 3px solid var(--clr-section-lv); transition: opacity 0.2s; }
.pool-detail-card.used { opacity: 0.35; }
.pool-tip-card { transition: opacity 0.2s; }
.pool-tip-card.used { opacity: 0.35; }
.email-editor .login-field {
  width: 100%; padding: 8px 12px;
  font-size: 17px; border: 2px solid var(--clr-border);
  border-radius: var(--radius); transition: border-color 0.2s;
}
.email-editor .login-field:focus { border-color: #7b4a8a; outline: none; }
.notiz-feld { }

/* ===== OVERLAYS ===== */
.overlay {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); z-index: 9999;
  justify-content: center; align-items: center;
}
.overlay-box {
  background: #fff; max-width: 650px; width: 90%;
  max-height: 85vh; overflow-y: auto;
  padding: 32px; border-radius: 8px;
  position: relative; font-size: 16px; line-height: 1.7;
}
.overlay-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 22px; cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .topbar { padding: 8px 12px; flex-wrap: wrap; gap: 6px; }
  .topbar-title { font-size: 13px; flex-basis: 100%; }
  .topbar-timer { font-size: 18px; }
  .section-nav { top: 62px; }
  .section-nav button { padding: 10px 12px; font-size: 13px; }
  .main { padding: 12px 10px 100px; }
  .card { padding: 14px; }
  .reading-text { font-size: 15px; padding: 12px; }
  .hv-transcript { font-size: 14px; padding: 12px; }
  .section-header h2 { font-size: 16px; }
  .chip-box { grid-template-columns: 1fr; }
  .answer-select { min-width: 100%; font-size: 14px; }
  .text-toggle-btn { display: block; }
  .desktop-text { display: none; }
  .eval-breakdown { grid-template-columns: 1fr; }
  .sticky-ref {
    top: 105px;
    margin-left: -10px; margin-right: -10px;
    padding-left: 10px; padding-right: 10px;
  }
  .hv2-sticky-header {
    top: 105px;
    margin-left: -10px; margin-right: -10px;
    padding-left: 10px; padding-right: 10px;
  }
  .sticky-ref .sticky-toggle { display: block; }
  .sticky-ref .sticky-content { display: none; }
  .sticky-ref .sticky-content.open { display: block; }
  .sticky-ref .chip-box,
  .sticky-ref .word-bank { max-height: 45vh; overflow-y: auto; }
  .lv2-layout { flex-direction: column; }
  .lv2-text-col { position: static; }
  .lv3-layout { flex-direction: column; }
  .lv3-ads-col { display: none; }
  .lv3-ad-toggle-btn { display: block; }
  .start-grid { grid-template-columns: 1fr; }
  .start-hero { padding: 36px 20px 28px; }
  .start-hero h1 { font-size: 24px; }
  .start-body { padding: 20px; }
  .thema-option { padding: 12px; }
  .audio-player-box { padding: 12px; }
  .audio-player-header { font-size: 14px; }
  .audio-player-box audio { height: 40px; }
  .transcript-help summary { font-size: 13px; padding: 8px 12px; }
  .answer-options { gap: 8px; }
  .answer-option { padding: 6px 12px 6px 8px; }
  .option-checkbox { width: 24px; height: 24px; font-size: 16px; }
  .option-letter { font-size: 16px; }
}

@media (min-width: 769px) {
  .lv2-text-col {
    position: sticky; top: 95px;
    align-self: flex-start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
  .text-overlay { display: none !important; }
  .lv3-ad-overlay { display: none !important; }
  .lv3-ad-toggle-btn { display: none !important; }
}

/* ===== FEHLERANALYSE ===== */
#errorBtnContainer {
  margin: 32px 0;
}
.btn-error-review {
  display: inline-block;
  padding: 22px 52px;
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-display);
  color: #fff;
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(200, 50, 50, 0.35);
  letter-spacing: 0.02em;
}
.btn-error-review:hover {
  background: linear-gradient(135deg, #a93226 0%, #c0392b 100%);
  box-shadow: 0 6px 24px rgba(200, 50, 50, 0.45);
  transform: translateY(-2px);
}
.btn-eval {
  display: inline-block;
  padding: 16px 36px;
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-display);
  color: #fff;
  background: var(--clr-error);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 12px rgba(200, 50, 50, 0.3);
}
.btn-eval:hover {
  background: #c0392b;
  box-shadow: 0 4px 16px rgba(200, 50, 50, 0.4);
  transform: translateY(-1px);
}
.error-review { margin-top: 24px; }
.error-review-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.error-review-header h3 { font-size: 22px; color: var(--clr-primary); }
.error-review-counter {
  font-size: 16px; color: var(--clr-text-light);
  background: #f0f0f0; padding: 6px 14px; border-radius: 20px;
}
.error-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--clr-border);
  overflow: hidden;
}
.error-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: #fef2f2;
  border-bottom: 1px solid #f0d0d0;
}
.error-card-num {
  font-weight: 700; font-size: 17px; color: var(--clr-error);
}
.error-card-section {
  font-size: 14px; color: var(--clr-text-light);
  background: #fff; padding: 3px 12px; border-radius: 10px;
  border: 1px solid #ddd;
}
.error-card-body { padding: 20px; }
.error-answers {
  display: flex; gap: 20px; margin-bottom: 16px; flex-wrap: wrap;
}
.error-answer-box {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 16px;
  flex: 1; min-width: 160px;
}
.error-answer-wrong {
  background: #fef2f2; border: 2px solid var(--clr-error);
}
.error-answer-right {
  background: #e8f5e9; border: 2px solid var(--clr-success);
}
.error-answer-label {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 4px; color: var(--clr-text-light);
}
.error-answer-value { font-size: 18px; font-weight: 600; }
.error-context {
  background: #f0f4ff; border-left: 3px solid #4a90d9;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px; margin-bottom: 10px;
  font-size: 16px; line-height: 1.65;
}
.error-explanation {
  background: #fdf8ed; border-left: 3px solid #e8a020;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 16px; line-height: 1.65;
}
.error-nav {
  display: flex; justify-content: center; align-items: center;
  margin-top: 16px; gap: 16px;
}
.btn-outline {
  padding: 10px 24px; font-size: 16px; font-weight: 600;
  border: 2px solid var(--clr-primary); border-radius: var(--radius);
  background: #fff; color: var(--clr-primary); cursor: pointer;
  transition: all 0.15s;
}
.btn-outline:hover {
  background: var(--clr-primary); color: #fff;
}

/* ===== KI VS KOPF FLIPCARD ===== */
.flip-card-wrap { margin: 24px 0; perspective: 800px; }
.flip-card { width: 100%; cursor: pointer; position: relative; transform-style: preserve-3d; transition: transform 0.6s ease; min-height: 80px; }
.flip-card.flipped { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back {
  display: flex; align-items: center; padding: 20px 24px;
  border-radius: var(--radius); backface-visibility: hidden; width: 100%;
}
.flip-card-front { background: linear-gradient(135deg, #37474F 0%, #455A64 100%); color: #fff; gap: 16px; border-bottom: 3px solid #FF8F00; }
.flip-card-back { background: #fff; border-left: 4px solid #FF8F00; transform: rotateY(180deg); flex-direction: column; justify-content: center; gap: 8px; position: absolute; top: 0; left: 0; box-shadow: var(--shadow); }
.flip-card-front .fc-icon { font-size: 36px; flex-shrink: 0; line-height: 1; }
.flip-card-front .fc-title { font-weight: 700; font-size: 19px; letter-spacing: 0.01em; }
.flip-card-front .fc-hint { font-size: 14px; color: #B0BEC5; margin-top: 6px; }
.flip-card-back .fc-back-title { font-weight: 700; font-size: 17px; color: #FF8F00; }
.flip-card-back .fc-back-body { font-size: 17px; line-height: 1.65; color: #333; }
@keyframes wobble { 0%,100%{transform:rotate(0)} 20%{transform:rotate(-1.5deg)} 40%{transform:rotate(1.5deg)} 60%{transform:rotate(-1deg)} 80%{transform:rotate(1deg)} }
.flip-card.wobble { animation: wobble 0.6s ease-in-out; }

/* ===== EVAL: TN-TEXT ANZEIGE ===== */
.eval-tn-text {
  background: #f8f8f5; border-radius: var(--radius);
  padding: 16px 20px; margin: 12px 0 20px;
  border-left: 4px solid var(--clr-primary);
  white-space: pre-wrap; font-size: 16px; line-height: 1.7;
  max-height: 300px; overflow-y: auto;
}
.eval-tn-text-label {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  color: var(--clr-text-light); margin-bottom: 6px; letter-spacing: 0.5px;
}

/* ===== EVAL: WARNHINWEIS + DOWNLOAD ===== */
.eval-warning-box {
  background: #fff8e1; border: 1px solid #ffe082;
  border-radius: var(--radius); padding: 16px 20px;
  margin-top: 24px; font-size: 16px; line-height: 1.6; color: #5d4037;
}
.eval-warning-box strong { display: block; margin-bottom: 6px; }
.eval-download-btn {
  display: block; width: 100%; padding: 16px;
  margin-top: 16px; border: none; border-radius: var(--radius);
  background: var(--clr-primary); color: #fff;
  font-size: 18px; font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.eval-download-btn:hover { background: #1a4d8f; }
.eval-download-btn:disabled {
  background: #ccc; cursor: not-allowed;
}
