@media (max-width:600px) {
  .quiz-page .panel .btn { min-height:44px; min-width:44px; }
}

@media (max-width:600px) {
  .quiz-page .panel label:has(input[type="checkbox"], input[type="radio"]) {
    display:inline-flex; align-items:center; gap:.5rem;
    min-height:44px; min-width:44px; padding:.5rem; box-sizing:border-box;
  }
}

/* On a phone the explanation pushes "Next question" below the fold after every answer:
   keep the two play buttons pinned to the bottom edge of the screen instead. */
@media (max-width:600px) {
  .quiz-page #quiz-play .btn-group {
    position:sticky; bottom:0; z-index:2; margin:.5rem -1rem 0; padding:.6rem 1rem;
    background:#1758a6; box-shadow:0 -6px 12px rgba(0,0,0,.25);
    display:flex; flex-wrap:nowrap; gap:.5rem; justify-content:stretch;
  }
  .quiz-page #quiz-play .btn-group .btn { margin:0; }
  .quiz-page #quiz-play #btn-next-question { flex:1 1 auto; }
  /* Scrolling the explanation into view must stop above the pinned bar, not under it. */
  .quiz-page #quiz-feedback { scroll-margin-bottom:5.5rem; }
}

.quiz-page .quiz-verdict { margin:.25rem 0 1rem; font-size:1.15rem; font-weight:700; }
.quiz-page .quiz-review { list-style:none; margin:1.25rem 0 0; padding:0; text-align:left; }
.quiz-page .quiz-review li { padding:.75rem 0; border-top:1px solid rgba(22,22,22,.35); }
.quiz-page .quiz-review span, .quiz-page .quiz-review strong { display:block; }
.quiz-page .quiz-review strong { margin-top:.2rem; }

/* Quiz of the day: the card is always in the layout (min-height covers both its states), so filling it
   in from script moves nothing. */
.quiz-page .quiz-daily { background:#f4d34e; color:#161616; border:2px solid #161616; padding:1rem 1.1rem; margin:0 0 1.5rem; min-height:16rem; box-sizing:border-box; }
.quiz-page .quiz-daily h2 { margin:0 0 .25rem; font-size:1.5rem; line-height:1.2; color:#161616; }
.quiz-page .quiz-daily .hint { color:#161616; margin:.15rem 0 .5rem; }
.quiz-page .quiz-daily-squares { margin:.4rem 0; font-size:2rem; line-height:1.2; letter-spacing:.12em; white-space:nowrap; }
.quiz-page .quiz-daily-meta { margin:.25rem 0 .6rem; font-weight:700; min-height:1.5em; }
.quiz-page .quiz-daily-next { min-height:1.5em; }
.quiz-page .quiz-daily-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.quiz-page .quiz-daily textarea, .quiz-page .quiz-daily-result textarea { width:100%; box-sizing:border-box; margin-top:.5rem; }
.quiz-page .quiz-daily-result { margin:.5rem 0 1rem; }
.quiz-page .quiz-best { margin:.25rem 0 1rem; font-weight:700; }
@media (max-width:600px) {
  .quiz-page .quiz-daily .btn { width:100%; }
}
