#book-wrapper {
    position: relative;
    perspective: 1800px;
}

#book {
    display: flex;
    width: 100%;
    height: 100%;
}

.page {
    flex: 1;
    background: #fdfaf4;
    overflow-y: auto;
    box-shadow: inset 0 0 30px rgba(0,0,0,.05);
    transition: transform 0.25s ease;
}

/* Flip layer */
.flip {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
    z-index: 10;
}

.flip.hidden {
    display: none;
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    overflow: hidden;
    background: #fdfaf4;
}

.flip-back {
    transform: rotateY(180deg);
}

.flip.next {
    right: 0;
    transform-origin: left center;
}

.flip.prev {
    left: 0;
    transform-origin: right center;
}

.book-image {
    text-align: center;
    margin: 1.5em 0;
}

.book-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.book-image figcaption {
    font-size: 0.9em;
    color: #555;
    margin-top: 0.5em;
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.4em 0;
    cursor: pointer;
    border-bottom: 1px dotted #ccc;
}

.toc-title {
    font-weight: 500;
}

.toc-page {
    color: #777;
}

.measure {
    width: 50%;
    height: 100vh;
    padding: 2rem;
}