a.back-to-story-button {
    color: var(--main-text-color);
    text-decoration: none;
    font-size: 1.25em;

    border: var(--accent-1) 3px solid;
    border-radius: 5px;
    box-sizing: border-box;

    margin: 0 1.75em 20px;
    padding: 0 5px;

    display: block;
    text-align: center;

    transition: all 0.3s linear;
}

a.back-to-story-button:hover {
    background-color: var(--accent-1-dark);
}

.chapters {
    overflow-y: auto;

    height: 100%;
    width: 100%;
}

#chapters-modal {
    border: var(--accent-2) 3px solid;
    border-radius: 15px;

    box-sizing: border-box;

    background-color: var(--main-background-color);

    padding: 15px;

    position: fixed;

    width: max-content;
    max-width: 90dvw;
    max-height: 75dvh;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    visibility: hidden;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;

    z-index: 10;

    transition: opacity 0.15s ease-in-out;
}

#chapters-modal.active {
    visibility: visible;
    opacity: 1;
}

#chapters-modal-cover {
    visibility: hidden;
    opacity: 0;

    background-color: black;

    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 100dvw;
    z-index: 1;

    transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
}

#chapters-modal-cover.active {
    visibility: visible;
    opacity: 0.5;
}

#hide-chapters {
    display: flex;
    border: none;
    padding: 0;
    border-radius: 5px;
    background-color: red;
    color: var(--main-text-color);
    box-sizing: border-box;
    height: 1lh;
    transition: all 0.3s linear;

    font-size: 20px;

    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 999;
}

.nav-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    margin-top: 1em;
}

.nav-buttons a {
    color: white;
    display: block;
    text-decoration: none;

    align-content: center;
    text-align: center;

    padding: 5px;

    border: var(--accent-2) 3px solid;
    border-radius: 5px;
    box-sizing: border-box;

    transition: background-color 0.3s linear;
}

.nav-buttons a.square {
    display: flex;
}

.nav-buttons a:hover {
    background-color: var(--accent-2-dark);
}

.nav-buttons > * {
    height: 100%;
}

.nav-prev {
    grid-column: 1;
    justify-self: left;
}

.nav-center {
    grid-column: 2;
    justify-self: center;
}

.nav-next {
    grid-column: 3;
    justify-self: right;
}