* {
	margin: 0;
	padding: 0;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000000;
}

.overlay-container {
	width: 100%;
}

.overlay-img {
	width: 100%;
	position: absolute;
	top: 0;
	left: 0;
}

/* Затемнение */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s;
}

.overlay.active {
    visibility: visible;
    opacity: 1;
}

/* Контейнер свитка */
.scroll-modal {
    position: relative;
    width: 700px;
    max-width: 90vw;
    transform: scaleX(0);
    transform-origin: center center;
    transition: transform 0.8s cubic-bezier(.2,.9,.2,1);
}

/* Раскрытие */
.overlay.active .scroll-modal {
    transform: scaleX(1);
}

/* Левый рулон */
.scroll-modal::before,
.scroll-modal::after {
    content: "";
    position: absolute;
    top: -10px;
    width: 40px;
    height: calc(100% + 20px);
    border-radius: 20px;
	background-repeat: round;
}

.scroll-modal::before {
    left: -20px;
	background-image: url("images/roller-left.png");
}

.scroll-modal::after {
    right: -20px;
	background-image: url("images/roller-right.png");
}

/* Бумага */
.paper {
    height: 100%;
    padding: 20px;
    overflow: auto;
}

.close {
    position: absolute;
    top: 40px;
    right: 50px;
    font-size: 28px;
    cursor: pointer;
    color: #5d4320;
}

/* Make the cards responsive for smaller screens */
@media screen and (max-width: 600px)  {
	.overlay-img {
		width: unset !important;
		height: 100dvh !important;
	}
}