:root{
  --accent:#3b82f6;
  --ok:#22c55e;
  --ng:#ef4444;
  --border:#e5e7eb;
  --muted:#6b7280;
}
*{box-sizing:border-box}
body{
  font-family:sans-serif;
  background:#fafafa;
  margin:0;
  padding:20px;
  color:#111827;
}
.screen{
  max-width:1000px;
  margin:0 auto;
  background:#fff;
  padding:20px;
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:0 4px 10px rgba(0,0,0,.04);
}
.hidden{display:none;}

.dialog-content #dialogItems {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.dialog-content #dialogItems label {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  white-space: nowrap;
}

.dialog-content #dialogItems input[type="checkbox"] {
  width: auto;
}

h1,h2,h3{margin-top:0}
label{display:block;margin:12px 0 6px;color:var(--muted)}
select,input,button{
  width:100%;
  padding:10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
}
button{cursor:pointer}
#startBtn,#nextBtn{
  margin-top: 12px;
  background:var(--accent);
  color:#fff;
  border:none;
}

.q-container{display:flex;gap:20px}
.q-left{flex:2}
.q-right{
  flex:1;
  border-left:1px solid var(--border);
  padding-left:14px;
  position:sticky;
  top:12px;
  align-self:flex-start
}

.progress{color:var(--muted);margin-bottom:6px}

#progressBarContainer {
  width: 100%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  margin: 6px 0 12px;
}

#progressBar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 6px;
  transition: width .3s ease;
}

.choice-texts p{
  margin:0 0 8px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  line-height:1.6;
}

.answer-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.answerBtn {
  font-size: 20px;
  font-weight: bold;
  color: #111827;
  width: calc(50% - 10px);
  box-sizing: border-box;
  text-align: center;
}

.answerBtn img.choice-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.answerBtn.correct{background:#ecfdf5;border-color:var(--ok)}
.answerBtn.wrong{background:#fef2f2;border-color:var(--ng)}

.commentary{
  min-height:120px;
  line-height:1.7;
}

.result{font-size:20px;margin:10px 0 16px}

.quiz-img{
  max-width:95%;
  margin:10px auto;
  display:block;
}

.dropdown-input{
  cursor:pointer;
  background:#fff;
}

.dialog{
  position:fixed;top:0;left:0;width:100%;height:100%;
  background:rgba(0,0,0,.4);
  display:flex;justify-content:center;align-items:center;
}
.dialog.hidden{display:none}
.dialog-content{
  background:#fff;
  padding:20px;
  border-radius:10px;
  width:300px;
  max-height:80vh;
  overflow-y:auto;
}
.dialog-content label{display:block;margin:6px 0}
.dialog-content button{
  margin-top:10px;
  width:100%;
  background:var(--accent);
  color:#fff;
  border:none;
  padding:10px;
  border-radius:8px;
}
