:root {
  --paper: #f3f8fd;
  --paper-soft: #f9fcff;
  --paper-deep: #ddeaf7;
  --white: #ffffff;
  --accent: #4c82b8;
  --accent-dark: #386899;
  --accent-soft: #dcebfa;
  --ink: #23384d;
  --ink-muted: #5d748c;
  --line-frame: #8ca5bd;
  --shadow-card: 0 18px 46px rgba(35, 56, 77, 0.1);
  --shadow-soft: 0 8px 24px rgba(35, 56, 77, 0.07);
  --font-title: 'Great Vibes', cursive;
  --font-sign: 'WindSong', cursive;
  --font-cond: 'Barlow Condensed', sans-serif;
  --font-serif: 'Lora', serif;
  --font-display: 'Playfair Display', serif;
  --font-sans: 'Be Vietnam Pro', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(206, 228, 249, 0.65), transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(218, 235, 252, 0.55), transparent 42%),
    radial-gradient(circle at 50% 80%, rgba(235, 245, 255, 0.8), transparent 52%),
    #edf4fb;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Falling petals / hearts ambient layer */
#petal-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* Envelope Intro Overlay */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: radial-gradient(circle at 50% 42%, #f9fcff 0%, #dceaf7 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.75s ease, visibility 0.75s ease, transform 0.75s ease;
}

.intro-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  pointer-events: none;
}

.intro-envelope {
  width: min(560px, 94vw);
  background: var(--paper);
  border-radius: 16px;
  padding: 26px 24px 28px;
  position: relative;
  box-shadow: 0 26px 60px rgba(35, 56, 77, 0.16);
  border: 1px solid #d5e5f4;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.intro-envelope:hover {
  transform: translateY(-3px);
}

.vf-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--ink);
  border-style: solid;
  pointer-events: none;
}

.vf-tl { top: 14px; left: 14px; border-width: 2px 0 0 2px; }
.vf-tr { top: 14px; right: 14px; border-width: 2px 2px 0 0; }
.vf-bl { bottom: 14px; left: 14px; border-width: 0 0 2px 2px; }
.vf-br { bottom: 14px; right: 14px; border-width: 0 2px 2px 0; }

.intro-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-left: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: recBlink 1.3s infinite ease-in-out;
}

@keyframes recBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 14px;
}

.intro-chibi {
  width: 100%;
  max-width: 210px;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(60, 35, 25, 0.12));
}

.intro-script {
  font-family: var(--font-title);
  font-size: clamp(32px, 5vw, 42px);
  color: var(--ink);
  line-height: 1.1;
}

.intro-main {
  font-family: var(--font-cond);
  font-size: clamp(34px, 5.5vw, 44px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1.2px;
  line-height: 1;
  margin: 2px 0 6px;
}

.intro-couple {
  font-size: 15px;
  font-weight: 600;
  color: #3a2e2b;
  margin-bottom: 12px;
}

.intro-guest-box {
  border-top: 1px dashed #c8b6a7;
  border-bottom: 1px dashed #c8b6a7;
  padding: 8px 6px;
  margin: 10px 0 12px;
}

.intro-guest-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.9px;
  color: var(--ink-muted);
}

.intro-guest-name {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--accent);
  margin-top: 2px;
}

.intro-date {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
}

.btn-open-card {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(76, 130, 184, 0.34);
  transition: transform 0.2s, background 0.2s;
  animation: pulseBtn 2s infinite;
}

.btn-open-card:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 10px 26px rgba(76, 130, 184, 0.32); }
  50% { box-shadow: 0 12px 34px rgba(76, 130, 184, 0.55); }
}

/* Main Page Container */
.page-wrap {
  position: relative;
  z-index: 3;
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 16px 90px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Sticky Quick Nav */
.top-pill-nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(248, 252, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid #d4e4f4;
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: var(--shadow-soft);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.nav-links a:hover {
  background: #e1eefb;
  color: var(--ink);
}

.nav-music-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 6px 13px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.nav-music-pill.is-paused {
  background: #5c758d;
}

/* Paper Sheet Sections */
.paper-sheet {
  background: var(--paper);
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid #d9e7f5;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 76px;
}

.flap-sheet {
  scroll-margin-top: 76px;
}

/* Ultra-thin scroll progress hairline */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #8fb8e2 0%, var(--accent) 100%);
  z-index: 60;
  pointer-events: none;
  transition: width 0.08s linear;
}

/* Bidirectional Scroll Reveal & Staggered Choreography */
.reveal {
  opacity: 0;
  transform: translateY(38px) scale(0.982);
  transition:
    opacity 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.82s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.from-top {
  transform: translateY(-34px) scale(0.982);
}

.reveal.from-bottom {
  transform: translateY(38px) scale(0.982);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered child items inside each section */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--stagger, 0) * 75ms);
}

