.element {
  display: inline-block;
  position: relative;
  border: 1px solid var(--cafe-noir);
  padding: 0.25em;
  width: 1.5em;
  height: 1.5em;
  margin-right: 0.1em;
  font-size: 3em;
}

.symbol {
  position: absolute;
  left: 0;
  top: 0.4em;
}

.number {
  position: absolute;
  top: 0;
  right: 0.25em;
  font-size: 0.25em;
}

.name {
  position: absolute;
  left: 0.25em;
  bottom: 0;
  font-size: 0.25em;
}

.unspellable {
  border-color: var(--flame);
}

.unspellable:focus {
  outline: none !important;
  border: 2px solid var(--flame);
  box-shadow: 0 0 10px var(--flame);
}

.spellings {
  margin-top: 1em;
}

.periodic-table
{
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  grid-template-rows: repeat(7, 1fr)
    [separator-start] 0.25fr
    [separator-end lanthanides-start] 1fr
    [lanthanides-end actinides-start] 1fr
    [actinides-end];
  grid-gap: 0.125em;
  list-style: none;
  padding: 0;
  counter-reset: atomic-number;
  max-width: 100%;
}

.periodic-table li
{
  background: darkred;
  color: white;
  padding: 0.5em 0.125em;
  text-align: center;
  counter-increment: atomic-number;
}

.periodic-table li:nth-of-type(2)
{
  grid-column: 18;
}

.periodic-table li:nth-of-type(5),
.periodic-table li:nth-of-type(13)
{
  grid-column: 13;
}

.periodic-table li:nth-of-type(n+58):nth-of-type(-n+71)
{
  grid-row: lanthanides;
}

.periodic-table li:nth-of-type(n+90):nth-of-type(-n+103)
{
  grid-row: actinides;
}

.periodic-table::before
{
  content: '';
  grid-row: lanthanides / actinides;
  grid-column: 1 / span 3;
}


@media (max-width: 600px) {
  .periodic-table {
    font-size: 0.6em;
  }
}
