.detail-header {
  align-items: center;
  border-bottom: var(--border-page-title);
  border-top: var(--border-page-title);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 0;
}

@media only screen and (min-width: 1000px) {
  .detail-header {
    align-items: center;
    display: grid;
    grid-template-columns: auto 1fr auto;
    position: relative;
    text-align: center;
  }
}

.detail-header .button {
  grid-column: 1 / 2;
  grid-row: 1;
  position: relative;
  z-index: 10;
}

.game-title {
  grid-column: 1 / 4;
  grid-row: 1;
  margin: 0;
}

.detail-header .tag {
  grid-column: 3 / 4;
  grid-row: 1;
}

.page__game .game {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 3rem 0;
}

@media only screen and (min-width: 1000px) {
  .page__game .game {
    align-items: initial;
    flex-direction: row;
    justify-content: center;
  }
}

.tag {
  background-color: var(--color-difficulty);
  color: var(--color-text-inverse);
  margin: 0;
  padding: .25rem .5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
}

.page__game .grid {
  max-width: 500px;
  width: 100vw;
}
@media only screen and (min-width: 750px) {
  .page__game .grid {
    max-width: 1000px;
    min-width: 600px;
    width: 85vh;
  }
}
@media only screen and (max-width: 1000px) {
  .page__game main {
    padding: 0;
  }
  .page__game .content {
    border-left: none !important;
    border-bottom: 1px solid silver !important;
    padding: 2rem 1rem !important;
  }
}

.grid .cell {
  align-items: center;
  aspect-ratio: 1;
  border-bottom: var(--border-grid-cell);
  border-right: var(--border-grid-cell);
  display: flex;
  justify-content: center;
  font-size: 1.8rem;
  line-height: 1;
}

.mojidoku {
  font-family: var(--font-family-mojidoku);
}

.musdoku {
  font-family: var(--font-family-musdoku);
}

.sudoku {
  font-family: var(--font-family-sudoku);
}

.grid .cell:nth-of-type(3n) {
  border-right: var(--border-grid-region);
}

.grid .cell:nth-of-type(9n) {
  border-right: none;
}

.grid .cell:nth-child(n + 19):nth-child(-n + 27),
.grid .cell:nth-child(n + 46):nth-child(-n + 54) {
  border-bottom: var(--border-grid-region);
}

.grid .cell:nth-child(n + 73):nth-child(-n + 81) {
  border-bottom: none;
}

.page__game .cell:not(.default):hover,
.cell.selected,
.page__game .cell:not(.default).selected {
  background-color: var(--color-cell-not-show);
  color: white;
  cursor: pointer;
}

.page__game .cell.default {
  background-color: var(--color-cell-default);
}

.numpad {
  background-color: var(--color-numpad);
  border-radius: .5rem;
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(5, 1fr);
  height: fit-content;
  padding: .5rem;
}
@media only screen and (min-width: 1000px) {
  .numpad {
    grid-template-columns: repeat(3, 1fr);
    max-width: 35vh;
  }
}

.numpad .num {
  align-items: center;
  aspect-ratio: 1;
  background-color: var(--color-body);
  border-radius: .25rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  font-size: 1.8rem;
  line-height: 1;
  padding: 1rem;
}

@media only screen and (min-width: 1000px) {
  .grid .cell,
  .numpad .num {
    font-size: 2rem;
  }
}

.numpad .num:hover {
  box-shadow: inset .15rem -.15rem #a6c2dd;
}

.numpad .num:active {
  box-shadow: inset -.1rem .1rem var(--color-ludoly);
}

.numpad .clear {
  aspect-ratio: auto;
  grid-column: 1 / 4;
}

#instructions {
  border-top: 1px solid silver;
  padding-top: 3rem;
}

.overlay__solved {
  align-items: center;
  background-color: var(--color-play);
  display: none;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}

.overlay__solved.show {
  display: flex;
}

.overlay__solved > div {
  align-items: center;
  background-color: var(--color-ludoly);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 2rem 2.5rem;
}

.overlay__solved p {
  margin-bottom: 1.5rem;
}