/* ==========================================================================
   EMIR & NABILA — GENDER REVEAL & BABY SHOWER INVITATION
   Botanical Eucalyptus & Heirloom Stationery Theme
   Handcrafted by Emir the Handsome (gritstudio@gmail.com)
   ========================================================================== */

:root {
  /* Template Paper & Background Palette */
  --bg-canvas: #F5EFE6;
  --bg-card: #FDFBF7;
  --bg-sand: #F3ECE1;
  --bg-glass: rgba(253, 251, 247, 0.94);

  /* Forest & Olive Botanical Greens */
  --leaf-forest: #2D472C;
  --leaf-olive: #475E44;
  --leaf-sage: #8A9D84;
  --leaf-pale: #E4ECE2;

  /* Hanging Clothes Palette from Template */
  --team-girl: #CA9289;
  --team-girl-deep: #A76E65;
  --team-girl-soft: #FAF0EE;

  --team-boy: #887479;
  --team-boy-deep: #68555A;
  --team-boy-soft: #F4EFEF;

  --bootie-beige: #D3C1AD;

  /* Typography & Ink */
  --ink-primary: #1C1917;
  --ink-secondary: #4A443E;
  --ink-muted: #78716C;

  /* Borders & Shadows */
  --border-card: rgba(138, 157, 132, 0.35);
  --border-soft: rgba(74, 68, 62, 0.1);
  --shadow-card: 0 25px 65px -15px rgba(60, 52, 42, 0.16), 0 6px 20px -5px rgba(60, 52, 42, 0.08);

  /* Fonts */
  --font-script: 'Allura', 'Alex Brush', cursive;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 9999px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(circle at 10% 12%, rgba(138, 157, 132, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 18%, rgba(202, 146, 137, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 50% 80%, rgba(136, 116, 121, 0.1) 0%, transparent 50%);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Floating Petals Canvas */
#celebration-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 95;
}

.container {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   WAX-SEALED BOTANICAL ENVELOPE INTRO
   ========================================================================== */
.envelope-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at 50% 40%, #FDFBF7 0%, #E9DFCFCF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope-overlay.is-opened {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.06);
  pointer-events: none;
}

.envelope-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 28px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 30px 70px -20px rgba(50, 42, 32, 0.22);
  position: relative;
}

.envelope-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(138, 157, 132, 0.45);
  border-radius: 20px;
  pointer-events: none;
}

.envelope-foliage-top {
  width: 220px;
  margin: 0 auto 0.75rem;
}

.envelope-subtitle {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--leaf-olive);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.envelope-title {
  font-family: var(--font-script);
  font-size: clamp(3.2rem, 8vw, 4.4rem);
  font-weight: 400;
  color: var(--leaf-forest);
  line-height: 1;
  margin-bottom: 0.15rem;
}

.envelope-couple {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 0.35rem;
}

.envelope-couple .amp {
  font-style: italic;
  color: var(--leaf-olive);
}

.envelope-chapter {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-secondary);
  margin-bottom: 2rem;
}

.wax-seal-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wax-seal-btn:hover {
  transform: scale(1.08) rotate(-2deg);
}

.wax-seal-btn:active {
  transform: scale(0.96);
}

.wax-seal-ring {
  width: 114px;
  height: 114px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #5B7A57 0%, #365338 65%, #233925 100%);
  box-shadow:
    0 12px 28px rgba(45, 71, 44, 0.4),
    inset 0 2px 5px rgba(255, 255, 255, 0.4),
    inset 0 -4px 8px rgba(20, 35, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  animation: pulseSeal 2.8s infinite ease-in-out;
}

@keyframes pulseSeal {
  0%, 100% {
    box-shadow: 0 12px 28px rgba(45, 71, 44, 0.4), 0 0 0 0 rgba(71, 94, 68, 0.35);
  }
  50% {
    box-shadow: 0 14px 32px rgba(45, 71, 44, 0.5), 0 0 0 14px rgba(71, 94, 68, 0);
  }
}

.wax-seal-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px dashed rgba(253, 251, 247, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FDFBF7;
}

.seal-monogram {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.seal-tap-text {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 0.2rem;
  opacity: 0.92;
}

.envelope-hint {
  margin-top: 1.75rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   STICKY FLOATING NAVIGATION
   ========================================================================== */
.floating-nav {
  position: sticky;
  top: 0.85rem;
  z-index: 100;
  padding: 0 1rem;
  margin-top: 0.85rem;
}

.nav-container {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 10px 30px -10px rgba(43, 37, 32, 0.1);
}

.nav-brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--leaf-forest);
  text-decoration: none;
  padding-left: 0.5rem;
}

.leaf-dot {
  color: var(--leaf-sage);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--leaf-forest);
  background: var(--leaf-pale);
}

