/* CSS Document - Lunar New Year Reunion Dinner */
:root {
  --crimson: #991b1e;
  --crimson-dark: #42080a;
  --gold: #f4c430;
  --gold-warm: #d49b38;
  --jade: #1f503c;
  --jade-light: #2d6a50;
  --cream: #fffcf4;
  --card-bg: rgba(255, 252, 244, 0.94);
  --ink: #1f1414;
  --ink-muted: #5e4a4a;
  --gold-glow: 0 0 16px rgba(244, 196, 48, 0.35);
  --red-glow: 0 12px 36px rgba(153, 27, 30, 0.45);
  --ease-spring: cubic-bezier(0.33, 1, 0.68, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Krub', sans-serif;
  background-color: var(--crimson-dark);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(153, 27, 30, 0.9) 0%, rgba(66, 8, 10, 0.98) 75%),
    radial-gradient(circle at 10% 85%, rgba(31, 80, 60, 0.35) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Typography Headings */
h1, h2, h3 {
  font-family: 'Chonburi', 'DM Serif Display', serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Side Progress Dots Nav (T37) - Argon Fix #3 */
.progress-dots {
  position: fixed;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
  background: rgba(66, 8, 10, 0.65);
  padding: 8px 4px;
  border-radius: 99px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(244, 196, 48, 0.25);
}

@media (max-width: 480px) {
  .progress-dots {
    display: none; /* Hide on mobile to prevent overlapping white card borders */
  }
}

.dot-btn {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(244, 196, 48, 0.3);
  border: 1px solid rgba(244, 196, 48, 0.6);
  padding: 0;
  cursor: pointer;
  transition: all 0.3s var(--ease-spring);
}

.dot-btn.active {
  height: 22px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(244, 196, 48, 0.8);
}

/* Chinese Lantern Decors - Argon Fix #2 (Gold caps, 3 ribs & 16px hanging tassels) */
.lantern-decor {
  position: absolute;
  top: -8px;
  width: 48px;
  height: 82px;
  filter: drop-shadow(0 8px 18px rgba(153, 27, 30, 0.6));
  animation: lanternSwing 3.6s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 5;
}

.lantern-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.left-lantern { left: 18px; transform-origin: top center; }
.right-lantern { right: 18px; animation-delay: -1.8s; transform-origin: top center; }

@keyframes lanternSwing {
  0% { transform: rotate(-4deg); }
  100% { transform: rotate(4deg); }
}

/* App Viewport & Controls */
.app-viewport {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 18px 80px;
  position: relative;
  z-index: 10;
}

.top-nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 24px;
}

.nav-btn {
  background: rgba(255, 252, 244, 0.12);
  border: 1px solid rgba(244, 196, 48, 0.45);
  color: var(--gold);
  font-family: 'Krub', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.25s var(--ease-spring);
}

.nav-btn:hover, .nav-btn:focus-visible {
  background: var(--gold);
  color: var(--crimson-dark);
}

/* Ripple Press Effect (T65) */
.ripple-press {
  position: relative;
  overflow: hidden;
}

.ripple-press .ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: rippleAnimation 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnimation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Hero Section - 100dvh Lock Screen (EV2 Lesson) */
.hero-section {
  text-align: center;
  padding: 20px 8px 32px;
  position: relative;
  min-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.badge-tag {
  display: inline-block;
  background: rgba(31, 80, 60, 0.8);
  border: 1px solid rgba(244, 196, 48, 0.6);
  color: var(--cream);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 16px;
  margin-bottom: 14px;
}

.hero-title {
  color: var(--gold);
  font-size: 30px;
  line-height: 1.25;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  color: #f7e8ce;
  font-size: 14px;
  line-height: 1.55;
  max-width: 420px;
  margin: 0 auto 30px;
  font-weight: 300;
  text-wrap: balance;
}

/* 3D Red Envelope Opening Gimmick */
.envelope-stage {
  perspective: 1000px;
  width: 280px;
  height: 200px;
  margin: 0 auto;
  cursor: pointer;
  position: relative;
}

.red-envelope {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-spring);
}

.envelope-stage:hover .red-envelope {
  transform: translateY(-4px) scale(1.02);
}

.env-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #a61c20 0%, #851216 100%);
  border-radius: 12px;
  box-shadow: var(--red-glow);
  border: 1.5px solid rgba(244, 196, 48, 0.5);
}

/* Sliding Letter Card Inside (Argon Fix #1 - Hide until open animation begins) */
.env-letter {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 14px;
  bottom: 14px;
  background: var(--cream);
  border-radius: 8px;
  border: 1px solid var(--gold-warm);
  padding: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transition: transform 0.8s var(--ease-spring), opacity 0.4s ease;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

.envelope-opened .env-letter {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-84px);
}

.letter-inner {
  opacity: 0;
  transition: opacity 0.35s ease 0.2s;
}

.envelope-opened .letter-inner {
  opacity: 1;
}

.letter-seal-mini {
  display: inline-block;
  font-size: 20px;
  color: var(--crimson);
  font-family: 'Chonburi', serif;
  margin-bottom: 4px;
}

.letter-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--crimson-dark);
  margin-bottom: 4px;
}

