:root {
  --ink: #111827;
  --muted: #667085;
  --navy: #0b1120;
  --navy-2: #0f172a;
  --gold: #e0ca74;
  --paper: #ffffff;
  --mist: #f0f2f5;
  --shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  --strong-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  background: var(--mist);
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.letter-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 26px;
  background:
    radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.95), transparent 36%),
    linear-gradient(rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.92)),
    url("../resource/background.jpg") center / cover;
  transition: opacity 1s ease, visibility 1s ease, filter 1s ease;
}

.letter-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 43%, rgba(255, 255, 255, 0.88) 0 14px, transparent 15px),
    radial-gradient(circle at 75% 50%, rgba(255, 255, 255, 0.86) 0 13px, transparent 14px),
    radial-gradient(circle at 74% 63%, rgba(255, 255, 255, 0.82) 0 11px, transparent 12px);
  opacity: 0.7;
  pointer-events: none;
}

.letter-gate.opening {
  opacity: 0;
  visibility: hidden;
  filter: blur(8px);
  pointer-events: none;
}

.letter-paper {
  position: relative;
  width: min(100%, 430px);
  min-height: min(88svh, 760px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  padding: 58px 26px 42px;
  color: #746a5f;
  background:
    linear-gradient(rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.9)),
    url("../resource/background.jpg") center / cover;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  animation: letterFloat 4.8s ease-in-out infinite;
}

.letter-paper::before,
.letter-paper::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 96px;
  height: 132px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 22%, rgba(206, 173, 113, 0.8) 0 5px, transparent 6px),
    radial-gradient(ellipse at 50% 16%, rgba(255, 255, 255, 0.95) 0 18px, transparent 19px),
    radial-gradient(ellipse at 28% 34%, rgba(255, 255, 255, 0.88) 0 20px, transparent 21px),
    radial-gradient(ellipse at 72% 34%, rgba(255, 255, 255, 0.88) 0 20px, transparent 21px),
    radial-gradient(ellipse at 50% 54%, rgba(255, 255, 255, 0.86) 0 20px, transparent 21px);
  filter: drop-shadow(0 8px 12px rgba(120, 120, 120, 0.13));
  opacity: 0.88;
  pointer-events: none;
}

.letter-paper::before {
  left: 28px;
  top: 260px;
}

.letter-paper::after {
  right: 18px;
  top: 396px;
  transform: scale(0.86) rotate(8deg);
}

.letter-paper p {
  position: relative;
  z-index: 3;
  margin: 0 0 24px;
  color: #817568;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.6px;
}