.nav-links a.nav-pill-highlight {
  background: linear-gradient(135deg, rgba(202, 146, 137, 0.18), rgba(136, 116, 121, 0.18));
  color: var(--ink-primary);
  font-weight: 600;
  border: 1px solid rgba(138, 157, 132, 0.4);
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-sand);
  border: 1px solid var(--border-card);
  color: var(--ink-primary);
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.audio-btn:hover {
  background: #E8DDCF;
}

.audio-btn.is-playing {
  background: var(--leaf-olive);
  color: #fff;
  border-color: var(--leaf-forest);
}

/* ==========================================================================
   HERO: THE EXACT BOTANICAL GENDER REVEAL TEMPLATE CARD
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 2rem 0 3.5rem;
}

.hero-ambient-glow {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

.glow-girl {
  top: 8%;
  left: -80px;
  background: #E8BFB8;
}

.glow-boy {
  top: 15%;
  right: -80px;
  background: #C4B2B6;
}

.hero-container {
  display: flex;
  justify-content: center;
}

/* The Authentic Template Card */
.template-card {
  width: 100%;
  max-width: 650px;
  background: var(--bg-card);
  border: 1px solid rgba(138, 157, 132, 0.4);
  border-radius: 26px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.card-leaf-border {
  width: 100%;
  height: 95px;
  overflow: hidden;
}

.card-leaf-border svg {
  width: 100%;
  height: 100%;
  display: block;
}

.template-card-inner {
  padding: 1rem 2.2rem 2.5rem;
}

/* Calligraphy Title */
.template-script-title {
  font-family: var(--font-script);
  font-size: clamp(4.2rem, 11vw, 6rem);
  font-weight: 400;
  color: var(--leaf-forest);
  line-height: 0.95;
  margin-bottom: 0.15rem;
  letter-spacing: 0.01em;
}

.template-couple-subtitle {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
  margin-bottom: 1.25rem;
}

.leaf-amp {
  font-style: italic;
  color: var(--leaf-olive);
}

/* Branch & Hanging Clothes Illustration */
.template-illustration-wrap {
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

.clothesline-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.clothes-item {
  transform-origin: top center;
  transition: transform 0.4s ease;
}

.template-card:hover .girl-romper {
  animation: gentleSway 3s infinite ease-in-out;
}

.template-card:hover .boy-overalls {
  animation: gentleSway 3.2s infinite ease-in-out reverse;
}

@keyframes gentleSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(2.5deg); }
}

/* Template Verses */
.template-motto {
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.25;
  margin-bottom: 0.45rem;
}

.template-submotto {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  max-width: 440px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

/* The Template Date Bracket (Horizontal rules with center day) */
.template-date-bracket {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  margin: 0 auto 2.25rem;
  max-width: 520px;
}

.date-side-rule {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.date-side-rule .rule-line,
.date-side-rule .rule-line-sub {
  display: block;
  width: 100%;
  height: 2.2px;
  background: #1C1917;
  border-radius: 2px;
}

.rule-right {
  position: relative;
  align-items: center;
  justify-content: center;
}

.rule-time {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-primary);
  padding: 0.2rem 0;
}

.date-center-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 95px;
}

.stack-month {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1;
}

.stack-day {
  font-size: clamp(3.2rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 0.95;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  margin: 0.2rem 0;
}

.stack-year {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1;
}

/* Template Location Block */
.template-location-block {
  margin-bottom: 2rem;
}

.template-venue-name {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 0.35rem;
}

.template-venue-address {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  max-width: 480px;
  margin: 0 auto 0.9rem;
  line-height: 1.45;
}

.template-dresscode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-sand);
  border: 1px solid var(--border-soft);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.template-dresscode-pill strong {
  color: var(--ink-primary);
}

.dresscode-dots {
  display: inline-flex;
  gap: 0.35rem;
}

