/* ==========================================================
   VINTAGE KRAFT & PARCHMENT THEME (Vàng Kem & Cổ Điển)
   Troll Edition: Minh Thành LGBT Birthday
   ========================================================== */

:root {
  /* Vintage Palette */
  --vintage-cream: #f7eedc;
  --vintage-parchment: #f0e2c8;
  --vintage-kraft: #d9bf94;
  --vintage-kraft-dark: #b89868;
  --vintage-ink: #2b1f17;
  --vintage-sepia: #4a3728;
  --vintage-faded: #8c735d;
  
  --vintage-wax: #881b1b;
  --vintage-wax-shadow: #520e0e;
  --vintage-stamp-red: #a32c2c;
  --vintage-stamp-blue: #234975;
  
  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-script: 'Caveat', cursive;
  --font-typewriter: 'Special Elite', 'Courier New', monospace;

  /* Elevation */
  --shadow-envelope: 0 20px 45px -10px rgba(58, 41, 28, 0.28), 0 8px 16px rgba(58, 41, 28, 0.12);
  --shadow-paper: 0 15px 35px -8px rgba(43, 31, 23, 0.22);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100dvh;
  font-family: var(--font-serif);
  color: var(--vintage-ink);
  background-color: var(--vintage-cream);
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================
   VINTAGE BACKGROUND & AIRMAIL WATERMARKS
   ========================================================== */
.vintage-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 30%, #fdf6ea 0%, #f2e4cb 60%, #e5cfab 100%);
}

.vintage-paper-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(43, 31, 23, 0.04) 1px, transparent 0),
    linear-gradient(to right, rgba(43, 31, 23, 0.02) 1px, transparent 1px);
  background-size: 20px 20px, 40px 40px;
  opacity: 0.8;
}

.vintage-postmark {
  position: absolute;
  font-family: var(--font-typewriter);
  color: rgba(43, 31, 23, 0.06);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

.postmark-tl {
  top: 60px;
  left: -20px;
  transform: rotate(-15deg);
}

.postmark-br {
  bottom: 60px;
  right: -20px;
  transform: rotate(12deg);
}

/* ==========================================================
   TOP BAR
   ========================================================== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.vintage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f7eedc;
  border: 1px dashed var(--vintage-faded);
  padding: 6px 14px;
  border-radius: 4px;
  font-family: var(--font-typewriter);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vintage-sepia);
  letter-spacing: 0.08em;
  box-shadow: 0 2px 6px rgba(43, 31, 23, 0.06);
}

.badge-icon {
  width: 14px;
  height: 14px;
}

.audio-control-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fdf6ea;
  border: 1px solid var(--vintage-kraft-dark);
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-typewriter);
  font-size: 0.75rem;
  color: var(--vintage-sepia);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(43, 31, 23, 0.08);
  transition: all 0.2s ease;
}

.audio-control-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.audio-control-btn.is-playing {
  background: #881b1b;
  color: #fff4ea;
  border-color: #520e0e;
  animation: pulse-music 1.2s infinite alternate;
}

@keyframes pulse-music {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

/* ==========================================================
   MAIN CONTAINER
   ========================================================== */
.main-container {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 75px 16px 36px;
  max-width: 540px;
  margin: 0 auto;
}

.stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.hidden {
  display: none !important;
}

/* ==========================================================
   STAGE 1: VINTAGE 3D ENVELOPE
   ========================================================== */
.envelope-header-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

.vintage-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-typewriter);
  font-size: 0.75rem;
  background: #efe3ce;
  border: 1px solid var(--vintage-kraft-dark);
  padding: 4px 12px;
  border-radius: 2px;
  letter-spacing: 0.06em;
  color: var(--vintage-sepia);
}

.tag-icon {
  width: 13px;
  height: 13px;
}

.vintage-tag.highlight {
  background: #a32c2c;
  color: #fff5e8;
  border-color: #7a1f1f;
  font-weight: 700;
}

.vintage-envelope-wrapper {
  position: relative;
  width: 320px;
  height: 220px;
  margin: 10px auto 26px;
  perspective: 1200px;
  cursor: pointer;
}

@media (max-width: 380px) {
  .vintage-envelope-wrapper {
    width: 290px;
    height: 200px;
  }
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--vintage-kraft);
  border-radius: 8px;
  box-shadow: var(--shadow-envelope);
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
  border: 1px solid rgba(43, 31, 23, 0.15);
}

.vintage-envelope-wrapper:hover .envelope {
  transform: translateY(-4px);
}

