/* ============================================================
   ROYAL MAROON WEDDING INVITATION — DESIGN TOKENS & STYLES
   ============================================================ */

:root {
  --cream: #F8F2E6;
  --cream2: #F1E7D6;
  --card-cream: #EFE3D3;
  --maroon: #4E141B;
  --maroon-dark: #3A0F14;
  --maroon-darker: #2A0A0E;
  --maroon-deepest: #1C0609;
  --intro-bg: #3A0011;
  --gold: #C99857;
  --gold-light: #E8CB98;
  --text-cream: #F3E7D8;
  --text-muted-rose: #C6A2A0;
  --ink: #4E141B;
  --ink-soft: #7A5C52;
  --line-on-maroon: rgba(230, 201, 160, 0.28);
  --shadow-card: 0 18px 40px -12px rgba(42, 10, 14, 0.35);
  --serif-ar: 'Amiri', serif;
  --sans-ar: 'Cairo', sans-serif;
  --serif-en: 'Cormorant Garamond', serif;
  --img-castle: url('../assets/castle.webp');
}

/* Base reset & typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  font-family: var(--sans-ar);
  background: var(--cream);
  color: var(--ink);
  overflow-x: clip;
  width: 100%;
  position: relative;
  direction: rtl;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font-family: inherit;
}

/* Fixed container & grain */
.container {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  padding: 0 24px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: radial-gradient(rgba(78, 20, 27, 0.035) 1px, transparent 1px);
  background-size: 3px 3px;
}

/* Ambient particles & Celebratory confetti canvases */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000005;
}

/* Gold foil shimmer animation */
.gold-shimmer-text {
  background: linear-gradient(115deg, var(--maroon) 0%, #7d1c28 25%, #ffd992 48%, #ffffff 52%, var(--gold) 58%, var(--maroon) 85%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShimmer 5s ease-in-out infinite;
}

@keyframes goldShimmer {
  0% { background-position: 120% center; }
  35%, 100% { background-position: -120% center; }
}

/* Section base */
section {
  position: relative;
  padding: 56px 0;
}

/* Titles */
.section-title {
  text-align: center;
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: 22px;
  color: var(--maroon);
  position: relative;
  z-index: 3;
}

.section-title.on-dark {
  color: var(--text-cream);
}

.section-sub {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
  font-weight: 400;
}

.section-sub.on-dark {
  color: var(--text-muted-rose);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Decorative floral elements */
.floral {
  position: absolute;
  width: 120px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}

.flower-hero {
  position: absolute;
  top: -26px;
  left: -40px;
  width: 130px;
  z-index: 4 !important;
  transform: rotate(-6deg);
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}

.flower-reception {
  top: 32%;
  left: -38px;
  width: 105px;
  transform: rotate(-10deg);
}

.flower-program {
  bottom: -22px;
  left: auto;
  right: -32px;
  width: 115px;
  transform: rotate(10deg) scaleX(-1);
}

.flower-guestbook {
  top: -10px;
  left: -30px;
  width: 110px;
  transform: rotate(8deg);
}

@media (max-width: 520px) {
  .flower-program,
  .flower-reception {
    max-width: 42vw !important;
    opacity: 0.55 !important;
  }
  .flower-guestbook {
    max-width: 34vw !important;
    opacity: 0.7 !important;
  }
}

/* Cards */
.dark-card {
  position: relative;
  background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-dark) 100%);
  border-radius: 26px;
  padding: 34px 26px 30px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  z-index: 2;
}

.light-card {
  background: var(--card-cream);
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 2;
}

.dark-card > :not(.floral),
.light-card > :not(.floral) {
  position: relative;
  z-index: 1;
}

/* ============================================================
   INTRO SCREEN (ENVELOPE OVERLAY)
   ============================================================ */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000000;
  background-color: var(--intro-bg);
  overflow: hidden;
  cursor: pointer;
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.intro-overlay.intro-fade {
  opacity: 0;
  pointer-events: none;
}

.intro-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: calc(100vh * (850 / 1850));
  max-height: calc(100vw * (1850 / 850));
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.intro-video {
  display: block;
  background: var(--intro-bg);
}