.dresscode-dots i {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Template CTA Buttons */
.template-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.65rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary {
  background: var(--leaf-forest);
  color: #fff;
  box-shadow: 0 10px 22px -6px rgba(45, 71, 44, 0.5);
}

.btn-primary:hover {
  background: #1E341E;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--ink-primary);
  border-color: var(--border-card);
}

.btn-secondary:hover {
  background: var(--bg-sand);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.48rem 1.1rem;
  font-size: 0.82rem;
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   SCHEDULE & EVENT DETAILS
   ========================================================================== */
.schedule-section {
  padding: 2rem 0 3.5rem;
}

.countdown-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.4rem;
  margin: 0 auto 2.5rem;
  max-width: 440px;
  box-shadow: 0 8px 24px -10px rgba(45, 71, 44, 0.1);
}

.cd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
}

.cd-num {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  color: var(--leaf-forest);
}

.cd-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-top: 0.25rem;
}

.cd-sep {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--leaf-sage);
  margin-top: -0.7rem;
}

.details-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.1rem 1.6rem;
  text-align: center;
  box-shadow: 0 10px 30px -10px rgba(45, 71, 44, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.25s ease;
}

.detail-card:hover {
  transform: translateY(-4px);
}

.detail-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--leaf-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--leaf-forest);
  margin-bottom: 1rem;
}

.detail-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.detail-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.detail-heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 0.35rem;
}

.detail-text {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-bottom: 1.15rem;
}

.detail-actions {
  margin-top: auto;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.link-btn {
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.link-btn:hover {
  background: #E8DDCF;
}

.swatch-row {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

/* Timeline Banner */
.timeline-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1 1 160px;
}

.tl-time {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--leaf-olive);
}

.tl-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.timeline-divider {
  color: var(--leaf-sage);
  font-size: 1.2rem;
}

/* ==========================================================================
   INTERACTIVE BOY OR GIRL PREDICTION POLL
   ========================================================================== */
.vote-section {
  padding: 3.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--leaf-olive);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.5vw, 2.9rem);
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.15;
  margin-bottom: 0.55rem;
}

.section-subtitle {
  color: var(--ink-secondary);
  font-size: 0.96rem;
}

.scoreboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 28px;
  padding: 2.5rem 2.2rem;
  box-shadow: var(--shadow-card);
}

.scoreboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.score-side {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.girl-side {
  text-align: right;
  align-items: flex-end;
}

.score-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
}

.boy-badge {
  background: var(--team-boy-soft);
  color: var(--team-boy-deep);
  border: 1px solid rgba(136, 116, 121, 0.35);
}

.girl-badge {
  background: var(--team-girl-soft);
  color: var(--team-girl-deep);
  border: 1px solid rgba(202, 146, 137, 0.35);
}

