.intro {
  margin: 1rem 0 1.5rem;
  max-width: 60ch;
}

.sudoku-contenedor {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
@media (max-width: 700px) {
  .sudoku-contenedor { grid-template-columns: 1fr; }
}

.sudoku-rejilla {
  display: grid;
  grid-template-columns: repeat(9, 42px);
  grid-template-rows: repeat(9, 42px);
  border: 3px solid var(--tinta);
  background: var(--tinta);
  gap: 1px;
}
@media (max-width: 500px) {
  .sudoku-rejilla {
    grid-template-columns: repeat(9, 32px);
    grid-template-rows: repeat(9, 32px);
  }
}

.sudoku-celda {
  background: var(--papel);
  display: grid;
  place-items: center;
  position: relative;
}
.sudoku-celda.borde-d  { box-shadow: inset -2px 0 0 var(--tinta); }
.sudoku-celda.borde-ab { box-shadow: inset 0 -2px 0 var(--tinta); }
.sudoku-celda.borde-d.borde-ab { box-shadow: inset -2px 0 0 var(--tinta), inset 0 -2px 0 var(--tinta); }

.sudoku-celda input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--tinta);
  padding: 0;
  outline: none;
}
.sudoku-celda input:focus { background: #fff1bf; }
.sudoku-celda.fijo input { font-weight: 700; }
.sudoku-celda.conflicto input { color: var(--rojo); }
.sudoku-celda.correcto input { color: #2d6b2d; }
.sudoku-celda.resalta { background: #faf0d9; }

.sudoku-aside {
  font-family: var(--serif);
}
.dificultad {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}
.dificultad label {
  cursor: pointer;
}
.botones {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.botones button {
  background: var(--tinta);
  color: var(--papel);
  border: none;
  padding: 0.5rem 1rem;
  font-family: var(--serif);
  font-size: 0.9rem;
  cursor: pointer;
}
.botones button:hover { background: var(--rojo); }

.mensaje {
  margin-top: 1rem;
  font-style: italic;
  min-height: 1.5em;
}
.mensaje.exito { color: #2d6b2d; }
.mensaje.error { color: var(--rojo); }
