@font-face {
  font-family: "Custom";
  src: url(PTSerif-Regular.ttf);
}

body {
  margin: 0;
  padding: 0;
  font-family: "Custom", serif;
  background: radial-gradient(rgba(100, 50, 50, 0.6) 50%, rgba(0, 0, 0, 0.9))
      no-repeat center center fixed,
    url(pandemonium.jpg) no-repeat center center fixed;
  background-size: cover;
  color: #3a2d1b;
  font-size: .77rem;
}

.book {
  max-width: 800px;
  aspect-ratio: 2 / 3;
  margin: 2rem auto;
  padding: 3rem;
  padding-bottom: 10rem;
  border: 1px solid rgba(50, 0, 0, 0.5);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  bottom: 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: radial-gradient(rgba(240, 50, 50, 0.1) 50%, rgba(50, 0, 0, 0.5)),
    url(parchment.jpg) no-repeat center center;
  background-size: cover;
  user-select: none;
  box-sizing: border-box;
  opacity: 1;
}

.book.coverf {
  background: radial-gradient(rgba(240, 50, 50, 0.1) 50%, rgba(50, 0, 0, 0.5)),
    url(cover_front.jpg) no-repeat top center;
  background-size: contain;
}

.book.coverb {
  background: radial-gradient(rgba(240, 50, 50, 0.1) 50%, rgba(50, 0, 0, 0.5)),
    url(cover_back.jpg) no-repeat top center;
  background-size: contain;
}

.book > * {
  mix-blend-mode: hard-light;
}

.book.loading > *:not(.navigation) {
  opacity: 0;
}

h1,
h2 {
  margin-bottom: 0.5rem;
}

a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
  font-style: italic;
  padding-left: 15px;
}

.section {
  margin-top: 1.5rem;
  text-align: justify;
  hyphens: auto;
}

blockquote {
  font-style: italic;
  margin: 1rem 0;
  border-left: 2px solid #3a2d1b;
  padding-left: 1rem;
}

figure {
  float: left;
  display: flex;
  flex-direction: column;
  max-width: 300px;
}

figure img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

figcaption {
  text-align: center;
  font-size: 0.75rem;
  color: #5e4a35;
}

.page-number,
.footer-number {
  text-align: center;
  font-weight: bold;
  margin: 1rem 0;
}

.footer-number {
  bottom: 0;
  position: absolute;
  justify-self: anchor-center;
}

.navigation {
  text-align: center;
  margin-top: 2rem;
  position: fixed;
  bottom: 2rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
}

.navigation button {
  background-color: #d1bfa5;
  border: none;
  padding: 0.5rem 1rem;
  margin: 0 1rem;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
