body {
  /*
  §6cyGY
  In a browser, this color won't be seen, as a child div will fill the whole space
  and contain a different color.
  But in Chrome in Android, this color will be seen under the back/home/menu buttons.
  So the color chosen here is the same as the color of the ground, to make them blend together nicely.
  */
  background: oklch(0.65 0.15 30);
  margin: 0;
  width: 100%;
  height: 100svh;
}
body.show-info-panel {
  background: oklch(0.65 0 30); /* §mgHAH */
}

.bg-container {
  background: oklch(0.65 0.15 265);
  height: 100%;
  overflow-y: hidden;
  /* Necessary to make the overflow-y rule work */
  position: relative;
}
body.show-info-panel .bg-container {
  background: oklch(0.6 0 265);
}

body {
  transition: background-color 0.1s;
}

.bg-container * {
  transition: background-color 0.1s, opacity 0.1s;
}

.code-ref-viewer-container {
  position: absolute;
  left: calc(50% - 150px);
  top: calc(40%);
  width: 150px;
  /* The content is bigger than the height, and will spill out, but be centered at the container's location. */
  height: 0;
  opacity: 1;
  transition: opacity 0.1s, display 0.1s allow-discrete;

  display: flex;
  flex-flow: column;
  justify-content: center;

  font-family: "Wendy One", sans-serif;
  font-weight: 400;
  font-style: normal;
}

@media screen and (width < 400px) {
  .code-ref-viewer-container {
    left: 40px;
  }
}

body.show-info-panel .code-ref-viewer-container {
  opacity: 0;
  display: none;
}

#code-ref-viewer {
  font-size: 2rem;
  margin: 0;
  color: white;

  *::-moz-selection { /* Code for Firefox */
    background: oklch(0.65 0.15 20);
  }
  
  *::selection {
    background: oklch(0.65 0.15 20);
  }
}

.code-ref-prefix {
  /* Swap the font for the "§" character, because the regular font's rendering of this character is really weird. */
  font-family: "Yusei Magic", sans-serif;
  font-weight: bold;
}

.actions {
  display: flex;
  gap: 0.8em;
  margin-left: -5px;
  cursor: pointer;
}

.actions button {
  all: unset;
  color: white;
  padding: 3px;
  margin: 2px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.actions button:focus {
  border-color: white;
}

#copy-failed-toast {
  display: none;
  opacity: 0;
  transition: opacity 0.5s, display 0.5s allow-discrete;
  
  position: absolute;
  left: calc(50% - 150px);
  top: calc(40% + 40px);
  background: white;
  padding: 5px;
  font-family: "Yusei Magic", sans-serif;
  border-radius: 2px;
  border-top-right-radius: 8px;
  box-sizing: border-box;
  width: calc(100vw - 100px);
  max-width: 400px;
}

@media screen and (width < 400px) {
  #copy-failed-toast {
    left: 40px;
  }
}

#copy-failed-toast.show {
  display: initial;
  opacity: 1;
  transition: opacity 0s;
}

body.show-info-panel #copy-failed-toast {
  opacity: 0;
}

#info-button {
  all: unset;
  position: absolute;
  top: 5px;
  right: 5px;
  padding-right: 4px;
  font-size: 1.1rem;
  color: white;
  cursor: pointer;
  font-weight: bolder;
}

.info-panel {
  display: none;
  color: white;
  font-family: "Yusei Magic", sans-serif;
  letter-spacing: 0.07rem;

  .info-panel-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 700px;
    padding: 0 20px;
    box-sizing: border-box;
  }

  h1 {
    font-family: "Wendy One", sans-serif;
  }

  p {
    font-size: 1.1rem;
    line-height: 1.3rem;
  }

  .info-panel-footer {
    position: absolute;
    bottom: 5px;
    right: 5px;
    color: inherit;
  }
}

body.show-info-panel .info-panel {
  display: initial;
}