.letter-paper h1 {
  position: relative;
  z-index: 3;
  width: min(100%, 360px);
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(116, 106, 95, 0.36);
  color: #867d72;
  font-family: "Dancing Script", "Segoe UI", cursive;
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.envelope-button {
  position: relative;
  z-index: 4;
  align-self: center;
  width: min(82vw, 330px);
  height: 218px;
  margin-top: 64px;
  border: 0;
  background: transparent;
  transform-origin: center;
  transition: transform 0.35s ease;
}

.envelope-button:hover {
  transform: translateY(-4px) scale(1.015);
}

.envelope {
  position: absolute;
  inset: 0;
  display: block;
  filter: drop-shadow(0 18px 24px rgba(120, 102, 82, 0.22));
}

.envelope-back,
.envelope-front,
.envelope-flap {
  position: absolute;
  inset: 0;
  border-radius: 4px;
}

.envelope-back {
  background: linear-gradient(145deg, #f2ecdc, #d7cbb8);
}

.envelope-front {
  background:
    linear-gradient(32deg, transparent 49.5%, rgba(116, 92, 70, 0.28) 50%, transparent 50.7%),
    linear-gradient(148deg, transparent 49.5%, rgba(116, 92, 70, 0.28) 50%, transparent 50.7%),
    linear-gradient(to top, #e4dbc9, #f4eedf);
  clip-path: polygon(0 22%, 50% 58%, 100% 22%, 100% 100%, 0 100%);
}

.envelope-flap {
  z-index: 2;
  background: linear-gradient(180deg, #f7f1e4, #d8cbb7);
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  transform-origin: top center;
  transition: transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.seal {
  position: absolute;
  left: 50%;
  top: 53%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #f5dfbd;
  background: radial-gradient(circle at 35% 35%, #d4a66b, #8d5633);
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.28), 0 6px 14px rgba(105, 72, 44, 0.28);
  transform: translate(-50%, -50%);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.tap-hand {
  position: absolute;
  left: 55%;
  top: 57%;
  z-index: 6;
  color: rgba(255, 255, 255, 0.92);
  font-size: 34px;
  text-shadow: 0 2px 8px rgba(88, 74, 59, 0.45);
  animation: tapPulse 1.5s ease-in-out infinite;
  pointer-events: none;
}

.letter-paper time {
  position: relative;
  z-index: 3;
  color: #7d7164;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 32px;
  letter-spacing: 4px;
}

.letter-gate.opening .envelope-button {
  animation: envelopeLeave 1s ease both;
}

.letter-gate.opening .envelope-flap {
  transform: rotateX(180deg);
}

.letter-gate.opening .seal,
.letter-gate.opening .tap-hand {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
}

.site-shell {
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

body.invitation-open .site-shell {
  opacity: 1;
  transform: scale(1);
}

.site-shell {
  width: 100vw;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--mist);
  box-shadow: 0 0 60px rgba(6, 10, 22, 0.22);
}

.section {
  position: relative;
  overflow: hidden;
}

.cover {
  min-height: 100svh;
  padding: 40px 20px 60px;
  text-align: center;
  background:
    linear-gradient(to bottom, rgba(240, 242, 245, 0) 70%, var(--mist) 100%),
    url("../resource/background.jpg") center / cover;
}

.ribbon-outer {
  position: absolute;
  top: -10px;
  left: 20px;
  z-index: 10;
  width: 80px;
  height: 520px;
  background: linear-gradient(90deg, #a87516, #f2d276 42%, #8c6517);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 35px), 50% 100%, 0 calc(100% - 35px));
  filter: drop-shadow(0 12px 18px rgba(8, 13, 25, 0.26));
  transform-origin: top center;
  animation: ribbonDrop 0.9s cubic-bezier(0.18, 0.82, 0.28, 1) both, clothWave 6s ease-in-out 1s infinite;
}

.ribbon-inner {
  position: absolute;
  inset: 0 3px 3px;
  overflow: hidden;
  background:
    radial-gradient(circle at 60% 26%, rgba(64, 94, 154, 0.42), transparent 22%),
    linear-gradient(165deg, #071021, #030713 54%, #081838);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 33px), 50% 100%, 0 calc(100% - 33px));
}

.ribbon-content {
  position: absolute;
  inset: 28px 0 92px;
}

.ribbon-small {
  position: absolute;
  top: 0;
  left: 50%;
  color: var(--gold);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  transform: translateX(-50%);
}

.ribbon-large {
  position: absolute;
  top: 70%;
  left: 50%;
  color: #fff;
  font-family: "Lobster", "Dancing Script", "Segoe UI", cursive;
  font-size: 34px;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 1.1px;
  text-transform: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: translate(-50%, -50%);
}

.ribbon-k {
  position: absolute;
  left: 50%;
  bottom: 58px;
  margin: 0;
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
}

.academy {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 60px;
  margin-left: 84px;
  animation: slideDown 0.8s ease 0.18s both;
}

.academy img {
  width: 48px;
  flex: 0 0 auto;
}

.academy p,
.academy h1,
.academy span {
  margin: 0;
  text-align: left;
}

.academy p {
  color: #e11d2e;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.academy h1 {
  color: #10265c;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.08;
}

.academy span {
  display: block;
  color: #344056;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.ceremony-title {
  position: relative;
  z-index: 3;
  margin: 24px 8px 28px 92px;
  text-align: center;
  animation: slideDown 0.8s ease 0.32s both;
}

.memory h2 span,
.album h2,
.letter-card h2,
.day,
.date-row strong {
  font-family: "Playfair Display", Georgia, serif;
}

.ceremony-title p {
  margin: 0;
  font-family: "Dancing Script", "Segoe UI", cursive;
  font-size: 40px;
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: none;
}

.ceremony-title span,
.cover-photo figcaption,
.invite-card h2,
.memory h2 em,
.signature,
.album h2,
.thank-you-footer h2 {
  font-family: "Dancing Script", "Segoe UI", cursive;
}

.ceremony-title span {
  display: block;
  margin-left: 16px;
  font-size: 36px;
  font-weight: 700;
  line-height: 0.86;
}

.ceremony-title span::after {
  content: "";
  display: inline-block;
  width: 28%;
  height: 1px;
  margin-left: 8px;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--ink), transparent);
}

.cover-photo {
  position: relative;
  z-index: 2;
  width: min(90%, 390px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 25px;
  background: #172033;
  box-shadow: var(--strong-shadow);
  animation: photoReveal 0.95s cubic-bezier(0.18, 0.82, 0.28, 1) 0.44s both;
}

.cover-photo img {
  width: 100%;
  height: min(62svh, 560px);
  min-height: 500px;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.9s ease, filter 0.9s ease;
}

.cover-photo:hover img {
  transform: scale(1.045);
  filter: saturate(1.08);
}

.cover-photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(transparent, rgba(4, 8, 17, 0.46));
  pointer-events: none;
}

.cover-photo figcaption {
  position: absolute;
  right: 20px;
  bottom: 24px;
  z-index: 2;
  color: #fff;
  font-size: 46px;
  font-weight: 700;
  line-height: 0.8;
  text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.55);
}

.cover-note {
  margin: 56px 0 0;
  color: #444;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 16px;
  letter-spacing: 2px;
  line-height: 1.55;
  text-align: center;
  animation: fadeRise 0.8s ease 0.76s both;
}

.event {
  padding: 0 0 30px;
  background: var(--mist);
}

.silk-wave {
  display: none;
}

.invite-card {
  position: relative;
  z-index: 2;
  margin: 0 20px 30px;
  padding: 50px 20px 30px;
  border-radius: 25px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}

.eyebrow,
.time,
.place-label,
.address {
  margin: 0;
}

.eyebrow {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.invite-card h2 {
  margin: 14px 0 28px;
  color: #1a1a1a;
  font-size: 44px;
  font-weight: 700;
  line-height: 0.95;
}

.time {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.date-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 15px;
  margin: 28px 0;
}

.date-row span {
  padding: 8px 5px;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
  color: #333;
  font-size: 14px;
  line-height: 1;
}

.date-row strong {
  color: #111;
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
}

.place-label {
  margin-bottom: 6px;
  color: #777;
  font-size: 12px;
}

.place {
  margin: 0 0 10px;
  color: #222;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.place br {
  display: none;
}

.address {
  color: #777;
  font-size: 13px;
  line-height: 1.45;
}

.map-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 38px;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.map-link::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.event-photo {
  width: 100%;
  height: 290px;
  margin-top: -62px;
  object-fit: cover;
  object-position: center 38%;
}

.memory {
  padding: 10px 0;
  background: var(--navy-2);
}

.torn {
  width: 100%;
  height: 60px;
  background-size: 100% 100%;
}

.torn.top {
  margin-top: -10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,120 C200,50 400,150 600,80 C800,10 1000,100 1200,60 L1200,120 L0,120 Z' fill='%230f172a'/%3E%3C/svg%3E");
}

.torn.bottom {
  margin-bottom: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C200,70 400,-30 600,40 C800,110 1000,20 1200,60 L1200,0 L0,0 Z' fill='%230f172a'/%3E%3C/svg%3E");
}

.memory h2 {
  margin: 0 0 40px;
  color: #fff;
  text-align: center;
}

.memory h2 span {
  display: block;
  font-size: 42px;
  font-style: italic;
  font-weight: 600;
  line-height: 0.95;
}

.memory h2 em {
  display: block;
  color: #cbd5e1;
  font-size: 24px;
  font-style: normal;
  font-weight: 600;
}

.memory-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 15px;
  height: 450px;
  padding: 0 15px;
}

.film-strip {
  position: relative;
  height: 100%;
  overflow: hidden;
  padding: 8px;
  border-right: 14px solid #1a1a24;
  border-left: 14px solid #1a1a24;
  border-radius: 4px;
  background: #050a15;
}

.film-strip::before,
.film-strip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  width: 6px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 6px, rgba(255, 255, 255, 0.4) 6px, rgba(255, 255, 255, 0.4) 12px);
  pointer-events: none;
}

.film-strip::before {
  left: -10px;
}

.film-strip::after {
  right: -10px;
}

.film-strip img {
  width: 100%;
  height: 120px;
  margin-bottom: 8px;
  flex-shrink: 0;
  border: 1px solid #333;
  border-radius: 4px;
  object-fit: cover;
  animation: filmScroll 12s linear infinite;
}

.film-strip:hover img {
  animation-play-state: paused;
}

.memory-hero {
  width: 100%;
  height: 100%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  object-fit: cover;
  object-position: 24% 30%;
}

.letter {
  padding: 0 20px 40px;
  background: var(--mist);
}

.letter-card {
  padding: 45px 25px 30px;
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.letter-card h2 {
  margin: 0 0 34px;
  color: #111;
  font-size: 28px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.letter-card p {
  margin: 0 0 20px;
  color: #444;
  font-size: 15px;
  line-height: 2;
  text-align: justify;
}

.signature {
  margin-top: 30px;
  padding-right: 10px;
  color: #111;
  font-size: 45px;
  font-weight: 700;
  text-align: right;
  text-transform: none;
}

.masonry {
  padding: 0 15px 40px;
  background: var(--mist);
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.photo-grid img {
  width: 100%;
  height: 170px;
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.photo-grid img:hover,
.memory-hero:hover,
.event-photo:hover {
  transform: scale(1.02);
  filter: saturate(1.08);
}

.photo-grid .tall {
  grid-row: span 2;
  height: 350px;
}

.photo-grid .wide {
  grid-column: 1 / -1;
  height: 210px;
}

.album {
  padding: 20px 0 40px;
  background: #fff;
  text-align: center;
}

.album h2 {
  margin: 0 0 20px;
  color: #111;
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
}

.album-view {
  position: relative;
  width: calc(100% - 20px);
  max-width: 500px;
  aspect-ratio: 3 / 4;
  margin: 0 auto 15px;
  overflow: hidden;
  border-radius: 15px;
  background:
    repeating-linear-gradient(90deg, #e2e4e9, #e2e4e9 4px, #f0f2f5 4px, #f0f2f5 8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.album-view::before {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: 0;
  background:
    repeating-linear-gradient(90deg, #e2e4e9, #e2e4e9 4px, #f0f2f5 4px, #f0f2f5 8px);
}

.album-track {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 0.58s cubic-bezier(0.22, 0.72, 0.18, 1);
  will-change: transform;
}

.album-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  user-select: none;
  -webkit-user-drag: none;
}

.album-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.3);
  font-size: 20px;
  line-height: 1;
  backdrop-filter: blur(5px);
  transform: translateY(-50%);
  transition: background 0.25s ease, color 0.25s ease;
}

.album-nav:hover {
  color: #111;
  background: rgba(255, 255, 255, 0.72);
}

.album-nav.prev {
  left: 10px;
}

.album-nav.next {
  right: 10px;
}

.thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 5px 15px 0;
  background: #fff;
  scrollbar-width: none;
}

.thumbs::-webkit-scrollbar {
  display: none;
}

.thumbs button {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  opacity: 0.5;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.thumbs button.active {
  border-color: #111;
  opacity: 1;
  transform: scale(1.05);
}

.thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rsvp {
  padding: 40px 20px 20px;
  background: var(--mist);
  text-align: center;
}

.rsvp > img {
  width: 100%;
  height: 300px;
  margin-bottom: 28px;
  border-radius: 20px;
  object-fit: cover;
  object-position: center 18%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 400px;
  margin: 0 auto;
}

.rsvp-form p {
  margin: 0 0 12px;
  color: #444;
  font-size: 14px;
  line-height: 1.8;
}

.rsvp-form input,
.rsvp-form textarea,
.rsvp-form select {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid #ccc;
  border-radius: 25px;
  color: #333;
  background: transparent;
  font-size: 15px;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus,
.rsvp-form select:focus {
  border-color: #111;
  outline: none;
}

.rsvp-form textarea {
  resize: none;
  border-radius: 15px;
}

.rsvp-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #555 50%), linear-gradient(135deg, #555 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.rsvp-form button {
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  border: 0;
  border-radius: 25px;
  color: #fff;
  background: var(--navy);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.rsvp-form button:hover {
  opacity: 0.86;
  transform: translateY(-1px);
}

.form-status {
  display: block;
  min-height: 20px;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
}

.map-section {
  padding: 0 20px 40px;
  background: var(--mist);
}

.map-container {
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.map-directions {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  color: #fff;
  background: var(--navy);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-align: center;
  text-decoration: none;
}

.thank-you-footer {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 40px 40px 0 0;
}

.thank-you-footer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.72);
}

.thank-you-footer h2 {
  position: absolute;
  bottom: 28px;
  left: 30px;
  margin: 0;
  color: #fff;
  font-size: 54px;
  font-weight: 700;
  line-height: 0.9;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.52);
}

.music-toggle {
  position: fixed;
  right: max(18px, calc((100vw - 430px) / 2 + 18px));
  bottom: 20px;
  z-index: 40;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  font-size: 24px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.music-toggle.playing {
  color: #fff;
  background: var(--navy);
  animation: pulse 1.5s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@keyframes pageFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ribbonDrop {
  from {
    opacity: 0;
    transform: translateY(-34px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes clothWave {
  0%,
  100% {
    transform: perspective(600px) rotateY(0deg) rotateX(0deg) skewY(0deg) translateY(0);
  }
  33% {
    transform: perspective(600px) rotateY(-8deg) rotateX(3deg) skewY(2deg) translateY(-8px);
  }
  66% {
    transform: perspective(600px) rotateY(6deg) rotateX(-2deg) skewY(-1deg) translateY(-3px);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes photoReveal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes filmScroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-256px);
  }
}

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

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

@keyframes tapPulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

@keyframes envelopeLeave {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  55% {
    opacity: 1;
    transform: translateY(-16px) scale(1.04);
  }
  100% {
    opacity: 0;
    transform: translateY(70px) scale(0.86);
  }
}

@media (max-width: 374px) {
  .cover {
    padding-right: 14px;
    padding-left: 14px;
  }

  .ribbon-outer {
    left: 14px;
    width: 72px;
    height: 500px;
  }

  .ribbon-large {
    font-size: 30px;
  }

  .academy,
  .ceremony-title {
    margin-left: 78px;
  }

  .academy img {
    width: 42px;
  }

  .academy p {
    font-size: 10px;
  }

  .academy h1 {
    font-size: 12px;
  }

  .academy span {
    font-size: 7px;
  }

  .ceremony-title p {
    font-size: 27px;
  }

  .ceremony-title span {
    font-size: 31px;
  }

  .cover-photo {
    width: 92%;
  }

  .cover-photo img {
    min-height: 470px;
  }

  .cover-photo figcaption {
    font-size: 40px;
  }

  .invite-card h2 {
    font-size: 40px;
  }

  .memory-layout {
    grid-template-columns: 0.86fr 1.14fr;
    height: 420px;
  }
}

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