body {
  margin: 0;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(
    135deg,
    #f4f2ee 0%,
    #d7cec4 100%
  );

  font-family: Arial, Helvetica, sans-serif;
}




.scene {
  position: relative;
  width: 560px;
  height: 420px;

  cursor: pointer;
  user-select: none;
}




.envelope {
  position: absolute;

  top: 50%;
  left: 50%;

  width: 520px;
  height: 340px;

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

  background: #f8f3ec;

  border: 4px solid #c9b59a;
  border-radius: 22px;

  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.22);

  overflow: hidden;

  transition: transform 0.4s ease;
}




.envelope::before {
  content: '';

  position: absolute;

  top: 0;
  left: 0;

  width: 100%;
  height: 58%;

  background: linear-gradient(
    135deg,
    #ddc9b1 0%,
    #f8f3ec 100%
  );

  clip-path: polygon(
    0 0,
    100% 0,
    52% 50%,
    48% 50%,
    0 0
  );

  transform-origin: top center;

  transition: transform 0.45s ease;

  z-index: 3;

  box-shadow:
    0 8px 18px rgba(0,0,0,0.08) inset;
}




.envelope::after {
  content: '';

  position: absolute;

  top: 28px;
  right: 28px;

  width: 72px;
  height: 72px;

  background: radial-gradient(
    circle at 50% 50%,
    #f7f0e8 0%,
    #d5b89a 72%
  );

  border-radius: 12px;

  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.35);
}




.envelope .stamp {
  position: absolute;

  top: 34px;
  right: 36px;

  width: 16px;
  height: 16px;

  border-radius: 50%;

  background: #c98c5b;

  box-shadow:
    0 0 0 6px rgba(201,140,91,0.15);
}




.envelope .stripe {
  position: absolute;

  left: 0;
  top: 0;

  width: 100%;
  height: 100%;

  background-image:
    linear-gradient(
      135deg,
      transparent 0%,
      transparent 32%,
      rgba(201,181,148,0.12) 32%,
      rgba(201,181,148,0.12) 34%,
      transparent 34%
    ),

    linear-gradient(
      45deg,
      transparent 0%,
      transparent 32%,
      rgba(201,181,148,0.12) 32%,
      rgba(201,181,148,0.12) 34%,
      transparent 34%
    );

  background-size: 36px 36px;

  pointer-events: none;

  opacity: 0.32;
}




.letter {
  position: absolute;

  top: 32px;
  left: 50%;

  width: 456px;
  height: 276px;

  background: linear-gradient(
    #fffefc,
    #fffdf9
  );

  border: 1px solid #d7d0c5;

  border-radius: 14px;

  box-shadow:
    0 18px 40px rgba(0,0,0,0.12);

  transform: translate(-50%, 0);

  opacity: 0;

  z-index: 5;

  transition:
    top 0.45s ease,
    opacity 0.45s ease;

  padding: 18px;

  box-sizing: border-box;

  overflow-y: auto;

  -webkit-overflow-scrolling: touch;
}




.letter::-webkit-scrollbar {
  width: 10px;
}

.letter::-webkit-scrollbar-track {
  background: transparent;
}

.letter::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    #d1b99e,
    #c9ad8a
  );

  border-radius: 8px;

  border: 2px solid rgba(255,255,255,0.6);
}




.letter-content {
  display: flex;

  flex-direction: column;

  gap: 22px;

  padding-right: 6px;
}




.section {
  min-height: 140px;

  padding: 12px 14px;

  border-radius: 10px;

  background: rgba(250,250,250,0.6);

  box-shadow:
    0 6px 12px rgba(0,0,0,0.04) inset;

  color: #2f2d2a;
}




.section h2 {
  margin: 0 0 8px;

  font-size: 18px;

  display: flex;
  align-items: center;

  gap: 10px;
}




.section p {
  margin: 0;

  line-height: 1.6;

  color: #4b4743;

  font-size: 14px;
}




.envelope.open::before {
  transform: translateY(-122%);
}

.envelope.open .letter {
  top: 60px;
  opacity: 1;
}




.scroll-hint {
  position: absolute;

  right: 18px;
  bottom: 8px;

  font-size: 12px;

  color: rgba(63,58,53,0.7);

  background: rgba(255,255,255,0.6);

  padding: 6px 8px;

  border-radius: 10px;

  z-index: 6;

  box-shadow:
    0 6px 12px rgba(0,0,0,0.06);
}




.hint {
  position: absolute;

  bottom: -44px;
  left: 50%;

  transform: translateX(-50%);

  color: #5f584f;

  font-size: 14px;
}




@media (max-width: 600px) {

  .scene {
    transform: scale(0.86);

    transform-origin: center;
  }

}