.letter-text {
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-muted);
}

/* Front Envelope Pockets */
.env-pocket-l, .env-pocket-r, .env-pocket-b {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.env-pocket-b {
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(180deg, #991b1e 0%, #7d1014 100%);
  clip-path: polygon(0 40%, 50% 0%, 100% 40%, 100% 100%, 0 100%);
  border-radius: 0 0 12px 12px;
  border-bottom: 1.5px solid rgba(244, 196, 48, 0.6);
}

.env-pocket-l {
  left: 0;
  bottom: 0;
  top: 0;
  width: 50%;
  background: linear-gradient(90deg, #8f171b 0%, #7d1014 100%);
  clip-path: polygon(0 0, 100% 60%, 0 100%);
  border-radius: 12px 0 0 12px;
  opacity: 0.5;
}

.env-pocket-r {
  right: 0;
  bottom: 0;
  top: 0;
  width: 50%;
  background: linear-gradient(-90deg, #8f171b 0%, #7d1014 100%);
  clip-path: polygon(100% 0, 0 60%, 100% 100%);
  border-radius: 0 12px 12px 0;
  opacity: 0.5;
}

/* Top Fold Flap with 3D Flip (Argon Fix #1 - Gold diagonal edge) */
.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: linear-gradient(180deg, #b32025 0%, #90161a 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.8s var(--ease-spring);
  z-index: 4;
}

.flap-gold-edge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.envelope-opened .env-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.gold-coin-seal {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, #fde08b 0%, #d49b38 80%, #996e1a 100%);
  border-radius: 50%;
  border: 2px solid #fff2a8;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.seal-char {
  font-family: 'Chonburi', serif;
  font-size: 18px;
  font-weight: 700;
  color: #7a1215;
}

.envelope-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  background: rgba(244, 196, 48, 0.15);
  border: 1px dashed var(--gold);
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
}

.envelope-hint:hover {
  background: rgba(244, 196, 48, 0.25);
  transform: translateY(-2px);
}

/* Content Reveal Container */
.content-reveal {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 1.2s var(--ease-spring), opacity 0.8s ease-in-out;
}

.envelope-opened + .content-reveal,
.content-reveal.expanded {
  max-height: 6000px;
  opacity: 1;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

/* General Section Cards */
.card-section, .countdown-card {
  background: var(--card-bg);
  border: 1px solid rgba(212, 155, 56, 0.45);
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
}

.section-badge {
  display: inline-block;
  background: rgba(153, 27, 30, 0.1);
  color: var(--crimson);
  border: 1px solid rgba(153, 27, 30, 0.25);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.card-title {
  color: var(--crimson-dark);
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

/* Countdown Section (T60) */
.countdown-card {
  text-align: center;
  background: linear-gradient(145deg, #fffcf4 0%, #f7eee0 100%);
  border: 2px solid var(--gold);
}

.cd-target-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--jade);
  margin-bottom: 16px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.count-box {
  background: #ffffff;
  border: 1px solid rgba(212, 155, 56, 0.3);
  border-radius: 12px;
  padding: 10px 4px;
  box-shadow: 0 4px 10px rgba(153, 27, 30, 0.08);
}

.count-num {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--crimson);
  line-height: 1.1;
}

.count-unit {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 500;
}

/* Zodiac Code Motif & SVG Line Draw (T11) */
.zodiac-card {
  text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(255, 252, 244, 0.98), rgba(247, 238, 224, 0.95));
}

.goat-svg-wrapper {
  max-width: 280px;
  margin: 12px auto;
  position: relative;
  background: #42080a;
  border-radius: 16px;
  border: 2px solid var(--gold);
  padding: 12px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 6px 18px rgba(0, 0, 0, 0.25);
}

.goat-vector {
  width: 100%;
  height: auto;
  display: block;
}

/* T11 SVG Line Draw Animation */
.draw-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 0;
  animation: lineDrawLoop 8s ease-in-out infinite alternate;
}

@keyframes lineDrawLoop {
  0% { stroke-dashoffset: 600; }
  40% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}

.zodiac-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.z-tag {
  background: rgba(31, 80, 60, 0.12);
  color: var(--jade);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid rgba(31, 80, 60, 0.25);
}

/* Menu Section - Expanding Strips (T41) */
.menu-strips {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.strip-item {
  background: #ffffff;
  border: 1px solid rgba(212, 155, 56, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.3s var(--ease-spring);
}

.strip-item:hover, .strip-item.active {
  border-color: var(--crimson);
  background: #fffdf9;
  box-shadow: 0 4px 14px rgba(153, 27, 30, 0.12);
}

.strip-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.strip-idx {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--gold-warm);
  font-weight: 700;
}

.strip-title-group {
  flex: 1;
}

.strip-name-th {
  font-size: 1.05rem;
  color: var(--crimson-dark);
  font-weight: 500;
  line-height: 1.35;
}

.strip-name-en {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 400;
}

.strip-symbol {
  font-family: 'Chonburi', serif;
  font-size: 18px;
  color: var(--crimson);
  opacity: 0.7;
}

.strip-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-spring), opacity 0.3s ease-in, margin-top 0.3s ease;
}

.strip-item.active .strip-body {
  max-height: 160px;
  opacity: 1;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(212, 155, 56, 0.3);
}

.strip-meaning {
  font-size: 12px;
  color: var(--jade);
  font-weight: 600;
  margin-bottom: 4px;
}

.strip-ingredients {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* Seating & Potluck Table */
.tables-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.table-card {
  background: #ffffff;
  border: 1px solid rgba(31, 80, 60, 0.25);
  border-radius: 12px;
  padding: 14px;
}

.table-card.highlight-card {
  background: linear-gradient(135deg, #fff7ea 0%, #fdf0dc 100%);
  border: 1.5px solid var(--gold-warm);
}

.table-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-warm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-name {
  font-size: 16px;
  color: var(--crimson-dark);
  margin-top: 2px;
  margin-bottom: 6px;
}

.table-members {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.45;
  margin-bottom: 8px;
}

.potluck-item {
  font-size: 12px;
  background: rgba(244, 196, 48, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
  color: #632207;
}

.potluck-label {
  font-weight: 600;
  margin-right: 4px;
}

/* Venue Section */
.venue-address {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 14px;
}

.venue-tips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.tip-pill {
  font-size: 12px;
  background: #f1f8f4;
  color: var(--jade);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(31, 80, 60, 0.2);
}

.map-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--jade);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.25s var(--ease-spring);
}

.map-link-btn:hover {
  background: var(--jade-light);
  transform: translateY(-2px);
}

/* RSVP Form (L2) */
.rsvp-card {
  border: 2px solid var(--crimson);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--crimson-dark);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  font-family: 'Krub', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(153, 27, 30, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(153, 27, 30, 0.15);
}

.form-textarea {
  min-height: 70px;
  resize: vertical;
}

.char-counter {
  text-align: right;
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.consent-row input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--crimson);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.privacy-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--crimson);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.seating-intro-desc {
  text-wrap: balance;
}

/* RSVP Card Bottom Clearance (Argon Fix #6) */
.rsvp-card {
  padding-bottom: 48px;
}

/* Attend / Decline Toggle (EV2 Lesson) */
.attendance-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.toggle-option {
  cursor: pointer;
}

.toggle-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1.5px solid rgba(244, 196, 48, 0.4);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: all 0.25s var(--ease-spring);
  text-align: center;
}

.toggle-option input[type="radio"]:checked + .toggle-pill {
  background: var(--crimson);
  color: #ffffff;
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(153, 27, 30, 0.35);
}

/* RSVP Success Confirmation Card (EV2 Lesson) */
.rsvp-success-card {
  text-align: center;
  padding: 24px 16px;
  background: #ffffff;
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-top: 10px;
}

.success-seal {
  font-family: 'Chonburi', serif;
  font-size: 36px;
  color: var(--crimson);
  width: 56px;
  height: 56px;
  line-height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff8eb;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 12px rgba(244, 196, 48, 0.4);
}

.success-title {
  color: var(--crimson-dark);
  font-size: 18px;
  margin-bottom: 8px;
}

.success-badge {
  display: inline-block;
  background: #f1f8f4;
  color: var(--jade);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(31, 80, 60, 0.25);
  margin-bottom: 12px;
}

.success-summary {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 14px;
}

.success-blessing {
  font-size: 13px;
  font-style: italic;
  color: var(--crimson);
  margin-bottom: 20px;
  padding: 10px;
  background: #fff8f8;
  border-radius: 8px;
}

.edit-rsvp-btn {
  background: none;
  border: 1px dashed var(--crimson);
  color: var(--crimson);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.edit-rsvp-btn:hover {
  background: rgba(153, 27, 30, 0.08);
}

.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--crimson) 0%, #7d1014 100%);
  color: #ffffff;
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 14px 20px;
  font-family: 'Krub', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(153, 27, 30, 0.3);
  transition: all 0.25s var(--ease-spring);
}

