* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, 'Times New Roman', serif;
  color: #3b2a24;
  background:
    radial-gradient(circle at top left, #fff2f5 0, transparent 35%),
    radial-gradient(circle at bottom right, #e8fbff 0, transparent 35%),
    #fffaf6;
}

.app {
  width: min(1100px, 94vw);
  margin: 0 auto;
  padding: 36px 0 48px;
  text-align: center;
}

.intro .eyebrow {
  margin: 0 0 8px;
  color: #c27683;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.intro h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
}

.intro p {
  font-size: 1.1rem;
}

.book-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(900px, 82vw);
  min-height: 560px;
  perspective: 1600px;
  filter: drop-shadow(0 24px 30px rgba(70, 45, 35, 0.24));
}

.page {
  position: relative;
  padding: clamp(24px, 4vw, 48px);
  border: 10px solid #d79aa5;
  outline: 2px dashed rgba(255,255,255,0.8);
  outline-offset: -18px;
  background: #a27855;
  overflow: hidden;
}

.page::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 2px solid rgba(255, 221, 229, 0.75);
  pointer-events: none;
}

.left-page {
  border-radius: 18px 4px 4px 18px;
  border-right-width: 4px;
}

.right-page {
  border-radius: 4px 18px 18px 4px;
  border-left-width: 4px;
}

.left-page::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 0;
  bottom: 0;
  width: 18px;
  background: repeating-linear-gradient(
    to bottom,
    #3e332f 0 9px,
    #16110f 9px 18px,
    transparent 18px 30px
  );
  z-index: 2;
}

.cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
}

.big-number {
  font-size: clamp(5rem, 13vw, 9rem);
  line-height: 0.9;
  font-weight: 900;
  color: #bde8e8;
  text-shadow:
    -2px -2px 0 #fff,
    2px -2px 0 #fff,
    -2px 2px 0 #fff,
    2px 2px 0 #fff,
    0 8px 0 rgba(0,0,0,0.08);
}

.cover h2 {
  margin: 18px 0 8px;
  font-size: clamp(2rem, 6vw, 4rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cover p {
  font-size: 1.8rem;
  margin: 0;
}

.decorations {
  margin-top: 24px;
  font-size: 2rem;
  color: #ffdce4;
  letter-spacing: 0.4em;
}

.letter-page {
  background:
    linear-gradient(rgba(255,255,255,0.64), rgba(255,255,255,0.64)),
    #a27855;
}

.page-number {
  color: #9f6470;
  font-style: italic;
  margin-top: 0;
}

.letter-page h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0 0 20px;
}

.letter-text {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 28px;
  background: #fff8e7;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(71, 45, 35, 0.18);
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
  text-align: left;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 30px,
    rgba(87, 132, 167, 0.18) 30px 31px
  );
}

.letter-text p {
  margin: 0 0 16px;
}

.nav-button {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: #d98290;
  color: white;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(128, 76, 86, 0.25);
}

.nav-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.book.flipping .right-page {
  animation: flip 0.45s ease;
}

@keyframes flip {
  0% { transform: rotateY(0deg); }
  48% { transform: rotateY(-14deg) scaleX(0.96); }
  100% { transform: rotateY(0deg); }
}

.dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #d8c8c3;
}

.dot.active {
  background: #d98290;
}

@media (max-width: 760px) {
  .book-wrap {
    gap: 8px;
  }

  .book {
    grid-template-columns: 1fr;
    width: min(560px, 78vw);
    min-height: auto;
  }

  .left-page {
    display: none;
  }

  .right-page {
    border-radius: 18px;
    min-height: 520px;
  }

  .nav-button {
    width: 42px;
    height: 42px;
    font-size: 2.2rem;
  }
}
