:root {
  color-scheme: light dark;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: light-dark(#fff, #000);
  color: light-dark(#000, #fff);
  min-height: 100vh;
  margin: 0;
  font-size: 1.5rem;
}

footer {
  margin-top: auto;
  padding: 0.5em;
  padding-top: 4em;
}

main {
  padding: 0.5em;
  width: max-content;
  min-width: min(600px, 90vw);
}

@media (max-width: 1000px) {
  main {
    min-width: 90vw;
  }
}

table {
  border-spacing: 0;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1/1;
}

td {
  padding: 0;
  width: 10%;
}

tr {
  padding: 0;
  height: 10%;
}

td>a {
  aspect-ratio: 1/1;
  height: 100%;
  display: block;
}

#challenge {
  display: flex;
}

@media (max-aspect-ratio: 1/1) {
  #challenge {
    flex-direction: column;
    width: min(90vw, 600px);
  }
}

@media (min-aspect-ration: 1/1) {
  main {
    max-width: min(90vw, 600px);
  }
}

#challenge img {
  width: 100%;
  height: 100%;
}

#challenge figure {
  width: 100%;
  height: 100%;
}

#i {
  position: relative;
}

@keyframes fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

#feedback {
  color: #f00;
  animation-name: fade-out;
  animation-duration: 1s;
  animation-delay: 5s;
  animation-fill-mode: forwards;
}

.reveal {
  background: light-dark(#ddd, #222);
  position: relative;
}

.reveal::before {
  content: "[Hover]";
  font-size: initial;
  background: light-dark(#ccc, #333);
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  display: block;
  text-align: center;
}

.reveal:hover::before {
  display: none;
}