.intro-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  text-align: center;
  color: rgba(255, 238, 222, 0.92);
  font-size: 14px;
  letter-spacing: 0.5px;
  z-index: 2;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  animation: introPulse 1.9s ease-in-out infinite;
}

@keyframes introPulse {
  0%, 100% {
    opacity: 0.5;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* ============================================================
   MAIN CONTENT & HERO
   ============================================================ */
#mainContent {
  opacity: 0;
  transition: opacity 0.8s ease;
}

#mainContent.show {
  opacity: 1;
}

.hero {
  padding-top: 48px;
  padding-bottom: 20px;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.hero-watermark {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 340px;
  max-width: 90vw;
  max-height: 90vw;
  background-image: var(--img-castle);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  opacity: 0.16;
  z-index: 0;
  pointer-events: none;
}

.save-the-date {
  font-family: var(--serif-en);
  font-weight: 600;
  letter-spacing: 6px;
  font-size: 16px;
  color: var(--maroon);
  position: relative;
  z-index: 2;
  margin-bottom: 34px;
  padding-right: 6px;
}

.envelope-wrap {
  position: relative;
  width: 300px;
  max-width: 78vw;
  margin: 0 auto;
  z-index: 2;
}

.envelope-stage {
  position: relative;
  width: 100%;
}

.env-bg {
  position: relative;
  z-index: 1;
  width: 100%;
  display: block;
}

.polaroid {
  position: absolute;
  width: 56%;
  left: 50%;
  top: 9%;
  background: #fff;
  padding: 5px 5px 12px;
  border-radius: 2px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  transform: translateX(-46%) rotate(7deg);
  z-index: 2;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1), opacity 1s ease;
  perspective: 1000px;
  cursor: pointer;
  user-select: none;
}

.polaroid-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 0.82 / 1;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.polaroid.flipped .polaroid-inner {
  transform: rotateY(180deg);
}

.polaroid-front,
.polaroid-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1px;
  overflow: hidden;
}

.polaroid-front img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 0.82 / 1;
  object-fit: cover;
  object-position: center center;
}

.flip-hint {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(42, 10, 14, 0.76);
  color: var(--text-cream);
  font-size: 9.5px;
  padding: 3px 8px;
  border-radius: 12px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s, transform 0.2s;
}

.polaroid:hover .flip-hint {
  opacity: 1;
  transform: translateX(-50%) scale(1.04);
}

.polaroid-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, #FFFDF8, #F3E7D8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(201, 152, 87, 0.35);
}

.polaroid-back-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.polaroid-heart {
  font-size: 16px;
  color: var(--gold);
  line-height: 1;
  animation: introPulse 2s infinite;
}

.polaroid-quote {
  font-family: var(--serif-ar);
  font-size: 11px;
  line-height: 1.6;
  color: var(--maroon);
  font-weight: 700;
}

.polaroid-sign {
  font-family: var(--serif-ar);
  font-size: 12.5px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.env-cover {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 3;
  display: block;
}

.couple-names {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3.5vw, 18px);
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: clamp(30px, 8vw, 42px);
  color: var(--maroon);
  margin-top: 28px;
}

.couple-names span {
  display: inline-block;
  line-height: 1.2;
}

.rings-hero {
  width: clamp(34px, 8.5vw, 46px);
  height: auto;
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 4px 10px rgba(78, 20, 27, 0.25));
  animation: ringFloat 4s ease-in-out infinite;
}

@keyframes ringFloat {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  50% {
    transform: translateY(-3px) scale(1.08) rotate(3deg);
  }
}