.submit-btn:hover {
  background: linear-gradient(135deg, #b32025 0%, var(--crimson) 100%);
  transform: translateY(-2px);
}

.submit-status {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  display: none;
}

.submit-status.success {
  display: block;
  background: #f1f8f4;
  color: var(--jade);
  border: 1px solid rgba(31, 80, 60, 0.3);
}

.submit-status.error {
  display: block;
  background: #fff0f0;
  color: #991b1e;
  border: 1px solid rgba(153, 27, 30, 0.3);
}

/* Footer */
.footer-note {
  text-align: center;
  color: #f7e8ce;
  padding: 24px 10px;
}

.footer-wishes {
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 6px;
}

.footer-sub {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* Privacy Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--cream);
  border: 2px solid var(--gold);
  border-radius: 16px;
  max-width: 440px;
  width: 100%;
  padding: 24px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.modal-title {
  color: var(--crimson);
  font-size: 17px;
  margin-bottom: 12px;
}

.modal-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin-bottom: 18px;
}

.modal-close {
  width: 100%;
  background: var(--crimson);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Creator Credit Pill (Playbook Rule 2.1) */
.site-credit {
  position: fixed;
  bottom: 14px;
  left: 14px;
  background: rgba(15, 10, 10, 0.85);
  border: 1px solid rgba(244, 196, 48, 0.45);
  color: #f7e8ce;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  z-index: 99;
  transition: all 0.2s;
}

.site-credit:hover {
  background: var(--gold);
  color: var(--crimson-dark);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .draw-path, .lantern-decor, .red-envelope, .env-flap, .env-letter {
    animation: none !important;
    transition: none !important;
  }
}
