.puzzles {
  display: block;
  max-width: 700px;
  margin: 100px auto 60px;
  padding: 0 16px;
  text-align: center;
}

.puzzles h1 { margin-bottom: 8px; }
#state { margin: 40px 0; line-height: 1.6; }
#state .action-button-small, .puzzles .buttons .action-button-small { font: inherit; cursor: pointer; margin: 8px 4px 0; display: inline-block; }
#puzzle[hidden], #next[hidden] { display: none; }
.prompt { font-size: 18px; margin: 8px 0 12px; }

#puzzle-board-wrap {
  width: min(560px, calc(100vw - 32px));
  height: min(560px, calc(100vw - 32px));
  margin: 0 auto;
}

.puzzle-board { width: 100%; }
#move-form { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; align-items: center; margin-top: 10px; }
#move-form input { font: inherit; min-height: 36px; padding: 0 10px; border: 1px solid #999; border-radius: 5px; width: 9em; background: #fffc; }
#move-form button { font: inherit; cursor: pointer; }
#feedback { min-height: 3em; line-height: 1.5; margin: 12px 0 4px; }
#feedback.good { color: #1a7f37; }
#feedback.bad { color: #c0392b; }
.meta { color: #555; font-size: 14px; }

@media (max-width: 600px) {
  .puzzles { margin-top: 16px; }
  .puzzles .buttons .action-button-small { min-height: 44px; }
}

.puzzles button:disabled { opacity: 0.45; cursor: default; }

.puzzles .filters { margin: 8px 0; }
.puzzles .filters label { margin-right: 8px; }
.puzzles [hidden] { display: none !important; }
