* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; padding: 16px;
  font-family: system-ui, "Segoe UI", Tahoma, Arial, sans-serif;
  background: #eef2f7; color: #1d2433;
  display: flex; justify-content: center; align-items: flex-start;
}
.card {
  width: 100%; max-width: 640px; background: #fff; border-radius: 16px;
  padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
h1 { font-size: 1.3rem; margin: 0; }
h2 { font-size: 1.25rem; line-height: 1.7; margin: 16px 0; }
button {
  font: inherit; cursor: pointer; border-radius: 10px; padding: 10px 16px;
  border: 1px solid #cdd5e0; background: #f6f8fb; color: inherit;
}
button:disabled { opacity: .4; cursor: default; }
button.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
button.ghost { padding: 6px 12px; font-size: .9rem; }
.meta { display: flex; justify-content: space-between; margin-top: 16px; color: #5b6475; font-size: .95rem; }
.bar { height: 6px; background: #e3e8ef; border-radius: 3px; margin-top: 6px; overflow: hidden; }
#progress { height: 100%; background: #2563eb; width: 0; transition: width .2s; }
#image { display: block; max-width: 180px; max-height: 180px; margin: 0 auto 16px; }
#answers { display: flex; flex-direction: column; gap: 10px; }
.answer {
  text-align: right; font-size: 1.05rem; line-height: 1.6; padding: 14px 16px;
  background: #fff; border: 2px solid #d6dce5;
}
.answer:not(:disabled):hover { border-color: #2563eb; }
.answer:disabled { opacity: 1; }
.answer.correct { background: #dcfce7; border-color: #16a34a; color: #14532d; font-weight: 600; }
.answer.wrong { background: #fee2e2; border-color: #dc2626; color: #7f1d1d; }
#feedback { min-height: 1.6em; font-size: 1.2rem; font-weight: 700; text-align: center; margin: 16px 0 4px; direction: ltr; }
#feedback.good { color: #16a34a; }
#feedback.bad { color: #dc2626; }
nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
nav button { flex: 1; padding: 14px; font-size: 1.05rem; }
.totals { display: flex; gap: 12px; margin: 20px 0; }
.totals div { flex: 1; border-radius: 14px; padding: 20px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.totals b { font-size: 2.6rem; }
.totals .right { background: #dcfce7; color: #14532d; }
.totals .wrong { background: #fee2e2; color: #7f1d1d; }
#nSkipped { text-align: center; color: #5b6475; }