/* Floating music button */
.music-btn {
  position: absolute;
  top: -14px;
  left: 46px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7a2530, var(--maroon-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(230, 201, 160, 0.25);
  z-index: 5;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.music-btn:hover {
  transform: scale(1.05);
}

.music-btn.playing svg {
  animation: spin 3.5s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* ============================================================
   ROYAL ARCH FRAME CARD (دعوة زفاف)
   ============================================================ */
.royal-arch-card {
  position: relative;
  background-color: var(--maroon);
  background-image: url('../assets/royal-frame.webp');
  background-size: 100% 100%;
  background-position: center top;
  background-repeat: no-repeat;
  border-radius: 28px;
  padding: clamp(140px, 28vw, 195px) 24px clamp(80px, 16vw, 115px);
  box-shadow: 0 20px 48px -12px rgba(42, 10, 14, 0.45);
  border: 1px solid rgba(201, 152, 87, 0.35);
  overflow: hidden;
  z-index: 2;
  color: var(--text-cream);
  text-align: center;
}

.royal-arch-card .section-title {
  color: var(--gold-light);
  font-family: var(--serif-ar);
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.parents-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  margin: 18px 0 20px;
  position: relative;
  z-index: 2;
}

.parents-col {
  flex: 1 1 0;
  text-align: center;
  max-width: 180px;
}

.parents-label {
  font-size: 11.5px;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 5px;
  opacity: 0.9;
}

.parents-name {
  font-size: 14px;
  color: var(--text-cream);
  font-weight: 700;
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.parents-divider {
  width: 1px;
  background: var(--line-on-maroon);
}

.invite-text {
  text-align: center;
  font-size: 13.5px;
  line-height: 2.1;
  color: var(--text-cream);
  max-width: 340px;
  margin: 0 auto 22px;
  position: relative;
  z-index: 2;
  font-weight: 400;
  opacity: 0.95;
}

.couple-card-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(14px, 4vw, 24px);
  margin: 12px 0 16px;
  position: relative;
  z-index: 2;
}

.couple-col {
  text-align: center;
  flex: 0 1 auto;
}

.couple-role {
  font-size: 13px;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.couple-name-lg {
  font-family: var(--serif-ar);
  font-weight: 700;
  font-size: clamp(30px, 8vw, 38px);
  color: var(--gold-light);
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(201, 152, 87, 0.45);
}

.couple-mid-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.rings-card {
  width: clamp(28px, 7vw, 38px);
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  animation: ringFloat 4s ease-in-out infinite;
}

.hairline {
  height: 1px;
  background: var(--line-on-maroon);
  margin: 22px 0 18px;
  position: relative;
  z-index: 2;
}

.hairline-thin {
  height: 1px;
  background: rgba(78, 20, 27, 0.15);
  margin: 10px 0;
}

.event-label {
  text-align: center;
  font-size: 13px;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
  letter-spacing: 0.4px;
}

.day-time-row {
  display: flex;
  justify-content: center;
  gap: 56px;
  position: relative;
  z-index: 2;
  font-size: 14px;
  color: var(--text-cream);
  font-weight: 700;
  margin-bottom: 18px;
}

.date-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.my-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 14px;
  color: var(--gold-light);
  text-align: center;
  font-weight: 700;
}

.date-divider {
  width: 1px;
  height: 44px;
  background: var(--line-on-maroon);
}

.day-num {
  font-family: var(--serif-en);
  font-size: 48px;
  font-weight: 700;
  color: var(--text-cream);
  line-height: 1;
}

.venue-pill {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 18px;
  border-radius: 20px;
  background: rgba(201, 152, 87, 0.14);
  border: 1px solid rgba(201, 152, 87, 0.35);
  color: var(--gold-light);
  font-size: 12.5px;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

/* ============================================================
   PHOTO ALBUM CAROUSEL
   ============================================================ */
.album-section {
  padding-top: 44px;
}

.album-section .section-title {
  margin-bottom: 26px;
}

.carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
  cursor: grab;
  touch-action: pan-y;
}

.carousel:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.carousel-track .slide {
  flex: 0 0 78%;
  padding: 0 8px;
}

.carousel-track .slide img {
  width: 100%;
  aspect-ratio: 3 / 4.4;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 16px 30px -10px rgba(42, 10, 14, 0.3);
  user-select: none;
  -webkit-user-drag: none;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
}

.carousel-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(78, 20, 27, 0.25);
  transition: width 0.3s ease, border-radius 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

.carousel-dots span.active {
  width: 20px;
  border-radius: 5px;
  background: var(--maroon);
}

/* ============================================================
   SAVE THE DATE SECTION
   ============================================================ */
.save-date-section {
  text-align: center;
  padding: 48px 0 32px;
  position: relative;
}

.save-date-wrap {
  max-width: 380px;
  margin: 22px auto 0;
  display: flex;
  justify-content: center;
}

.save-date-card {
  position: relative;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 46px -10px rgba(42, 10, 14, 0.35);
  border: 1px solid rgba(201, 152, 87, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--maroon);
}

.save-date-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px -10px rgba(42, 10, 14, 0.42);
}

.save-date-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 576 / 1024;
  object-fit: cover;
}

.save-date-actions {
  margin-top: 22px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.add-cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
  color: var(--text-cream);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(78, 20, 27, 0.25);
  border: 1px solid rgba(201, 152, 87, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.add-cal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(78, 20, 27, 0.35);
  background: linear-gradient(135deg, #5e1921, #451218);
}

/* ============================================================
   LOCATION & VENUE MAP
   ============================================================ */
.location-section {
  text-align: center;
  min-height: 300px;
  position: relative;
}

.location-watermark {
  position: absolute;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
  width: 380px;
  height: 380px;
  max-width: 90vw;
  max-height: 90vw;
  background-image: var(--img-castle);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  opacity: 0.14;
  z-index: 0;
  pointer-events: none;
}

.location-section .section-title {
  margin-bottom: 8px;
}

.venue-map {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 22px auto 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-on-maroon);
  box-shadow: var(--shadow-card);
  background: rgba(255, 255, 255, 0.5);
}

.venue-map iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
}

.venue-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  position: relative;
  z-index: 2;
}

