body.page-letters {
  position: relative;
}

.wind {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.closeBubble {
  top: 3vh;
  left: 3vh;
}

.pageCard {
  animation: fadeIn 0.45s ease-out forwards;
}

.pageHeader {
  align-items: flex-start;
}

.composerFooter,
.tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.composerLabel,
.tabButton {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.composerCard {
  position: relative;
  margin-top: 28px;
  padding: 22px 22px 18px;
  border: 1px solid rgba(196, 134, 142, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 252, 251, 0.94), rgba(250, 246, 243, 0.74)),
    radial-gradient(circle at top right, rgba(228, 198, 203, 0.34), transparent 40%);
  box-shadow: 0 24px 60px -42px rgba(70, 49, 55, 0.55);
  overflow: hidden;
  animation: slideUp 0.5s ease-out forwards;
}

.composerCard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.38), transparent 50%);
  pointer-events: none;
}

.composerLabel {
  position: relative;
  margin: 0;
  color: var(--muted);
}

.draftInput {
  position: relative;
  width: 100%;
  border: 0;
  margin-top: 14px;
  padding: 14px 0 6px;
  resize: vertical;
  min-height: 160px;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 29px,
      var(--line) 29px,
      var(--line) 30px
    );
  background-position-y: 18px;
  color: var(--deep);
  font-size: 17px;
  line-height: 30px;
  outline: none;
}

.composerFooter {
  position: relative;
  margin-top: 16px;
}

.submitButton {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  background: var(--deep);
  color: #fff9f7;
  font-size: 15px;
  box-shadow: 0 18px 32px -24px rgba(69, 55, 61, 0.72);
}

.tabs {
  margin-top: 28px;
  justify-content: flex-start;
  gap: 24px;
  border-bottom: 1px solid rgba(196, 134, 142, 0.16);
}

.tabButton {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0 0 14px;
  color: var(--muted);
}

.tabButton.isActive {
  color: var(--deep);
}

.tabButton.isActive::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--deep);
}

.tabBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(196, 134, 142, 0.18);
  color: var(--primary);
  font-size: 10px;
  letter-spacing: normal;
}

.lettersList {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.letterCard {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 252, 251, 0.82), rgba(255, 247, 244, 0.62));
  padding: 18px 18px 16px;
  text-align: left;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  animation: slideUp 0.45s ease-out forwards;
}

.letterCard.isFresh {
  animation: cardSlideIn 0.55s ease-out;
}

.letterCard.isUnread {
  border-color: rgba(196, 134, 142, 0.26);
  box-shadow: 0 20px 45px -30px rgba(196, 134, 142, 0.45);
}

.letterCard:hover {
  transform: translateY(-2px) rotate(0.3deg);
  box-shadow: 0 24px 42px -30px rgba(70, 49, 55, 0.3);
  border-color: rgba(196, 134, 142, 0.24);
}

.letterCardHeader {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.letterIcon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(196, 134, 142, 0.1);
  color: var(--primary);
  font-size: 18px;
}

.letterMeta {
  flex: 1;
}

.letterTitle {
  margin: 0;
  font-size: 18px;
  color: var(--deep);
}

.letterDate {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.letterChevron {
  color: var(--muted);
  font-size: 18px;
  transition: transform 0.25s ease;
}

.letterCard.isExpanded .letterChevron {
  transform: rotate(180deg);
}

.letterContent {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.35s ease, margin-top 0.35s ease;
}

.letterCard.isExpanded .letterContent {
  max-height: 460px;
  margin-top: 16px;
  opacity: 1;
}

.letterPaper {
  padding: 16px 18px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 252, 251, 0.84), rgba(251, 247, 245, 0.9)),
    repeating-linear-gradient(
      transparent,
      transparent 29px,
      var(--line) 29px,
      var(--line) 30px
    );
  background-size: auto, 100% 100%;
  background-position-y: 0, 18px;
  white-space: normal;
  font-size: 16px;
  line-height: 30px;
}

@media (max-width: 720px) {
  .draftInput {
    min-height: 140px;
  }

  .closeBubble {
    top: 14px;
    left: 14px;
  }
}
