html, body {
  margin: 0;
  padding: 0;
}

body {
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, roboto, noto, arial, sans-serif;
}

header {
  text-align: left;
  background: lavender;
  padding: 0.5rem;
}

header svg {
  margin-right: 0.5rem;
}

header h1 {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  color: darkslateblue;
  font-size: 1rem;
}

.numerals {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  touch-action: manipulation;
  padding: 0;
  margin: 0;
}

@media (pointer: coarse) {
  .numerals {
    display: grid;
    grid-template-rows: 5rem 5rem 5rem;
    grid-template-columns: 6rem 6rem 6rem;
    align-items: center;
  }

  .numerals li {
    margin-right: 0;
  }

  .numerals button {
    font-size: 100%;
    padding: 0.25rem;
  }

  .numerals li:nth-child(1) {
    grid-row: 4;
    grid-column: 2;
  }

}

@media (pointer: fine) {

.numerals li {
  margin-right: 1rem;
}

}

.numerals button {
  font-size: 200%;
  padding: 1rem;
  font-variant: tabular-nums;
}

.icon-button {
  width: 5rem;
  height: 6rem;
  display: inline-block;
  touch-action: manipulation;
}

.last-input {
  animation: highlightActive 0.2s ease 1;
}

@keyframes highlightActive {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.settings {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background: whitesmoke;
  margin-top: 2rem;
  padding: 0.5rem;
  flex-wrap: wrap;
}

.settings > * {
  margin-right: 1rem;
}

#settings-toggle {
  position: absolute;
  right: 0rem;
}

output {
  display: inline-block;
  height: 3rem;
  line-height: 3rem;
  font-size: 2rem;
  font-variant: tabular-nums;
}

output:empty:after {
  content: "…";
}

output:not(:empty):after {
  content: " ×";
  font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
  cursor: pointer;
  display: inline-block;
  color: darkgray;
}

code {
  font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
}

.confusion-tables {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  flex-wrap: wrap;
}
