#panel.quiz-dialog {
  --quiz-green: #087d51;
  --quiz-ink: #223b2d;
  --quiz-muted: #586a5e;
  box-sizing: border-box;
  width: min(100% - 2rem, 36rem);
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  margin: auto;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #cbdccb;
  border-radius: 24px;
  background: #fff;
  color: var(--quiz-ink);
  box-shadow: 0 25px 95px #173a252b;
  line-height: 1.5;
  letter-spacing: -.025em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
#panel.quiz-dialog::backdrop { background: rgb(23 43 33 / .49); }
.quiz-dialog *, .quiz-dialog *::before, .quiz-dialog *::after { box-sizing: border-box; }
.quiz-dialog button, .quiz-dialog input { font: inherit; }
.quiz-dialog button { cursor: pointer; }
.quiz-dialog button:focus-visible, .quiz-option:has(input:focus-visible) {
  outline: 3px solid #147d61;
  outline-offset: 3px;
}
.quiz-shell, .quiz-interlude { padding: clamp(1.25rem, 4vw, 2rem); }
.quiz-header, .quiz-track-row { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.quiz-course { margin: 0 0 .15rem; color: var(--quiz-green); font-size: .82rem; font-weight: 750; }
.quiz-lesson { margin: 0; font-size: 1.17rem; letter-spacing: -.045em; font-weight: 800; line-height: 1.4; }
.quiz-close {
  flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 1px solid #e0e7de; border-radius: 50%; background: #f6f8f4; color: #53685a;
}
.quiz-close:hover { background: #eaf2eb; }
.quiz-icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.9; flex: none; }
.quiz-track-row { margin: 1.1rem 0 1.5rem; gap: .75rem; }
.quiz-track {
  appearance: none; -webkit-appearance: none; flex: 1; width: 1rem; height: .52rem;
  border: 0; border-radius: 99px; background: #eaf0e8; overflow: hidden;
}
.quiz-track::-webkit-progress-bar { background: #eaf0e8; }
.quiz-track::-webkit-progress-value { background: #21a36d; border-radius: 99px; }
.quiz-track::-moz-progress-bar { background: #21a36d; border-radius: 99px; }
.quiz-counter { color: var(--quiz-muted); font-size: .82rem; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quiz-group { min-width: 0; border: 0; padding: 0; margin: 0; }
.quiz-prompt {
  display: block; padding: 0; margin: 0 0 1.25rem; font-size: clamp(1.24rem, 4vw, 1.5rem);
  line-height: 1.45; letter-spacing: -.055em; font-weight: 800;
}
.quiz-prompt:focus, .quiz-result-title:focus, .quiz-feedback:focus { outline: 0; }
.quiz-options { display: grid; gap: .6rem; }
.quiz-option {
  position: relative; display: flex; align-items: center; gap: .72rem;
  min-height: 3.12rem; padding: .64rem .8rem;
  border: 1.5px solid #dbe4db; border-radius: 13px; color: #304638; background: white;
  line-height: 1.45; font-weight: 550; cursor: pointer;
}
.quiz-option:has(input:not(:disabled)):hover { background: #f4f8f2; border-color: #a8c4ac; }
.quiz-option:has(input:checked:not(:disabled)), .quiz-option.quiz-right {
  border-color: #24926a; background: #eaf8eb; color: #0d6243;
}
.quiz-option:has(input:disabled) { cursor: default; }
.quiz-radio { position: absolute; width: 1px; height: 1px; opacity: 0; }
.quiz-number {
  width: 1.7rem; height: 1.7rem; flex: none; display: grid; place-items: center;
  border-radius: 8px; background: #f0f4ed; color: #5d7163; font-size: .84rem; font-weight: 750;
}
.quiz-option:has(input:checked:not(:disabled)) .quiz-number, .quiz-right .quiz-number { background: #d0eed6; color: #0e5e3e; }
.quiz-option.quiz-wrong { background: #fff4ef; color: #883c22; border-color: #d98c71; }
.quiz-wrong .quiz-number { background: #ffe2d6; color: #943f28; }
.quiz-choice-text { flex: 1; }
.quiz-choice-state { min-width: 1.35rem; display: grid; place-items: center; }
.quiz-primary, .quiz-secondary {
  display: block; width: 100%; min-height: 3rem; padding: .68rem .9rem; border-radius: 13px;
  font-weight: 750 !important; line-height: 1.4 !important; font-size: 1rem !important;
}
.quiz-primary { margin-top: 1.2rem; border: 1px solid var(--quiz-green); background: var(--quiz-green); color: white; box-shadow: 0 3px 0 #056340; }
.quiz-primary:hover:enabled { background: #056d45; }
.quiz-primary:active:enabled { transform: translateY(2px); box-shadow: 0 1px 0 #056340; }
.quiz-primary:disabled { cursor: default; background: #e7ece5; color: #57675c; border-color: #e0e6dc; box-shadow: 0 2px 0 #d5ded3; }
.quiz-secondary { margin-top: .65rem; border: 1px solid #d9e3d9; background: #f8faf7; color: var(--quiz-muted); }
.quiz-secondary:hover { background: #eef3ec; }
.quiz-feedback { margin-top: 1rem; padding: .9rem 1rem; border-radius: 13px; line-height: 1.55; color: #315143; }
.quiz-positive { background: #ebf8ec; }
.quiz-correction { background: #fff5e8; color: #6e4a28; }
.quiz-feedback-title { display: flex; align-items: center; gap: .38rem; margin: 0; font-size: 1.03rem; font-weight: 800; }
.quiz-solution, .quiz-explanation { margin: .35rem 0 0; font-size: .94rem; }
.quiz-solution { font-weight: 730; }
.quiz-interlude { text-align: center; padding-block: 2.25rem; }
.quiz-symbol {
  display: inline-grid; width: 3.5rem; height: 3.5rem; margin: 0 0 1rem; place-items: center;
  border-radius: 17px; background: #e6f4e5; color: var(--quiz-green);
}
.quiz-symbol .quiz-icon { width: 1.8rem; height: 1.8rem; }
.quiz-trophy { width: 5.5rem; height: 5.5rem; object-fit: contain; margin-bottom: .6rem; }
.quiz-result-title { margin: 0; font-size: clamp(1.45rem, 5vw, 1.9rem); letter-spacing: -.06em; font-weight: 820; }
.quiz-body { margin: .5rem 0 1.3rem; color: var(--quiz-muted); }
.quiz-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1rem 0 1.3rem; }
.quiz-stat { margin: 0; padding: .8rem .4rem; border-radius: 13px; background: #f2f7ee; border: 1px solid #dce7d9; }
.quiz-stat dt { font-size: .84rem; color: var(--quiz-muted); }
.quiz-stat dd { margin: .15rem 0 0; font-size: 1.28rem; font-weight: 820; color: #176b45; }
@media (max-width: 480px) {
  #panel.quiz-dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); border-radius: 19px; }
  .quiz-shell, .quiz-interlude { padding: 1.1rem 1rem 1.25rem; }
  .quiz-interlude { padding-block: 1.75rem; }
  .quiz-track-row { margin: .9rem 0 1.1rem; }
}