/* Interior Back */
.envelope-back {
  position: absolute;
  inset: 0;
  background: #cbb085;
  border-radius: 8px;
  z-index: 1;
}

/* Peeking Letter inside */
.envelope-letter-peek {
  position: absolute;
  top: 10px;
  left: 20px;
  right: 20px;
  height: 130px;
  background: #fcf6e8;
  border-radius: 4px;
  padding: 16px 12px;
  box-shadow: 0 4px 14px rgba(43, 31, 23, 0.12);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed var(--vintage-kraft-dark);
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.65s, box-shadow 1.2s ease 0.65s;
}

.peek-stamp {
  font-family: var(--font-typewriter);
  font-size: 0.6875rem;
  color: var(--vintage-stamp-red);
  border: 1px solid var(--vintage-stamp-red);
  padding: 1px 8px;
  border-radius: 2px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.peek-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--vintage-ink);
  margin-top: 8px;
  letter-spacing: 0.04em;
}

/* Vintage Postage Stamp in top right */
.vintage-stamp-art {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 44px;
  height: 52px;
  background: #fbf5e6;
  border: 2px dashed #a32c2c;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(4deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.stamp-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-family: var(--font-typewriter);
  color: #a32c2c;
  line-height: 1.1;
}

.stamp-post {
  font-size: 0.4375rem;
  font-weight: 700;
}

.stamp-cost {
  font-size: 0.6875rem;
  font-weight: 800;
}

.stamp-symbol {
  font-size: 0.5rem;
}

/* Flaps */
.envelope-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 160px 110px 160px;
  border-color: transparent transparent var(--vintage-kraft) transparent;
  z-index: 4;
  border-radius: 0 0 8px 8px;
}

@media (max-width: 380px) {
  .envelope-bottom {
    border-width: 0 145px 100px 145px;
  }
}

.envelope-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 110px 0 110px 155px;
  border-color: transparent transparent transparent #cfae7e;
  z-index: 3;
  border-radius: 8px 0 0 8px;
}

@media (max-width: 380px) {
  .envelope-left {
    border-width: 100px 0 100px 140px;
  }
}

.envelope-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 110px 155px 110px 0;
  border-color: transparent #c9a775 transparent transparent;
  z-index: 3;
  border-radius: 0 8px 8px 0;
}

@media (max-width: 380px) {
  .envelope-right {
    border-width: 100px 140px 100px 0;
  }
}

/* Top Folding Flap */
.envelope-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 115px 160px 0 160px;
  border-color: var(--vintage-kraft-dark) transparent transparent transparent;
  transform-origin: top center;
  transition: transform 1.4s cubic-bezier(0.25, 1, 0.5, 1), z-index 0.3s 0.65s;
  z-index: 5;
  border-radius: 8px 8px 0 0;
}

@media (max-width: 380px) {
  .envelope-top {
    border-width: 105px 145px 0 145px;
  }
}

/* Vintage Wax Seal */
.wax-seal {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: radial-gradient(circle at 35% 35%, #a62a2a, var(--vintage-wax) 70%, var(--vintage-wax-shadow) 100%);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(82, 14, 14, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.35);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
}

.wax-seal:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.wax-seal:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.seal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffeedb;
  border: 1.5px dashed rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  width: 50px;
  height: 50px;
}

.seal-initials {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  line-height: 1;
}

.seal-caption {
  font-family: var(--font-typewriter);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  margin-top: 1px;
}

/* Open State */
.envelope.is-open .envelope-top {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope.is-open .wax-seal {
  transform: translate(-50%, -50%) scale(0.4) rotate(15deg);
  opacity: 0;
  pointer-events: none;
}

.envelope.is-open .envelope-letter-peek {
  transform: translateY(-160px);
  box-shadow: 0 24px 48px rgba(43, 31, 23, 0.28);
}

/* Envelope Actions */
.envelope-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.envelope-hint {
  font-family: var(--font-typewriter);
  font-size: 0.8125rem;
  color: var(--vintage-faded);
}

/* ==========================================================
   VINTAGE BUTTONS
   ========================================================== */
.vintage-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #38271e;
  color: #f7eedc;
  font-family: var(--font-typewriter);
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 9999px;
  border: 2px solid #5a4233;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(43, 31, 23, 0.2);
  transition: all 0.2s ease;
  user-select: none;
}

.vintage-btn-primary:hover {
  background: #4a3429;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(43, 31, 23, 0.28);
}

.vintage-btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