.reveal.from-top .stagger-item {
  transform: translateY(-18px);
}

.reveal.is-visible .stagger-item {
  opacity: 1;
  transform: translateY(0);
}

/* Subtle ambient breathing for monogram & heart badge */
.monogram-svg {
  animation: monogramFloat 5.5s ease-in-out infinite;
}

@keyframes monogramFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.02); }
}

.heart-circle-badge {
  animation: heartPulse 2.6s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Hero opening choreography after envelope opens */
.hero-card.just-opened {
  animation: heroSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroSlideUp {
  0% { opacity: 0; transform: translateY(44px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .stagger-item,
  .monogram-svg,
  .heart-circle-badge,
  .hero-chibi,
  .btn-open-card {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Section 1: Hero Viewfinder Card */
.hero-card {
  padding: 36px 28px 34px;
}

.hero-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 12px;
}

.heart-circle-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.2px solid #8ca5bd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 15px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 20px;
}

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

.hero-chibi {
  width: 100%;
  max-width: 310px;
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(58, 34, 24, 0.12));
  animation: floatGentle 4.5s ease-in-out infinite;
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-info {
  text-align: center;
}

.hero-script {
  font-family: var(--font-title);
  font-size: clamp(44px, 6vw, 56px);
  color: var(--ink);
  line-height: 1.05;
}

.hero-title {
  font-family: var(--font-cond);
  font-size: clamp(46px, 6.5vw, 58px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1.5px;
  line-height: 1;
  margin: 2px 0 8px;
}

.hero-couple-sub {
  font-size: 19px;
  font-weight: 500;
  color: #3a2e2b;
  margin-bottom: 18px;
}

.hero-invite-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: #3a2e2b;
}

.hero-guest-line {
  font-family: var(--font-title);
  font-size: 29px;
  color: var(--ink);
  min-height: 36px;
  border-bottom: 1px solid #a6948c;
  max-width: 280px;
  margin: 4px auto 20px;
  padding-bottom: 2px;
}

.hero-date-big {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 36px);
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--accent);
  margin-bottom: 12px;
}

/* Interactive Music Player Bar */
.player-widget {
  max-width: 280px;
  margin: 0 auto;
}

.player-track-title {
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.player-bar {
  position: relative;
  height: 3px;
  background: rgba(76, 130, 184, 0.28);
  border-radius: 99px;
  margin-bottom: 14px;
  cursor: pointer;
}

.player-progress {
  height: 100%;
  width: 68%;
  background: var(--accent);
  border-radius: 99px;
  position: relative;
  transition: width 0.25s linear;
}

.player-progress::after {
  content: '';
  position: absolute;
  right: -5px;
  top: -3.5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.ctrl-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: transform 0.15s, opacity 0.15s;
}

.ctrl-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

.ctrl-btn.is-active {
  background: rgba(76, 130, 184, 0.14);
  border-radius: 6px;
}

.ctrl-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  opacity: 1;
  box-shadow: 0 4px 12px rgba(76, 130, 184, 0.3);
}

/* Section 2: Pointed Flap Monogram & Countdown */
.flap-sheet {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
  overflow: visible;
}

.flap-cap {
  background: var(--paper);
  clip-path: polygon(50% 0%, 100% 34%, 100% 100%, 0% 100%, 0% 34%);
  padding: 44px 20px 26px;
  text-align: center;
  border-bottom: 1.5px solid #d5e5f4;
  filter: drop-shadow(0 12px 24px rgba(35, 56, 77, 0.08));
}

.monogram-svg {
  width: 170px;
  height: 170px;
  margin: 0 auto;
  display: block;
}

.countdown-strip {
  background: var(--paper);
  padding: 20px 18px 26px;
  border-radius: 0 0 22px 22px;
  border: 1px solid #d9e7f5;
  border-top: none;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.countdown-label {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(62px, 94px));
  justify-content: center;
  gap: 10px;
}

.cd-box {
  background: #fff;
  border: 1px solid #d5e4f2;
  border-radius: 14px;
  padding: 10px 6px;
  box-shadow: 0 4px 12px rgba(35, 56, 77, 0.05);
}

.cd-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.cd-unit {
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Section 3 & 4: White Inner Cards inside Cream Frame */
.inner-panel-wrap {
  padding: 20px;
}

.white-card-inner {
  background: #fff;
  border-radius: 22px;
  padding: 36px 26px 34px;
  position: relative;
  text-align: center;
  box-shadow: 0 4px 18px rgba(60, 40, 30, 0.05);
}

.wavy-frame-svg {
  position: absolute;
  inset: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  pointer-events: none;
}

.inner-content {
  position: relative;
  z-index: 2;
}

.serif-small-caps {
  font-family: var(--font-serif);
  font-size: 13.5px;
  letter-spacing: 0.4px;
  color: var(--ink);
  line-height: 1.65;
}

.invite-guest-inline {
  margin-bottom: 10px;
  font-family: var(--font-serif);
  font-size: 13px;
  color: #3a2e2b;
}

.invite-guest-inline span {
  font-family: var(--font-title);
  font-size: 24px;
  color: var(--accent);
  border-bottom: 1px solid #b8a89f;
  padding: 0 18px 2px;
  display: inline-block;
  min-width: 170px;
}

.couple-names-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 14px 0 10px;
}

.couple-sign {
  font-family: var(--font-sign);
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 500;
  color: var(--accent);
  line-height: 1.15;
}

.heart-divider {
  color: var(--accent);
  font-size: 22px;
}

.date-bars-row {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 16px;
  margin: 12px auto 8px;
}

.bar-text {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  border-top: 1.2px solid var(--accent);
  border-bottom: 1.2px solid var(--accent);
  padding: 5px 10px;
  letter-spacing: 0.5px;
}

.day-month-big {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 42px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1.5px;
}

.lunar-italic {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-style: italic;
  color: #4a3e3a;
  margin-bottom: 16px;
}

.venue-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0;
}

.venue-addr {
  font-family: var(--font-serif);
  font-size: 14px;
  color: #4a3e3a;
}

.action-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 14px;
}

