/* overlays.css — auto-split from styles.css */
/* ===== LETTER OVERLAY — more alive ===== */
.letter-overlay {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: transparent;
}
.letter-overlay.show {
  display: flex;
}
.letter-overlay-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(42, 36, 28, 0.75), rgba(8, 7, 5, 0.88) 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(224, 192, 138, 0.08), transparent 60%),
    radial-gradient(ellipse 40% 35% at 85% 20%, rgba(224, 192, 138, 0.07), transparent 55%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: letterBgIn 0.45s ease both;
}
.letter-overlay-glow {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(520px, 90vw);
  height: min(420px, 70vh);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(232, 204, 150, 0.18), transparent 65%);
  pointer-events: none;
  animation: letterGlowPulse 3.5s ease-in-out infinite alternate;
}
@keyframes letterBgIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes letterGlowPulse {
  from { opacity: 0.55; transform: translate(-50%, -50%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

.letter-paper {
  position: relative;
  z-index: 2;
  width: min(460px, 100%);
  max-height: 85svh;
  overflow-y: auto;
  padding: 36px 28px 28px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(224, 192, 138, 0.4) !important;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(232, 204, 150, 0.14), transparent 50%),
    linear-gradient(165deg, rgba(48, 42, 34, 0.97), rgba(22, 19, 15, 0.98)) !important;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.5),
    0 0 60px rgba(224, 192, 138, 0.1),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
  text-align: left;
  animation: letterPaperIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes letterPaperIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.letter-seal {
  text-align: center;
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 10px;
  filter: drop-shadow(0 0 12px rgba(232, 204, 150, 0.45));
  animation: softPulse 2.4s ease-in-out infinite;
  font-family: Georgia, 'Playfair Display', serif;
}
.letter-paper h2,
#letterTitle {
  text-align: center;
  color: #fffaf0 !important;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.45rem, 4.5vw, 1.85rem);
  margin: 0 0 12px !important;
  line-height: 1.3;
}
.letter-rule {
  width: 56px;
  height: 1px;
  margin: 0 auto 18px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 10px rgba(232, 204, 150, 0.4);
}
#letterBody {
  color: #efe6d6;
}
#letterBody p {
  color: #efe6d6 !important;
  line-height: 1.8 !important;
  margin: 0.75em 0 !important;
  text-align: left !important;
  max-width: none !important;
  font-size: 1.02rem !important;
}
.letter-close {
  display: flex !important;
  margin: 22px auto 0 !important;
}

@media (max-width: 700px) {
  .letter-overlay-bg {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background:
      radial-gradient(ellipse 80% 60% at 50% 40%, rgba(40, 34, 26, 0.92), rgba(10, 9, 7, 0.94) 75%) !important;
  }
  .letter-overlay-glow {
    animation: none !important;
    opacity: 0.7;
  }
  .letter-paper {
    padding: 28px 18px 22px !important;
  }
  .letter-seal {
    animation: none !important;
  }
}


/* ===== MODAL = same living style as letters ===== */
#modal.letter-overlay,
#modal.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: transparent;
}
#modal.show {
  display: flex !important;
}
#modalContent.modal-paper,
#modalContent.letter-paper {
  text-align: center;
}
#modalContent .modal-body {
  text-align: center;
}
#modalContent .modal-body p {
  text-align: center !important;
  color: #efe6d6 !important;
  line-height: 1.8 !important;
  margin: 0.85em 0 !important;
  font-size: 1.02rem !important;
  max-width: none !important;
}
#modalContent .modal-emphasis {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem !important;
  color: #fffaf0 !important;
  margin: 1em 0 !important;
}
#modalContent .modal-sign {
  font-family: 'Playfair Display', Georgia, serif !important;
  color: var(--muted) !important;
  margin-top: 1.2em !important;
}
#modalContent h2 {
  text-align: center;
  color: #fffaf0 !important;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.55rem, 4.5vw, 2rem);
  margin: 0 0 12px !important;
}


/* ===== NEW NOTE HIGHLIGHT ===== */
.new-note {
  width: min(520px, 100%);
  margin: 28px auto 0;
  padding: 22px 20px 20px;
  border-radius: 20px;
  border: 1px solid rgba(232, 204, 150, 0.45);
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(232, 204, 150, 0.16), transparent 55%),
    linear-gradient(155deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03));
  box-shadow:
    0 16px 40px rgba(0,0,0,0.25),
    0 0 40px rgba(232, 204, 150, 0.1);
  text-align: left;
  animation: newNoteIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes newNoteIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.new-note-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1a1610;
  background: linear-gradient(135deg, #e8c070, #d4a040);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(196, 146, 58, 0.35);
}
.new-note-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  font-weight: 600;
}
.new-note p {
  margin: 0 0 12px !important;
  font-size: 1rem !important;
  line-height: 1.75 !important;
  color: #f0e8d8 !important;
  text-align: left !important;
  max-width: none !important;
}
.new-note p:last-child {
  margin-bottom: 0 !important;
}
@media (max-width: 700px) {
  .new-note {
    padding: 18px 14px;
    margin-top: 22px;
  }
}