.vintage-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fdf7ec;
  color: var(--vintage-ink);
  font-family: var(--font-typewriter);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 9999px;
  border: 1.5px solid var(--vintage-kraft-dark);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(43, 31, 23, 0.08);
  transition: all 0.2s ease;
}

.vintage-btn-secondary:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.vintage-btn-secondary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-shake {
  animation: gentle-shake 2.5s infinite ease-in-out;
}

@keyframes gentle-shake {
  0%, 80%, 100% { transform: scale(1) rotate(0deg); }
  85% { transform: scale(1.03) rotate(-1.5deg); }
  90% { transform: scale(1.03) rotate(1.5deg); }
  95% { transform: scale(1.03) rotate(-1deg); }
}

.btn-icon {
  width: 18px;
  height: 18px;
}

/* ==========================================================
   STAGE 2: VINTAGE BIRTHDAY CARD (Mặt thiệp chính)
   ========================================================== */
.vintage-card-container {
  width: 100%;
  max-width: 480px;
  background: #fbf5e7;
  border-radius: 12px;
  padding: 32px 24px 28px;
  border: 2px solid var(--vintage-kraft);
  box-shadow: 0 20px 45px -10px rgba(43, 31, 23, 0.25), 0 0 0 1px rgba(212, 175, 55, 0.2);
  text-align: center;
  position: relative;
  animation: card-appear 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes card-appear {
  0% {
    opacity: 0;
    transform: translateY(45px) scale(0.92);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-postal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--vintage-kraft-dark);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.postal-stamp-small {
  font-family: var(--font-typewriter);
  font-size: 0.6875rem;
  color: var(--vintage-stamp-red);
  border: 1px solid var(--vintage-stamp-red);
  padding: 2px 8px;
  border-radius: 2px;
  transform: rotate(2deg);
}

.card-title-block {
  margin-bottom: 24px;
}

.vintage-kicker {
  font-family: var(--font-typewriter);
  font-size: 0.75rem;
  color: var(--vintage-faded);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.vintage-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.title-sub {
  font-size: clamp(1.6rem, 5.5vw, 2.3rem);
  font-weight: 800;
  color: var(--vintage-sepia);
  letter-spacing: 0.05em;
}

.title-main {
  font-size: clamp(1.9rem, 6.5vw, 2.7rem);
  font-weight: 900;
  color: #8c2323;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 0px #edd6bd;
}

.vintage-mock-sub {
  font-family: var(--font-typewriter);
  font-size: 0.875rem;
  color: var(--vintage-faded);
  margin-top: 8px;
}

/* Polaroid Photo Frame with Aged Tone */
.vintage-photo-frame {
  position: relative;
  margin: 20px auto 26px;
  display: inline-block;
}

.photo-pin {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background: #a32c2c;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 2px 3px rgba(255, 255, 255, 0.4);
  z-index: 10;
}

.photo-polaroid {
  background: #ffffff;
  padding: 12px 12px 18px 12px;
  border-radius: 6px;
  border: 1px solid #d4c5a9;
  box-shadow: 0 10px 24px -4px rgba(43, 31, 23, 0.18);
  transform: rotate(-1.5deg);
  transition: transform 0.3s ease;
}

.photo-polaroid:hover {
  transform: rotate(0deg) scale(1.02);
}

.photo-wrap {
  width: 230px;
  height: 230px;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
  background: #ecdcc3;
}

@media (max-width: 360px) {
  .photo-wrap {
    width: 200px;
    height: 200px;
  }
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.2) contrast(1.05);
}

.vintage-photo-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 30px rgba(74, 55, 40, 0.3);
  pointer-events: none;
}

.photo-caption {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.caption-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--vintage-ink);
}

.caption-desc {
  font-family: var(--font-typewriter);
  font-size: 0.6875rem;
  color: var(--vintage-faded);
}

.card-action-block {
  margin-top: 6px;
}

/* ==========================================================
   STAGE 3: VINTAGE SECRET LETTER MODAL (RICKROLL & PUNCHLINE)
   ========================================================== */
.letter-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  background: rgba(35, 24, 17, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modal-fade-in 0.3s ease-out;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.letter-sheet-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  animation: letter-unfold 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  perspective: 1000px;
}

@keyframes letter-unfold {
  0% {
    opacity: 0;
    transform: scale(0.85) rotateX(25deg) translateY(40px);
  }
  60% {
    opacity: 1;
    transform: scale(1.02) rotateX(-3deg) translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateX(0deg) translateY(0);
  }
}