.score-numbers {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.score-pct {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.boy-side .score-pct {
  color: var(--team-boy-deep);
}

.girl-side .score-pct {
  color: var(--team-girl-deep);
}

.score-count {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.score-center-pill {
  background: var(--bg-canvas);
  border: 1px solid var(--border-card);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

/* Tug-of-War Bar */
.tug-bar-outer {
  position: relative;
  height: 22px;
  border-radius: var(--radius-pill);
  display: flex;
  background: #E8DDCF;
  margin-bottom: 2rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

.tug-bar-boy {
  height: 100%;
  background: linear-gradient(90deg, #68555A 0%, #887479 100%);
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.tug-bar-girl {
  height: 100%;
  background: linear-gradient(90deg, #D49D94 0%, #CA9289 100%);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.tug-bar-knot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--leaf-olive);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

/* Voter Controls */
.voter-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.85rem;
}

.voter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.voter-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.voter-field input,
.voter-field select {
  width: 100%;
  padding: 0.68rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--ink-primary);
}

.voter-field input:focus,
.voter-field select:focus {
  outline: 2px solid var(--leaf-olive);
}

/* Two Interactive Vote Cards */
.vote-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.vote-choice-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.75rem 1.9rem;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.boy-card {
  background: linear-gradient(180deg, #F8F4F5 0%, #FDFBF7 100%);
  border: 1.5px solid rgba(136, 116, 121, 0.35);
}

.boy-card:hover,
.boy-card.is-selected {
  border-color: var(--team-boy);
  box-shadow: 0 16px 40px -12px rgba(136, 116, 121, 0.3);
  transform: translateY(-4px);
}

.girl-card {
  background: linear-gradient(180deg, #FBF4F3 0%, #FDFBF7 100%);
  border: 1.5px solid rgba(202, 146, 137, 0.35);
}

.girl-card:hover,
.girl-card.is-selected {
  border-color: var(--team-girl);
  box-shadow: 0 16px 40px -12px rgba(202, 146, 137, 0.3);
  transform: translateY(-4px);
}

.choice-ribbon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
}

.boy-card .choice-ribbon {
  background: var(--team-boy-soft);
  color: var(--team-boy-deep);
}

.girl-card .choice-ribbon {
  background: var(--team-girl-soft);
  color: var(--team-girl-deep);
}

.choice-illustration {
  width: 90px;
  height: 90px;
  margin-bottom: 0.85rem;
}

.choice-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.boy-card .choice-title {
  color: var(--team-boy-deep);
}

.girl-card .choice-title {
  color: var(--team-girl-deep);
}

.choice-desc {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-bottom: 1.25rem;
  max-width: 320px;
}

.btn-vote {
  margin-top: auto;
  width: 100%;
  max-width: 250px;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s ease;
}

.btn-vote:hover {
  transform: scale(1.03);
}

.btn-vote-boy {
  background: var(--team-boy);
  color: #fff;
  box-shadow: 0 10px 20px -6px rgba(136, 116, 121, 0.55);
}

.btn-vote-boy:hover {
  background: var(--team-boy-deep);
}

.btn-vote-girl {
  background: var(--team-girl);
  color: #fff;
  box-shadow: 0 10px 20px -6px rgba(202, 146, 137, 0.55);
}

.btn-vote-girl:hover {
  background: var(--team-girl-deep);
}

.vote-feedback {
  margin-top: 1.5rem;
  padding: 0.95rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--leaf-pale);
  border: 1px solid var(--border-card);
  text-align: center;
  font-weight: 600;
  color: var(--leaf-forest);
}

/* ==========================================================================
   TRAITS & CLUES
   ========================================================================== */
.traits-section {
  padding: 1rem 0 3.5rem;
}

.traits-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  text-align: center;
}

.traits-header {
  max-width: 560px;
  margin: 0 auto 1.75rem;
}

.traits-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.clues-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.clue-pill {
  background: var(--bg-canvas);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.clue-q {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  font-weight: 600;
}

.clue-a {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--ink-primary);
}

.clue-tag {
  margin-top: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
}

.boy-tag {
  background: var(--team-boy-soft);
  color: var(--team-boy-deep);
}

.girl-tag {
  background: var(--team-girl-soft);
  color: var(--team-girl-deep);
}

.tie-tag {
  background: var(--leaf-pale);
  color: var(--leaf-forest);
}

/* ==========================================================================
   RSVP & WISHES GUESTBOOK
   ========================================================================== */
.rsvp-section {
  padding: 3rem 0 4.5rem;
}

.rsvp-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: start;
}

.rsvp-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.4rem 2rem;
  box-shadow: var(--shadow-card);
}

.rsvp-intro {
  font-size: 0.94rem;
  color: var(--ink-secondary);
  margin-bottom: 1.6rem;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.78rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: var(--bg-canvas);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--ink-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--leaf-olive);
  background: #fff;
}

.radio-pill-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.radio-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1.5px solid var(--border-soft);
}

.boy-radio {
  background: var(--team-boy-soft);
  color: var(--team-boy-deep);
}

.girl-radio {
  background: var(--team-girl-soft);
  color: var(--team-girl-deep);
}

.form-submit-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.btn-whatsapp {
  background: #EFF7F0;
  color: #265C34;
  border: 1px solid rgba(38, 92, 52, 0.28);
}

.btn-whatsapp:hover {
  background: #E0F0E3;
}

.rsvp-status {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: #EDF6EE;
  color: #245832;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

/* Wishes Wall */
.wishes-column {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.75rem;
  box-shadow: var(--shadow-card);
}

.wishes-header {
  margin-bottom: 1.35rem;
}

.wishes-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.wishes-sub {
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.wish-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
}

.wish-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.wish-author {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-primary);
}

.wish-team-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
}

.wish-team-tag.boy {
  background: var(--team-boy-soft);
  color: var(--team-boy-deep);
}

.wish-team-tag.girl {
  background: var(--team-girl-soft);
  color: var(--team-girl-deep);
}

.wish-message {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.wish-meta {
  margin-top: 0.45rem;
  font-size: 0.73rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   SIGNATURE FOOTER — EMIR THE HANDSOME & GRIT STUDIO
   ========================================================================== */
.site-footer {
  background: linear-gradient(180deg, var(--bg-canvas) 0%, #E6DDD0 100%);
  border-top: 1px solid var(--border-card);
  padding: 3.5rem 0 4rem;
  text-align: center;
}

.footer-ornament {
  width: 180px;
  margin: 0 auto 1rem;
}

.footer-couple {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.footer-hashtag {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 0.25rem;
  margin-bottom: 2.25rem;
}

.signature-credit-box {
  max-width: 540px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 16px 36px -14px rgba(45, 71, 44, 0.12);
}

.credit-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--leaf-forest);
  background: var(--leaf-pale);
  padding: 0.28rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.65rem;
}

.credit-headline {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--ink-primary);
  margin-bottom: 0.3rem;
}

.credit-headline strong {
  color: var(--leaf-forest);
  background: rgba(138, 157, 132, 0.2);
  padding: 0 0.35rem;
  border-radius: 6px;
}

.credit-enquiry {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  margin-bottom: 1.15rem;
}

.credit-email-link {
  color: var(--leaf-forest);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.credit-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.credit-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.95rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--ink-primary);
  color: #fff;
  border: 1px solid var(--ink-primary);
  transition: all 0.2s ease;
}

.credit-pill-btn:hover {
  transform: translateY(-1px);
}

.credit-pill-outline {
  background: var(--bg-canvas);
  color: var(--ink-primary);
  border-color: var(--border-card);
}

.credit-pill-admin {
  background: var(--leaf-forest);
  color: #fff;
  border-color: var(--leaf-forest);
}

.credit-pill-admin:hover {
  background: #1C331C;
}

.credit-pill-subtle {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--border-soft);
}