.pill-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: var(--paper-soft);
  color: var(--accent);
  border: 1px solid #c9ddf1;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s, transform 0.15s;
}

.pill-action:hover {
  background: #e3effb;
  transform: translateY(-1px);
}

.script-closing {
  font-family: var(--font-title);
  font-size: 27px;
  color: var(--ink);
  margin: 10px 0 16px;
}

.parents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-family: var(--font-serif);
  font-size: 13.5px;
  color: var(--ink);
  padding-top: 6px;
}

.parents-side {
  font-style: italic;
  margin-bottom: 4px;
  color: var(--ink-muted);
}

.parents-name {
  font-weight: 600;
  line-height: 1.45;
}

/* Ceremony Lower Panel */
.ceremony-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 20px;
}

.ceremony-chibi {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
  display: block;
}

.ceremony-script-title {
  font-family: var(--font-title);
  font-size: 40px;
  color: var(--ink);
  margin: 6px 0;
}

.ceremony-date-red {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  margin: 6px 0;
}

/* Section 5: Calendar Thank You */
.calendar-sheet {
  padding: 0 0 28px;
  text-align: center;
}

.thank-flap {
  background: #f6faff;
  padding: 28px 20px 36px;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
  filter: drop-shadow(0 6px 10px rgba(35, 56, 77, 0.08));
  position: relative;
}

.thank-title {
  font-family: var(--font-title);
  font-size: 52px;
  color: var(--ink);
}

.cal-grid-wrap {
  max-width: 400px;
  margin: 18px auto 0;
  padding: 0 16px;
}