.letter-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: #fdf8ed;
  border: 1.5px solid var(--vintage-kraft-dark);
  border-radius: 50%;
  color: var(--vintage-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.letter-close-btn:hover {
  transform: scale(1.1);
  background: #ffffff;
}

.parchment-paper {
  background: #fdf8ee;
  border-radius: 8px;
  padding: 34px 22px 28px;
  border: 3px solid #dfcca6;
  box-shadow: 0 25px 50px -12px rgba(35, 24, 17, 0.35);
  position: relative;
  text-align: center;
  overflow: hidden;
}

/* Airmail Top & Bottom Stripes */
.airmail-border-top, .airmail-border-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    #a32c2c 0px,
    #a32c2c 12px,
    #fdf8ee 12px,
    #fdf8ee 18px,
    #234975 18px,
    #234975 30px,
    #fdf8ee 30px,
    #fdf8ee 36px
  );
}

.airmail-border-top { top: 0; }
.airmail-border-bottom { bottom: 0; }

/* Large Faded Watermark */
.parchment-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-family: var(--font-typewriter);
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(43, 31, 23, 0.035);
  letter-spacing: 0.2em;
  pointer-events: none;
  white-space: nowrap;
}

/* Distinctive Handwriting Salutation: "Dear Minh Thành LGBT," */
.letter-salutation-area {
  margin-top: 8px;
  margin-bottom: 20px;
}

.salutation-top-stamp {
  font-family: var(--font-typewriter);
  font-size: 0.6875rem;
  color: var(--vintage-stamp-red);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  font-weight: 700;
}

.handwriting-salutation {
  font-family: var(--font-script);
  font-size: clamp(2.3rem, 7vw, 3rem);
  font-weight: 700;
  color: #7d1c1d;
  line-height: 1.15;
  text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
}

.vintage-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto;
  width: 75%;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--vintage-kraft-dark);
}

/* Punchline: "có con cặc" with Flanking Ricks */
.letter-punchline-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 4px;
  position: relative;
}

.rick-punchline-flank {
  width: 54px;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
  animation: rick-bounce 0.7s infinite ease-in-out alternate;
  pointer-events: none;
}

.rick-flank-left {
  transform: scaleX(-1);
}

@keyframes rick-bounce {
  from { transform: translateY(0) scale(0.95); }
  to { transform: translateY(-8px) scale(1.08); }
}

.punchline-text {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 7.5vw, 3.2rem);
  font-weight: 900;
  color: #991b1b;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  text-shadow: 2px 2px 0px #eeddcd;
  animation: punchline-slam 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

@keyframes punchline-slam {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Signoff Area */
.letter-signoff-area {
  margin: 16px 0 20px;
}

.signoff-signature-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.signature-title {
  font-family: var(--font-typewriter);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--vintage-faded);
  font-weight: 600;
}

.handwriting-signature {
  font-family: var(--font-script);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--vintage-ink);
  line-height: 1.1;
}

/* Floating Transparent Dancing Ricks */
.rick-stickers-wrapper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  overflow: hidden;
  border-radius: 8px;
}

.rick-sticker {
  position: absolute;
  width: 76px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
  animation: rick-groove 1.6s infinite ease-in-out alternate;
}

.rick-tl {
  top: 4px;
  left: 4px;
  transform: rotate(-10deg);
  animation-delay: 0s;
}

.rick-tr {
  top: 4px;
  right: 4px;
  transform: rotate(10deg);
  animation-delay: 0.4s;
}

.rick-bl {
  bottom: 8px;
  left: 8px;
  width: 66px;
  transform: rotate(-8deg);
  animation-delay: 0.8s;
}

.rick-br {
  bottom: 8px;
  right: 8px;
  width: 66px;
  transform: rotate(8deg);
  animation-delay: 1.2s;
}

@keyframes rick-groove {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.08) rotate(4deg); }
  100% { transform: translateY(0) scale(1); }
}

/* Troll Alert & Shake */
.troll-alert {
  background: #991b1b;
  color: #ffffff;
  font-family: var(--font-typewriter);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 9999px;
  display: inline-block;
  margin: 0 auto 12px;
  box-shadow: 0 4px 14px rgba(153, 27, 27, 0.4);
  border: 1.5px solid #dfcca6;
  animation: troll-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes troll-pop {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.troll-shake {
  animation: troll-vibrate 0.4s ease-in-out !important;
}

@keyframes troll-vibrate {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px) rotate(-2deg); }
  40%, 80% { transform: translateX(6px) rotate(2deg); }
}

.letter-footer-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 400px) {
  .letter-footer-buttons {
    flex-direction: row;
    justify-content: center;
  }
}
