body {
  font-family: 'sans-serif';
}

header {
  margin-bottom: 16px;
  max-width: 480px;
  text-align: center;
}

h1 {
  font-size: 1.5em;
}

.description {
  font-size: 14px;
}

footer {
  font-size: 10px;
  margin-top: 16px;
  text-align: center;
}

.book-title {
  text-decoration: underline;
}

.game {
  display: flex;
  flex-flow: row nowrap;
  height: 100%;
  width: 100%;
}
.game .main {
  align-items: center;
  display: flex;
  flex-flow: column nowrap;
}

.game .detail {
  max-width: 480px;
  padding-left: 16px;
  text-align: center;
}

hr {
  width: 250px;
}

.detail hr {
  width: initial;
}

.input,
.board,
.keyboard {
  align-items: center;
  display: flex;
  flex-flow: column nowrap;
}

.row {
  display: flex;
  flex-flow: row nowrap;
}

.tile {
  border: 1px solid lightgray;
  background-color: white;
  color: black;
  font-size: 32px;
  height:48px;
  line-height: 48px;
  margin: 2px;
  text-align: center;
  width: 48px;
}

.keyboard-key.y,
.tile.y {
  background-color: #6aaa64;
  color: white;
}
.keyboard-key.n,
.tile.n {
  background-color: slategray;
  color: white;
}
.keyboard-key.m,
.tile.m {
  background-color: #c9b458;
  color: white;
}

.keyboard {
  margin-top: 6px;
}

.keyboard-row {
  display: flex;
  flex-flow: row nowrap;
}

.keyboard-key {
  background-color: lightgray;
  border-radius: 4px;
  color: black;
  cursor: pointer;
  font-family: monospace;
  font-size: 20px;
  height: 42px;
  line-height: 42px;
  margin: 6px;
  padding: 6px 12px;
  user-select: none;
}

.examples {
  display: flex;
  flex-flow: row nowrap;
  font-family: monospace;
  justify-content: center;
  margin-top: 8px;
}

.rule {
  align-items: center;
  display: flex;
  flex-flow: column nowrap;
  margin: 0 8px;
}

@media (max-width: 640px) {
  h1 {
    margin: 8px 0;
  }

  .keyboard-key {
    font-size: 16px;
    margin: 2px;
    padding: 6px 10px;
    height: 28px;
    line-height: 28px;
  }

  .tile {
    font-size: 24px;
    height: 32px;
    line-height: 32px;
    width: 32px;
  }
}

@media (prefers-color-scheme: dark) {
  body,
  .tile {
    color: white;
    background-color:darkslategray;
  }
}