html {
  height: 100%;
  overflow: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: #f2ede4;
  color: #171411;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  line-height: 1.6;
}

main {
  width: min(720px, 100%);
  max-height: 100%;
}

body.image-page {
  padding: 0;
}

body.image-page main {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  max-height: none;
}

body.audio-clue-page main {
  position: relative;
  overflow: hidden;
}

body.clue-page main {
  display: grid;
  gap: 1rem;
  place-items: center;
  text-align: center;
}

body.troll-page {
  background: #ffffff;
  color: #111111;
  text-align: center;
}

body.troll-page main {
  display: grid;
  gap: 1rem;
  place-items: center;
}

.clue-image {
  display: block;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  width: auto;
  height: 100vh;
  height: 100dvh;
  object-fit: contain;
  image-rendering: pixelated;
}

.clue-image--natural {
  image-rendering: auto;
}

.color-clue {
  width: 960px;
  height: 960px;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
}

.clue-image--with-text {
  max-width: min(100%, 720px);
  max-height: calc(100vh - 8rem);
  max-height: calc(100dvh - 8rem);
  height: auto;
}

.encoded-clue {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.troll-image {
  display: block;
  width: auto;
  max-width: min(92vw, 620px);
  max-height: 72vh;
  max-height: 72dvh;
  object-fit: contain;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