.venue-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid var(--maroon);
  background: var(--cream);
  color: var(--maroon);
}

.venue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(78, 20, 27, 0.15);
}

.venue-btn.map-btn {
  background: var(--maroon);
  color: var(--text-cream);
  border-color: var(--maroon);
}

.venue-btn.map-btn:hover {
  background: var(--maroon-dark);
}

.venue-btn.waze-btn {
  background: #2cb5e8;
  color: #fff;
  border-color: #2cb5e8;
}

.venue-btn.waze-btn:hover {
  background: #1ca5d8;
}

.venue-btn.copy-btn {
  background: var(--card-cream);
  color: var(--ink);
  border-color: rgba(78, 20, 27, 0.35);
}

.venue-btn.copy-btn:hover {
  background: #e6d8c4;
}

.share-box {
  margin-top: 26px;
  margin-bottom: 6px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.share-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 13px 28px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.share-whatsapp-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.42);
}

@media (max-width: 520px) {
  .venue-map iframe {
    height: 210px;
  }
}

/* ============================================================
   DRESS CODE
   ============================================================ */
.dress-section {
  text-align: center;
}

.dress-section .section-title {
  margin-bottom: 8px;
}

.dress-colors {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
  direction: ltr;
}

.dress-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* ============================================================
   DAY PROGRAM (TIMELINE)
   ============================================================ */
.timeline {
  margin-top: 28px;
  position: relative;
  z-index: 2;
}

.tl-item {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  padding-bottom: 34px;
  z-index: 2;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-line {
  position: absolute;
  top: 16px;
  bottom: -2px;
  right: 5px;
  width: 1px;
  background: var(--line-on-maroon);
}

.tl-item:last-child .tl-line {
  display: none;
}

.tl-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--text-cream);
  border: 2px solid var(--gold);
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}

.tl-label {
  flex: 1 1 0;
  font-size: 13.5px;
  color: var(--text-cream);
  font-weight: 600;
}

.tl-time {
  font-family: var(--serif-en);
  font-size: 17px;
  color: var(--gold-light);
  font-weight: 600;
  min-width: 52px;
  text-align: center;
}

.tl-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-icon svg {
  width: 20px;
  height: 20px;
}

/* ============================================================
   GUESTBOOK
   ============================================================ */
.guestbook-section {
  padding-top: 44px;
  overflow: hidden;
}

