body {
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  color: #000;
  margin: 0;
  padding: 2rem;
}

h1, h2 {
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
}

textarea, input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  font-size: 14pt;
}

button {
  padding: 0.6rem 1.2rem;
  background-color: #333;
  color: white;
  border: none;
  cursor: pointer;
  margin-top: 1rem;
  font-size: 14pt;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28px, 28px));
  gap: 2px;
  justify-content: center;
  margin: 0 auto;
  padding: 20px;
  border: 2px solid #000;
  width: max-content;
}

.grid-cell {
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 16pt;
  background-color: #fff;
}

.word-list {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-size: 12pt;
  font-weight: bold;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.puzzle-container {
  padding: 30px;
  margin: 2rem auto;
  max-width: 700px;
  background-color: #fff;
  page-break-after: always;
}