/* ==========================================================================
   PASSWORD-PROTECTED WEB DATABASE ADMIN PORTAL
   ========================================================================== */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 350;
  background: rgba(30, 24, 20, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.admin-modal[hidden] {
  display: none !important;
}

.admin-modal-card {
  width: 100%;
  max-width: 820px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

.admin-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 1rem;
}

.admin-modal-header h3 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  line-height: 1.1;
}

.admin-lock-screen {
  text-align: center;
  padding: 2.5rem 1rem;
  max-width: 380px;
  margin: 0 auto;
}

.lock-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.lock-form input {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-card);
  font-size: 0.95rem;
  text-align: center;
  background: var(--bg-canvas);
}

.admin-error {
  color: #B3261E;
  font-size: 0.82rem;
  font-weight: 600;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.15rem 1rem;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-val {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink-primary);
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.2rem;
}

.stat-card.boy-stat {
  border-color: rgba(136, 116, 121, 0.4);
  background: var(--team-boy-soft);
}
.stat-card.boy-stat .stat-val {
  color: var(--team-boy-deep);
}

.stat-card.girl-stat {
  border-color: rgba(202, 146, 137, 0.4);
  background: var(--team-girl-soft);
}
.stat-card.girl-stat .stat-val {
  color: var(--team-girl-deep);
}

.admin-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.action-left {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.action-right {
  display: flex;
  gap: 0.85rem;
}

.btn-link-subtle {
  background: none;
  border: none;
  font-size: 0.82rem;
  color: var(--ink-muted);
  cursor: pointer;
  text-decoration: underline;
}

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: #fff;
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
}

.db-table th {
  background: var(--bg-sand);
  color: var(--ink-primary);
  font-weight: 700;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-soft);
}

.db-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(43, 37, 32, 0.06);
}

.badge-attending {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  background: #EDF6EE;
  color: #245832;
}

.badge-declining {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  background: #F8EDED;
  color: #8C2A2A;
}

.btn-del-entry {
  background: none;
  border: none;
  color: #B3261E;
  font-size: 0.82rem;
  cursor: pointer;
}

/* ==========================================================================
   HOST SETTINGS MODAL
   ========================================================================== */
.host-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(30, 24, 20, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.host-modal[hidden] {
  display: none !important;
}

.host-modal-card {
  width: 100%;
  max-width: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}

.host-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
}

.host-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}

.host-modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 900px) {
  .details-cards-grid {
    grid-template-columns: 1fr;
  }
  .clues-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rsvp-layout {
    grid-template-columns: 1fr;
  }
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
  }
  .template-card-inner {
    padding: 0.5rem 1.25rem 2rem;
  }
  .template-script-title {
    font-size: 3.8rem;
  }
  .template-date-bracket {
    gap: 0.85rem;
  }
  .voter-controls,
  .vote-cards-grid,
  .form-row,
  .clues-grid {
    grid-template-columns: 1fr;
  }
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
  .timeline-divider {
    display: none;
  }
}