.cal-month-label {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.cal-table {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px 4px;
  font-family: var(--font-serif);
  font-size: 15px;
}

.cal-head {
  font-weight: 700;
  color: var(--accent);
  padding-bottom: 6px;
}

.cal-cell {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3e322e;
  position: relative;
}

.cal-cell.is-heart {
  color: #fff;
  font-weight: 700;
}

.cal-cell.is-heart svg {
  position: absolute;
  width: 34px;
  height: 32px;
  z-index: 0;
}

.cal-cell.is-heart span {
  position: relative;
  z-index: 1;
}

/* Section 6: RSVP & Guestbook */
.section-heading {
  text-align: center;
  margin-bottom: 18px;
}

.section-heading .script {
  font-family: var(--font-title);
  font-size: 40px;
  color: var(--ink);
  line-height: 1.1;
}

.section-heading .sub {
  font-family: var(--font-serif);
  font-size: 13.5px;
  color: var(--ink-muted);
}

.rsvp-form {
  display: grid;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.input-box label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.input-box input,
.input-box select,
.input-box textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dccbbe;
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
}

.input-box input:focus,
.input-box select:focus,
.input-box textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(179, 40, 36, 0.1);
}

.btn-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-submit:hover {
  background: var(--accent-dark);
}

.wishes-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.wish-card {
  background: #fff;
  border: 1px solid #eadad0;
  border-radius: 14px;
  padding: 12px 15px;
}

.wish-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.wish-author {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}

.wish-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--accent);
  font-weight: 600;
}

.wish-text {
  font-size: 13px;
  color: #4b3e39;
  line-height: 1.5;
}

/* Section 7: Belly Band Gift / Host Link Builder */
.gift-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 620px;
  margin: 0 auto;
}

.gift-card {
  background: #fff;
  border: 1px solid #e6d6c7;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.gift-role {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--accent);
}

.gift-detail {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 6px 0 10px;
}

.btn-copy-sm {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #c7d9ec;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Wedding Photo Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.gallery-card {
  background: #fff;
  border: 1px solid #d9e7f5;
  border-radius: 16px;
  padding: 10px 10px 12px;
  box-shadow: 0 6px 18px rgba(35, 56, 77, 0.06);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(35, 56, 77, 0.12);
}

.gallery-card.is-wide {
  grid-column: span 2;
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 11px;
  overflow: hidden;
  background: #edf4fb;
  position: relative;
}

.gallery-card.is-wide .gallery-thumb {
  aspect-ratio: 16 / 9;
}

.gallery-thumb img,
.gallery-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.gallery-card:hover .gallery-thumb img,
.gallery-card:hover .gallery-thumb svg {
  transform: scale(1.03);
}

.gallery-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 4px 0;
  font-family: var(--font-serif);
  font-size: 12.5px;
  color: var(--ink-muted);
}

.gallery-caption strong {
  font-family: var(--font-title);
  font-size: 21px;
  font-weight: 400;
  color: var(--ink);
}

.gallery-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn-upload-photo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-soft);
  color: var(--accent);
  border: 1px dashed #9fc0e2;
  border-radius: 999px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-upload-photo:hover {
  background: #e4effb;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 34, 48, 0.86);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-inner {
  max-width: min(860px, 94vw);
  max-height: 88vh;
  position: relative;
  text-align: center;
}

.lightbox-media {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  padding: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-media img,
.lightbox-media svg {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

.lightbox-caption {
  color: #edf5fd;
  font-family: var(--font-title);
  font-size: 28px;
  margin-top: 10px;
}

.lb-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lb-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-close {
  top: 20px;
  right: 20px;
  transform: none;
  font-size: 20px;
}

.host-tools-box {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed #b9cde2;
  border-radius: 16px;
  padding: 14px 18px;
}

.host-tools-box summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.host-tools-body {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.link-share-row {
  display: flex;
  gap: 8px;
}

.link-share-row input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #c7d9ec;
  font-size: 12.5px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: #23384d;
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 99;
}

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

@media (max-width: 680px) {
  .intro-grid,
  .hero-grid,
  .ceremony-grid,
  .form-row-2,
  .gift-grid,
  .parents-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-card.is-wide {
    grid-column: span 1;
  }
  .top-pill-nav {
    border-radius: 16px;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links {
    justify-content: center;
  }
  .nav-music-pill {
    justify-content: center;
  }
  .countdown-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
