:root {
  --page-color: #eee;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  font-family: 'Zilla Slab', serif;
  background: #577386;
}

body::-webkit-scrollbar {
  display: none;
}

p {
  margin: 0 0 3px;
  line-height: 1;
  letter-spacing: 1px;
  pointer-events: none;
}

.prev-btn, .next-btn {
  position: absolute;
  top: 0;
  border-radius: 50%;
  color: black;
  text-align: center;
  width: 50px;
  height: 50px;
  line-height: 50px;
  margin: 10px;
}

.prev-btn:hover, .next-btn:hover {
  background-color: #ddd;
}

.prev-btn {
  left: 0;
}

.next-btn {
  right: 0;
}

.calendar {
  margin: 110px 50px 50px;
  position: relative;
  width: 800px;
  cursor: default;
  user-select: none;
}

.calendar::before, .calendar::after {
  content: '';
  position: absolute;
  top: -38px;
  left: 60px;
  width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ddd;
  z-index: 3;
}

.calendar::after {
  left: initial;
  right: 60px;
}

.pages {
  position: relative;
  background: var(--page-color);
  box-shadow: 0 10px 0 0px #a5a4a4;
  min-height: 800px;
}

.pages::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 60px;
  background: indianred;
  bottom: 100%;
  left: 0;
  z-index: 2;
}

.page {
  text-align: center;
  position: relative;
  padding: 20px 30px 15px;
  background: var(--page-color);
}

.page::before {
  content: '';
  position: absolute;
  bottom: 99%;
  left: 0;
  display: block;
  background:
          linear-gradient(-45deg, var(--page-color) 10px, var(--page-color) 10px, var(--page-color) 10px,  transparent 0),
          linear-gradient(45deg, var(--page-color) 10px, transparent 0);
  background-position: left top;
  background-repeat: repeat-x;
  background-size: 10px 18px;
  height: 10px;
  width: 100%;
}

.month,
.day-name {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 60px;
}

.day {
  font-size: 240px;
  font-weight: 700;
  margin: 0 0 15px;
}

.year {
  font-size: 36px;
  margin-bottom: 50px;
}

.person {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 15px;
}

.quote {
  font-size: 24px;
  margin: 0 0 20px;
}

.birthday {
  font-size: 28px;
  margin: 50px 0 20px;
}

.context {
  font-size: 22px;
  color: #5e5e5e;
}

span.context {
  margin-left: 10px;
}

p.context {
  margin: 0 0 20px;
}

.tear {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transform-origin: top left;
  box-shadow: 0 0 10px -1px rgba(0,0,0,0.5);
  pointer-events: none;
  animation: tear-animation .8s linear forwards;
}

@keyframes tear-animation {
  0% {
    transform: rotate(0deg);
    top: 0;
    opacity: 1;
  }
  20% {
    transform: rotate(15deg);
    top: 0;
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    top: 400px;
    opacity: 0;
  }
}