:root {
  --bg-primary: #1a3a5c;
  --bg-warm: #f5f1ec;
  --text-dark: #2a2a2a;
  --text-light: #f5f1ec;
  --accent-correct: #2d6a4f;
  --accent-wrong: #9d2929;
  --focus: #f6c945;
  --card-bg: #ffffff;
  --border: #d8d4cc;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-warm);
  color: var(--text-dark);
  font-family: "Inter", "Source Sans Pro", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

.hero {
  background: var(--bg-primary);
  color: var(--text-light);
  padding: 2.5rem 1rem 2rem;
  text-align: center;
  position: relative;
}
.lang-picker {
  position: absolute; top: 0.75rem; right: 1rem;
  padding: 0.25rem 0.5rem; font-size: 0.8rem;
  background: rgba(255,255,255,0.15); color: var(--text-light);
  border: 1px solid rgba(255,255,255,0.3); border-radius: 6px;
  cursor: pointer; font-family: inherit;
}
.lang-picker option { background: var(--bg-primary); color: var(--text-light); }
.tier-legend {
  font-size: 0.7rem; color: var(--text-light); opacity: 0.7;
  position: absolute; bottom: 0.5rem; right: 1rem; text-align: right;
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-quote { font-style: italic; font-size: 1.05rem; margin: 0 0 0.25rem; opacity: 0.92; }
.hero-quote-attr { font-size: 0.85rem; opacity: 0.7; margin: 0 0 1.25rem; }
.hero-title { font-family: "Source Serif Pro", "Georgia", serif; font-size: 2.4rem; margin: 0 0 0.5rem; letter-spacing: 0.02em; }
.hero-sub { font-size: 1.05rem; margin: 0; opacity: 0.92; }

.app { max-width: 720px; margin: -1.5rem auto 0; padding: 0 1rem 2rem; }
.screen { margin-top: 1.5rem; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(26, 58, 92, 0.08);
}

.quiz-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.progress-label { font-size: 0.9rem; font-weight: 600; color: var(--bg-primary); }
progress { flex: 1; height: 8px; appearance: none; }
progress::-webkit-progress-bar { background: #e5e0d6; border-radius: 4px; }
progress::-webkit-progress-value { background: var(--bg-primary); border-radius: 4px; }
progress::-moz-progress-bar { background: var(--bg-primary); border-radius: 4px; }

.badges { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: 0.2rem 0.6rem; font-size: 0.78rem; border-radius: 999px; font-weight: 600; }
.badge-nr { background: var(--bg-primary); color: var(--text-light); }
.badge-kategorie { background: #e5e0d6; color: var(--text-dark); }

.frage { font-family: "Source Serif Pro", "Georgia", serif; font-size: 1.25rem; margin: 0 0 1.25rem; line-height: 1.4; }

.bildfrage-placeholder {
  background: #fff8e1;
  border: 1px dashed #c9a227;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #6b5300;
}

.bildfrage-stem { max-width: 100%; max-height: 300px; margin: 0 auto 1rem; display: block; border-radius: 6px; }
.bildfrage-option { max-width: 100%; max-height: 120px; display: block; margin: 0 auto; }

.answer-form fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.opt {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg-warm);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.15s, background 0.15s;
}
.opt:hover { border-color: var(--bg-primary); }
.opt:has(input:checked) { border-color: var(--bg-primary); background: #e8eef5; }
.opt input { margin-top: 0.2rem; flex-shrink: 0; }
.opt-label { font-weight: 700; color: var(--bg-primary); flex-shrink: 0; min-width: 1.2rem; }
.opt-text { flex: 1; }

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}
.btn-primary { background: var(--bg-primary); color: var(--text-light); }
.btn-primary:hover:not(:disabled) { background: #14304b; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--bg-primary); border-color: var(--bg-primary); }
.btn-secondary:hover:not(:disabled) { background: #e8eef5; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

.result { margin: 1rem 0 0; padding: 0.85rem 1rem; border-radius: 8px; font-size: 1rem; }
.result-correct { background: #e6f4ec; color: var(--accent-correct); border: 1px solid var(--accent-correct); }
.result-wrong { background: #fbe9e9; color: var(--accent-wrong); border: 1px solid var(--accent-wrong); }

.score { font-size: 1.5rem; font-weight: 700; text-align: center; margin: 1rem 0; }
.actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.footer { text-align: center; padding: 1.5rem 1rem; color: #6b6b6b; font-size: 0.85rem; }
.error { color: var(--accent-wrong); padding: 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (max-width: 480px) {
  .hero-title { font-size: 1.9rem; }
  .frage { font-size: 1.1rem; }
}
