* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  border: 0;
}

#app {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  min-height: 720px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: cream;
}

.app {
  display: grid;
  grid-template-rows: 48px 48px 1fr 48px;
  grid-gap: 6px;

  width: 360px;
}

.header {
  grid-row: 1;
  text-align: center;
  font-size: 24px;
  font-family: 'Courier New', Courier, monospace;
}

.palette {
  grid-row: 2;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.palette .cell {
  transition: 0.3s all;
  width: 36px;
  height: 36px;
  border: 2px solid black;
}

.palette .cell.active {
  transform: rotate(45deg) scale(1.2);
  border: 4px solid gold;
  box-shadow: 0 2px 8px -3px black;
  z-index: 1000;
}

.grid {
  grid-row: 3;
  display: grid;
  grid-template-rows: repeat(8, 1fr);
  grid-template-columns: repeat(8, 1fr);
  grid-gap: 1px;
  height: 360px;
  width: 360px;
}

.grid .cell {
  border: 2px solid #888;
  background: white;
}

.action-panel {
  grid-row: 4;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.action-panel button {
  background: black;
  color: white;
  text-transform: uppercase;
  border: 0;
  padding: 8px 16px;
  font-size: 14px;
}

.action-panel button:hover {
  box-shadow: 0 4px 8px -3px black;
}