.guestbook-section .section-title {
  margin-bottom: 22px;
}

#wishForm input,
#wishForm textarea {
  width: 100%;
  background: var(--card-cream);
  border: 1.4px solid rgba(78, 20, 27, 0.35);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 14px;
  resize: none;
}

#wishForm input::placeholder,
#wishForm textarea::placeholder {
  color: rgba(78, 20, 27, 0.45);
}

#wishForm input:focus,
#wishForm textarea:focus {
  outline: none;
  border-color: var(--maroon);
}

.wish-actions {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.send-btn {
  flex: 1 1 0;
  background: var(--maroon);
  color: var(--text-cream);
  border-radius: 30px;
  padding: 13px;
  font-weight: 700;
  font-size: 13.5px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(78, 20, 27, 0.3);
}

.wand-btn {
  width: 48px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1.4px rgba(78, 20, 27, 0.35);
  transition: transform 0.2s ease;
  cursor: pointer;
  border: none;
}

.wand-btn:hover {
  transform: rotate(-12deg) scale(1.05);
}

.wishes-list {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.wish-item {
  background: var(--cream);
  border: 1px solid rgba(78, 20, 27, 0.15);
  border-radius: 14px;
  padding: 14px 16px;
  animation: wishIn 0.5s ease forwards;
}

@keyframes wishIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.wish-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.wish-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--maroon);
}

.wish-time {
  font-size: 10.5px;
  color: var(--ink-soft);
}

.wish-msg {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.7;
}

.wishes-empty {
  text-align: center;
  padding: 18px 12px;
  font-size: 13px;
  color: rgba(92, 20, 32, 0.55);
}

/* ============================================================
   GIFT SECTION
   ============================================================ */
.gift-section {
  text-align: center;
  padding-top: 60px;
  padding-bottom: 70px;
  overflow: hidden;
  position: relative;
}

.gift-watermark {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 360px;
  max-width: 90vw;
  max-height: 90vw;
  background-image: var(--img-castle);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  opacity: 0.13;
  z-index: 0;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  color: var(--gold);
  opacity: 0.7;
  animation: twinkle 2.4s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
}

.sparkle.s1 {
  top: 18%;
  left: 20%;
  font-size: 20px;
  animation-delay: 0s;
}

.sparkle.s2 {
  top: 34%;
  left: 75%;
  font-size: 16px;
  animation-delay: 0.6s;
}

.sparkle.s3 {
  top: 58%;
  left: 14%;
  font-size: 14px;
  animation-delay: 1.1s;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.15);
  }
}

.gift-section .section-title {
  margin-bottom: 30px;
}

.gift-box-wrap {
  position: relative;
  z-index: 2;
}

.gift-box-btn {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--card-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  border: none;
}

.gift-box-btn.opened {
  transform: scale(1.1) rotate(-8deg);
}

.gift-tap-label {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: underline;
}

.gift-thanks {
  max-width: 340px;
  margin: 26px auto 0;
  font-size: 12.5px;
  line-height: 2;
  color: var(--ink-soft);
  position: relative;
  z-index: 2;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.6s ease, max-height 0.6s ease, margin 0.6s ease;
}

.gift-thanks.show {
  opacity: 1;
  max-height: 200px;
}

.site-footer {
  margin-top: 40px;
  font-size: 12px;
  color: var(--ink-soft);
  position: relative;
  z-index: 2;
}

/* ============================================================
   TOAST COMPONENT
   ============================================================ */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--maroon);
  color: var(--text-cream);
  padding: 13px 26px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 2000001;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS & ACCESSIBILITY
   ============================================================ */
@media (max-width: 380px) {
  .couple-names {
    font-size: 34px;
  }
  .day-num {
    font-size: 42px;
  }
  .day-time-row {
    gap: 44px;
  }
}

@media (max-width: 360px) {
  .countdown {
    gap: 4px;
  }
  .countdown .cd-unit {
    min-width: 48px;
    padding: 7px 3px 6px;
  }
  .countdown .cd-num {
    font-size: 20px;
  }
  .countdown .cd-label {
    font-size: 9.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
