#canvas {
  background-color: rgb(224, 224, 224);
  height: 95vh;
  aspect-ratio: 16/9;
}

body {
  margin: 0;
  font-family: 'Caveat', cursive;
  font-weight: 400;
}

#bodyContent {
  width: 75vw;
  margin: 0 auto;
  text-align: center;
  background: url("ruled.png") center top / 100% auto repeat-y;
}

.step {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100svh;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

[hidden] {
  display: none !important;
}

.step:focus {
  outline: none;
}

.typing {
  white-space: pre-line;
  font-family: 'Caveat', cursive;
  font-size: 4rem;
  color: rgb(72, 72, 72);
}

.small {
  font-size: 3rem;
}

.smallest {
  font-size: 2.5rem;
}

.action {
  font-family: inherit;
  filter: sepia(0%) hue-rotate(0deg) saturate(0%);
  cursor: pointer;
  width: 20%;
  padding: 0;
  border: 0;
  background: transparent;
}

.action:hover {
  filter: sepia(100%) hue-rotate(185deg) saturate(3000%);
  transition: filter 0.15s steps(1, end);
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}


[waitfor]:not([data-waitfor-ready]) {
  visibility: hidden;
  pointer-events: none;
}

.action img {
  display: block;
  width: 100%;
}

.action:focus-visible {
  outline: 2px solid rgb(72, 72, 72);
  outline-offset: 4px;
}

/* Replay the fade whenever a non-text dependency becomes ready. */
[waitfor][data-waitfor-ready]:not(:is(.typing, p, span, h1, h2, h3, h4, h5, h6, label, blockquote, li, figcaption)) {
  animation: waitfor-fade-in 0.4s ease-out both;
}

@keyframes waitfor-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  [waitfor][data-waitfor-ready] {
    animation: none;
  }
}

.text-action {
  width: auto;
  max-width: 100%;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid currentColor;
  border-radius: 0.25rem;
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: rgb(72, 72, 72);
}

/* Reflection passages grow together rather than occupying separate screens. */
#reflection {
  min-height: 0;
  align-items: stretch;
  justify-content: flex-start;
}

.reflection-part {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.75rem 0;
}

.reflection-part:focus {
  outline: none;
}

.reflection-part .typing {
  margin: 0 0 0.75rem;
}

.reflection-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.75rem auto;
}
