:root {
  --ink: #2c2523;
  --muted: #776b66;
  --paper: #fffaf5;
  --blush: #e9a7a1;
  --rose: #b85f66;
  --coral: #d97962;
  --leaf: #53745d;
  --mint: #dce9d7;
  --gold: #b98e46;
  --sky: #9bbfd1;
  --lavender: #c7abc9;
  --line: rgba(44, 37, 35, 0.12);
  --shadow: 0 22px 60px rgba(79, 55, 48, 0.16);
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
}

.day-ambient {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background: rgba(var(--ambient-color, 255, 196, 151), var(--ambient-opacity, 0.05));
  transition: background-color 1.2s ease;
}

.day-ambient i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 8px white;
  opacity: var(--night-opacity, 0);
  animation: star-twinkle 2.8s ease-in-out infinite alternate;
}

.day-ambient i:nth-child(1) { top: 12%; left: 8%; }
.day-ambient i:nth-child(2) { top: 22%; left: 74%; animation-delay: -0.7s; }
.day-ambient i:nth-child(3) { top: 38%; left: 91%; animation-delay: -1.4s; }
.day-ambient i:nth-child(4) { top: 56%; left: 15%; animation-delay: -2.1s; }
.day-ambient i:nth-child(5) { top: 73%; left: 82%; animation-delay: -0.4s; }
.day-ambient i:nth-child(6) { top: 88%; left: 31%; animation-delay: -1.1s; }

.day-journey {
  position: fixed;
  inset: 0 10px 0 auto;
  z-index: 9;
  width: 28px;
  pointer-events: none;
}

.day-journey-track {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  width: 1px;
  background: linear-gradient(#eaa586, #e7c97e 38%, #d47e6d 70%, #596080);
  opacity: 0.52;
}

.celestial-body {
  position: absolute;
  top: var(--journey-y, 8%);
  left: 50%;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #ffd27c;
  box-shadow: 0 0 0 5px rgba(255, 210, 124, 0.14), 0 0 22px 8px rgba(255, 190, 104, 0.38);
  transform: translate(-50%, -50%);
  transition: top 0.12s linear, background 0.8s ease, box-shadow 0.8s ease;
}

.day-journey[data-phase="day"] .celestial-body {
  background: #ffe5a3;
  box-shadow: 0 0 0 6px rgba(255, 229, 163, 0.16), 0 0 26px 10px rgba(255, 204, 95, 0.4);
}

.day-journey[data-phase="sunset"] .celestial-body {
  background: #df7a67;
  box-shadow: 0 0 0 6px rgba(223, 122, 103, 0.13), 0 0 25px 9px rgba(205, 93, 87, 0.35);
}

.day-journey[data-phase="night"] .celestial-body {
  background: #f6f1db;
  box-shadow: inset 5px -2px 0 #707693, 0 0 0 5px rgba(246, 241, 219, 0.1), 0 0 19px 6px rgba(220, 224, 255, 0.27);
}

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

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 52px);
  background: rgba(255, 250, 245, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
}

.brand {
  color: var(--rose);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  font-weight: 700;
  text-decoration: none;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 3vw, 28px);
}

.nav a,
.text-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover,
.text-link:hover {
  color: var(--rose);
}

.language-switch,
.segmented {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.lang-button,
.segmented span {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.lang-button.is-active,
.segmented input:checked + span {
  color: white;
  background: var(--rose);
}

.section {
  padding: 92px clamp(18px, 5vw, 72px);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding-top: 120px;
  color: white;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 22, 18, 0.7), rgba(30, 22, 18, 0.25) 54%, rgba(30, 22, 18, 0.4));
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  overflow: hidden;
}

.hero-media img {
  object-fit: cover;
  animation: slowZoom 18s ease-in-out infinite alternate;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 740px;
  padding-bottom: 130px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffe0db;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  line-height: 0.95;
}

h1 {
  font-size: clamp(4rem, 12vw, 9rem);
}

.hero h1 {
  max-width: min(760px, 82vw);
  color: #fff7ef;
  font-family: "Dancing Script", "Great Vibes", cursive;
  font-size: clamp(3.35rem, 7vw, 6.6rem);
  font-weight: 700;
  line-height: 1.02;
  text-wrap: balance;
  text-shadow:
    0 2px 0 rgba(185, 142, 70, 0.18),
    0 18px 34px rgba(43, 25, 22, 0.46);
}

.hero h1::after {
  content: "";
  display: block;
  width: min(220px, 42vw);
  height: 1px;
  margin-top: 18px;
  background: linear-gradient(90deg, transparent, rgba(255, 233, 190, 0.9), transparent);
  box-shadow: 0 0 18px rgba(255, 226, 176, 0.45);
}

h2 {
  color: var(--ink);
  font-size: clamp(2.3rem, 6vw, 4.6rem);
}

.hero-date {
  margin: 18px 0 26px;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.45) 48%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.65s ease;
}

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

.button:hover::after {
  transform: translateX(120%);
}

.button.primary {
  color: white;
  background: var(--rose);
  box-shadow: 0 12px 28px rgba(184, 95, 102, 0.32);
}

.button.ghost {
  color: white;
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.12);
}

.button.full {
  width: 100%;
}

.countdown {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 36px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 10px;
  width: min(470px, calc(100% - 36px));
}

.countdown div,
.detail-card,
.story-card,
.stat,
.message-card,
.guest-row,
.rsvp-shell,
.message-form {
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.countdown div {
  display: grid;
  gap: 4px;
  padding: 16px 10px;
  text-align: center;
}

.countdown strong {
  font-size: 2rem;
}

.countdown span {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section-heading {
  position: relative;
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transition: width 1.1s 0.25s ease;
}

.section-heading.is-in-view::after {
  width: min(190px, 45vw);
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.story-section,
.details-section {
  position: relative;
  overflow: hidden;
}

.story-section {
  padding-inline: clamp(18px, 4vw, 96px);
  background:
    linear-gradient(90deg, rgba(185, 142, 70, 0.08) 0 1px, transparent 1px calc(100% - 1px), rgba(185, 142, 70, 0.08) calc(100% - 1px)),
    radial-gradient(circle at 12% 20%, rgba(185, 142, 70, 0.12), transparent 24%),
    radial-gradient(circle at 88% 82%, rgba(83, 116, 93, 0.1), transparent 24%),
    linear-gradient(135deg, #fffaf5 0%, #fffdf8 46%, #f8f3ea 100%);
}

.story-section::before,
.story-section::after {
  content: "";
  position: absolute;
  top: 170px;
  bottom: 95px;
  width: clamp(42px, 8vw, 118px);
  border-block: 1px solid rgba(185, 142, 70, 0.24);
  opacity: 0.9;
}

.story-section::before {
  left: clamp(16px, 3vw, 52px);
  border-left: 1px solid rgba(185, 142, 70, 0.24);
}

.story-section::after {
  right: clamp(16px, 3vw, 52px);
  border-right: 1px solid rgba(185, 142, 70, 0.24);
}

.section-glow {
  position: absolute;
  inset: 108px auto auto 50%;
  width: min(720px, 62vw);
  height: 220px;
  border-radius: 50%;
  background: rgba(185, 142, 70, 0.08);
  filter: blur(34px);
  transform: translateX(-50%);
  animation: breathe 7s ease-in-out infinite;
}

.story-showcase {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: center;
  max-width: 1280px;
  margin: auto;
}

.story-showcase::before {
  content: "";
  position: absolute;
  inset: auto -18px -48px auto;
  width: clamp(140px, 18vw, 260px);
  height: clamp(140px, 18vw, 260px);
  border: 1px solid rgba(185, 142, 70, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.story-photo {
  position: relative;
}

.story-photo::before,
.story-photo::after {
  content: "";
  position: absolute;
  border-radius: 8px;
  transform: rotate(-6deg);
}

.story-photo::before {
  inset: 24px -22px -22px 30px;
  background: rgba(185, 142, 70, 0.12);
}

.story-photo::after {
  inset: -18px 28px 28px -18px;
  border: 1px solid rgba(185, 142, 70, 0.42);
}

.story-photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.story-timeline {
  position: relative;
  display: grid;
  gap: clamp(7px, 1vh, 14px);
  align-content: center;
}

.story-chapter-list {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(10px, 1.4vh, 16px);
  align-content: center;
  min-height: 0;
  height: 100%;
}

.story-game-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: clamp(15px, 1.8vw, 20px) clamp(22px, 3vw, 34px);
  border: 1px solid rgba(185, 142, 70, 0.28);
  border-radius: 22px 8px 22px 8px;
  color: #75433f;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.78), transparent 28%),
    radial-gradient(circle at 92% 78%, rgba(242, 163, 154, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.88), rgba(255, 241, 238, 0.72));
  box-shadow:
    0 18px 42px rgba(94, 58, 52, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 0 0 7px rgba(255, 255, 255, 0.18);
  font-family: "Dancing Script", "Caveat", cursive;
  font-size: clamp(1.18rem, 1.65vw, 1.58rem);
  font-weight: 700;
  line-height: 1.34;
  text-align: center;
  text-wrap: pretty;
}

.story-game-hint::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px 6px 18px 6px;
  pointer-events: none;
}

.story-game-hint::after {
  content: "✦";
  position: absolute;
  top: -10px;
  right: clamp(18px, 3vw, 34px);
  color: rgba(185, 142, 70, 0.62);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.18rem;
  text-shadow: 0 0 16px rgba(255, 227, 172, 0.72);
  animation: storyHintTwinkle 2.6s ease-in-out infinite;
}

@keyframes storyHintTwinkle {
  0%, 100% { opacity: 0.52; transform: translateY(0) scale(0.88) rotate(0deg); }
  50% { opacity: 1; transform: translateY(-2px) scale(1.08) rotate(8deg); }
}

.story-timeline::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 26px;
  width: 2px;
  background: linear-gradient(var(--rose), var(--leaf), var(--gold));
}

.story-card,
.detail-card {
  padding: 28px;
}

.story-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  padding: 14px 18px;
  border-color: rgba(185, 142, 70, 0.18);
  background: rgba(255, 255, 255, 0.84);
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.story-card:hover,
.story-card:focus-within {
  transform: translateY(-5px);
  border-color: rgba(185, 142, 70, 0.38);
  box-shadow: 0 24px 54px rgba(79, 55, 48, 0.16);
}

.story-bloom,
.story-leaf {
  position: absolute;
  z-index: 2;
  display: block;
  grid-column: auto;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.story-bloom {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #e6b85e 0 10%, transparent 11%),
    radial-gradient(ellipse at 50% 16%, #fff 0 17%, transparent 18%),
    radial-gradient(ellipse at 84% 50%, #f7d8dc 0 17%, transparent 18%),
    radial-gradient(ellipse at 50% 84%, #fff 0 17%, transparent 18%),
    radial-gradient(ellipse at 16% 50%, #f7d8dc 0 17%, transparent 18%);
  filter: drop-shadow(0 5px 6px rgba(117, 73, 63, 0.16));
}

.story-bloom-one {
  top: 10px;
  right: 16px;
  transform: translate(18px, -18px) rotate(-35deg) scale(0.25);
}

.story-bloom-two {
  right: 62px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  transform: translate(12px, 18px) rotate(30deg) scale(0.25);
}

.story-leaf {
  width: 38px;
  height: 18px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #8ca98f, #53745d);
}

.story-leaf-one {
  top: 47px;
  right: 11px;
  transform: translateX(22px) rotate(-24deg) scale(0.3);
}

.story-leaf-two {
  right: 40px;
  bottom: 23px;
  transform: translate(20px, 14px) rotate(42deg) scale(0.3);
}

.story-card:hover .story-bloom,
.story-card:focus-within .story-bloom,
.story-card:hover .story-leaf,
.story-card:focus-within .story-leaf {
  opacity: 1;
}

.story-card:hover .story-bloom-one,
.story-card:focus-within .story-bloom-one {
  transform: translate(0) rotate(8deg) scale(1);
}

.story-card:hover .story-bloom-two,
.story-card:focus-within .story-bloom-two {
  transform: translate(0) rotate(-12deg) scale(1);
}

.story-card:hover .story-leaf-one,
.story-card:focus-within .story-leaf-one {
  transform: translate(0) rotate(-42deg) scale(1);
}

.story-card:hover .story-leaf-two,
.story-card:focus-within .story-leaf-two {
  transform: translate(0) rotate(28deg) scale(1);
}

.story-card::after {
  content: "";
  position: absolute;
  inset: auto -42px -54px auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  opacity: 0.12;
}

.story-card.rose::after {
  background: var(--rose);
}

.story-card.leaf::after {
  background: var(--leaf);
}

.story-card.gold::after {
  background: var(--gold);
}

.story-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--rose);
  box-shadow: 0 10px 24px rgba(184, 95, 102, 0.25);
}

.story-card.leaf .story-marker {
  background: var(--leaf);
}

.story-card.gold .story-marker {
  background: var(--gold);
}

.story-chapter-copy,
.story-card p {
  grid-column: 2;
}

.story-chapter-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.story-chapter-label {
  color: var(--gold);
  font-size: clamp(0.72rem, 0.9vw, 0.86rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-chapter-date {
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.02rem, 1.7vw, 1.62rem);
  font-weight: 800;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.story-chapter-title {
  color: var(--muted);
  display: -webkit-box;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.84rem, 1vw, 0.98rem);
  font-style: italic;
  font-weight: 600;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.2;
  text-transform: none;
}

.detail-card span {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}

.story-card p,
.detail-card p {
  color: var(--muted);
  line-height: 1.7;
}

.story-card p {
  margin: -4px 0 0;
}

.story-card .story-lock-status {
  display: inline-flex;
  width: fit-content;
  margin-top: -2px;
  padding: 4px 9px;
  border: 1px solid rgba(185, 142, 70, 0.24);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.86);
  color: #8e6d3a;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.story-card.is-unlocked .story-lock-status {
  border-color: rgba(83, 116, 93, 0.26);
  background: rgba(245, 250, 243, 0.9);
  color: var(--leaf);
}

.story-modal {
  width: min(92vw, 620px);
  max-height: 92vh;
  padding: 0;
  overflow: auto;
  border: 0;
  background: transparent;
}

.story-modal::backdrop {
  background: rgba(42, 34, 30, 0.46);
  backdrop-filter: blur(9px);
}

.story-modal[open] {
  animation: modal-pop-in 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.story-modal-card {
  position: relative;
  overflow: hidden auto;
  max-height: calc(92vh - 10px);
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid rgba(185, 142, 70, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 10%, rgba(233, 189, 113, 0.26), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(184, 95, 102, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(255, 247, 239, 0.96));
  box-shadow: 0 30px 80px rgba(50, 36, 32, 0.26);
  text-align: center;
}

.story-modal-card::before,
.story-modal-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.story-modal-card::before {
  inset: 14px;
  border: 1px solid rgba(185, 142, 70, 0.18);
  border-radius: 14px;
}

.story-modal-card::after {
  right: -56px;
  bottom: -58px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(185, 142, 70, 0.12);
}

.story-modal-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 1.45rem;
  cursor: pointer;
}

.story-modal-icon {
  position: relative;
  z-index: 1;
  display: inline-grid;
  width: 58px;
  height: 58px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(185, 142, 70, 0.16);
  font-size: 1.7rem;
}

.story-modal-eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-modal h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1;
}

.story-gate-form,
.story-content-text,
.story-content-date {
  position: relative;
  z-index: 1;
}

.story-gate-question,
.story-content-text {
  white-space: pre-line;
}

.story-gate-question {
  margin: 18px auto 16px;
  max-width: 460px;
  color: var(--muted);
  line-height: 1.65;
}

.story-gate-options {
  display: grid;
  gap: 10px;
  margin: 0 auto;
  max-width: 480px;
  text-align: left;
}

.story-answer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(185, 142, 70, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.story-answer:hover,
.story-answer:has(input:checked) {
  transform: translateY(-2px);
  border-color: rgba(184, 95, 102, 0.42);
  background: rgba(255, 246, 248, 0.9);
}

.story-answer input {
  accent-color: var(--rose);
}

.story-gate-feedback {
  min-height: 26px;
  margin: 16px auto 0;
  max-width: 500px;
  white-space: pre-line;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.story-gate-feedback.is-wrong {
  color: #b85f66;
}

.story-gate-feedback.is-correct {
  color: var(--leaf);
}

.story-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.story-content-date {
  display: inline-flex;
  margin: 14px auto 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(185, 142, 70, 0.14);
  color: #8e6d3a;
  font-weight: 900;
}

.story-content-text {
  margin: 16px auto 0;
  max-width: 500px;
  max-height: min(48vh, 430px);
  overflow-y: auto;
  padding: 0 12px 18px 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  text-align: left;
  scrollbar-color: rgba(185, 142, 70, 0.46) rgba(185, 142, 70, 0.08);
  scrollbar-width: thin;
}

.story-content-text p {
  margin: 0 0 1em;
}

.story-inline-image {
  margin: 12px auto 16px;
  padding: 7px;
  border: 1px solid rgba(185, 142, 70, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(79, 55, 48, 0.1);
}

.story-inline-image img {
  display: block;
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.story-inline-image.is-wide {
  width: min(100%, 390px);
}

.story-inline-image.is-wide img {
  max-height: min(21vh, 180px);
}

.story-inline-image.is-chat {
  width: fit-content;
  max-width: min(100%, 230px);
  margin-block: 8px;
  margin-left: 0;
}

.story-inline-image.is-chat img {
  max-height: 72px;
}

.story-content-text::-webkit-scrollbar {
  width: 7px;
}

.story-content-text::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(185, 142, 70, 0.08);
}

.story-content-text::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(185, 142, 70, 0.46);
}

.story-content-modal .story-modal-card {
  max-height: 88vh;
}

.story-content-modal .story-modal-card::after {
  z-index: 0;
}

.rsvp-modal {
  width: min(92vw, 610px);
  max-height: 92vh;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
}

.rsvp-modal::backdrop {
  background: rgba(37, 29, 28, 0.7);
  backdrop-filter: blur(8px);
  animation: modal-backdrop-in 0.4s ease both;
}

.rsvp-modal[open] {
  animation: modal-pop-in 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.rsvp-modal-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(46px, 8vw, 72px) clamp(24px, 7vw, 64px) 42px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.98), transparent 42%),
    linear-gradient(145deg, #fffdf9, #fff2ef 52%, #eef6ef);
  box-shadow: 0 34px 90px rgba(34, 22, 20, 0.35), inset 0 0 50px rgba(255, 255, 255, 0.72);
}

.rsvp-modal.is-declined .rsvp-modal-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.98), transparent 42%),
    linear-gradient(145deg, #fffdf9, #f7f1f4 54%, #eef3f1);
}

.rsvp-modal-card::before,
.rsvp-modal-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(185, 142, 70, 0.22);
  border-radius: 50%;
  animation: modal-halo 4s ease-in-out infinite;
}

.rsvp-modal-card::before {
  top: -105px;
  left: -80px;
  box-shadow: 0 0 0 22px rgba(184, 95, 102, 0.05), 0 0 0 46px rgba(185, 142, 70, 0.04);
}

.rsvp-modal-card::after {
  right: -90px;
  bottom: -115px;
  box-shadow: 0 0 0 22px rgba(83, 116, 93, 0.05), 0 0 0 46px rgba(185, 142, 70, 0.04);
  animation-delay: -2s;
}

.rsvp-modal-flower {
  position: relative;
  width: 66px;
  height: 66px;
  margin: 0 auto 18px;
  animation: modal-flower-float 3s ease-in-out infinite;
}

.rsvp-modal-flower::after {
  content: "";
  position: absolute;
  inset: 24px;
  z-index: 2;
  border-radius: 50%;
  background: #e6b85e;
  box-shadow: 0 0 18px rgba(230, 184, 94, 0.72);
}

.rsvp-modal-flower i {
  position: absolute;
  top: 4px;
  left: 23px;
  width: 20px;
  height: 32px;
  border-radius: 70% 70% 55% 55%;
  background: linear-gradient(#fff, #f5cbd0);
  transform-origin: 50% 29px;
}

.rsvp-modal-flower i:nth-child(2) { transform: rotate(72deg); }
.rsvp-modal-flower i:nth-child(3) { transform: rotate(144deg); }
.rsvp-modal-flower i:nth-child(4) { transform: rotate(216deg); }
.rsvp-modal-flower i:nth-child(5) { transform: rotate(288deg); }

.rsvp-modal-eyebrow {
  margin: 0 0 8px;
  color: var(--rose);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rsvp-modal-guest {
  min-height: 1.5em;
  margin: 0 0 5px;
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-style: italic;
  font-weight: 700;
}

.rsvp-modal h2 {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  line-height: 0.98;
}

.rsvp-modal-body {
  max-width: 450px;
  margin: 18px auto 26px;
  color: var(--muted);
  line-height: 1.8;
}

.rsvp-sparkles {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.rsvp-sparkles i {
  position: absolute;
  left: var(--x);
  bottom: -16px;
  width: 7px;
  height: 11px;
  border-radius: 80% 0 80% 0;
  background: var(--blush);
  opacity: 0;
  animation: modal-petal-rise 3.4s var(--delay) ease-in infinite;
}

.rsvp-sparkles i:nth-child(3n) { background: var(--gold); }
.rsvp-sparkles i:nth-child(3n + 1) { background: #91ad96; }

@keyframes modal-pop-in {
  from { opacity: 0; transform: translateY(24px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modal-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-halo {
  50% { transform: scale(1.08); opacity: 0.62; }
}

@keyframes modal-flower-float {
  50% { transform: translateY(-7px) rotate(5deg); }
}

@keyframes modal-petal-rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
  18% { opacity: 0.8; }
  100% { opacity: 0; transform: translate3d(22px, -520px, 0) rotate(440deg); }
}

.details-section {
  --event-image: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(45, 66, 62, 0.9) 0 34%, rgba(255, 250, 246, 0.78) 68%, rgba(237, 216, 220, 0.72)),
    var(--event-image) center top/cover;
}

.details-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, 0.24) 43%, transparent 59%);
  transform: translateX(-100%);
  animation: event-light-pass 9s ease-in-out infinite;
}

.details-section > *:not(.event-ornaments) {
  position: relative;
  z-index: 2;
}

.details-section .section-heading {
  max-width: 1080px;
  margin: 0 auto 28px;
  padding: clamp(24px, 5vw, 54px);
  color: white;
  text-align: left;
}

.details-section .section-heading h2,
.details-section .section-heading .eyebrow {
  color: white;
  text-shadow: 0 3px 24px rgba(17, 34, 31, 0.32);
}

.event-ornaments span {
  position: absolute;
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  font-family: Georgia, serif;
  pointer-events: none;
  animation: event-ornament-drift 5s ease-in-out infinite alternate;
}

.event-ornaments span:nth-child(1) { top: 8%; left: 5%; font-size: 2.4rem; }
.event-ornaments span:nth-child(2) { top: 28%; right: 6%; color: rgba(184, 95, 102, 0.65); font-size: 3.4rem; animation-delay: -2s; }
.event-ornaments span:nth-child(3) { right: 18%; bottom: 9%; color: rgba(185, 142, 70, 0.72); font-size: 2rem; animation-delay: -3s; }

@keyframes event-light-pass {
  0%, 30% { transform: translateX(-100%); }
  62%, 100% { transform: translateX(100%); }
}

@keyframes event-ornament-drift {
  from { transform: translateY(-4px) rotate(-7deg); opacity: 0.52; }
  to { transform: translateY(8px) rotate(8deg); opacity: 0.9; }
}

.details-feature {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto 18px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgba(185, 142, 70, 0.28);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 245, 0.88)),
    linear-gradient(135deg, rgba(185, 142, 70, 0.13), transparent 55%);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}

.details-feature-copy,
.details-feature .button.primary {
  position: relative;
  z-index: 2;
}

.details-feature::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 18%,
    rgba(201, 151, 156, 0.12) 37%,
    rgba(185, 142, 70, 0.15) 50%,
    rgba(125, 151, 132, 0.12) 63%,
    transparent 82%
  );
  transform: translateX(-100%);
  animation: detail-shimmer 8s ease-in-out infinite;
}

.details-feature::after {
  content: "";
  position: absolute;
  right: clamp(88px, 14vw, 180px);
  bottom: -72px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(185, 142, 70, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(201, 151, 156, 0.035), 0 0 0 46px rgba(125, 151, 132, 0.025);
  pointer-events: none;
}

.details-feature span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}

.details-feature strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1;
}

.details-feature p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.details-feature .button.primary {
  color: var(--ink);
  border-color: rgba(185, 142, 70, 0.34);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: none;
}

.wedding-pups {
  position: absolute;
  z-index: 1;
  right: clamp(154px, 23vw, 330px);
  bottom: 8px;
  width: 260px;
  height: 104px;
  pointer-events: none;
}

.pup-svg {
  position: absolute;
  bottom: 0;
  width: 132px;
  height: 92px;
  overflow: visible;
  filter: drop-shadow(0 12px 18px rgba(90, 58, 40, 0.16));
}

.pup-left {
  left: 0;
  transform-origin: 50% 80%;
  animation: pup-run-left 5.2s ease-in-out infinite;
}

.pup-right {
  right: 0;
  transform-origin: 50% 80%;
  animation: pup-run-right 5.2s ease-in-out infinite;
}

.pup-shadow {
  fill: rgba(103, 71, 50, 0.16);
}

.pup-tail,
.pup-leg {
  fill: none;
  stroke: #b97a49;
  stroke-linecap: round;
  stroke-width: 7;
}

.pup-tail {
  animation: pup-tail-wag 0.62s ease-in-out infinite alternate;
}

.pup-body {
  fill: #f3c58f;
  stroke: rgba(111, 74, 47, 0.2);
  stroke-width: 2;
}

.pup-face {
  fill: #ffe5c8;
  stroke: rgba(111, 74, 47, 0.18);
  stroke-width: 2;
}

.pup-ear {
  fill: #b97855;
}

.pup-muzzle {
  fill: #fff5e9;
}

.pup-eye,
.pup-nose {
  fill: #332421;
}

.pup-blush {
  fill: rgba(215, 102, 123, 0.5);
}

.pup-heart,
.pup-heart::before,
.pup-heart::after {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #cf5d71;
}

.pup-heart {
  left: 50%;
  bottom: 42px;
  border-radius: 3px;
  opacity: 0;
  transform: translateX(-50%) rotate(45deg) scale(0.4);
  animation: pup-heart-rise 5.2s ease-in-out infinite;
}

.pup-heart-small {
  bottom: 54px;
  margin-left: 28px;
  animation-delay: 0.25s;
  transform: translateX(-50%) rotate(45deg) scale(0.28);
}

.pup-heart::before,
.pup-heart::after {
  content: "";
  border-radius: 50%;
}

.pup-heart::before {
  left: -7px;
}

.pup-heart::after {
  top: -7px;
}

@keyframes pup-run-left {
  0%, 14% { transform: translateX(0) translateY(0) rotate(0deg); }
  28% { transform: translateX(40px) translateY(-4px) rotate(1deg); }
  42%, 62% { transform: translateX(72px) translateY(0) rotate(2deg); }
  82%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
}

@keyframes pup-run-right {
  0%, 14% { transform: translateX(0) translateY(0) rotate(0deg); }
  28% { transform: translateX(-40px) translateY(-4px) rotate(-1deg); }
  42%, 62% { transform: translateX(-72px) translateY(0) rotate(-2deg); }
  82%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
}

@keyframes pup-tail-wag {
  from { transform: rotate(-4deg); }
  to { transform: rotate(7deg); }
}

@keyframes pup-heart-rise {
  0%, 35% {
    opacity: 0;
    transform: translate(-50%, 10px) rotate(45deg) scale(0.35);
  }
  45%, 62% {
    opacity: 1;
    transform: translate(-50%, -18px) rotate(45deg) scale(1);
  }
  82%, 100% {
    opacity: 0;
    transform: translate(-50%, -48px) rotate(45deg) scale(0.6);
  }
}

.details-grid {
  max-width: 1080px;
  margin: auto;
}

.detail-card h3 {
  margin: 14px 0 8px;
  color: var(--ink);
  font-size: 2.2rem;
}

.detail-card small {
  display: block;
  color: var(--muted);
  line-height: 1.65;
}

.detail-card:nth-child(1) {
  border-top: 3px solid rgba(201, 151, 156, 0.78);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(252, 241, 243, 0.72));
}

.detail-card:nth-child(2) {
  border-top: 3px solid rgba(125, 151, 132, 0.78);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(239, 246, 241, 0.74));
}

.detail-card:nth-child(3) {
  border-top: 3px solid rgba(185, 142, 70, 0.72);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(255, 247, 232, 0.76));
}

.detail-card {
  position: relative;
  padding-top: 54px;
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: -9px;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.detail-card::before {
  content: attr(data-event-icon);
  position: absolute;
  top: 16px;
  right: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid currentColor;
  border-radius: 50%;
  place-items: center;
  color: var(--rose);
  background: rgba(255, 255, 255, 0.72);
  font-family: Georgia, serif;
  font-size: 1.05rem;
  transition: transform 0.35s ease, background-color 0.35s ease;
}

.detail-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(91, 68, 48, 0.13);
}

.detail-card:hover::before {
  transform: rotate(12deg) scale(1.12);
  background: white;
}

.program-panel {
  display: grid;
  grid-template-columns: minmax(190px, 0.4fr) minmax(0, 1fr);
  gap: 24px;
  max-width: 1080px;
  margin: 18px auto 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(185, 142, 70, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.program-panel h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.program-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(185, 142, 70, 0.22);
  border-radius: 8px;
  background: rgba(185, 142, 70, 0.22);
}

.program-item {
  position: relative;
  min-height: 118px;
  padding: 18px;
  border-radius: 0;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.94);
  overflow: hidden;
  transition: background-color 0.35s ease, transform 0.35s ease;
}

.program-item:nth-child(2) {
  background: rgba(252, 241, 243, 0.78);
}

.program-item:nth-child(3) {
  background: rgba(239, 246, 241, 0.82);
}

.program-item:nth-child(4) {
  background: rgba(255, 247, 232, 0.82);
}

.program-item:hover {
  z-index: 2;
  transform: translateY(-4px);
  background: #fff;
}

.program-item::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 86px;
  height: 86px;
  border: 1px solid rgba(185, 142, 70, 0.16);
  border-radius: 50%;
}

.program-item time {
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  font-weight: 900;
}

.program-item:nth-child(2) time {
  color: #a86872;
}

.program-item:nth-child(3) time {
  color: #567461;
}

.program-item:nth-child(4) time {
  color: #9a702f;
}

@keyframes detail-shimmer {
  0%, 28% {
    transform: translateX(-100%);
  }
  58%, 100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .details-feature::before {
    animation: none;
    transform: translateX(0);
  }

  .detail-card,
  .program-item,
  .story-card,
  .story-bloom,
  .story-leaf,
  .motion-item,
  .celestial-body,
  .pup-svg,
  .pup-heart,
  .button,
  .message-card {
    transition: none;
  }

  .rsvp-modal[open],
  .story-modal[open],
  .rsvp-modal::backdrop,
  .rsvp-modal-card::before,
  .rsvp-modal-card::after,
  .rsvp-modal-flower,
  .rsvp-sparkles i,
  .day-ambient i,
  .message-section::before,
  .message-section::after,
  .gallery-lightbox[open],
  .gallery-lightbox::backdrop,
  .cursor-sparkles i {
    animation: none;
  }

  .wish-card-studio[open] {
    animation: none;
  }

  .motion-item {
    opacity: 1;
    transform: none;
  }

  .hero-media img {
    translate: none;
  }
}

/* Editorial viewport composition: each primary desktop section reads as one scene. */
.section {
  scroll-margin-top: 62px;
}

.story-monogram {
  display: block;
  margin-bottom: 8px;
  color: rgba(185, 142, 70, 0.18);
  font-family: "Great Vibes", cursive;
  font-size: clamp(4.2rem, 7vw, 7rem);
  line-height: 0.7;
}

.story-photo-caption {
  position: absolute;
  z-index: 3;
  right: -16px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(185, 142, 70, 0.28);
  color: var(--ink);
  background: rgba(255, 252, 247, 0.92);
  box-shadow: 0 12px 30px rgba(72, 50, 35, 0.14);
  backdrop-filter: blur(12px);
}

.story-photo-caption b {
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
}

.story-photo-caption i {
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  font-style: normal;
}

.story-sequence {
  position: absolute;
  top: 13px;
  right: 18px;
  color: rgba(185, 142, 70, 0.3);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.wedding-pups {
  display: grid;
  place-items: center;
}

.wedding-pups > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(102, 74, 55, 0.1));
  transform-origin: 50% 75%;
  animation: puppy-vignette-breathe 4.8s ease-in-out infinite;
}

.wedding-pups .pup-heart-one { margin-left: 0; animation-delay: 0s; }
.wedding-pups .pup-heart-two { margin-left: 24px; animation-delay: 0.55s; }
.wedding-pups .pup-heart-three { margin-left: -24px; animation-delay: 1.05s; }

@keyframes puppy-vignette-breathe {
  0%, 100% { transform: translateY(2px) scale(0.985); }
  50% { transform: translateY(-2px) scale(1.01); }
}

.gallery-section {
  padding-top: clamp(76px, 8vw, 112px);
  background:
    linear-gradient(90deg, transparent 0 5%, rgba(185, 142, 70, 0.08) 5% calc(5% + 1px), transparent calc(5% + 1px)),
    linear-gradient(180deg, #fffdf8, #f8eee8 54%, #eef3ed);
}

.gallery-section .section-heading {
  max-width: 760px;
  margin: 0 0 34px;
  text-align: left;
}

.gallery-section .section-heading::after {
  left: 0;
  transform: none;
}

.gallery-intro {
  max-width: 540px;
}

.gallery-edition {
  position: absolute;
  top: 112px;
  right: clamp(72px, 9vw, 150px);
  display: grid;
  grid-template-columns: auto 88px auto;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.gallery-edition i {
  height: 1px;
  background: var(--gold);
}

.gallery-edition b {
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
}

.gallery-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  background: #eee7e0;
  box-shadow: 0 20px 54px rgba(61, 46, 40, 0.14);
}

.gallery .gallery-frame img {
  border-radius: 0;
  box-shadow: none;
  transform: scale(1.01);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.gallery-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(24, 20, 18, 0.56));
  opacity: 0;
  transition: opacity 0.45s ease;
}

.gallery-frame figcaption {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 12px;
  left: 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  color: white;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.gallery-frame figcaption span {
  font-family: "Caveat", cursive;
  font-size: 1.2rem;
}

.gallery-frame figcaption i {
  font-style: normal;
}

.gallery-frame figcaption b {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  line-height: 0.8;
}

.gallery-frame:hover::after,
.gallery-frame:focus-within::after,
.gallery-frame:hover figcaption,
.gallery-frame:focus-within figcaption {
  opacity: 1;
}

.gallery-frame:hover figcaption,
.gallery-frame:focus-within figcaption {
  transform: translateY(0);
}

.gallery .gallery-frame:hover img,
.gallery .gallery-frame:focus-within img,
.gallery .gallery-frame:nth-child(even):hover img {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.065);
}

.gallery-layout-single .gallery-frame { grid-column: span 12; grid-row: span 6; }
.gallery-layout-duo .gallery-frame { grid-column: span 6; grid-row: span 5; }
.gallery-layout-trio .gallery-frame:first-child { grid-column: span 7; grid-row: span 6; }
.gallery-layout-trio .gallery-frame:not(:first-child) { grid-column: span 5; grid-row: span 3; }
.gallery-layout-quad .gallery-frame { grid-column: span 6; grid-row: span 4; }
.gallery-layout-feature .gallery-frame:first-child { grid-column: span 7; grid-row: span 6; }
.gallery-layout-feature .gallery-frame:nth-child(n + 2) { grid-column: span 5; grid-row: span 3; }
.gallery-layout-feature .gallery-frame:nth-child(5),
.gallery-layout-feature .gallery-frame:nth-child(6) { grid-column: span 6; }
.gallery-layout-mosaic .gallery-frame { grid-column: span 3; grid-row: span 3; }
.gallery-layout-mosaic .gallery-frame:nth-child(8n + 1),
.gallery-layout-mosaic .gallery-frame:nth-child(8n + 6) { grid-column: span 6; grid-row: span 5; }
.gallery-layout-mosaic .gallery-frame:nth-child(8n + 2),
.gallery-layout-mosaic .gallery-frame:nth-child(8n + 5) { grid-column: span 3; grid-row: span 4; }
.gallery-layout-mosaic .gallery-frame:nth-child(8n + 4) { grid-column: span 6; grid-row: span 3; }

@media (min-width: 901px) and (min-height: 700px) {
  .section:not(.hero):not(.gallery-section):not(.stats-section) {
    min-height: calc(100svh - 62px);
  }

  .story-section {
    display: grid;
    grid-template-columns: minmax(230px, 0.62fr) minmax(720px, 2fr);
    gap: clamp(30px, 4vw, 68px);
    align-items: center;
    height: calc(100svh - 62px);
    min-height: 638px;
    padding-block: 76px 28px;
  }

  .story-section .section-heading {
    align-self: center;
    margin: 0;
    text-align: left;
  }

  .story-section .section-heading::after {
    left: 0;
    transform: none;
  }

  .story-section .section-heading h2 {
    font-size: clamp(2rem, 3.2vw, 3.35rem);
  }

  .story-section .section-heading > p:not(.eyebrow) {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .story-showcase {
    grid-template-columns: minmax(250px, 0.88fr) minmax(340px, 1.12fr);
    gap: clamp(22px, 2.6vw, 42px);
    width: 100%;
    height: min(74vh, 560px);
    margin: 0;
  }

  .story-photo,
  .story-photo img {
    height: 100%;
  }

  .story-photo img {
    aspect-ratio: auto;
  }

  .story-timeline {
    gap: clamp(6px, 1vh, 9px);
    align-content: stretch;
    grid-template-rows: repeat(5, minmax(0, 1fr));
  }

  .story-card {
    grid-template-columns: 50px 1fr;
    gap: 9px;
    min-height: 0;
    padding: 10px 14px;
  }

  .story-marker {
    width: 40px;
    height: 40px;
    font-size: 0.72rem;
  }

  .story-card p {
    margin-top: -2px;
    font-size: 0.68rem;
    line-height: 1;
  }

  .story-chapter-copy {
    gap: 2px;
  }

  .story-chapter-date {
    font-size: clamp(0.98rem, 1.25vw, 1.2rem);
    line-height: 1;
  }

  .story-chapter-title {
    font-size: 0.78rem;
    line-height: 1.06;
  }

  .story-chapter-label {
    font-size: 0.66rem;
  }

  .story-lock-status {
    padding: 3px 7px;
    font-size: 0.62rem;
  }

  .details-section {
    display: grid;
    grid-template-rows: auto auto auto auto;
    align-content: center;
    gap: 11px;
    height: calc(100svh - 62px);
    min-height: 638px;
    padding-block: 68px 20px;
  }

  .details-section .section-heading {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 0;
  }

  .details-section .section-heading h2 {
    font-size: clamp(2.15rem, 4vw, 3.7rem);
  }

  .details-feature {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.25fr) auto;
    min-height: 150px;
    margin-bottom: 0;
    padding: 14px 22px;
  }

  .details-feature strong {
    font-size: clamp(2.2rem, 4vw, 3.55rem);
  }

  .wedding-pups {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 135px;
  }

  .details-grid {
    width: min(1080px, 100%);
    gap: 10px;
  }

  .detail-card {
    min-height: 132px;
    padding: 38px 18px 14px;
  }

  .detail-card h3 {
    margin: 3px 0;
    font-size: 1.65rem;
  }

  .detail-card p {
    margin: 2px 0;
    font-size: 0.84rem;
  }

  .detail-card small {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .detail-card::before {
    top: 11px;
    width: 27px;
    height: 27px;
  }

  .program-panel {
    width: min(1080px, 100%);
    min-height: 108px;
    margin-top: 0;
    padding: 12px 16px;
  }

  .program-panel h3 {
    font-size: 1.75rem;
  }

  .program-item {
    min-height: 80px;
    padding: 10px 12px;
    font-size: 0.76rem;
  }

  .program-item time {
    margin-bottom: 7px;
    font-size: 1.1rem;
  }

  .rsvp-section,
  .gift-section,
  .message-section {
    display: grid;
    align-content: center;
    padding-block: 74px 26px;
  }

  .rsvp-shell {
    max-height: calc(100svh - 108px);
    padding: 24px;
  }

  .rsvp-shell .form {
    gap: 10px;
  }

  .rsvp-shell textarea {
    min-height: 62px;
  }

  .gift-section .section-heading {
    margin-bottom: 24px;
  }

  .message-section {
    gap: 18px;
  }

  .message-layout {
    width: min(1080px, 100%);
    margin-inline: auto;
  }

  .message-wall {
    max-height: 300px;
    overflow-x: auto;
    overflow-y: hidden;
    grid-auto-flow: column;
    grid-auto-columns: minmax(270px, 0.33fr);
    grid-template-columns: none;
    padding: 18px 6px 26px;
    scroll-snap-type: x mandatory;
  }

  .message-card {
    scroll-snap-align: start;
  }
}

/* Cohesive finishing layer: identity, active navigation, and stationery details. */
.topbar {
  transition: padding 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease;
}

.topbar.is-scrolled {
  padding-block: 9px;
  background: rgba(255, 252, 248, 0.88);
  box-shadow: 0 10px 34px rgba(57, 42, 36, 0.09);
}

.nav a {
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: -7px;
  left: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  transition: right 0.3s ease, left 0.3s ease;
}

.nav a.is-active {
  color: var(--rose);
}

.nav a.is-active::after,
.nav a:hover::after,
.nav a:focus-visible::after {
  right: 0;
  left: 0;
}

.quick-dock-button.is-active {
  color: var(--ink);
  background: rgba(255, 246, 238, 0.96);
  box-shadow: 0 0 0 4px rgba(204, 70, 88, 0.16), 0 14px 30px rgba(86, 37, 44, 0.24);
}

.hero-date-seal {
  position: absolute;
  z-index: 2;
  top: 29%;
  right: clamp(52px, 10vw, 154px);
  display: grid;
  width: 172px;
  aspect-ratio: 1;
  place-content: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
  color: white;
  text-align: center;
  background: rgba(65, 48, 41, 0.18);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.08), 0 20px 55px rgba(31, 23, 20, 0.18);
  backdrop-filter: blur(9px);
  animation: seal-float 5s ease-in-out infinite;
}

.hero-date-seal::before,
.hero-date-seal::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(255, 233, 216, 0.55);
  border-radius: 50%;
}

.hero-date-seal::after {
  inset: -8px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.16);
}

.hero-date-seal span {
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-date-seal strong {
  margin: 7px 0 3px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
}

.hero-date-seal i {
  color: #ffe2d7;
  font-family: "Great Vibes", cursive;
  font-size: 1.35rem;
  font-style: normal;
}

.hero-next {
  position: absolute;
  z-index: 3;
  bottom: 31px;
  left: 50%;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  color: white;
  background: rgba(30, 22, 18, 0.16);
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
  animation: hero-next-bounce 2.2s ease-in-out infinite;
}

.hero-next svg {
  width: 18px;
  height: 18px;
}

.rsvp-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.rsvp-shell::before,
.rsvp-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(185, 142, 70, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(184, 95, 102, 0.035), 0 0 0 36px rgba(83, 116, 93, 0.025);
}

.rsvp-shell::before {
  top: -105px;
  left: -85px;
}

.rsvp-shell::after {
  right: -85px;
  bottom: -105px;
}

.rsvp-monogram {
  display: inline-block;
  margin-bottom: -8px;
  color: rgba(184, 95, 102, 0.2);
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.8rem, 6vw, 6rem);
  line-height: 0.8;
}

.rsvp-shell input,
.rsvp-shell textarea,
.message-form input,
.message-form textarea {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.rsvp-shell input:focus,
.rsvp-shell textarea:focus,
.message-form input:focus,
.message-form textarea:focus {
  background: white;
  transform: translateY(-1px);
}

.bank-card,
.message-card,
.detail-card,
.story-card,
.gallery-frame {
  will-change: transform;
}

.bank-card:focus-within,
.message-card:focus-within,
.detail-card:focus-within,
.story-card:focus-within,
.gallery-frame:focus-within {
  outline: 2px solid rgba(185, 142, 70, 0.54);
  outline-offset: 4px;
}

@keyframes seal-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(1deg); }
}

@keyframes hero-next-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

@media (max-width: 900px) {
  .hero-date-seal {
    top: 20%;
    right: 30px;
    width: 138px;
  }

  .hero-next {
    display: none;
  }
}

/* Keep the story caption inside the photo on every desktop and browser zoom level. */
.story-photo-caption {
  right: 12px;
  bottom: 16px;
  max-width: calc(100% - 24px);
  opacity: 1;
  visibility: visible;
}

/* A discrete large-desktop composition for 32-inch and high-resolution displays. */
@media (min-width: 1900px) and (min-height: 900px) {
  .section {
    scroll-margin-top: 76px;
  }

  .topbar {
    padding: 16px 5vw;
  }

  .topbar.is-scrolled {
    padding-block: 12px;
  }

  .brand {
    font-size: 1.5rem;
  }

  .nav {
    gap: 32px;
  }

  .nav a,
  .language-switch button {
    font-size: 1rem;
  }

  .quick-dock-button {
    width: 54px;
    height: 54px;
  }

  .quick-dock-toggle {
    width: 60px;
    height: 60px;
  }

  .quick-dock-button svg {
    width: 24px;
    height: 24px;
  }

  .hero-content {
    max-width: 980px;
    padding-bottom: 180px;
  }

  .hero-content h1 {
    max-width: 780px;
    font-size: 7rem;
  }

  .hero-date-seal {
    width: 210px;
    right: 12vw;
  }

  .countdown {
    width: 620px;
  }

  .countdown div {
    padding: 22px 14px;
  }

  .countdown strong {
    font-size: 2.55rem;
  }

  .story-section,
  .details-section {
    height: calc(100svh - 76px);
    min-height: 824px;
  }

  .story-section {
    grid-template-columns: minmax(330px, 0.7fr) minmax(1020px, 2fr);
    gap: 86px;
    padding: 96px 7vw 42px;
  }

  .story-section .section-heading h2 {
    font-size: 4rem;
  }

  .story-section .section-heading > p:not(.eyebrow) {
    font-size: 1.08rem;
    line-height: 1.75;
  }

  .story-monogram {
    font-size: 8rem;
  }

  .story-showcase {
    grid-template-columns: minmax(380px, 0.9fr) minmax(520px, 1.1fr);
    gap: 68px;
    max-width: 1480px;
    height: min(72vh, 760px);
  }

  .story-card {
    grid-template-columns: 66px 1fr;
    gap: 16px;
    padding: 16px 20px;
  }

  .story-marker {
    width: 54px;
    height: 54px;
    font-size: 0.9rem;
  }

  .story-chapter-date {
    font-size: clamp(1.18rem, 1.38vw, 1.64rem);
  }

  .story-chapter-title {
    font-size: 0.92rem;
  }

  .story-card p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .story-photo-caption {
    right: 20px;
    bottom: 24px;
    padding: 13px 18px;
  }

  .story-photo-caption i {
    font-size: 1.45rem;
  }

  .details-section {
    gap: 18px;
    padding: 88px 7vw 34px;
  }

  .details-section .section-heading,
  .details-feature,
  .details-grid,
  .program-panel {
    width: min(1420px, 100%);
    max-width: 1420px;
  }

  .details-section .section-heading h2 {
    font-size: 4.4rem;
  }

  .details-feature {
    grid-template-columns: minmax(280px, 0.8fr) minmax(430px, 1.25fr) auto;
    min-height: 190px;
    padding: 22px 32px;
  }

  .wedding-pups {
    height: 170px;
  }

  .details-grid {
    gap: 16px;
  }

  .detail-card {
    min-height: 165px;
    padding: 48px 26px 20px;
  }

  .detail-card h3 {
    font-size: 2rem;
  }

  .detail-card p,
  .detail-card small {
    font-size: 0.88rem;
  }

  .details-section .program-panel {
    min-height: 126px;
    padding: 14px 22px;
  }

  .program-item {
    min-height: 96px;
    padding: 15px 18px;
    font-size: 0.88rem;
  }

  .program-item time {
    font-size: 1.35rem;
  }

  .gallery {
    grid-auto-rows: 130px;
    gap: 20px;
  }

  .gallery-section,
  .rsvp-section,
  .gift-section,
  .message-section {
    padding-inline: 7vw;
  }

  .rsvp-shell,
  .message-layout,
  .bank-transfer-list {
    max-width: 1380px;
  }

  .rsvp-section .rsvp-shell,
  .message-section .message-layout {
    padding: 36px 42px;
  }

  .rsvp-section .form,
  .message-section .form {
    gap: 14px;
  }

  .rsvp-section input,
  .rsvp-section textarea,
  .message-section input,
  .message-section textarea {
    padding: 13px 15px;
    font-size: 1rem;
  }
}

/* Keep the guestbook composition after all legacy section overrides. */
@media (min-width: 901px) {
  .message-section {
    display: grid;
    grid-template-columns: minmax(390px, 0.82fr) minmax(590px, 1.38fr);
    grid-template-rows: 1fr auto;
    gap: 12px clamp(24px, 4vw, 64px);
    align-items: center;
    min-height: 100svh;
  }

  .message-section .message-layout {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
    margin: 0;
    padding: 18px 20px;
  }

  .message-section .message-layout h2 {
    font-size: clamp(2.65rem, 4vw, 3.55rem);
    line-height: 0.94;
  }

  .message-section .message-form {
    gap: 9px;
    padding: 16px;
  }

  .message-section .message-form label { gap: 4px; }
  .message-section .message-form input,
  .message-section .message-form textarea { padding: 9px 11px; }
  .message-section .message-form textarea { min-height: 68px; }
  .message-section .message-form .button { min-height: 42px; }
  .message-section .message-form .form-status { min-height: 16px; }

  .message-section .message-admin-actions {
    grid-column: 1;
    grid-row: 2;
  }

  .message-section .guestbook-stage {
    grid-column: 2;
    grid-row: 1 / 3;
    display: grid;
    min-height: 560px;
  }
}

@media (max-width: 900px) {
  .message-section { display: block; min-height: auto; }
  .message-section .message-layout { grid-template-columns: 1fr; }
  .message-section .guestbook-stage { display: grid; }
}

/* Interactive wedding guestbook */
.message-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(620px, 1.45fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(26px, 4vw, 68px);
  align-items: center;
  min-height: 100svh;
}

.message-section .message-layout {
  grid-column: 1;
  grid-row: 1 / 3;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(23, 27, 43, 0.56);
  box-shadow: 0 24px 70px rgba(8, 11, 27, 0.28);
  backdrop-filter: blur(18px);
}

.message-section .message-admin-actions {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  margin: 0;
}

.guestbook-stage {
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%;
  min-width: 0;
  min-height: 590px;
  perspective: 1800px;
}

.guestbook-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 54px;
  width: min(84%, 820px);
  height: 44px;
  border-radius: 50%;
  background: rgba(6, 8, 20, 0.52);
  filter: blur(18px);
  transform: translateX(-50%);
}

.guestbook-book {
  width: min(100%, 920px);
  height: min(65vh, 610px);
  min-height: 500px;
  filter: drop-shadow(0 22px 24px rgba(5, 8, 20, 0.32));
}

.guestbook-content {
  position: relative;
  display: grid;
  width: 100%;
  place-items: center;
}

.guestbook-underlay {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  overflow: hidden;
  border: 1px solid rgba(95, 72, 54, 0.18);
  background:
    linear-gradient(90deg, transparent 49.2%, rgba(83, 59, 43, 0.16) 49.6%, rgba(255, 255, 255, 0.72) 50%, rgba(83, 59, 43, 0.18) 50.45%, transparent 50.9%),
    repeating-linear-gradient(to bottom, transparent 0 30px, rgba(95, 126, 145, 0.14) 30px 31px),
    #fff8e9;
  box-shadow: 0 20px 42px rgba(9, 11, 24, 0.3), inset 18px 0 28px rgba(74, 50, 34, 0.06), inset -18px 0 28px rgba(74, 50, 34, 0.06);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.985);
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.guestbook-underlay::before,
.guestbook-underlay::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 5px;
  background: repeating-linear-gradient(to bottom, rgba(117, 88, 63, 0.2) 0 1px, transparent 1px 4px);
}

.guestbook-underlay::before { left: 7px; }
.guestbook-underlay::after { right: 7px; }

.guestbook-underlay i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 24px;
  background: radial-gradient(ellipse at center, rgba(72, 49, 35, 0.2), transparent 68%);
  transform: translateX(-50%);
}

.guestbook-stage.is-book-open .guestbook-underlay { opacity: 1; }

.guestbook-book {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(6px) scale(0.985);
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.guestbook-stage.is-book-open .guestbook-book {
  opacity: 1;
  transform: none;
}

.guestbook-page {
  overflow: hidden;
  color: #352d28;
  background: #fbf4e7;
}

.guestbook-paper {
  position: relative;
  height: 100%;
  padding: 34px 30px 30px 40px;
  background:
    linear-gradient(90deg, transparent 0 27px, rgba(177, 83, 88, 0.2) 27px 29px, transparent 29px),
    repeating-linear-gradient(to bottom, transparent 0 30px, rgba(95, 126, 145, 0.2) 30px 31px),
    radial-gradient(circle at 12% 8%, rgba(185, 142, 70, 0.08), transparent 26%),
    #fffaf0;
  box-shadow: inset 0 0 34px rgba(92, 63, 42, 0.1);
}

.guestbook-page:nth-child(even) .guestbook-paper {
  box-shadow: inset -18px 0 26px rgba(70, 50, 37, 0.09), inset 0 0 34px rgba(92, 63, 42, 0.07);
}

.guestbook-page:nth-child(odd) .guestbook-paper {
  box-shadow: inset 18px 0 26px rgba(70, 50, 37, 0.09), inset 0 0 34px rgba(92, 63, 42, 0.07);
}

.guestbook-wishes {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: calc(100% - 10px);
}

.guestbook-wishes.is-one {
  grid-template-rows: minmax(0, 1fr);
}

.guestbook-wishes.is-three {
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.guestbook-wish {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  min-height: 0;
  padding: 8px 3px 7px 5px;
  border-bottom: 1px dashed rgba(110, 82, 61, 0.18);
  transform: translateX(var(--wish-shift, 0)) rotate(var(--wish-tilt, 0deg));
  transform-origin: center;
}

.guestbook-wish:last-child { border-bottom: 0; }

.guestbook-wishes.is-three .guestbook-wish {
  padding-block: 5px 4px;
}

.guestbook-wishes.is-one .guestbook-wish {
  align-content: stretch;
  padding: 12px 4px 10px 6px;
  border-bottom: 0;
}

.guestbook-wish::before {
  content: "“";
  position: absolute;
  left: -2px;
  top: 10px;
  color: color-mix(in srgb, var(--wish-ink, #a84f5a) 13%, transparent);
  font-family: Georgia, serif;
  font-size: 4.8rem;
  line-height: 1;
  pointer-events: none;
}

.guestbook-wish:nth-child(4n + 1) { --wish-shift: 5px; --wish-tilt: -0.8deg; padding-right: 12px; }
.guestbook-wish:nth-child(4n + 2) { --wish-shift: -3px; --wish-tilt: 0.6deg; padding-left: 12px; }
.guestbook-wish:nth-child(4n + 3) { --wish-shift: 4px; --wish-tilt: 0.9deg; padding-right: 16px; }
.guestbook-wish:nth-child(4n) { --wish-shift: -5px; --wish-tilt: -0.55deg; padding-left: 15px; }

.guestbook-wish.wish-hand-0 { --wish-shift: 7px; --wish-tilt: -1.2deg; --wish-ink: #3d495f; --wish-font: "Caveat", cursive; --signature-font: "Dancing Script", cursive; }
.guestbook-wish.wish-hand-1 { --wish-shift: -5px; --wish-tilt: 1.8deg; --wish-ink: #59483f; --wish-font: "Dancing Script", cursive; --signature-font: "Great Vibes", cursive; }
.guestbook-wish.wish-hand-2 { --wish-shift: 3px; --wish-tilt: -0.25deg; --wish-ink: #354b40; --wish-font: "Dancing Script", cursive; --signature-font: "Dancing Script", cursive; }
.guestbook-wish.wish-hand-3 { --wish-shift: -8px; --wish-tilt: -1.7deg; --wish-ink: #704756; --wish-font: "Caveat", cursive; --signature-font: "Dancing Script", cursive; }
.guestbook-wish.wish-hand-4 { --wish-shift: 10px; --wish-tilt: 4.2deg; --wish-ink: #31516a; --wish-font: "Caveat", cursive; --signature-font: "Caveat", cursive; }
.guestbook-wish.wish-hand-5 { --wish-shift: -6px; --wish-tilt: 2.4deg; --wish-ink: #68413d; --wish-font: "Dancing Script", cursive; --signature-font: "Great Vibes", cursive; }
.guestbook-wish.wish-hand-6 { --wish-shift: 4px; --wish-tilt: -1.75deg; --wish-ink: #4d443d; --wish-font: "Caveat", cursive; --signature-font: "Great Vibes", cursive; }
.guestbook-wish.wish-hand-7 { --wish-shift: -10px; --wish-tilt: 3.5deg; --wish-ink: #684f78; --wish-font: "Caveat", cursive; --signature-font: "Dancing Script", cursive; }

.guestbook-wish > p {
  display: block;
  overflow: visible;
  align-self: center;
  margin: 0;
  padding-inline: 3px 28px;
  color: var(--wish-ink, #40362f);
  font-family: var(--wish-font, "Caveat", cursive);
  font-size: clamp(0.86rem, 1.15vw, 1.08rem);
  font-weight: 600;
  line-height: 1.28;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
}

.wish-hand-0 > p,
.wish-hand-4 > p,
.wish-hand-7 > p { font-size: clamp(1rem, 1.35vw, 1.22rem); line-height: 1.12; }
.wish-hand-1 > p,
.wish-hand-5 > p { font-size: clamp(0.94rem, 1.25vw, 1.14rem); line-height: 1.18; }
.wish-hand-3 > p { font-size: clamp(0.98rem, 1.24vw, 1.16rem); line-height: 1.18; }
.wish-hand-2 > p { font-style: italic; }

.guestbook-wish.wish-length-short > p { font-size: clamp(1.3rem, 1.9vw, 1.68rem); line-height: 1.17; }
.guestbook-wish.wish-length-medium > p { font-size: clamp(1.1rem, 1.5vw, 1.36rem); line-height: 1.17; }
.guestbook-wish.wish-length-long > p { font-size: clamp(0.9rem, 1.16vw, 1.08rem); line-height: 1.15; }
.guestbook-wish.wish-length-extra-long > p { font-size: clamp(0.82rem, 1.06vw, 0.98rem); line-height: 1.12; }
.guestbook-wish.wish-length-ultra-long > p { font-size: clamp(0.68rem, 0.86vw, 0.78rem); line-height: 1.08; }

.guestbook-wishes.is-one .guestbook-wish.wish-length-long > p { font-size: clamp(0.88rem, 1.08vw, 1.02rem); line-height: 1.1; }
.guestbook-wishes.is-one .guestbook-wish.wish-length-extra-long > p { font-size: clamp(0.74rem, 0.9vw, 0.84rem); line-height: 1.06; }
.guestbook-wishes.is-one .guestbook-wish.wish-length-ultra-long > p { font-size: clamp(0.62rem, 0.76vw, 0.7rem); line-height: 1.04; }

.guestbook-wishes.is-three .guestbook-wish.wish-length-short > p { font-size: clamp(1.12rem, 1.5vw, 1.42rem); line-height: 1.12; }
.guestbook-wishes.is-three .guestbook-wish.wish-length-medium > p { font-size: clamp(0.96rem, 1.22vw, 1.12rem); line-height: 1.1; }
.guestbook-wish.is-split-part > p { font-size: clamp(0.9rem, 1.04vw, 1rem); line-height: 1.08; }
.guestbook-wish.is-split-part .guestbook-signature { font-size: clamp(0.96rem, 1.22vw, 1.14rem); }
.guestbook-wish.is-split-part .guestbook-wish-footer { margin-top: 1px; }
.guestbook-wish > p {
  font-size: var(--wish-fit-size, 1rem);
  line-height: var(--wish-fit-line, 1.12);
}

.guestbook-part-label {
  position: absolute;
  top: 4px;
  right: 30px;
  margin: 0;
  color: color-mix(in srgb, var(--wish-ink, #59483f) 58%, transparent);
  font-family: "Caveat", cursive;
  font-size: 0.76rem;
  font-weight: 700;
}

.guestbook-doodle {
  position: absolute;
  top: 11px;
  right: 9px;
  z-index: 2;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: color-mix(in srgb, var(--wish-ink, #a84f5a) 72%, transparent);
  transform: rotate(calc(var(--wish-tilt, 0deg) * -1.4));
  pointer-events: none;
}

.guestbook-doodle svg { width: 21px; height: 21px; stroke-width: 1.7; }
.guestbook-doodle-secondary { top: auto; right: 34px; bottom: 8px; transform: rotate(-18deg) scale(0.72); opacity: 0.65; }
.wish-hand-3 .guestbook-doodle { right: 18px; transform: rotate(17deg); }
.wish-hand-4 .guestbook-doodle { top: 4px; right: 14px; transform: rotate(-24deg) scale(1.18); }
.wish-hand-7 .guestbook-doodle { top: 17px; right: 4px; transform: rotate(28deg); }

.guestbook-doodle-trail {
  position: absolute;
  right: 9px;
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--wish-ink, #a84f5a);
  opacity: 0.38;
  transform: rotate(-18deg);
  pointer-events: none;
}

.guestbook-doodle-trail i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.guestbook-doodle-trail i:nth-child(2) { width: 5px; height: 5px; }
.wish-hand-1 .guestbook-doodle-trail,
.wish-hand-5 .guestbook-doodle-trail { right: auto; left: 8px; bottom: 7px; transform: rotate(12deg); }

.wish-hand-4::after,
.wish-hand-7::after {
  content: "";
  position: absolute;
  right: 48px;
  bottom: 12px;
  width: 42px;
  height: 11px;
  border-bottom: 2px solid color-mix(in srgb, var(--wish-ink) 45%, transparent);
  border-radius: 50%;
  transform: rotate(-8deg);
  pointer-events: none;
}

.guestbook-wish-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  margin-top: 3px;
}

.guestbook-wishes.is-three .guestbook-wish-footer { margin-top: 1px; }

.guestbook-wish-author {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.guestbook-signature {
  max-width: 100%;
  overflow: visible;
  padding: 5px 3px 1px;
  color: #a84f5a;
  font-family: var(--signature-font, "Great Vibes", cursive);
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guestbook-wish-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
  color: color-mix(in srgb, var(--wish-ink, #59483f) 62%, transparent);
  font-family: "Caveat", cursive;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.guestbook-wish-time svg { width: 10px; height: 10px; }

.guestbook-wish-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.guestbook-wish .wish-save-button,
.guestbook-wish .admin-delete-button,
.guestbook-wish .admin-select-item {
  min-height: 27px;
  padding: 4px 6px;
  font-size: 0.63rem;
}

.guestbook-wish .wish-save-button svg { width: 14px; height: 14px; }
.guestbook-wish .wish-save-button span { display: none; }
.guestbook-wish .admin-select-item span { display: none; }

.guestbook-folio {
  position: absolute;
  right: 18px;
  bottom: 10px;
  color: rgba(74, 59, 48, 0.55);
  font-family: "Cormorant Garamond", serif;
  font-size: 0.72rem;
}

.guestbook-empty,
.guestbook-blank {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: #8a6d5b;
  text-align: center;
}

.guestbook-empty svg { width: 34px; height: 34px; color: #a84f5a; }
.guestbook-blank > span { color: rgba(168, 79, 90, 0.18); font-family: "Great Vibes", cursive; font-size: 4rem; }

.guestbook-closed-cover,
.guestbook-cover {
  position: relative;
  display: grid;
  grid-template-columns: minmax(74px, 25%) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #443936;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(85, 55, 58, 0.08), transparent 7%, transparent),
    #fffdf9;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 0 0 7px rgba(193, 156, 111, 0.12),
    inset 12px 0 28px rgba(78, 49, 45, 0.12),
    0 18px 48px rgba(86, 58, 54, 0.2);
  overflow: hidden;
}

.guestbook-closed-cover {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: min(48%, 450px);
  min-width: 285px;
  height: min(65vh, 610px);
  min-height: 500px;
  transform: translate(-50%, -50%) rotate(-1.2deg);
  filter: drop-shadow(0 28px 26px rgba(5, 8, 20, 0.36));
  transition: opacity 0.32s ease, transform 0.45s ease, filter 0.45s ease;
}

.guestbook-stage.is-book-open .guestbook-closed-cover {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-1.2deg) scale(0.94);
  filter: drop-shadow(0 10px 18px rgba(5, 8, 20, 0.18));
  pointer-events: none;
}

.guestbook-cover::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(192, 166, 111, 0.3);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.guestbook-closed-cover::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(192, 166, 111, 0.3);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.guestbook-cover::after,
.guestbook-closed-cover::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(25% - 1px);
  width: 1px;
  border-radius: 0;
  background:
    linear-gradient(180deg, transparent, rgba(187, 153, 98, 0.34), transparent);
  box-shadow: 7px 0 22px rgba(87, 58, 54, 0.08);
  pointer-events: none;
}

.guestbook-cover-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 30px 14px;
  color: #fffaf6;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 45%, rgba(127, 61, 63, 0.08)),
    #f2a39a;
}

.guestbook-cover-panel::before,
.guestbook-cover-panel::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 44px;
  height: 86px;
  border: 1px solid rgba(255, 250, 246, 0.42);
  border-inline: 0;
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.guestbook-cover-panel::before {
  top: 42px;
  box-shadow:
    inset 0 17px 0 -16px rgba(255, 250, 246, 0.82),
    inset 0 -17px 0 -16px rgba(255, 250, 246, 0.82);
}

.guestbook-cover-panel::after {
  bottom: 94px;
  width: 36px;
  height: 64px;
  opacity: 0.62;
  transform: translateX(-50%) rotate(180deg);
}

.guestbook-cover-panel span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #fffaf6;
  font-family: "Dancing Script", "Great Vibes", cursive;
  font-size: clamp(2.04rem, 3.28vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.92;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.26),
    0 8px 18px rgba(119, 56, 58, 0.16);
}

.guestbook-cover-panel i {
  position: absolute;
  bottom: 38px;
  left: 50%;
  width: 54px;
  height: 50px;
  transform: translateX(-50%);
}

.guestbook-cover-panel i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 24px;
  height: 24px;
  border-radius: 8px 8px 2px 8px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.34), transparent 34%),
    rgba(255, 250, 246, 0.88);
  box-shadow:
    -15px 15px 0 -7px rgba(255, 250, 246, 0.72),
    14px 20px 0 -9px rgba(255, 250, 246, 0.58),
    0 10px 20px rgba(125, 56, 61, 0.12);
  transform: translateX(-50%) rotate(45deg);
}

.guestbook-cover-panel i::after {
  content: "";
  position: absolute;
  left: 11px;
  bottom: 1px;
  width: 34px;
  height: 15px;
  border-bottom: 1px solid rgba(255, 250, 246, 0.76);
  border-radius: 50%;
  transform: rotate(-12deg);
  opacity: 0.82;
}

.guestbook-cover-main {
  display: grid;
  grid-template-rows: minmax(106px, 24%) minmax(210px, 47%) minmax(116px, 29%);
  min-width: 0;
  padding: 22px 20px 26px;
  background:
    radial-gradient(circle at 88% 16%, rgba(231, 206, 156, 0.18), transparent 28%),
    linear-gradient(180deg, #fffefd, #fff9f2);
}

.guestbook-cover-heading {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  color: #91825d;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.35rem, 2.2vw, 2.1rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: 0.22em;
}

.guestbook-cover-amp {
  color: #bda772;
  font-size: 0.74em;
  letter-spacing: 0;
}

.guestbook-cover-photo {
  position: relative;
  min-width: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #f3e9e1;
  box-shadow:
    0 16px 34px rgba(95, 64, 58, 0.14),
    0 0 0 1px rgba(190, 158, 109, 0.12);
}

.guestbook-cover-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  animation: guestbookCoverPhoto 16s ease-in-out infinite alternate;
}

.guestbook-cover-footer {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding-inline: 6px;
}

.guestbook-cover-kicker {
  color: inherit;
}

.guestbook-closed-cover h3,
.guestbook-cover h3 {
  margin: 3px 0 0;
  color: #7d4054;
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.2rem, 5.5vw, 5.2rem);
  font-weight: 400;
  line-height: 0.92;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.78), 0 8px 24px rgba(176, 82, 113, 0.2);
}

.guestbook-closed-cover p,
.guestbook-cover p {
  width: max-content;
  max-width: min(330px, 100%);
  margin: 0;
  color: rgba(76, 60, 55, 0.74);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.74rem, 0.92vw, 0.84rem);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.guestbook-cover-date {
  position: relative;
  display: inline-grid;
  place-items: center;
  padding-top: 13px;
  color: #2f2928;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.2rem, 2vw, 1.68rem);
  font-weight: 800;
  letter-spacing: 0.14em;
}

.guestbook-cover-date::before {
  content: "";
  position: absolute;
  top: 0;
  width: 48px;
  height: 1px;
  background: #bda772;
}

.guestbook-cover-ornament {
  display: none;
}

.guestbook-cover-monogram {
  position: absolute;
  right: 22px;
  bottom: 16px;
  font-family: "Great Vibes", cursive;
  font-size: 1.2rem;
  color: rgba(145, 130, 93, 0.52);
}

.guestbook-open {
  position: absolute;
  right: 26px;
  bottom: 23px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-top: 0;
  padding: 7px 11px;
  border: 1px solid rgba(189, 167, 114, 0.34);
  border-radius: 999px;
  color: #8a665e;
  background: rgba(255, 253, 249, 0.76);
  font-weight: 800;
  font-size: 0.74rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.guestbook-open:hover {
  background: rgba(255, 250, 245, 0.7);
  box-shadow: 0 0 28px rgba(217, 126, 154, 0.24);
  transform: translateY(-2px);
}

.guestbook-open svg { width: 19px; height: 19px; }

.guestbook-lock-button {
  right: 50%;
  bottom: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(78%, 330px);
  min-height: 58px;
  padding: 9px 12px 9px 10px;
  border-color: rgba(189, 167, 114, 0.48);
  border-radius: 999px;
  color: #704b46;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.94), rgba(255, 240, 244, 0.9)),
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.95), transparent 28%);
  box-shadow:
    0 14px 34px rgba(102, 58, 63, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.74) inset;
  transform: translateX(50%);
  overflow: visible;
  animation: guestbookLockFloat 2.6s ease-in-out infinite;
}

.guestbook-lock-button:hover,
.guestbook-lock-button:focus-visible {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 236, 242, 0.94)),
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.95), transparent 28%);
  box-shadow:
    0 18px 42px rgba(184, 95, 102, 0.24),
    0 0 0 1px rgba(189, 167, 114, 0.36) inset;
  transform: translateX(50%) translateY(-2px);
}

.guestbook-lock-rings,
.guestbook-lock-rings::before,
.guestbook-lock-rings::after {
  content: "";
  position: absolute;
  inset: -7px;
  z-index: -1;
  border: 1px solid rgba(184, 95, 102, 0.22);
  border-radius: 999px;
  opacity: 0;
  animation: guestbookLockPulse 2.6s ease-out infinite;
}

.guestbook-lock-rings::before {
  inset: -14px;
  animation-delay: 0.55s;
}

.guestbook-lock-rings::after {
  inset: -21px;
  animation-delay: 1.1s;
}

.guestbook-lock-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: #fffaf6;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.38), transparent 34%),
    linear-gradient(135deg, #c8878b, #b85f66);
  box-shadow: 0 9px 18px rgba(184, 95, 102, 0.26);
}

.guestbook-lock-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.9;
}

.guestbook-lock-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.guestbook-lock-text strong {
  color: #6a4541;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  font-weight: 800;
  line-height: 1;
}

.guestbook-lock-text small {
  color: rgba(107, 74, 68, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
}

.guestbook-lock-cta {
  padding: 6px 9px;
  border: 1px solid rgba(184, 95, 102, 0.18);
  border-radius: 999px;
  color: #a84f5a;
  background: rgba(255, 250, 246, 0.72);
  font-size: 0.64rem;
  font-weight: 900;
  white-space: nowrap;
}

@keyframes guestbookLockFloat {
  0%, 100% { box-shadow: 0 14px 34px rgba(102, 58, 63, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.74) inset; }
  50% { box-shadow: 0 18px 44px rgba(184, 95, 102, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.82) inset; }
}

@keyframes guestbookLockPulse {
  0% { opacity: 0; transform: scale(0.92); }
  24% { opacity: 0.72; }
  100% { opacity: 0; transform: scale(1.08); }
}

.guestbook-back-cover { background-color: #fff1f4; }

@keyframes guestbookCoverPhoto {
  from { transform: scale(1.02); }
  to { transform: scale(1.07); }
}

.guestbook-controls {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 4px;
  opacity: 0.58;
  transition: opacity 0.35s ease;
}

.guestbook-controls.is-open { opacity: 1; }
.guestbook-controls[hidden] { display: none; }

.guestbook-control {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  background: rgba(20, 23, 38, 0.72);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.guestbook-control:hover:not(:disabled) { background: #a84f5a; transform: translateY(-2px); }
.guestbook-control:disabled { opacity: 0.28; cursor: default; }
.guestbook-control svg { width: 20px; height: 20px; }
.guestbook-close { margin-left: 5px; }

.guestbook-page-status {
  min-width: 112px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 1100px) {
  .message-section {
    grid-template-columns: minmax(270px, 0.66fr) minmax(520px, 1.34fr);
    column-gap: 22px;
  }
  .guestbook-book { height: min(61vh, 540px); min-height: 470px; }
  .guestbook-closed-cover { height: min(61vh, 540px); min-height: 470px; }
  .guestbook-stage { min-height: 530px; }
}

@media (max-width: 900px) {
  .message-section { display: block; min-height: auto; }
  .message-section .message-layout { max-width: 640px; margin: 0 auto 24px; }
  .message-section .message-admin-actions { max-width: 640px; margin: 0 auto 16px; }
  .guestbook-stage { min-height: 560px; }
  .guestbook-book { width: min(100%, 540px); height: 520px; min-height: 460px; }
  .guestbook-closed-cover { width: min(88%, 420px); height: 520px; min-height: 460px; }
}

@media (max-width: 560px) {
  .guestbook-stage { min-height: 500px; margin-inline: -8px; width: calc(100% + 16px); }
  .guestbook-book { height: 465px; min-height: 430px; }
  .guestbook-closed-cover {
    grid-template-columns: 72px minmax(0, 1fr);
    width: min(88%, 338px);
    height: 465px;
    min-height: 430px;
  }
  .guestbook-cover-main {
    grid-template-rows: minmax(86px, 22%) minmax(190px, 47%) minmax(128px, 31%);
    padding: 18px 18px 24px;
  }
  .guestbook-cover-panel { padding-inline: 10px; }
  .guestbook-cover-panel span { font-size: 1.55rem; letter-spacing: 0.01em; }
  .guestbook-cover-panel::before { top: 34px; width: 34px; height: 66px; }
  .guestbook-cover-panel::after { bottom: 82px; width: 30px; height: 52px; }
  .guestbook-cover-panel i { bottom: 30px; transform: translateX(-50%) scale(0.82); }
  .guestbook-cover-heading { font-size: 1.32rem; letter-spacing: 0.16em; }
  .guestbook-cover-date { font-size: 1.18rem; }
  .guestbook-closed-cover p,
  .guestbook-cover p {
    width: auto;
    max-width: 190px;
    font-size: 0.78rem;
    line-height: 1.18;
    white-space: normal;
    text-wrap: balance;
  }
  .guestbook-open { right: 17px; bottom: 17px; min-height: 32px; padding-inline: 9px; font-size: 0.68rem; }
  .guestbook-lock-button {
    right: 50%;
    bottom: 22px;
    grid-template-columns: auto minmax(0, 1fr);
    width: min(82%, 270px);
    min-height: 52px;
    padding: 8px 10px;
    transform: translateX(50%);
  }

  .guestbook-lock-button:hover,
  .guestbook-lock-button:focus-visible {
    transform: translateX(50%) translateY(-2px);
  }

  .guestbook-lock-icon {
    width: 36px;
    height: 36px;
  }

  .guestbook-lock-text strong {
    font-size: 0.98rem;
  }

  .guestbook-lock-text small {
    font-size: 0.62rem;
  }

  .guestbook-lock-cta {
    display: none;
  }
  .guestbook-paper { padding: 27px 20px 26px 34px; }
  .guestbook-cover { padding: 0; border-width: 0; }
  .guestbook-closed-cover h3,
  .guestbook-cover h3 { font-size: 3.5rem; }
  .guestbook-wish > p { font-size: 0.82rem; }
  .guestbook-wishes.is-one .guestbook-wish > p { font-size: 0.76rem; }
  .guestbook-signature { font-size: 1rem; }
  .guestbook-wish > p {
    font-size: calc(var(--wish-fit-size, 0.82rem) * 0.92);
    line-height: var(--wish-fit-line, 1.08);
  }
  .guestbook-controls { gap: 10px; min-height: 52px; margin-top: 8px; }
  .guestbook-control { width: 48px; height: 48px; }
  .guestbook-control svg { width: 23px; height: 23px; }
  .guestbook-page-status { min-width: 104px; }
}

@media (max-width: 560px), (max-height: 740px) {
  .story-modal {
    width: min(94vw, 620px);
    max-height: 94dvh;
  }

  .story-modal-card {
    max-height: calc(94dvh - 12px);
    padding: 22px 18px 18px;
  }

  .story-modal-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 7px;
    font-size: 1.25rem;
  }

  .story-modal h2 {
    font-size: clamp(1.35rem, 8vw, 2rem);
    line-height: 1.05;
  }

  .story-gate-question {
    margin: 12px auto 10px;
    line-height: 1.45;
  }

  .story-gate-options {
    gap: 7px;
  }

  .story-answer {
    padding: 9px 10px;
    border-radius: 10px;
  }

  .story-gate-feedback {
    margin-top: 10px;
    min-height: 20px;
    line-height: 1.38;
  }

  .story-modal-actions {
    position: sticky;
    z-index: 4;
    bottom: -18px;
    margin: 14px -18px -18px;
    padding: 10px 14px 12px;
    background: linear-gradient(180deg, rgba(255, 248, 240, 0.2), rgba(255, 248, 240, 0.96) 36%, rgba(255, 248, 240, 0.99));
  }
}

@media (prefers-reduced-motion: reduce) {
  .guestbook-open,
  .guestbook-control { transition: none; }
}

@media (max-width: 560px) {
  .hero-date-seal {
    display: none;
  }

  .topbar.is-scrolled {
    padding-block: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-date-seal,
  .hero-next {
    animation: none;
  }
}

@media (max-width: 900px) {
  .story-monogram {
    font-size: 4.5rem;
  }

  .gallery-edition {
    position: static;
    width: min(100%, 340px);
    margin: -16px 0 28px;
  }

  .gallery-layout-single .gallery-frame,
  .gallery-layout-duo .gallery-frame,
  .gallery-layout-trio .gallery-frame,
  .gallery-layout-quad .gallery-frame,
  .gallery-layout-feature .gallery-frame,
  .gallery-layout-mosaic .gallery-frame {
    grid-column: span 3;
    grid-row: span 3;
  }

  .gallery-layout-trio .gallery-frame:first-child,
  .gallery-layout-feature .gallery-frame:first-child,
  .gallery-layout-mosaic .gallery-frame:nth-child(6n + 1) {
    grid-column: span 6;
    grid-row: span 4;
  }

  .wedding-pups {
    width: min(360px, 78vw);
    height: 116px;
  }
}

@media (max-width: 560px) {
  .story-photo-caption {
    right: 8px;
    bottom: 12px;
  }

  .gallery-section .section-heading {
    margin-bottom: 26px;
  }

  .gallery-layout-single .gallery-frame,
  .gallery-layout-duo .gallery-frame,
  .gallery-layout-trio .gallery-frame,
  .gallery-layout-quad .gallery-frame,
  .gallery-layout-feature .gallery-frame,
  .gallery-layout-mosaic .gallery-frame,
  .gallery-layout-trio .gallery-frame:first-child,
  .gallery-layout-feature .gallery-frame:first-child,
  .gallery-layout-mosaic .gallery-frame:nth-child(6n + 1) {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 4 / 5;
  }

  .gallery-frame figcaption,
  .gallery-frame::after {
    opacity: 1;
  }

  .gallery-frame figcaption {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wedding-pups > img {
    animation: none;
  }
}

.program-item span {
  position: relative;
  z-index: 1;
  font-weight: 800;
}

.gallery {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 92px;
  gap: 14px;
}

.gallery-section {
  position: relative;
  background: linear-gradient(180deg, #fffdf7, #fff4e5 58%, #f7e7df);
  overflow: hidden;
}

.gallery-section::before {
  content: "";
  position: absolute;
  top: 8%;
  right: -8%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(231, 168, 104, 0.16);
  box-shadow: 0 0 0 35px rgba(231, 168, 104, 0.04);
  transform: translateY(calc(var(--scroll-progress, 0) * 80px));
}

.gallery img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, filter 0.35s ease;
  cursor: zoom-in;
  outline: none;
}

.gallery-layout-single {
  max-width: 760px;
  margin-inline: auto;
}

.gallery-layout-single .gallery-photo {
  grid-column: span 12;
  grid-row: span 6;
}

.gallery-layout-duo .gallery-photo {
  grid-column: span 6;
  grid-row: span 5;
}

.gallery-layout-duo .gallery-photo:nth-child(2) {
  transform: translateY(28px);
}

.gallery-layout-trio .gallery-photo:first-child {
  grid-column: span 7;
  grid-row: span 6;
}

.gallery-layout-trio .gallery-photo:not(:first-child) {
  grid-column: span 5;
  grid-row: span 3;
}

.gallery-layout-quad .gallery-photo {
  grid-column: span 6;
  grid-row: span 4;
}

.gallery-layout-feature .gallery-photo:first-child {
  grid-column: span 7;
  grid-row: span 6;
}

.gallery-layout-feature .gallery-photo:nth-child(n + 2) {
  grid-column: span 5;
  grid-row: span 3;
}

.gallery-layout-feature .gallery-photo:nth-child(5),
.gallery-layout-feature .gallery-photo:nth-child(6) {
  grid-column: span 6;
}

.gallery-layout-mosaic .gallery-photo {
  grid-column: span 3;
  grid-row: span 3;
}

.gallery-layout-mosaic .gallery-photo:nth-child(8n + 1),
.gallery-layout-mosaic .gallery-photo:nth-child(8n + 6) {
  grid-column: span 6;
  grid-row: span 5;
}

.gallery-layout-mosaic .gallery-photo:nth-child(8n + 2),
.gallery-layout-mosaic .gallery-photo:nth-child(8n + 5) {
  grid-column: span 3;
  grid-row: span 4;
}

.gallery-layout-mosaic .gallery-photo:nth-child(8n + 4) {
  grid-column: span 6;
  grid-row: span 3;
}

.gallery img:focus-visible {
  box-shadow: 0 0 0 4px rgba(184, 95, 102, 0.3), var(--shadow);
}

.gallery-layout-mosaic img:nth-child(even) {
  margin-top: 34px;
}

.gallery img:hover {
  filter: saturate(1.08);
  transform: translateY(-10px) rotate(-1deg) scale(1.015);
}

.gallery img:nth-child(even):hover {
  transform: translateY(-10px) rotate(1deg) scale(1.015);
}

.gallery-lightbox {
  width: min(94vw, 1100px);
  height: min(90vh, 820px);
  padding: 0;
  overflow: visible;
  border: 0;
  color: white;
  background: transparent;
}

.gallery-lightbox::backdrop {
  background: rgba(20, 19, 30, 0.88);
  backdrop-filter: blur(12px);
  animation: lightbox-fade 0.35s ease both;
}

.gallery-lightbox[open] {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  animation: lightbox-rise 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gallery-lightbox figure {
  display: grid;
  height: 100%;
  margin: 0;
  place-items: center;
}

.gallery-lightbox img {
  width: 100%;
  height: calc(100% - 38px);
  object-fit: contain;
  filter: drop-shadow(0 28px 55px rgba(0, 0, 0, 0.46));
}

.gallery-lightbox figcaption {
  padding-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.lightbox-close,
.lightbox-nav {
  display: grid;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  place-items: center;
  color: white;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.18);
}

.lightbox-close {
  position: absolute;
  top: -8px;
  right: 0;
  width: 44px;
  height: 44px;
  font-size: 1.8rem;
}

.lightbox-nav {
  width: 46px;
  height: 46px;
  font-size: 2rem;
}

@keyframes lightbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.rsvp-section,
.message-section {
  background:
    linear-gradient(rgba(255, 250, 245, 0.9), rgba(255, 250, 245, 0.9)),
    url("https://images.unsplash.com/photo-1525258946800-98cfd641d0de?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.gift-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(110deg, rgba(233, 239, 226, 0.94), rgba(249, 235, 220, 0.93) 48%, rgba(238, 219, 225, 0.92));
}

.gift-section::before {
  content: "✦";
  position: absolute;
  top: 12%;
  right: 8%;
  color: rgba(185, 142, 70, 0.34);
  font-size: 4rem;
  animation: event-ornament-drift 5s ease-in-out infinite alternate;
}

.gift-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(111, 78, 58, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(62, 45, 38, 0.08), rgba(255, 250, 245, 0.02) 48%, rgba(62, 45, 38, 0.1));
  pointer-events: none;
}

.bank-transfer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 940px;
  margin: 32px auto 0;
}

.bank-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(168px, 0.82fr) minmax(0, 1.05fr);
  gap: 22px;
  align-items: center;
  min-height: 260px;
  padding: 22px;
  border: 1px solid rgba(185, 142, 70, 0.25);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 12%, rgba(184, 95, 102, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(255, 253, 248, 0.9), rgba(255, 245, 238, 0.78));
  box-shadow: 0 22px 55px rgba(77, 63, 48, 0.14);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.bank-card:nth-child(2) {
  border-color: rgba(125, 151, 132, 0.3);
  background:
    radial-gradient(circle at 88% 12%, rgba(91, 127, 99, 0.13), transparent 28%),
    linear-gradient(145deg, rgba(253, 255, 250, 0.92), rgba(242, 249, 239, 0.8));
}

.bank-card::before {
  content: "✦";
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: rgba(185, 142, 70, 0.2);
  font-size: 3.2rem;
  line-height: 1;
  pointer-events: none;
}

.bank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, 0.72) 48%, transparent 68%);
  transform: translateX(-120%);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.bank-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 30px 70px rgba(77, 63, 48, 0.2);
}

.bank-card:hover::after { transform: translateX(120%); }

.bank-qr {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  padding: 12px;
  border: 1px solid rgba(185, 142, 70, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(135deg, rgba(184, 95, 102, 0.5), rgba(185, 142, 70, 0.5)) border-box;
  box-shadow: 0 14px 30px rgba(52, 42, 33, 0.14);
}

.bank-qr img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: contain;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.bank-qr img.is-verifying,
.bank-qr img.is-unverified {
  filter: blur(7px) saturate(0.6);
  opacity: 0.34;
}

.bank-qr img.is-verified {
  filter: none;
  opacity: 1;
}

.bank-qr img.is-blocked,
.bank-card.is-qr-blocked .bank-qr img {
  filter: blur(12px) grayscale(1);
  opacity: 0;
}

.bank-card.is-qr-verifying .bank-qr::after,
.bank-card.is-qr-unverified .bank-qr::after,
.bank-card.is-qr-blocked .bank-qr::after {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.4;
  pointer-events: none;
}

.bank-card.is-qr-verifying .bank-qr::after {
  content: "Đang xác thực QR";
  color: #8a642c;
  background: rgba(255, 250, 245, 0.82);
}

.bank-card.is-qr-unverified .bank-qr::after {
  content: "Cần kiểm tra tên người nhận";
  color: #8a642c;
  background: rgba(255, 250, 245, 0.82);
}

.bank-card.is-qr-blocked .bank-qr {
  border-color: rgba(167, 52, 69, 0.42);
  background:
    linear-gradient(rgba(255, 244, 246, 0.95), rgba(255, 244, 246, 0.95)) padding-box,
    linear-gradient(135deg, rgba(167, 52, 69, 0.65), rgba(185, 142, 70, 0.42)) border-box;
}

.bank-card.is-qr-blocked .bank-qr::after {
  content: "QR bị khóa";
  color: #a73445;
  background: rgba(255, 244, 246, 0.9);
}

html[lang="en"] .bank-card.is-qr-verifying .bank-qr::after {
  content: "Verifying QR";
}

html[lang="en"] .bank-card.is-qr-unverified .bank-qr::after {
  content: "Check recipient name";
}

html[lang="en"] .bank-card.is-qr-blocked .bank-qr::after {
  content: "QR locked";
}

.qr-placeholder {
  display: grid;
  height: 100%;
  padding: 18px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
  background: repeating-linear-gradient(135deg, #fff 0 12px, #f7f3ed 12px 24px);
}

.qr-placeholder strong {
  color: var(--rose);
  font-family: "Great Vibes", cursive;
  font-size: 2.8rem;
  font-weight: 400;
}

.qr-placeholder span { font-size: 0.72rem; font-weight: 700; }

.bank-details {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 10px;
  padding: 12px 4px;
}

.bank-card-number {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(185, 142, 70, 0.24);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bank-card-number::before {
  content: "♥";
  color: var(--rose);
  font-size: 0.8rem;
  line-height: 1;
}

.bank-details h3 {
  max-width: 15ch;
  margin: 0;
  color: #6c3d43;
  font-family: "Dancing Script", cursive;
  font-size: clamp(1.75rem, 3.5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.02;
  text-wrap: balance;
}

.bank-card-hint {
  max-width: 24ch;
  margin: 0;
  color: rgba(78, 63, 56, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.5;
}

.qr-verify-status {
  position: relative;
  max-width: 30ch;
  margin: 0;
  padding: 9px 12px 9px 30px;
  border: 1px solid rgba(185, 142, 70, 0.2);
  border-radius: 16px 8px 16px 8px;
  color: rgba(78, 63, 56, 0.82);
  background: rgba(255, 252, 247, 0.62);
  font-family: "Cormorant Garamond", serif;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.32;
}

.qr-verify-status::before {
  content: "♡";
  position: absolute;
  top: 9px;
  left: 11px;
  color: rgba(184, 95, 102, 0.78);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1;
}

.bank-card.is-qr-verified .qr-verify-status {
  border-color: rgba(185, 142, 70, 0.28);
  color: #78494f;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(135deg, rgba(255, 252, 247, 0.78), rgba(255, 241, 238, 0.62));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.bank-card.is-qr-blocked .qr-verify-status {
  border-color: rgba(167, 52, 69, 0.32);
  color: #a73445;
  background: rgba(255, 244, 246, 0.86);
}

.bank-details p { display: grid; gap: 4px; margin: 12px 0; }
.bank-details p span { color: var(--muted); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.bank-details p strong { overflow-wrap: anywhere; }

.bank-details .bank-recipient {
  margin-top: 6px;
}

.gift-reminder-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  margin: 0 auto 2px;
  padding: 7px 11px;
  border: 1px solid rgba(185, 142, 70, 0.16);
  border-radius: 999px;
  color: rgba(111, 73, 79, 0.82);
  background: rgba(255, 250, 245, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.gift-reminder-link:hover,
.gift-reminder-link:focus-visible {
  border-color: rgba(184, 95, 102, 0.28);
  color: #77494f;
  background: rgba(255, 248, 242, 0.68);
  transform: translateY(-1px);
}

.gift-reminder-link::before {
  content: "♡";
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: rgba(184, 95, 102, 0.76);
  background: rgba(184, 95, 102, 0.1);
  font-size: 0.9rem;
}

.rsvp-section {
  position: relative;
  background:
    linear-gradient(rgba(255, 239, 226, 0.88), rgba(239, 197, 184, 0.84)),
    url("https://images.unsplash.com/photo-1525258946800-98cfd641d0de?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.message-section {
  position: relative;
  color: #f8f2ee;
  background:
    linear-gradient(rgba(42, 42, 61, 0.92), rgba(29, 32, 50, 0.96)),
    url("https://images.unsplash.com/photo-1525258946800-98cfd641d0de?auto=format&fit=crop&w=1800&q=80") center/cover;
  overflow: hidden;
}

.message-section::before,
.message-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.72);
  animation: star-twinkle 2.6s ease-in-out infinite alternate;
}

.message-section::before { top: 13%; left: 9%; width: 3px; height: 3px; }
.message-section::after { top: 24%; right: 13%; width: 4px; height: 4px; animation-delay: -1.2s; }

.message-section h2,
.message-section .section-heading p:not(.eyebrow) {
  color: #fffaf5;
}

.message-section .message-card {
  background: rgba(255, 255, 255, 0.9);
}

.footer {
  background: #1d2032;
  color: rgba(255, 250, 245, 0.72);
}

.rsvp-shell,
.message-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 32px;
  align-items: center;
  max-width: 1080px;
  margin: auto;
  padding: clamp(22px, 5vw, 52px);
}

.rsvp-shell h2,
.message-layout h2 {
  text-align: left;
}

.form {
  display: grid;
  gap: 16px;
}

.form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(184, 95, 102, 0.12);
}

.character-counter {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
  transition: color 0.2s ease;
}

.character-counter.is-near-limit {
  color: var(--rose);
}

.segmented {
  border-radius: 8px;
}

.segmented label {
  flex: 1;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  min-height: 44px;
  place-items: center;
  text-align: center;
}

.form-status,
.empty {
  min-height: 24px;
  margin: 0;
  color: var(--leaf);
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 900px;
  margin: auto;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 20px auto 8px;
}

.export-button {
  gap: 9px;
  color: white;
  background: var(--leaf);
  box-shadow: 0 12px 28px rgba(83, 116, 93, 0.24);
}

.export-button > span:first-child {
  font-size: 1.2rem;
  line-height: 1;
}

.danger-button {
  gap: 9px;
  color: white;
  background: #a73445;
  box-shadow: 0 12px 28px rgba(167, 52, 69, 0.2);
}

.message-admin-actions {
  display: flex;
  justify-content: flex-end;
  max-width: 1100px;
  margin: 18px auto 0;
}

.stat {
  padding: 24px;
  text-align: center;
}

.stat strong {
  display: block;
  color: var(--rose);
  font-size: 2.7rem;
}

.stat span {
  color: var(--muted);
  font-weight: 800;
}

.guest-list,
.message-wall {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin: 22px auto 0;
}

.guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.guest-row div {
  display: grid;
  gap: 4px;
}

.admin-row-actions,
.message-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-select-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(91, 68, 48, 0.14);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-select-item input {
  width: 15px;
  height: 15px;
  accent-color: var(--rose);
}

.admin-select-item span {
  color: inherit;
}

.guest-row span {
  color: var(--muted);
}

mark {
  border-radius: 999px;
  padding: 8px 12px;
  color: white;
  font-weight: 900;
}

mark.accepted {
  background: var(--leaf);
}

mark.declined {
  background: var(--muted);
}

.message-layout {
  padding: 0;
}

.message-form {
  padding: 24px;
}

.message-wall {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 22px;
  max-width: 1160px;
  padding: 34px 18px 18px;
  perspective: 1000px;
}

.message-section .message-card {
  --note-rotation: -1deg;
  position: relative;
  min-height: 210px;
  padding: 34px 24px 22px;
  border: 0;
  border-radius: 3px;
  background: #fff8e8;
  box-shadow: 0 14px 28px rgba(8, 11, 27, 0.26), inset 0 0 0 1px rgba(102, 75, 52, 0.08);
  backdrop-filter: none;
  transform: rotate(var(--note-rotation));
  transform-origin: 50% 12px;
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
}

.message-section .message-card:nth-child(3n + 2) { --note-rotation: 1.2deg; background: #f0f7ee; }
.message-section .message-card:nth-child(3n + 3) { --note-rotation: -0.4deg; background: #f8eef1; }
.message-section .message-card:nth-child(4n) { --note-rotation: 0.8deg; background: #eef4f8; }

.message-card::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 76px;
  height: 24px;
  background: rgba(235, 214, 166, 0.72);
  box-shadow: 0 2px 5px rgba(57, 44, 35, 0.12);
  transform: translateX(-50%) rotate(-2deg);
  clip-path: polygon(2% 8%, 98% 0, 95% 92%, 5% 100%);
}

.message-card::after {
  content: "✦";
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: rgba(184, 95, 102, 0);
  font-size: 1.2rem;
  text-shadow: -22px -14px 0 rgba(185, 142, 70, 0), 8px -32px 0 rgba(125, 151, 132, 0);
  transition: color 0.35s ease, text-shadow 0.35s ease, transform 0.45s ease;
}

.message-card.motion-item.is-in-view {
  transform: rotate(var(--note-rotation));
}

.message-card:hover,
.message-card.motion-item.is-in-view:hover {
  z-index: 3;
  transform: translateY(-10px) rotate(0deg) scale(1.025);
  box-shadow: 0 28px 58px rgba(8, 11, 27, 0.38);
  filter: saturate(1.08);
}

.message-card:hover::after {
  color: rgba(184, 95, 102, 0.78);
  text-shadow: -22px -14px 0 rgba(185, 142, 70, 0.72), 8px -32px 0 rgba(125, 151, 132, 0.7);
  transform: rotate(20deg) scale(1.15);
}

.message-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.7;
}

.message-card p::before {
  content: "“";
  position: absolute;
  top: -28px;
  left: -10px;
  color: rgba(184, 95, 102, 0.2);
  font-family: Georgia, serif;
  font-size: 4.2rem;
  line-height: 1;
}

.message-card span {
  color: var(--rose);
  font-weight: 900;
}

.message-card-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(91, 68, 48, 0.2);
}

.wish-save-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(184, 95, 102, 0.24);
  border-radius: 6px;
  color: var(--rose);
  background: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.wish-save-button span {
  color: inherit;
}

.wish-save-button:hover {
  transform: translateY(-2px);
  background: white;
}

.admin-delete-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(178, 56, 72, 0.28);
  border-radius: 6px;
  color: #a73445;
  background: rgba(255, 245, 247, 0.82);
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-delete-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 235, 239, 0.96);
  box-shadow: 0 10px 20px rgba(167, 52, 69, 0.13);
}

.wish-card-studio {
  width: min(94vw, 1080px);
  max-height: 94vh;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: #fffaf5;
  box-shadow: 0 35px 90px rgba(11, 13, 26, 0.42);
}

.wish-card-studio::backdrop {
  background: rgba(22, 23, 37, 0.82);
  backdrop-filter: blur(10px);
}

.wish-card-studio[open] {
  animation: studio-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wish-studio-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(340px, 1fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: center;
  padding: clamp(24px, 5vw, 52px);
}

.wish-studio-controls h2 {
  font-size: clamp(2.1rem, 4vw, 3.5rem);
}

.wish-studio-controls > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
}

.studio-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-size: 1.7rem;
  cursor: pointer;
}

.wish-backgrounds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.wish-typography {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 20px;
}

.wish-typography label {
  display: grid;
  min-width: 0;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.wish-typography label > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.wish-typography select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: white;
  font: inherit;
}

.wish-typography input[type="range"] {
  width: 100%;
  accent-color: var(--rose);
}

.wish-typography output {
  color: var(--rose);
}

.wish-typography .wish-auto-format {
  grid-column: 1 / -1;
  display: flex;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.wish-typography .wish-auto-format input {
  order: 2;
  width: 42px;
  height: 24px;
  margin: 0;
  padding: 0;
  accent-color: var(--rose);
  cursor: pointer;
}

.wish-typography .wish-auto-format > span {
  display: block;
}

.wish-background {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: white;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.wish-background i {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background-color: #fff;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-accent), transparent 65%);
}

.wish-background i b {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--theme-accent);
  font-family: Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: 5px;
}

.wish-background.is-selected {
  border-color: var(--theme-accent);
  color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent), transparent 82%);
}

.wish-card-preview {
  --wish-start: #fff8f4;
  --wish-end: #f3d6d8;
  --wish-accent: #b85f66;
  --wish-ink: #4a3433;
  position: relative;
  display: flex;
  width: min(100%, 440px);
  aspect-ratio: 4 / 5;
  margin: auto;
  padding: clamp(58px, 8vw, 88px) clamp(32px, 5vw, 58px) clamp(48px, 7vw, 72px) clamp(76px, 11vw, 112px);
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: var(--wish-ink);
  text-align: center;
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent 53px, color-mix(in srgb, var(--wish-accent), transparent 77%) 54px, transparent 55px),
    linear-gradient(145deg, var(--wish-start), var(--wish-end));
  box-shadow: 0 24px 60px rgba(71, 48, 44, 0.2);
  border: 8px solid rgba(255, 253, 246, 0.92);
  outline: 1px dashed color-mix(in srgb, var(--wish-accent), transparent 45%);
  outline-offset: -14px;
  clip-path: polygon(1% 2%, 6% 0, 13% 1.5%, 22% 0.5%, 31% 2%, 41% 0, 52% 1.3%, 63% 0.4%, 74% 1.8%, 86% 0.5%, 98% 2%, 100% 10%, 98.5% 21%, 100% 33%, 98.5% 46%, 100% 60%, 98.5% 73%, 100% 87%, 98% 98%, 88% 100%, 75% 98.7%, 62% 100%, 49% 98.5%, 36% 100%, 23% 98.6%, 11% 100%, 1% 97%, 0 85%, 1.5% 72%, 0 58%, 1.5% 45%, 0 31%, 1.5% 17%);
  transition: background 0.45s ease, color 0.45s ease;
}

.wish-card-preview.has-frame-image {
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  outline: 0;
  clip-path: none;
  background: white;
}

.wish-frame-image {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.wish-card-content {
  position: absolute;
  z-index: 2;
  top: var(--content-top, 20%);
  left: var(--content-left, 20%);
  display: flex;
  width: var(--content-width, 60%);
  height: var(--content-height, 60%);
  padding: 6px;
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  color: var(--wish-ink);
}

.wish-card-preview.mask-frame-center .wish-card-content {
  padding: 4% 5%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
}

.wish-card-preview.has-frame-image .wish-frame,
.wish-card-preview.has-frame-image .wish-page-margin,
.wish-card-preview.has-frame-image .wish-binding,
.wish-card-preview.has-frame-image .wish-motifs,
.wish-card-preview.has-frame-image .wish-corner-image {
  display: none;
}

.image-load-failed {
  display: none !important;
}

.wish-frame {
  position: absolute;
  inset: 20px;
  border: 1px solid var(--wish-accent);
  box-shadow: inset 0 0 0 8px color-mix(in srgb, var(--wish-accent), transparent 92%);
  pointer-events: none;
}

.wish-page-margin {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 22%;
  width: 1px;
  background: rgba(200, 104, 104, 0.42);
}

.wish-binding {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 7%;
  width: 22px;
  opacity: 0.72;
  background: repeating-linear-gradient(to bottom, transparent 0 18px, rgba(68, 59, 52, 0.5) 19px 22px, transparent 23px 39px);
  filter: drop-shadow(3px 0 2px rgba(65, 50, 40, 0.16));
}

.wish-motifs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wish-motifs span {
  position: absolute;
  color: var(--wish-accent);
  font-family: Georgia, serif;
  font-size: clamp(1rem, 3vw, 1.65rem);
  opacity: 0.48;
  text-shadow: 0 0 18px color-mix(in srgb, var(--wish-accent), transparent 38%);
  animation: wish-motif-float 4s ease-in-out infinite alternate;
  animation-delay: calc(var(--motif-index) * -0.28s);
}

.wish-motifs span:nth-child(1) { top: 5%; right: 8%; font-size: 2rem; }
.wish-motifs span:nth-child(2) { top: 12%; right: 4%; }
.wish-motifs span:nth-child(3) { top: 18%; right: 11%; }
.wish-motifs span:nth-child(4) { bottom: 8%; left: 25%; font-size: 2rem; }
.wish-motifs span:nth-child(5) { bottom: 4%; left: 37%; }
.wish-motifs span:nth-child(6) { bottom: 14%; left: 30%; }

.wish-corner-image {
  position: absolute;
  z-index: 1;
  width: 25%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(53, 42, 34, 0.16));
}

.wish-corner-image-top { top: 3%; right: 4%; }
.wish-corner-image-bottom { bottom: 3%; left: 22%; transform: rotate(-7deg); }

@keyframes wish-motif-float {
  from { transform: translateY(-2px) rotate(-5deg); }
  to { transform: translateY(4px) rotate(6deg); }
}

.wish-card-label {
  margin: 0 0 7px;
  color: var(--wish-accent);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.wish-card-couple {
  color: var(--wish-accent);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.wish-card-preview blockquote {
  display: -webkit-box;
  width: 100%;
  max-height: 55%;
  margin: clamp(44px, 9vw, 72px) 0 0;
  overflow: hidden;
  color: var(--wish-ink);
  font-family: var(--wish-font-family, "Dancing Script", cursive);
  font-size: clamp(1.35rem, 3.4vw, 2.15rem);
  font-weight: 600;
  line-height: 1.58;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
}

.wish-card-preview.has-frame-image blockquote {
  display: flex;
  flex: 1;
  min-height: 0;
  max-height: none;
  margin: 4% 0 2px;
  align-items: center;
  justify-content: center;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-line;
  font-size: var(--wish-message-size, 1.15rem);
  line-height: 1.22;
  text-align: var(--wish-text-align, center);
  -webkit-line-clamp: 7;
}

.wish-card-signature {
  width: 100%;
  margin: auto 0 0;
  color: var(--wish-accent);
  font-family: "Great Vibes", cursive;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1;
  text-align: right;
}

.wish-card-preview.has-frame-image .wish-card-signature {
  margin: 2px 0 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: var(--wish-signature-size, 2.2rem);
  text-align: center;
}

.wish-card-preview.has-frame-image .wish-card-couple {
  font-size: clamp(1.15rem, 3.3vw, 1.9rem);
  line-height: 0.95;
}

.wish-card-preview.has-frame-image .wish-card-label {
  margin-bottom: 4px;
  font-size: 0.52rem;
}

.wish-card-preview.has-frame-image small {
  margin-top: 5px;
  font-size: 0.62rem;
}

.wish-card-preview small {
  margin-top: 12px;
  opacity: 0.66;
  font-weight: 700;
}

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

.footer {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.petal-field {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
}

.cursor-sparkles {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.cursor-sparkles i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: hsl(var(--sparkle-hue) 78% 72%);
  box-shadow: 0 0 13px hsl(var(--sparkle-hue) 88% 72%);
  transform: translate(-50%, -50%);
  animation: cursor-sparkle 0.85s ease-out forwards;
}

@keyframes cursor-sparkle {
  from { opacity: 0.92; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(-50%, -18px) scale(0.1); }
}

.petal-field span {
  position: absolute;
  top: -40px;
  left: calc((var(--i) * 47px) % 100vw);
  width: 12px;
  height: 18px;
  border-radius: 12px 0 12px 0;
  background: rgba(233, 167, 161, 0.72);
  animation: fall 12s linear infinite;
  animation-delay: var(--delay);
}

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

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

.motion-item {
  --motion-x: 0;
  --motion-y: 24px;
  --motion-scale: 1;
  opacity: 0;
  transform: translate3d(var(--motion-x), var(--motion-y), 0) scale(var(--motion-scale));
  transition: opacity 0.8s var(--motion-delay, 0ms) ease, transform 0.9s var(--motion-delay, 0ms) cubic-bezier(0.16, 1, 0.3, 1);
}

.story-card.motion-item {
  --motion-y: 0;
}

.motion-left { --motion-x: -34px; --motion-y: 0; }
.motion-right { --motion-x: 34px; --motion-y: 0; }
.motion-scale { --motion-y: 0; --motion-scale: 0.92; }

.motion-item.is-in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.hero-media img {
  translate: 0 var(--parallax-y, 0);
}

@supports (content-visibility: auto) {
  main > .section:not(.hero) {
    content-visibility: auto;
    contain-intrinsic-size: 860px;
  }
}

body.is-scroll-performing .day-ambient,
body.is-scroll-performing .day-journey,
body.is-scroll-performing .petal-field,
body.is-scroll-performing .cursor-sparkles {
  opacity: 0 !important;
}

body.is-scroll-performing .hero-media img,
body.is-scroll-performing .day-ambient i,
body.is-scroll-performing .wedding-pups *,
body.is-scroll-performing .guestbook-closed-cover,
body.is-scroll-performing .guestbook-lock-button,
body.is-scroll-performing .music-toggle::after {
  animation-play-state: paused !important;
}

body.is-scroll-performing .topbar,
body.is-scroll-performing .quick-dock,
body.is-scroll-performing .music-toggle,
body.is-scroll-performing .section-heading,
body.is-scroll-performing .rsvp-shell,
body.is-scroll-performing .message-layout,
body.is-scroll-performing .gift-nudge,
body.is-scroll-performing .guestbook-stage {
  backdrop-filter: none !important;
  transition-duration: 0.01ms !important;
}

body.is-scroll-performing .gallery .gallery-frame,
body.is-scroll-performing .message-card,
body.is-scroll-performing .detail-card,
body.is-scroll-performing .bank-card {
  box-shadow: 0 8px 22px rgba(67, 50, 43, 0.08) !important;
}

@keyframes star-twinkle {
  from { filter: brightness(0.75); transform: scale(0.75); }
  to { filter: brightness(1.4); transform: scale(1.35); }
}

@keyframes slowZoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.55;
    transform: translateX(-50%) scale(0.96);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.04);
  }
}

@keyframes fall {
  0% {
    transform: translate3d(0, -40px, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(80px, 110vh, 0) rotate(420deg);
  }
}

@media (max-width: 900px) {
  .bank-transfer-list {
    grid-template-columns: 1fr;
    max-width: 580px;
  }

  .bank-card {
    grid-template-columns: minmax(130px, 0.72fr) minmax(0, 1fr);
  }

  .bank-details h3 {
    max-width: 18ch;
  }

  .topbar {
    grid-template-columns: auto auto;
  }

  .nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    padding-top: 150px;
  }

  .hero-content {
    padding-bottom: 190px;
  }

  .countdown,
  .story-showcase,
  .details-grid,
  .stats-grid,
  .message-wall,
  .program-panel,
  .program-list,
  .rsvp-shell,
  .message-layout {
    grid-template-columns: 1fr;
  }

  .story-timeline::before {
    left: 26px;
  }

  .details-feature {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 110px;
  }

  .wedding-pups {
    right: 50%;
    bottom: 14px;
    transform: translateX(50%) scale(0.92);
  }

  .countdown {
    grid-template-columns: repeat(4, 1fr);
    right: 18px;
  }

  .gallery {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 78px;
  }

  .gallery-layout-single .gallery-photo,
  .gallery-layout-duo .gallery-photo,
  .gallery-layout-trio .gallery-photo:first-child,
  .gallery-layout-quad .gallery-photo,
  .gallery-layout-feature .gallery-photo:first-child,
  .gallery-layout-feature .gallery-photo:nth-child(n + 2),
  .gallery-layout-feature .gallery-photo:nth-child(5),
  .gallery-layout-feature .gallery-photo:nth-child(6),
  .gallery-layout-mosaic .gallery-photo,
  .gallery-layout-mosaic .gallery-photo:nth-child(8n + 1),
  .gallery-layout-mosaic .gallery-photo:nth-child(8n + 2),
  .gallery-layout-mosaic .gallery-photo:nth-child(8n + 4),
  .gallery-layout-mosaic .gallery-photo:nth-child(8n + 5),
  .gallery-layout-mosaic .gallery-photo:nth-child(8n + 6) {
    grid-column: span 3;
    grid-row: span 3;
  }

  .gallery-layout-trio .gallery-photo:first-child,
  .gallery-layout-feature .gallery-photo:first-child,
  .gallery-layout-mosaic .gallery-photo:nth-child(6n + 1) {
    grid-column: span 6;
    grid-row: span 4;
  }

  .gallery img:nth-child(even),
  .gallery-layout-duo .gallery-photo:nth-child(2) {
    margin-top: 0;
    transform: none;
  }

  .rsvp-shell,
  .message-layout {
    padding: 22px;
  }

  .wish-studio-layout {
    grid-template-columns: 1fr;
  }

  .wish-studio-controls {
    padding-right: 38px;
  }

  .wish-card-preview {
    width: min(100%, 380px);
  }
}

@media (max-width: 560px) {
  .bank-card {
    grid-template-columns: 1fr;
  }

  .music-prompt {
    left: 12px;
    right: 12px;
    bottom: 12px;
    grid-template-columns: 1fr;
  }

  .music-prompt .button {
    width: 100%;
  }

  .bank-qr {
    width: min(100%, 250px);
    margin: auto;
  }
  .wish-typography {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 76px 16px;
  }

  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .gallery-layout-single .gallery-photo,
  .gallery-layout-duo .gallery-photo,
  .gallery-layout-trio .gallery-photo:first-child,
  .gallery-layout-trio .gallery-photo:not(:first-child),
  .gallery-layout-quad .gallery-photo,
  .gallery-layout-feature .gallery-photo:first-child,
  .gallery-layout-feature .gallery-photo:nth-child(n + 2),
  .gallery-layout-feature .gallery-photo:nth-child(5),
  .gallery-layout-feature .gallery-photo:nth-child(6),
  .gallery-layout-mosaic .gallery-photo,
  .gallery-layout-mosaic .gallery-photo:nth-child(8n + 1),
  .gallery-layout-mosaic .gallery-photo:nth-child(8n + 2),
  .gallery-layout-mosaic .gallery-photo:nth-child(8n + 4),
  .gallery-layout-mosaic .gallery-photo:nth-child(8n + 5),
  .gallery-layout-mosaic .gallery-photo:nth-child(8n + 6) {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 4 / 5;
  }

  .hero-content {
    padding-bottom: 210px;
  }

  .hero-content h1 {
    font-size: clamp(3rem, 12vw, 4.7rem);
  }

  .details-feature {
    padding-bottom: 104px;
  }

  .wedding-pups {
    bottom: 10px;
    transform: translateX(50%) scale(0.78);
  }

  .countdown {
    gap: 6px;
  }

  .countdown div {
    padding: 12px 6px;
  }

  .countdown strong {
    font-size: 1.35rem;
  }

  .nav a {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .guest-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .story-card {
    grid-template-columns: 62px 1fr;
    padding: 20px;
  }

  .story-marker {
    width: 48px;
    height: 48px;
  }

  .program-item {
    min-height: 94px;
  }

  .gallery-lightbox[open] {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    width: 96vw;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 1.6rem;
  }

  .lightbox-close {
    top: 2px;
    right: 4px;
    z-index: 2;
  }

  .wish-studio-layout {
    padding: 50px 18px 24px;
  }

  .wish-card-preview {
    width: min(100%, 320px);
    padding: 48px 38px;
  }

  .message-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Configurable photographic layers and compact quick navigation. */
.section.has-photo-backdrop {
  position: relative;
  isolation: isolate;
  background-image:
    linear-gradient(
      rgba(var(--section-tint, 255, 250, 245), var(--section-overlay-opacity, 0.72)),
      rgba(var(--section-tint, 255, 250, 245), var(--section-overlay-opacity, 0.72))
    ),
    var(--section-image) !important;
  background-position: center;
  background-size: cover;
}

.topbar {
  background: rgba(255, 250, 245, 0.68);
}

.story-card,
.detail-card,
.details-feature,
.program-panel,
.bank-card,
.rsvp-shell,
.message-form,
.stat,
.guest-row {
  background-color: rgba(255, 255, 255, var(--card-opacity, 0.78));
  backdrop-filter: blur(14px) saturate(1.08);
}

.quick-dock {
  position: fixed;
  top: 50%;
  right: 34px;
  z-index: 40;
  display: grid;
  justify-items: center;
  gap: 16px;
  transform: translateY(-50%);
}

.quick-dock-items {
  display: grid;
  gap: 9px;
  max-height: 380px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.45s ease, opacity 0.3s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-dock-button {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: white;
  background: rgba(204, 70, 88, 0.9);
  box-shadow: 0 10px 25px rgba(86, 37, 44, 0.24);
  backdrop-filter: blur(12px);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.quick-dock-button[hidden] {
  display: none !important;
}

.music-prompt {
  position: fixed;
  z-index: 120;
  right: clamp(16px, 4vw, 42px);
  bottom: clamp(18px, 5vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: min(520px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid rgba(185, 142, 70, 0.28);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 245, 238, 0.9)),
    radial-gradient(circle at 12% 10%, rgba(207, 93, 113, 0.18), transparent 38%);
  box-shadow: 0 22px 50px rgba(72, 50, 35, 0.2);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.music-prompt.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.music-prompt strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  line-height: 1.05;
}

.music-prompt p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.music-prompt .button {
  min-height: 46px;
  white-space: nowrap;
}

.music-prompt .button svg {
  width: 18px;
  height: 18px;
}

.quick-dock-button:hover,
.quick-dock-button:focus-visible {
  background: rgba(174, 74, 83, 0.96);
  box-shadow: 0 14px 30px rgba(86, 37, 44, 0.34);
  transform: translateX(-4px) scale(1.06);
  outline: none;
}

.quick-dock-button svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.quick-dock-toggle {
  width: 52px;
  height: 52px;
  border: 4px solid rgba(255, 220, 224, 0.9);
  background: rgba(204, 70, 88, 0.96);
}

.quick-dock.is-collapsed .quick-dock-items {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px) scale(0.84);
}

.music-toggle.is-playing::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid rgba(204, 70, 88, 0.42);
  border-radius: 50%;
  animation: music-pulse 1.8s ease-out infinite;
}

.music-toggle.is-awaiting-play {
  animation: music-waiting 1.4s ease-in-out infinite alternate;
}

@keyframes music-pulse {
  from { opacity: 0.8; transform: scale(0.86); }
  to { opacity: 0; transform: scale(1.38); }
}

@keyframes music-waiting {
  from { box-shadow: 0 8px 20px rgba(86, 37, 44, 0.22); }
  to { box-shadow: 0 8px 28px rgba(204, 70, 88, 0.58); }
}

@media (max-width: 720px) {
  .quick-dock {
    right: 14px;
  }

  .quick-dock-button {
    width: 43px;
    height: 43px;
  }

  .quick-dock-toggle {
    width: 48px;
    height: 48px;
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .music-toggle.is-playing::after,
  .music-toggle.is-awaiting-play {
    animation: none;
  }
}

/* Final desktop compaction overrides live last to win over form base styles. */
@media (min-width: 901px) and (min-height: 700px) {
  .details-section .program-panel {
    min-height: 98px;
    padding: 8px 14px;
  }

  .rsvp-section,
  .message-section {
    padding-block: 62px 12px;
  }

  .rsvp-section .rsvp-shell {
    padding: 18px 22px;
  }

  .rsvp-section .rsvp-shell h2 {
    font-size: clamp(2.2rem, 4vw, 3.35rem);
  }

  .rsvp-section .form {
    gap: 8px;
  }

  .rsvp-section .form label {
    gap: 4px;
    font-size: 0.82rem;
  }

  .rsvp-section input,
  .rsvp-section textarea {
    padding: 9px 12px;
  }

  .rsvp-section textarea {
    min-height: 48px;
  }

  .rsvp-section .segmented span {
    min-height: 38px;
  }

  .rsvp-section .form-status {
    min-height: 18px;
    font-size: 0.78rem;
  }

  .message-section {
    gap: 10px;
  }

  .message-section .message-layout {
    padding: 20px 24px;
  }
}

/* Release overrides must remain last in the cascade. */
.wedding-pups {
  padding: 6px 12px 14px;
  overflow: visible;
}

.wedding-pups > img {
  width: 92%;
  height: 88%;
  object-position: center center;
}

@keyframes puppy-vignette-breathe {
  0%, 100% { transform: translateY(-1px) scale(0.955); }
  50% { transform: translateY(-4px) scale(0.975); }
}

@media (max-width: 900px) {
  .quick-dock-items {
    gap: 7px;
    max-height: 420px;
  }

  .wedding-pups {
    padding: 4px 18px 16px;
  }

  .wedding-pups > img {
    width: 88%;
    height: 84%;
  }
}

@media (min-width: 901px) {
  .details-feature {
    overflow: visible;
  }

  .wedding-pups {
    bottom: clamp(18px, 2.2vw, 34px);
    width: clamp(280px, 24vw, 390px);
    height: clamp(126px, 11vw, 178px);
    padding: 8px 18px 24px;
  }

  .wedding-pups > img {
    width: 100%;
    height: 100%;
    object-position: center bottom;
  }
}

.map-ornament {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(118px, 14vw, 190px);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 250, 246, 0.96) 0 38%, rgba(255, 236, 232, 0.52) 39% 58%, transparent 59%),
    conic-gradient(from 140deg, rgba(185, 142, 70, 0.18), rgba(242, 163, 154, 0.22), rgba(125, 151, 132, 0.16), rgba(185, 142, 70, 0.18));
  box-shadow:
    0 18px 42px rgba(80, 52, 45, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.map-ornament-ring {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(185, 142, 70, 0.42);
  border-radius: 50%;
}

.map-ornament-ring::before,
.map-ornament-ring::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 142, 70, 0.58));
}

.map-ornament-ring::before {
  right: 100%;
}

.map-ornament-ring::after {
  left: 100%;
  transform: rotate(180deg);
}

.map-ornament-heart,
.map-ornament-heart::before,
.map-ornament-heart::after {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #c97982;
}

.map-ornament-heart {
  transform: rotate(45deg);
  animation: map-heart-glow 2.8s ease-in-out infinite;
}

.map-ornament-heart::before,
.map-ornament-heart::after {
  content: "";
  border-radius: 50%;
}

.map-ornament-heart::before {
  left: -9px;
}

.map-ornament-heart::after {
  top: -9px;
}

.map-ornament-leaf {
  position: absolute;
  width: 48px;
  height: 20px;
  border-top: 1px solid rgba(83, 116, 93, 0.5);
}

.map-ornament-leaf::before,
.map-ornament-leaf::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 16px;
  height: 10px;
  border: 1px solid rgba(83, 116, 93, 0.34);
  border-left: 0;
  border-radius: 50% 0 50% 0;
  transform: rotate(-25deg);
}

.map-ornament-leaf::before {
  left: 9px;
}

.map-ornament-leaf::after {
  left: 28px;
}

.map-ornament-leaf-left {
  left: 10%;
  bottom: 20%;
  transform: rotate(-28deg);
}

.map-ornament-leaf-right {
  right: 10%;
  top: 22%;
  transform: rotate(152deg);
}

@keyframes map-heart-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(201, 121, 130, 0)); transform: rotate(45deg) scale(0.96); }
  50% { filter: drop-shadow(0 0 14px rgba(201, 121, 130, 0.32)); transform: rotate(45deg) scale(1.06); }
}

@media (max-width: 900px) {
  .map-ornament {
    width: min(138px, 46vw);
    margin-block: 2px 6px;
  }
}

/* Large-screen corrections remain last so compact laptop rules cannot override them. */
@media (min-width: 1900px) and (min-height: 900px) {
  .topbar.is-scrolled {
    padding-block: 12px;
  }

  .quick-dock-button {
    width: 54px;
    height: 54px;
  }

  .quick-dock-toggle {
    width: 60px;
    height: 60px;
  }

  .quick-dock-button svg {
    width: 24px;
    height: 24px;
  }

  .details-section .program-panel {
    min-height: 126px;
    padding: 14px 22px;
  }

  .gallery {
    grid-auto-rows: 130px;
    gap: 20px;
  }

  .rsvp-shell,
  .message-layout,
  .bank-transfer-list {
    max-width: 1380px;
  }

  .rsvp-section .rsvp-shell,
  .message-section .message-layout {
    padding: 36px 42px;
  }

  .rsvp-section .form,
  .message-section .form {
    gap: 14px;
  }

  .rsvp-section input,
  .rsvp-section textarea,
  .message-section input,
  .message-section textarea {
    padding: 13px 15px;
    font-size: 1rem;
  }
}

/* Final guestbook layout wins over the older editorial section rules. */
@media (min-width: 901px) {
  .message-section {
    display: grid;
    grid-template-columns: minmax(390px, 0.82fr) minmax(590px, 1.38fr);
    grid-template-rows: 1fr auto;
    gap: 12px clamp(24px, 4vw, 64px);
    align-items: center;
    min-height: 100svh;
  }

  .message-section .message-layout {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
    margin: 0;
    padding: 18px 20px;
  }

  .message-section .message-layout h2 {
    font-size: clamp(2.65rem, 4vw, 3.55rem);
    line-height: 0.94;
  }

  .message-section .message-form {
    gap: 9px;
    padding: 16px;
  }

  .message-section .message-form label { gap: 4px; }
  .message-section .message-form input,
  .message-section .message-form textarea { padding: 9px 11px; }
  .message-section .message-form textarea { min-height: 68px; }
  .message-section .message-form .button { min-height: 42px; }
  .message-section .message-form .form-status { min-height: 16px; }

  .message-section .message-admin-actions {
    grid-column: 1;
    grid-row: 2;
  }

  .message-section .guestbook-stage {
    grid-column: 2;
    grid-row: 1 / 3;
    display: grid;
    min-height: 560px;
  }
}

@media (max-width: 900px) {
  .message-section { display: block; min-height: auto; }
  .message-section .message-layout { grid-template-columns: 1fr; }
  .message-section .guestbook-stage { display: grid; }
}

/* Final dock geometry: the toggle and scrollable icons never share a row. */
.quick-dock {
  top: max(76px, env(safe-area-inset-top));
  bottom: max(14px, env(safe-area-inset-bottom));
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: end;
  gap: 14px;
  transform: none;
}

.quick-dock-items {
  align-self: end;
  min-height: 0;
  max-height: 100%;
  padding: 5px 4px;
  overflow-x: visible;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.quick-dock-items::-webkit-scrollbar { display: none; }

.quick-dock-toggle {
  position: relative;
  z-index: 2;
  margin: 0;
  flex: none;
}

.quick-dock.is-collapsed .quick-dock-items {
  align-self: end;
  max-height: 0;
  padding-block: 0;
}

@media (max-height: 520px) {
  .quick-dock {
    top: max(66px, env(safe-area-inset-top));
    bottom: max(8px, env(safe-area-inset-bottom));
    gap: 10px;
  }

  .quick-dock-button { width: 40px; height: 40px; }
  .quick-dock-toggle { width: 44px; height: 44px; }
}

/* Final form polish: softer RSVP and wish entry frames. */
.rsvp-section .rsvp-shell,
.message-section .message-layout {
  border: 1px solid rgba(192, 145, 91, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 248, 241, 0.62)),
    radial-gradient(circle at 12% 16%, rgba(232, 180, 116, 0.18), transparent 32%),
    radial-gradient(circle at 92% 84%, rgba(184, 95, 102, 0.14), transparent 30%);
  box-shadow:
    0 24px 70px rgba(70, 46, 36, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.08);
}

.rsvp-section .rsvp-shell::before,
.message-section .message-layout::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px solid rgba(192, 145, 91, 0.16);
  border-radius: 14px;
  pointer-events: none;
}

.message-section .message-layout {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.rsvp-section .form,
.message-section .message-form {
  border: 1px solid rgba(184, 95, 102, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.72), rgba(255, 245, 240, 0.48)),
    repeating-linear-gradient(to bottom, transparent 0 34px, rgba(185, 142, 70, 0.055) 34px 35px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 12px 34px rgba(83, 57, 45, 0.08);
}

.rsvp-section input,
.rsvp-section textarea,
.message-section input,
.message-section textarea {
  border: 1px solid rgba(185, 142, 70, 0.24);
  border-radius: 13px;
  background: rgba(255, 253, 249, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.rsvp-section input:focus,
.rsvp-section textarea:focus,
.message-section input:focus,
.message-section textarea:focus {
  border-color: rgba(184, 95, 102, 0.5);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(184, 95, 102, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.rsvp-section .segmented {
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(185, 142, 70, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.62);
}

.rsvp-section .segmented span {
  border-radius: 999px;
  background: transparent;
}

.rsvp-section .segmented input:checked + span {
  background: linear-gradient(135deg, rgba(184, 95, 102, 0.94), rgba(202, 139, 112, 0.9));
  box-shadow: 0 10px 24px rgba(184, 95, 102, 0.22);
}

.rsvp-section .button.primary.full,
.message-section .button.primary.full {
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(184, 95, 102, 0.24);
}

/* Final header polish: glass, monogram, and hand-drawn navigation details. */
.topbar {
  top: 10px;
  right: clamp(10px, 2.4vw, 30px);
  left: clamp(10px, 2.4vw, 30px);
  grid-template-columns: minmax(118px, auto) minmax(0, 1fr) auto;
  gap: clamp(12px, 2.2vw, 30px);
  padding: 10px clamp(12px, 2.6vw, 28px);
  border: 1px solid rgba(185, 142, 70, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 239, 0.52)),
    radial-gradient(circle at 8% 20%, rgba(232, 180, 116, 0.18), transparent 32%);
  box-shadow: 0 18px 44px rgba(54, 38, 32, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px) saturate(1.12);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: inherit;
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  right: clamp(84px, 12vw, 170px);
  bottom: -8px;
  left: clamp(84px, 12vw, 170px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 142, 70, 0.42), rgba(184, 95, 102, 0.22), transparent);
  pointer-events: none;
}

.topbar.is-scrolled {
  top: 8px;
  padding-block: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 241, 0.68)),
    radial-gradient(circle at 8% 20%, rgba(232, 180, 116, 0.18), transparent 32%);
  box-shadow: 0 14px 34px rgba(54, 38, 32, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.brand {
  position: relative;
  display: inline-grid;
  min-width: 74px;
  min-height: 46px;
  place-items: center;
  padding: 4px 18px 6px;
  border: 1px solid rgba(185, 142, 70, 0.24);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.68);
  color: var(--rose);
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.72rem, 2.7vw, 2.25rem);
  font-weight: 400;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 9px 22px rgba(184, 95, 102, 0.08);
}

.brand::before,
.brand::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px 999px 0 999px;
  background: rgba(184, 95, 102, 0.42);
  transform: translateY(-50%) rotate(45deg);
}

.brand::before { left: 8px; }
.brand::after { right: 8px; transform: translateY(-50%) rotate(-135deg); }

.nav {
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.8vw, 18px);
  min-width: 0;
}

.nav a {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 7px 12px 8px;
  border-radius: 999px;
  color: rgba(44, 37, 35, 0.78);
  font-size: 0.84rem;
  font-weight: 850;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.nav a::before {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(184, 95, 102, 0.42);
  font-size: 0.58rem;
  opacity: 0;
  transform: translate(-50%, -120%) scale(0.6);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.nav a::after {
  right: 14px;
  bottom: 6px;
  left: 14px;
  height: 6px;
  border-bottom: 2px solid rgba(184, 95, 102, 0.52);
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  transform: scaleX(0.45) rotate(-1deg);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.is-active {
  color: var(--rose);
  background: rgba(255, 246, 241, 0.72);
  transform: translateY(-1px);
}

.nav a:hover::before,
.nav a:focus-visible::before,
.nav a.is-active::before {
  opacity: 1;
  transform: translate(-50%, -165%) scale(1);
}

.nav a:hover::after,
.nav a:focus-visible::after,
.nav a.is-active::after {
  right: 14px;
  left: 14px;
  opacity: 1;
  transform: scaleX(1) rotate(-1deg);
}

.language-switch {
  border-color: rgba(185, 142, 70, 0.22);
  background: rgba(255, 253, 249, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.language-switch .lang-button {
  padding: 7px 10px;
}

@media (max-width: 900px) {
  .topbar {
    top: 8px;
    grid-template-columns: auto auto;
    align-items: center;
    border-radius: 22px;
    padding: 9px 10px;
  }

  .brand {
    min-height: 40px;
    padding-inline: 16px;
    font-size: 1.7rem;
  }

  .nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 100%;
    padding: 4px 2px 1px;
    overflow: visible;
    scrollbar-width: none;
  }

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

  .nav a {
    flex: 0 1 auto;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 0.74rem;
    background: rgba(255, 253, 249, 0.46);
  }

  .language-switch {
    justify-self: end;
  }
}

@media (max-width: 430px) {
  .topbar {
    right: max(6px, env(safe-area-inset-right));
    left: max(6px, env(safe-area-inset-left));
    padding: 8px 7px;
  }

  .nav {
    gap: 4px;
    padding-inline: 0;
  }

  .nav a {
    min-height: 30px;
    padding: 5px 6px;
    font-size: 0.68rem;
    letter-spacing: 0;
  }
}

@media (max-width: 420px) {
  .topbar {
    right: max(6px, env(safe-area-inset-right));
    left: max(6px, env(safe-area-inset-left));
  }

  .language-switch .lang-button {
    padding: 6px 8px;
    font-size: 0.76rem;
  }
}

/* Final RSVP spacing polish: labels breathe away from their fields. */
.rsvp-section .form {
  gap: 18px;
  padding: clamp(20px, 3vw, 30px);
}

.rsvp-section .rsvp-shell {
  overflow: hidden;
}

.rsvp-section .rsvp-shell::before,
.rsvp-section .rsvp-shell::after {
  display: none;
}

.rsvp-section .rsvp-shell > * {
  position: relative;
  z-index: 1;
}

.rsvp-section .rsvp-shell > div:first-child {
  position: relative;
  min-height: 160px;
  padding-top: 28px;
}

.rsvp-section .rsvp-monogram {
  position: absolute;
  z-index: -1;
  top: 4px;
  left: 0;
  margin: 0;
  color: rgba(184, 95, 102, 0.11);
  font-size: clamp(5.8rem, 10vw, 9rem);
  line-height: 0.75;
  pointer-events: none;
}

.rsvp-section .form label {
  gap: 10px;
}

.rsvp-section .form label > span {
  padding-left: 2px;
  color: rgba(92, 76, 68, 0.86);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.rsvp-section input,
.rsvp-section textarea {
  padding: 14px 16px;
}

.rsvp-section .segmented {
  margin-block: 2px;
}

@media (max-width: 560px) {
  .rsvp-section .form {
    gap: 15px;
    padding: 18px;
  }

  .rsvp-section .form label {
    gap: 8px;
  }

  .rsvp-section input,
  .rsvp-section textarea {
    padding: 12px 14px;
  }

  .rsvp-section .rsvp-shell > div:first-child {
    min-height: 118px;
    padding-top: 22px;
  }

  .rsvp-section .rsvp-monogram {
    top: 0;
    font-size: 5.4rem;
  }
}

/* Final typography polish: clearer section hierarchy across the invitation. */
.section-heading {
  color: #322724;
}

.section-heading .eyebrow,
.rsvp-section .eyebrow,
.program-panel .eyebrow,
.wish-studio-controls .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto 14px;
  padding: 6px 12px;
  border: 1px solid rgba(185, 142, 70, 0.24);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.62);
  color: #9a6f34;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.section-heading .eyebrow::before,
.section-heading .eyebrow::after,
.rsvp-section .eyebrow::before,
.rsvp-section .eyebrow::after,
.program-panel .eyebrow::before,
.program-panel .eyebrow::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px 999px 0 999px;
  background: rgba(184, 95, 102, 0.44);
  transform: rotate(45deg);
}

.section-heading .eyebrow::after,
.rsvp-section .eyebrow::after,
.program-panel .eyebrow::after {
  transform: rotate(-135deg);
}

.section-heading h2,
.rsvp-shell h2,
.message-layout h2,
.program-panel h3,
.wish-studio-controls h2 {
  color: #34241f;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.58);
}

.section-heading p:not(.eyebrow),
.rsvp-shell > div:first-child > p:not(.eyebrow),
.message-layout .section-heading p:not(.eyebrow),
.gift-section .section-heading p:not(.eyebrow),
.gallery-section .section-heading p:not(.eyebrow) {
  max-width: 680px;
  margin-inline: auto;
  color: rgba(58, 45, 39, 0.82);
  font-size: clamp(0.98rem, 1.35vw, 1.14rem);
  font-weight: 600;
  line-height: 1.72;
  text-wrap: pretty;
}

.story-section .section-heading {
  position: relative;
  isolation: isolate;
  max-width: 660px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(185, 142, 70, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.7), rgba(255, 245, 239, 0.46));
  box-shadow: 0 18px 48px rgba(58, 37, 31, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(10px) saturate(1.05);
}

.story-section .story-monogram {
  position: absolute;
  z-index: -1;
  top: 8px;
  left: clamp(16px, 4vw, 34px);
  margin: 0;
  color: rgba(184, 95, 102, 0.09);
  font-size: clamp(5.4rem, 9vw, 8.4rem);
  pointer-events: none;
}

.story-section .section-heading .eyebrow {
  margin-inline: 0;
  color: #8d642c;
}

.story-section .section-heading h2 {
  color: #38241f;
  font-size: clamp(1.72rem, 2.55vw, 2.55rem);
  line-height: 1.04;
}

.story-section .section-heading > p:not(.eyebrow) {
  margin-top: 18px;
  color: rgba(47, 36, 31, 0.86);
  font-size: clamp(1rem, 1.28vw, 1.13rem);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.78;
}

.details-section .section-heading,
.gallery-section .section-heading,
.gift-section .section-heading {
  padding-inline: clamp(10px, 3vw, 28px);
}

.message-section .section-heading .eyebrow {
  margin-inline: 0;
}

.message-section h2,
.message-section .section-heading p:not(.eyebrow) {
  color: #fffaf5;
  text-shadow: 0 2px 16px rgba(35, 24, 22, 0.28);
}

.message-section .section-heading p:not(.eyebrow) {
  color: rgba(255, 250, 245, 0.86);
}

.rsvp-shell > div:first-child > p:not(.eyebrow) {
  margin-top: 16px;
  max-width: 440px;
}

@media (min-width: 901px) {
  .story-section .section-heading {
    text-align: left;
  }

  .details-section .section-heading .eyebrow,
  .gallery-section .section-heading .eyebrow,
  .gift-section .section-heading .eyebrow {
    margin-inline: auto;
  }
}

@media (max-width: 900px) {
  .story-section .section-heading {
    text-align: center;
  }

  .story-section .section-heading .eyebrow {
    margin-inline: auto;
  }
}

@media (max-width: 560px) {
  .bank-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
    text-align: center;
  }

  .bank-qr {
    width: min(100%, 260px);
    margin-inline: auto;
  }

  .bank-details {
    justify-items: center;
    padding: 0 4px 6px;
  }

  .bank-details h3,
  .bank-card-hint {
    max-width: 24ch;
  }

  .gift-reminder-link {
    font-size: 0.78rem;
  }

  .section-heading .eyebrow,
  .rsvp-section .eyebrow,
  .program-panel .eyebrow {
    padding: 5px 10px;
    font-size: 0.66rem;
  }

  .story-section .section-heading {
    padding: 18px 16px;
  }

  .story-section .section-heading h2 {
    font-size: clamp(1.85rem, 9vw, 2.55rem);
  }

  .section-heading p:not(.eyebrow),
  .story-section .section-heading > p:not(.eyebrow) {
    font-size: 0.96rem;
    line-height: 1.66;
  }
}

@media (min-width: 901px) and (min-height: 700px) {
  .story-section .section-heading {
    padding: 22px 20px;
  }

  .story-section .section-heading h2 {
    font-size: clamp(1.68rem, 2.15vw, 2.38rem);
    line-height: 1.06;
  }

  .story-section .section-heading > p:not(.eyebrow) {
    margin-top: 14px;
    font-size: 0.96rem;
    line-height: 1.68;
  }
}

.details-section .section-heading,
.gift-section .section-heading,
.gallery-section .section-heading {
  border-radius: 18px;
  border: 1px solid rgba(255, 250, 245, 0.34);
  background:
    linear-gradient(135deg, rgba(47, 36, 32, 0.46), rgba(119, 76, 70, 0.24)),
    rgba(255, 250, 245, 0.12);
  box-shadow: 0 18px 48px rgba(42, 30, 26, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px) saturate(1.02);
}

.details-section .section-heading h2,
.gallery-section .section-heading h2,
.gift-section .section-heading h2 {
  color: #fffdf8;
  text-shadow: 0 3px 18px rgba(28, 19, 16, 0.58), 0 1px 2px rgba(28, 19, 16, 0.44);
}

.details-section .section-heading p:not(.eyebrow),
.gallery-section .section-heading p:not(.eyebrow),
.gift-section .section-heading p:not(.eyebrow) {
  color: rgba(255, 250, 245, 0.88);
  text-shadow: 0 2px 12px rgba(36, 25, 22, 0.26);
}

.gift-section .section-heading,
.gallery-section .section-heading {
  padding-block: 12px 18px;
}

.gift-section .section-heading {
  background:
    linear-gradient(135deg, rgba(83, 54, 46, 0.52), rgba(128, 77, 78, 0.28)),
    rgba(255, 247, 238, 0.12);
}

.gift-section .section-heading h2 {
  font-size: clamp(2.35rem, 5vw, 3.7rem);
}

/* Final guestbook/message polish: align the entry panel with the editorial cover. */
.message-section .message-layout {
  border-color: rgba(190, 151, 101, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 250, 246, 0.9), transparent 28%),
    radial-gradient(circle at 86% 84%, rgba(242, 163, 154, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(255, 253, 249, 0.86), rgba(255, 244, 239, 0.7));
  box-shadow:
    0 28px 76px rgba(80, 52, 45, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    inset 0 0 0 8px rgba(193, 156, 111, 0.08);
}

.message-section .message-layout::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 58px;
  height: 42px;
  border-right: 1px solid rgba(184, 95, 102, 0.2);
  border-bottom: 1px solid rgba(184, 95, 102, 0.2);
  border-radius: 0 0 26px 0;
  opacity: 0.8;
  pointer-events: none;
}

.message-section .section-heading {
  position: relative;
  margin-bottom: 2px;
  padding: clamp(8px, 1.4vw, 14px) clamp(6px, 1.4vw, 16px) clamp(10px, 1.6vw, 18px);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.64), rgba(255, 246, 241, 0.38)),
    radial-gradient(circle at 0 0, rgba(242, 163, 154, 0.18), transparent 42%);
}

.message-section .section-heading::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(189, 167, 114, 0.16);
  border-radius: 12px;
  pointer-events: none;
}

.message-section .section-heading .eyebrow {
  margin: 0 0 11px;
  border-color: rgba(242, 163, 154, 0.34);
  background: rgba(255, 250, 246, 0.74);
  color: #a06e62;
}

.message-section h2 {
  max-width: 420px;
  margin: 0;
  color: #5a3835;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.38rem, 3.75vw, 3.34rem);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.message-section .section-heading p:not(.eyebrow) {
  max-width: 410px;
  margin: 14px 0 0;
  color: rgba(87, 65, 58, 0.82);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1rem, 1.24vw, 1.12rem);
  font-weight: 650;
  line-height: 1.58;
  text-shadow: none;
  text-wrap: pretty;
}

.message-section .message-form {
  border-color: rgba(242, 163, 154, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.78), rgba(255, 246, 241, 0.58)),
    repeating-linear-gradient(to bottom, transparent 0 32px, rgba(185, 142, 70, 0.045) 32px 33px);
}

.message-section .message-form label > span {
  color: rgba(87, 65, 58, 0.84);
}

.message-section .button.primary.full {
  background: linear-gradient(135deg, #b85f66, #d9968c);
}

.guestbook-closed-cover {
  width: min(56%, 520px);
  min-width: 330px;
}

@media (min-width: 901px) {
  .message-section {
    grid-template-columns: minmax(380px, 0.74fr) minmax(660px, 1.46fr);
  }

  .message-section .message-layout {
    padding: 22px 24px;
  }

  .message-section .guestbook-stage {
    min-height: 600px;
  }

  .guestbook-book {
    width: min(100%, 1040px);
  }
}

@media (max-width: 1100px) {
  .guestbook-closed-cover {
    width: min(54%, 470px);
    min-width: 310px;
  }
}

@media (max-width: 900px) {
  .message-section .message-layout {
    max-width: 680px;
    padding: 22px;
  }

  .message-section h2 {
    max-width: 560px;
    font-size: clamp(2.1rem, 8vw, 3.05rem);
  }

  .message-section .section-heading p:not(.eyebrow) {
    max-width: 560px;
  }

  .guestbook-closed-cover {
    width: min(90%, 470px);
  }
}

@media (max-width: 560px) {
  .message-section .message-layout {
    padding: 18px;
  }

  .message-section .section-heading {
    padding: 10px 10px 14px;
  }

  .message-section h2 {
    font-size: clamp(1.9rem, 10vw, 2.55rem);
    line-height: 1;
  }

  .message-section .section-heading p:not(.eyebrow) {
    margin-top: 12px;
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .guestbook-closed-cover {
    width: min(90%, 354px);
    min-width: 0;
  }
}

/* Final heading color sync: event, gallery, and gift headings match the guestbook palette. */
.details-section .section-heading,
.gallery-section .section-heading,
.gift-section .section-heading {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(190, 151, 101, 0.26);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 250, 246, 0.88), transparent 30%),
    radial-gradient(circle at 90% 86%, rgba(242, 163, 154, 0.24), transparent 36%),
    linear-gradient(135deg, rgba(255, 253, 249, 0.82), rgba(255, 244, 239, 0.64));
  box-shadow:
    0 24px 66px rgba(80, 52, 45, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    inset 0 0 0 8px rgba(193, 156, 111, 0.07);
  backdrop-filter: blur(14px) saturate(1.06);
}

.details-section .section-heading::before,
.gallery-section .section-heading::before,
.gift-section .section-heading::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border: 1px solid rgba(189, 167, 114, 0.16);
  border-radius: 14px;
  pointer-events: none;
}

.details-section .section-heading::after,
.gallery-section .section-heading::after,
.gift-section .section-heading::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 0;
  width: 58px;
  height: 36px;
  border-right: 1px solid rgba(184, 95, 102, 0.1);
  border-bottom: 1px solid rgba(184, 95, 102, 0.1);
  border-radius: 0 0 28px 0;
  opacity: 0.55;
  transform: none;
  pointer-events: none;
}

.details-section .section-heading > *,
.gallery-section .section-heading > *,
.gift-section .section-heading > * {
  position: relative;
  z-index: 1;
}

.gallery-section .section-heading::after {
  right: 24px;
  bottom: 10px;
  width: 42px;
  height: 24px;
  opacity: 0.42;
}

.details-section .section-heading .eyebrow,
.gallery-section .section-heading .eyebrow,
.gift-section .section-heading .eyebrow {
  border-color: rgba(242, 163, 154, 0.34);
  background: rgba(255, 250, 246, 0.74);
  color: #a06e62;
  text-shadow: none;
}

.details-section .section-heading h2,
.gallery-section .section-heading h2,
.gift-section .section-heading h2 {
  max-width: 760px;
  margin-inline: auto;
  color: #5a3835;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.32rem, 4.2vw, 3.5rem);
  font-weight: 700;
  line-height: 0.98;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  text-wrap: balance;
}

.details-section .section-heading p:not(.eyebrow),
.gallery-section .section-heading p:not(.eyebrow),
.gift-section .section-heading p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(87, 65, 58, 0.82);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1rem, 1.28vw, 1.14rem);
  font-weight: 650;
  line-height: 1.6;
  text-shadow: none;
}

.gift-section .section-heading {
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 250, 246, 0.9), transparent 30%),
    radial-gradient(circle at 88% 88%, rgba(242, 163, 154, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(255, 253, 249, 0.86), rgba(255, 244, 239, 0.68));
}

.gift-section .section-heading h2 {
  font-size: clamp(2.24rem, 4.8vw, 3.42rem);
}

.details-section .section-heading {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: clamp(150px, 18vw, 210px);
  padding-block: clamp(28px, 4.4vw, 48px);
  text-align: center;
}

.details-section .section-heading h2 {
  line-height: 1.08;
  transform: translateY(-2px);
}

@media (max-width: 560px) {
  .details-section .section-heading,
  .gallery-section .section-heading,
  .gift-section .section-heading {
    padding: 18px 16px;
  }

  .details-section .section-heading h2,
  .gallery-section .section-heading h2,
  .gift-section .section-heading h2 {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .details-section .section-heading p:not(.eyebrow),
  .gallery-section .section-heading p:not(.eyebrow),
  .gift-section .section-heading p:not(.eyebrow) {
    font-size: 0.96rem;
    line-height: 1.55;
  }
}

/* Compact music gesture hint for browsers that block autoplay until a real click/tap. */
.music-prompt {
  right: 72px;
  bottom: clamp(92px, 11vw, 124px);
  grid-template-columns: auto auto;
  gap: 7px;
  width: auto;
  max-width: calc(100vw - 112px);
  padding: 7px 8px 7px 11px;
  border-color: rgba(242, 163, 154, 0.24);
  border-radius: 999px;
  background:
    radial-gradient(circle at 12% 0, rgba(242, 163, 154, 0.14), transparent 36%),
    linear-gradient(135deg, rgba(255, 253, 249, 0.86), rgba(255, 244, 239, 0.76));
  box-shadow: 0 10px 24px rgba(80, 52, 45, 0.12);
}

.music-prompt span {
  color: #5a3835;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.music-prompt .button {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
}

.music-prompt .button svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 560px) {
  .music-prompt {
    right: 66px;
    bottom: 82px;
    max-width: calc(100vw - 96px);
  }

  .music-prompt span {
    max-width: 108px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Final gallery orientation lock: images 1-2 stay vertical, all later images stay horizontal. */
.gallery .gallery-frame {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.gallery .gallery-frame.is-portrait {
  grid-column: span 4;
  grid-row: span 6;
  aspect-ratio: 3 / 4;
}

.gallery > .gallery-photo.is-portrait {
  grid-column: span 4;
  grid-row: span 6;
  aspect-ratio: 3 / 4;
}

.gallery .gallery-frame.is-landscape {
  grid-column: span 4;
  grid-row: span 3;
  aspect-ratio: 16 / 10;
}

.gallery > .gallery-photo.is-landscape {
  grid-column: span 4;
  grid-row: span 3;
  aspect-ratio: 16 / 10;
}

.gallery .gallery-frame .gallery-photo {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery .gallery-frame.is-contain {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 250, 246, 0.82), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 242, 0.96), rgba(246, 229, 222, 0.82));
}

.gallery .gallery-frame.is-contain .gallery-photo {
  padding: 8px;
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 16px 28px rgba(61, 46, 40, 0.14));
}

.gallery .gallery-frame figcaption {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}

.gallery-lightbox img {
  max-width: min(92vw, 1280px);
  max-height: calc(92vh - 74px);
  object-fit: contain;
}

.gallery-lightbox img.is-portrait {
  width: auto;
  height: calc(92vh - 74px);
  max-width: 92vw;
}

@media (max-width: 900px) {
  .gallery .gallery-frame.is-portrait,
  .gallery > .gallery-photo.is-portrait {
    grid-column: span 3;
    grid-row: span 4;
  }

  .gallery .gallery-frame.is-landscape,
  .gallery > .gallery-photo.is-landscape {
    grid-column: span 6;
    grid-row: span 3;
  }
}

@media (max-width: 560px) {
  .gallery .gallery-frame.is-portrait,
  .gallery .gallery-frame.is-landscape,
  .gallery > .gallery-photo.is-portrait,
  .gallery > .gallery-photo.is-landscape {
    grid-column: 1;
    grid-row: auto;
  }

  .gallery .gallery-frame.is-portrait,
  .gallery > .gallery-photo.is-portrait {
    aspect-ratio: 3 / 4;
  }

  .gallery .gallery-frame.is-landscape,
  .gallery > .gallery-photo.is-landscape {
    aspect-ratio: 16 / 10;
  }
}

/* Keep vertical event background photos anchored to the top so heads are not cropped. */
.details-section.has-photo-backdrop {
  background-position: center center, center top;
}

/* Final premium gallery system: 4, 6, or 8 photo editorial layouts. */
.gallery {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: clamp(18px, 3vw, 34px);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(246, 238, 226, 0.72)),
    radial-gradient(circle at 88% 12%, rgba(185, 142, 70, 0.12), transparent 30%);
  box-shadow: 0 28px 80px rgba(75, 55, 47, 0.12);
}

.gallery-editorial-copy {
  z-index: 3;
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  color: #5a4138;
  text-align: left;
}

.gallery-editorial-copy span {
  color: rgba(146, 111, 66, 0.92);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gallery-editorial-copy strong {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.1rem, 4.4vw, 4.6rem);
  font-weight: 650;
  line-height: 0.94;
  text-wrap: balance;
}

.gallery-editorial-copy small {
  color: rgba(90, 65, 56, 0.72);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  font-weight: 700;
}

.gallery .gallery-frame {
  position: relative;
  display: grid;
  overflow: visible;
  min-width: 0;
  min-height: 0;
  padding: clamp(8px, 1vw, 13px);
  border: 1px solid rgba(190, 151, 101, 0.2);
  border-radius: 6px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 22px 52px rgba(67, 50, 43, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.64);
  transform: translateY(var(--gallery-y, 0)) rotate(var(--gallery-rotate, 0deg));
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.gallery .gallery-frame:hover,
.gallery .gallery-frame:focus-within {
  transform: translateY(calc(var(--gallery-y, 0) - 5px)) rotate(var(--gallery-rotate, 0deg));
  box-shadow: 0 30px 70px rgba(67, 50, 43, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.gallery .gallery-photo {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 3px;
  object-fit: contain;
  object-position: center center;
  background: linear-gradient(135deg, #fffdf8, #f3eadf);
  box-shadow: none;
  filter: none;
  transform: none;
}

.gallery .gallery-frame:hover img,
.gallery .gallery-frame:focus-within img,
.gallery .gallery-frame:nth-child(even):hover img {
  filter: none;
  transform: none;
}

.gallery .gallery-frame figcaption {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  justify-self: end;
  margin: 0;
  padding: 7px 9px;
  border-radius: 999px;
  color: rgba(90, 65, 56, 0.76);
  background: rgba(255, 253, 249, 0.74);
  box-shadow: 0 8px 22px rgba(67, 50, 43, 0.1);
  opacity: 0;
  transform: translateY(8px);
}

.gallery .gallery-frame:hover figcaption,
.gallery .gallery-frame:focus-within figcaption {
  opacity: 1;
  transform: translateY(0);
}

.gallery .gallery-frame figcaption b {
  display: none;
}

.gallery .gallery-frame figcaption span {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.gallery-layout-four {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(36px, 5.6vw));
  gap: clamp(14px, 2vw, 24px);
  align-items: stretch;
}

.gallery-layout-four .gallery-editorial-copy {
  grid-column: 8 / 13;
  grid-row: 1 / 4;
  padding-inline: clamp(4px, 1vw, 18px);
}

.gallery-layout-four .gallery-frame-1 { grid-column: 1 / 8; grid-row: 1 / 7; --gallery-rotate: -1.2deg; }
.gallery-layout-four .gallery-frame-2 { grid-column: 7 / 13; grid-row: 4 / 9; --gallery-y: 10px; --gallery-rotate: 1.4deg; }
.gallery-layout-four .gallery-frame-3 { grid-column: 2 / 6; grid-row: 6 / 9; --gallery-y: -4px; --gallery-rotate: 1deg; }
.gallery-layout-four .gallery-frame-4 { grid-column: 8 / 11; grid-row: 3 / 5; --gallery-rotate: -1deg; }

.gallery-layout-six {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(10, minmax(32px, 4.5vw));
  gap: clamp(12px, 1.6vw, 22px);
}

.gallery-layout-six .gallery-editorial-copy {
  grid-column: 5 / 9;
  grid-row: 4 / 7;
  justify-content: center;
  text-align: center;
}

.gallery-layout-six .gallery-frame-1 { grid-column: 1 / 5; grid-row: 1 / 6; --gallery-rotate: -1deg; }
.gallery-layout-six .gallery-frame-2 { grid-column: 5 / 9; grid-row: 1 / 4; --gallery-rotate: 0.8deg; }
.gallery-layout-six .gallery-frame-3 { grid-column: 9 / 13; grid-row: 1 / 6; --gallery-rotate: 1.1deg; }
.gallery-layout-six .gallery-frame-4 { grid-column: 1 / 4; grid-row: 6 / 11; --gallery-y: -8px; --gallery-rotate: 1.2deg; }
.gallery-layout-six .gallery-frame-5 { grid-column: 4 / 9; grid-row: 7 / 11; --gallery-rotate: -0.7deg; }
.gallery-layout-six .gallery-frame-6 { grid-column: 9 / 13; grid-row: 6 / 11; --gallery-y: -5px; --gallery-rotate: -1.1deg; }

.gallery-layout-eight {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  grid-template-rows: repeat(10, minmax(28px, 3.8vw));
  gap: clamp(10px, 1.2vw, 18px);
}

.gallery-layout-eight .gallery-editorial-copy {
  grid-column: 7 / 11;
  grid-row: 4 / 7;
  justify-content: center;
  text-align: center;
}

.gallery-layout-eight .gallery-frame-1 { grid-column: 1 / 5; grid-row: 1 / 6; --gallery-rotate: -0.7deg; }
.gallery-layout-eight .gallery-frame-2 { grid-column: 5 / 9; grid-row: 1 / 4; --gallery-rotate: 0.5deg; }
.gallery-layout-eight .gallery-frame-3 { grid-column: 9 / 13; grid-row: 1 / 4; --gallery-rotate: -0.4deg; }
.gallery-layout-eight .gallery-frame-4 { grid-column: 13 / 17; grid-row: 1 / 6; --gallery-rotate: 0.7deg; }
.gallery-layout-eight .gallery-frame-5 { grid-column: 1 / 5; grid-row: 6 / 11; --gallery-rotate: 0.8deg; }
.gallery-layout-eight .gallery-frame-6 { grid-column: 5 / 9; grid-row: 7 / 11; --gallery-rotate: -0.5deg; }
.gallery-layout-eight .gallery-frame-7 { grid-column: 9 / 13; grid-row: 7 / 11; --gallery-rotate: 0.5deg; }
.gallery-layout-eight .gallery-frame-8 { grid-column: 13 / 17; grid-row: 6 / 11; --gallery-rotate: -0.8deg; }

@media (max-width: 900px) {
  .gallery-layout-four,
  .gallery-layout-six,
  .gallery-layout-eight {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(72px, auto);
    gap: 14px;
  }

  .gallery-layout-four .gallery-editorial-copy,
  .gallery-layout-six .gallery-editorial-copy,
  .gallery-layout-eight .gallery-editorial-copy {
    grid-column: 1 / -1;
    grid-row: auto;
    padding-block: 10px;
    text-align: center;
  }

  .gallery-layout-four .gallery-frame,
  .gallery-layout-six .gallery-frame,
  .gallery-layout-eight .gallery-frame {
    grid-column: span 3;
    grid-row: span 3;
    aspect-ratio: 4 / 5;
    transform: none;
  }

  .gallery-layout-four .gallery-frame:nth-of-type(2n),
  .gallery-layout-six .gallery-frame:nth-of-type(2n),
  .gallery-layout-eight .gallery-frame:nth-of-type(2n) {
    aspect-ratio: 16 / 11;
  }
}

@media (max-width: 560px) {
  .gallery {
    padding: 14px;
  }

  .gallery-layout-four,
  .gallery-layout-six,
  .gallery-layout-eight {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-layout-four .gallery-frame,
  .gallery-layout-six .gallery-frame,
  .gallery-layout-eight .gallery-frame {
    grid-column: 1;
    grid-row: auto;
    aspect-ratio: 4 / 5;
    padding: 9px;
  }

  .gallery-layout-four .gallery-frame:nth-of-type(2n),
  .gallery-layout-six .gallery-frame:nth-of-type(2n),
  .gallery-layout-eight .gallery-frame:nth-of-type(2n) {
    aspect-ratio: 16 / 11;
  }

  .gallery .gallery-frame figcaption {
    opacity: 1;
    transform: none;
  }
}

/* Hard lock for premium gallery: never crop wedding photos. */
.gallery.gallery-layout-four .gallery-photo,
.gallery.gallery-layout-six .gallery-photo,
.gallery.gallery-layout-eight .gallery-photo {
  object-fit: contain !important;
  object-position: center center !important;
}

/* Gallery polish: handwritten title, larger fourth photo, lighter scroll cost. */
.gallery-editorial-copy strong {
  font-family: "Dancing Script", "Great Vibes", cursive;
  font-size: clamp(2.65rem, 5.2vw, 5.4rem);
  font-weight: 700;
  line-height: 0.98;
  color: #70473f;
}

.gallery-layout-four .gallery-frame-4 {
  grid-column: 8 / 12;
  grid-row: 2 / 5;
}

.gallery .gallery-frame {
  box-shadow: 0 14px 34px rgba(67, 50, 43, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transition: transform 0.25s ease;
  will-change: auto;
}

.gallery .gallery-frame:hover,
.gallery .gallery-frame:focus-within {
  box-shadow: 0 16px 38px rgba(67, 50, 43, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.66);
}

.gallery .gallery-frame figcaption {
  box-shadow: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery .gallery-photo,
.gallery .gallery-frame.is-contain .gallery-photo {
  filter: none !important;
}

@media (max-width: 900px) {
  .gallery-editorial-copy strong {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .gallery-layout-four .gallery-frame-4 {
    grid-column: span 3;
    grid-row: span 3;
  }
}

/* Keep the album title readable and away from photo 4. */
.gallery-layout-four .gallery-editorial-copy {
  grid-column: 8 / 13;
  grid-row: 1 / 3;
  align-self: start;
  max-width: 440px;
  padding-top: 4px;
}

.gallery-layout-four .gallery-editorial-copy strong {
  font-size: clamp(2.35rem, 4.25vw, 4.35rem);
  line-height: 0.9;
  max-width: 100%;
}

.gallery-layout-four .gallery-frame-4 {
  grid-column: 8 / 12;
  grid-row: 4 / 7;
  z-index: 1;
}

@media (max-width: 900px) {
  .gallery-layout-four .gallery-editorial-copy {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: center;
    max-width: min(100%, 520px);
  }

  .gallery-layout-four .gallery-editorial-copy strong {
    font-size: clamp(2.25rem, 9vw, 3.7rem);
    line-height: 0.98;
  }

  .gallery-layout-four .gallery-frame-4 {
    grid-column: span 3;
    grid-row: span 3;
  }
}

/* Prevent photo 4 from covering photo 3 faces in the 4-photo layout. */
.gallery-layout-four .gallery-frame-3 {
  grid-column: 2 / 6;
  grid-row: 7 / 9;
  --gallery-y: 0px;
  --gallery-rotate: 0.4deg;
  z-index: 1;
}

.gallery-layout-four .gallery-frame-4 {
  grid-column: 8 / 12;
  grid-row: 4 / 6;
  --gallery-y: 0px;
  --gallery-rotate: -0.4deg;
  z-index: 1;
}

@media (max-width: 900px) {
  .gallery-layout-four .gallery-frame-3,
  .gallery-layout-four .gallery-frame-4 {
    grid-column: span 3;
    grid-row: span 3;
    --gallery-y: 0px;
    --gallery-rotate: 0deg;
  }
}

/* Balanced 4-photo gallery: title outside photo area, photos separated clearly. */
.gallery-layout-four {
  grid-template-rows: minmax(96px, auto) repeat(7, minmax(36px, 5.1vw));
}

.gallery-layout-four .gallery-editorial-copy {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  max-width: min(92%, 780px);
  padding: 0 0 clamp(8px, 1.4vw, 16px);
  text-align: center;
}

.gallery-layout-four .gallery-editorial-copy strong {
  font-size: clamp(2.45rem, 4.8vw, 4.9rem);
  line-height: 0.96;
}

.gallery-layout-four .gallery-frame-1 {
  grid-column: 1 / 7;
  grid-row: 2 / 7;
  --gallery-y: 0px;
  --gallery-rotate: -0.8deg;
}

.gallery-layout-four .gallery-frame-2 {
  grid-column: 7 / 13;
  grid-row: 2 / 7;
  --gallery-y: 0px;
  --gallery-rotate: 0.8deg;
}

.gallery-layout-four .gallery-frame-3 {
  grid-column: 1 / 7;
  grid-row: 7 / 10;
  --gallery-y: 0px;
  --gallery-rotate: 0.6deg;
  z-index: 1;
}

.gallery-layout-four .gallery-frame-4 {
  grid-column: 7 / 13;
  grid-row: 7 / 10;
  --gallery-y: 0px;
  --gallery-rotate: -0.6deg;
  z-index: 1;
}

@media (max-width: 900px) {
  .gallery-layout-four {
    grid-template-rows: auto;
  }

  .gallery-layout-four .gallery-editorial-copy {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .gallery-layout-four .gallery-frame-1,
  .gallery-layout-four .gallery-frame-2,
  .gallery-layout-four .gallery-frame-3,
  .gallery-layout-four .gallery-frame-4 {
    grid-column: span 3;
    grid-row: span 3;
    --gallery-y: 0px;
  }
}

/* Editorial lookbook version for 4-photo gallery: distinctive without overlapping photos. */
.gallery-layout-four {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: minmax(96px, auto) repeat(8, minmax(34px, 4.2vw));
  gap: clamp(12px, 1.55vw, 22px);
  align-items: stretch;
}

.gallery-layout-four .gallery-editorial-copy {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
  max-width: 760px;
  padding: 0 0 4px;
  text-align: left;
}

.gallery-layout-four .gallery-editorial-copy span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.gallery-layout-four .gallery-editorial-copy span::after {
  content: "";
  display: inline-block;
  width: min(120px, 18vw);
  height: 1px;
  background: rgba(146, 111, 66, 0.42);
}

.gallery-layout-four .gallery-editorial-copy strong {
  font-size: clamp(2.55rem, 4.6vw, 4.8rem);
  line-height: 0.94;
}

.gallery-layout-four .gallery-frame-1 {
  grid-column: 1 / 7;
  grid-row: 2 / 6;
  --gallery-y: 0px;
  --gallery-rotate: -0.7deg;
}

.gallery-layout-four .gallery-frame-2 {
  grid-column: 7 / 13;
  grid-row: 2 / 6;
  --gallery-y: 0px;
  --gallery-rotate: 0.8deg;
}

.gallery-layout-four .gallery-frame-3 {
  grid-column: 1 / 7;
  grid-row: 6 / 10;
  --gallery-y: 0px;
  --gallery-rotate: -0.5deg;
}

.gallery-layout-four .gallery-frame-4 {
  grid-column: 7 / 13;
  grid-row: 6 / 10;
  --gallery-y: 0px;
  --gallery-rotate: 0.6deg;
}

.gallery-layout-four .gallery-frame-1::before,
.gallery-layout-four .gallery-frame-2::before,
.gallery-layout-four .gallery-frame-3::before,
.gallery-layout-four .gallery-frame-4::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border: 1px solid rgba(190, 151, 101, 0.16);
  border-radius: 8px;
}

@media (max-width: 900px) {
  .gallery-layout-four {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .gallery-layout-four .gallery-editorial-copy {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: center;
    text-align: center;
  }

  .gallery-layout-four .gallery-editorial-copy span::after {
    display: none;
  }

  .gallery-layout-four .gallery-frame-1,
  .gallery-layout-four .gallery-frame-2,
  .gallery-layout-four .gallery-frame-3,
  .gallery-layout-four .gallery-frame-4 {
    grid-column: span 3;
    grid-row: span 3;
    --gallery-y: 0px;
  }
}

/* Zoom-safe event details: let content grow naturally instead of being clipped. */
.details-section {
  overflow: visible;
  min-height: auto;
  padding-bottom: clamp(34px, 5vw, 72px);
}

.details-section .section-heading {
  min-height: auto;
  margin-bottom: clamp(14px, 2.2vw, 24px);
  padding-block: clamp(22px, 3.2vw, 42px);
}

.details-feature,
.details-grid,
.program-panel {
  width: min(1080px, calc(100% - clamp(24px, 6vw, 72px)));
}

.details-feature {
  align-items: center;
  min-height: auto;
  margin-top: 0;
  padding: clamp(22px, 3vw, 34px);
}

.details-feature strong {
  font-size: clamp(2.15rem, 4.6vw, 4rem);
}

.details-feature p,
.detail-card p,
.detail-card small,
.program-item span {
  overflow-wrap: anywhere;
}

.details-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  align-items: stretch;
  gap: clamp(12px, 1.6vw, 18px);
}

.detail-card {
  min-height: auto;
  padding: clamp(18px, 2.3vw, 28px);
}

.program-panel {
  grid-template-columns: minmax(240px, 0.3fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 2.2vw, 28px);
  overflow: visible;
}

.details-section .program-panel {
  min-height: 138px;
  padding: clamp(16px, 1.9vw, 22px) clamp(18px, 2.4vw, 28px);
}

.program-panel > div:first-child {
  display: grid;
  align-content: center;
  min-width: 0;
}

.program-panel h3 {
  font-size: clamp(1.72rem, 2.7vw, 2.55rem);
  line-height: 1.02;
  max-width: 7.8em;
}

.program-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-self: center;
  overflow: visible;
}

.program-item {
  display: grid;
  align-content: center;
  min-height: 112px;
  padding: clamp(14px, 1.7vw, 18px);
  transform: none;
}

.program-item:hover {
  transform: none;
}

.program-item time {
  margin-bottom: 8px;
}

@media (min-width: 1200px) and (max-height: 760px), (min-width: 1200px) and (min-resolution: 1.2dppx) {
  .details-section {
    padding-top: clamp(28px, 4vh, 46px);
  }

  .details-section .section-heading h2 {
    font-size: clamp(2.8rem, 4.4vw, 4.6rem);
  }

  .details-feature {
    grid-template-columns: minmax(250px, 1fr) minmax(120px, 0.55fr) auto;
  }
}

@media (max-width: 1120px) {
  .program-panel {
    grid-template-columns: 1fr;
  }

  .program-panel h3 {
    max-width: none;
  }
}

@media (max-width: 860px) {
  .details-feature,
  .program-panel {
    grid-template-columns: 1fr;
  }

  .details-feature .button.primary {
    justify-self: start;
  }

  .program-panel {
    width: min(1080px, calc(100% - 28px));
  }
}

@media (max-width: 560px) {
  .details-feature,
  .details-grid,
  .program-panel {
    width: min(100% - 24px, 1080px);
  }

  .details-section .section-heading {
    margin-bottom: 14px;
  }

  .program-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .program-list {
    grid-template-columns: 1fr;
  }
}

/* Final desktop lock for the wedding program timeline. */
.details-section .program-panel {
  display: grid !important;
  grid-template-columns: minmax(230px, 0.28fr) minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 156px !important;
  padding: 20px 28px !important;
  box-sizing: border-box;
}

.details-section .program-panel > div:first-child {
  align-self: center !important;
  display: grid !important;
  align-content: center !important;
  height: 100%;
}

.details-section .program-panel h3 {
  margin: 0 !important;
  font-size: clamp(1.72rem, 2.35vw, 2.45rem) !important;
  line-height: 1.05 !important;
}

.details-section .program-list {
  align-self: center !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  height: 112px !important;
  min-height: 112px !important;
  overflow: hidden !important;
}

.details-section .program-item {
  display: grid !important;
  align-content: center !important;
  min-height: 100% !important;
  height: 100% !important;
  padding: 14px 18px !important;
  transform: none !important;
}

.details-section .program-item:hover {
  transform: none !important;
}

@media (max-width: 1120px) {
  .details-section .program-panel {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }

  .details-section .program-panel > div:first-child {
    height: auto;
  }

  .details-section .program-list {
    height: auto !important;
    min-height: 112px !important;
  }
}

@media (max-width: 560px) {
  .details-section .program-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 420px) {
  .details-section .program-list {
    grid-template-columns: 1fr !important;
  }
}

/* Realistic guestbook clasp: keep the open affordance clear without covering the cover text. */
.guestbook-closed-cover {
  overflow: visible;
}

.guestbook-closed-cover .guestbook-cover-main,
.guestbook-closed-cover .guestbook-cover-panel {
  overflow: hidden;
}

.guestbook-lock-button {
  top: 50% !important;
  right: 10px !important;
  bottom: auto !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  place-items: center;
  gap: 6px;
  width: 74px !important;
  min-height: 122px !important;
  padding: 10px 7px !important;
  border: 1px solid rgba(127, 86, 58, 0.34);
  border-radius: 42px 12px 12px 42px;
  color: #6c4b32;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4), transparent 26%, rgba(90, 46, 38, 0.1)),
    linear-gradient(135deg, #f6d89d, #b9804b 54%, #f1d49a);
  box-shadow:
    -10px 0 20px rgba(96, 53, 45, 0.16),
    inset 0 0 0 1px rgba(255, 246, 220, 0.6),
    inset -8px 0 14px rgba(99, 49, 42, 0.16);
  transform: translateY(-50%) !important;
  animation: guestbookClaspGlow 2.8s ease-in-out infinite;
}

.guestbook-lock-button::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -11px;
  z-index: -1;
  width: 62px;
  height: 58px;
  border-radius: 14px 0 0 14px;
  background:
    linear-gradient(90deg, rgba(255, 239, 204, 0.95), rgba(183, 122, 76, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent);
  box-shadow:
    inset 0 0 0 1px rgba(111, 72, 48, 0.22),
    -8px 0 18px rgba(90, 54, 45, 0.12);
  transform: translateY(-50%);
}

.guestbook-lock-button::after {
  content: "Mở sổ";
  position: absolute;
  right: calc(100% + 10px);
  top: 8px;
  width: max-content;
  max-width: 120px;
  padding: 6px 9px;
  border: 1px solid rgba(189, 167, 114, 0.38);
  border-radius: 999px;
  color: #8a5a52;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: 0 10px 24px rgba(93, 58, 52, 0.13);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
}

.guestbook-lock-button:hover,
.guestbook-lock-button:focus-visible {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.46), transparent 26%, rgba(90, 46, 38, 0.08)),
    linear-gradient(135deg, #ffe3a7, #c58b53 54%, #ffe0a0);
  box-shadow:
    -12px 0 24px rgba(184, 95, 102, 0.18),
    inset 0 0 0 1px rgba(255, 246, 220, 0.72),
    inset -8px 0 14px rgba(99, 49, 42, 0.14);
  transform: translateY(-50%) translateX(-2px) !important;
}

.guestbook-lock-rings {
  inset: -8px !important;
  border-color: rgba(190, 151, 101, 0.28);
  border-radius: 46px 14px 14px 46px;
}

.guestbook-lock-rings::before,
.guestbook-lock-rings::after {
  border-color: rgba(190, 151, 101, 0.22);
  border-radius: 50px 18px 18px 50px;
}

.guestbook-lock-icon {
  width: 48px;
  height: 48px;
  color: #513420;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.58), transparent 28%),
    linear-gradient(135deg, #fff1c6, #b77842 58%, #f2d89e);
  box-shadow:
    inset 0 0 0 1px rgba(108, 69, 42, 0.2),
    0 8px 18px rgba(89, 49, 35, 0.2);
}

.guestbook-lock-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.85;
}

.guestbook-lock-text {
  display: block;
}

.guestbook-lock-text strong {
  display: block;
  color: #64422e;
  font-family: "Cormorant Garamond", serif;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.guestbook-lock-text small,
.guestbook-lock-cta {
  display: none;
}

@keyframes guestbookClaspGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(190, 151, 101, 0)); }
  50% { filter: drop-shadow(0 0 13px rgba(190, 151, 101, 0.32)); }
}

html[lang="en"] .guestbook-lock-button::after {
  content: "Open";
}

@media (max-width: 560px) {
  .guestbook-lock-button {
    top: 48% !important;
    right: 7px !important;
    width: 62px !important;
    min-height: 104px !important;
    padding: 8px 6px !important;
  }

  .guestbook-lock-button::before {
    right: -9px;
    width: 50px;
    height: 48px;
  }

  .guestbook-lock-button::after {
    top: -32px;
    right: -2px;
    font-size: 0.62rem;
  }

  .guestbook-lock-icon {
    width: 40px;
    height: 40px;
  }

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

  .guestbook-lock-text strong {
    font-size: 0.62rem;
  }
}

/* Final safety lock for event details: never clip heading text on desktop/zoom. */
.details-section {
  height: auto !important;
  min-height: calc(100svh - 62px) !important;
  align-content: center !important;
  overflow: visible !important;
}

.details-section .section-heading {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: auto !important;
  padding: clamp(28px, 3.4vw, 46px) clamp(24px, 4vw, 56px) !important;
  overflow: visible !important;
  box-sizing: border-box;
}

.details-section .section-heading .eyebrow {
  flex: 0 0 auto;
  margin: 0 !important;
}

.details-section .section-heading h2 {
  display: block;
  margin: 0 !important;
  padding-bottom: 0.08em;
  line-height: 1.12 !important;
  transform: none !important;
  overflow: visible !important;
}

.details-section .section-heading::before,
.details-section .section-heading::after {
  pointer-events: none;
}

/* Guestbook tie ribbon: a slim interactive cord on the book seam. */
.guestbook-closed-cover .guestbook-lock-button {
  top: 50% !important;
  left: calc(25% - 11px) !important;
  right: auto !important;
  bottom: auto !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  place-items: center;
  width: 22px !important;
  min-width: 0 !important;
  height: calc(100% - 52px) !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px;
  color: #7b5332;
  background:
    linear-gradient(90deg, rgba(96, 58, 44, 0.24), transparent 18%, transparent 82%, rgba(255, 252, 238, 0.5)),
    linear-gradient(180deg, #f8dba0, #b77b4e 28%, #f7dda7 52%, #a96849 78%, #f3cf90);
  box-shadow:
    0 0 0 1px rgba(255, 242, 209, 0.54) inset,
    0 10px 24px rgba(91, 49, 38, 0.15);
  transform: translateY(-50%) !important;
  filter: none;
  overflow: visible;
  animation: guestbookTieShimmer 3s ease-in-out infinite;
}

.guestbook-closed-cover .guestbook-lock-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.62), transparent 25%),
    radial-gradient(circle at 50% 50%, #fff0c9 0 18%, #c28a54 19% 44%, #8b5738 45% 49%, #f7d99a 50% 72%, #a96849 73%);
  box-shadow:
    0 13px 24px rgba(93, 49, 37, 0.22),
    0 0 0 3px rgba(255, 249, 232, 0.5) inset,
    0 0 22px rgba(242, 204, 125, 0.35);
  transform: translate(-50%, -50%);
}

.guestbook-closed-cover .guestbook-lock-button::after {
  content: "Bấm để mở";
  position: absolute;
  left: auto;
  right: 32px;
  top: 50%;
  width: max-content;
  max-width: 118px;
  padding: 7px 10px;
  border: 1px solid rgba(189, 167, 114, 0.34);
  border-radius: 999px;
  color: #8a5a52;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 10px 24px rgba(93, 58, 52, 0.13);
  font-size: 0.67rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(calc(-50% + 39px));
  animation: guestbookTieHint 3s ease-in-out infinite;
}

.guestbook-closed-cover .guestbook-lock-button:hover,
.guestbook-closed-cover .guestbook-lock-button:focus-visible {
  background:
    linear-gradient(90deg, rgba(96, 58, 44, 0.2), transparent 18%, transparent 82%, rgba(255, 252, 238, 0.58)),
    linear-gradient(180deg, #ffe5aa, #c78d58 28%, #ffe3ad 52%, #b87652 78%, #ffe0a0);
  box-shadow:
    0 0 0 1px rgba(255, 242, 209, 0.7) inset,
    0 12px 28px rgba(184, 95, 102, 0.17);
  transform: translateY(-50%) scaleX(1.08) !important;
}

.guestbook-closed-cover .guestbook-lock-rings {
  inset: auto !important;
  top: calc(50% - 38px);
  left: 50%;
  z-index: 1;
  width: 76px;
  height: 76px;
  border-color: rgba(242, 204, 125, 0.36);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: guestbookTiePulse 2.8s ease-out infinite;
}

.guestbook-closed-cover .guestbook-lock-rings::before,
.guestbook-closed-cover .guestbook-lock-rings::after {
  inset: -11px;
  border-color: rgba(255, 238, 196, 0.28);
  border-radius: 50%;
}

.guestbook-closed-cover .guestbook-lock-rings::after {
  inset: -21px;
}

.guestbook-closed-cover .guestbook-lock-icon {
  position: relative;
  z-index: 3;
  width: 28px;
  height: 28px;
  color: #704822;
  background: transparent;
  box-shadow: none;
  transform: translateY(-1px);
}

.guestbook-closed-cover .guestbook-lock-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  filter: drop-shadow(0 1px 0 rgba(255, 246, 222, 0.72));
}

.guestbook-closed-cover .guestbook-lock-text,
.guestbook-closed-cover .guestbook-lock-cta {
  display: none !important;
}

html[lang="en"] .guestbook-closed-cover .guestbook-lock-button::after {
  content: "Tap to open";
}

@keyframes guestbookTieShimmer {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(242, 204, 125, 0)); }
  50% { filter: drop-shadow(0 0 12px rgba(242, 204, 125, 0.42)); }
}

@keyframes guestbookTiePulse {
  0% { opacity: 0; transform: translateX(-50%) scale(0.78); }
  28% { opacity: 0.74; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.16); }
}

@keyframes guestbookTieHint {
  0%, 100% { opacity: 0.78; transform: translateY(calc(-50% + 39px)); }
  50% { opacity: 1; transform: translateY(calc(-50% + 36px)); }
}

@media (max-width: 560px) {
  .guestbook-closed-cover .guestbook-lock-button {
    left: calc(72px - 10px) !important;
    width: 20px !important;
    height: calc(100% - 46px) !important;
  }

  .guestbook-closed-cover .guestbook-lock-button::before {
    width: 46px;
    height: 46px;
  }

  .guestbook-closed-cover .guestbook-lock-button::after {
    display: none;
  }

  .guestbook-closed-cover .guestbook-lock-rings {
    top: calc(50% - 32px);
    width: 64px;
    height: 64px;
  }
}

/* Notebook-style elastic band: thin, pastel, and clear without covering cover content. */
.guestbook-closed-cover .guestbook-lock-button {
  left: calc(25% - 4px) !important;
  width: 8px !important;
  height: calc(100% - 28px) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.62) 0 13%,
      #f9d9df 14% 30%,
      #d996a1 31% 45%,
      #fff3ed 46% 54%,
      #d996a1 55% 69%,
      #f9d9df 70% 86%,
      rgba(121, 72, 78, 0.22) 87% 100%
    ) !important;
  box-shadow:
    0 0 0 1px rgba(255, 249, 246, 0.74) inset,
    0 0 0 1px rgba(184, 95, 102, 0.1),
    0 10px 18px rgba(112, 62, 67, 0.12);
  animation: guestbookElasticShine 3.2s ease-in-out infinite !important;
}

.guestbook-closed-cover .guestbook-lock-button::before {
  content: "";
  position: absolute;
  inset: 8px -4px;
  z-index: 2;
  width: auto;
  height: auto;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent),
    repeating-linear-gradient(180deg, rgba(255, 250, 246, 0.08) 0 8px, rgba(132, 73, 78, 0.09) 9px 10px);
  box-shadow: none;
  transform: none;
  pointer-events: none;
}

.guestbook-closed-cover .guestbook-lock-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 5px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.92),
    10px 88px 0 -1px rgba(255, 250, 246, 0.72),
    -7px 172px 0 -2px rgba(255, 250, 246, 0.62);
  transform: translateX(-50%);
  animation: guestbookElasticSparkle 2.8s ease-in-out infinite;
}

.guestbook-closed-cover .guestbook-lock-button:hover,
.guestbook-closed-cover .guestbook-lock-button:focus-visible {
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, 0.7) 0 13%,
      #ffe1e7 14% 30%,
      #e4a1ab 31% 45%,
      #fff7f1 46% 54%,
      #e4a1ab 55% 69%,
      #ffe1e7 70% 86%,
      rgba(121, 72, 78, 0.2) 87% 100%
    ) !important;
  box-shadow:
    0 0 0 1px rgba(255, 249, 246, 0.86) inset,
    0 0 0 1px rgba(184, 95, 102, 0.13),
    0 0 18px rgba(242, 163, 154, 0.34);
  transform: translateY(-50%) scaleX(1.22) !important;
}

.guestbook-closed-cover .guestbook-lock-rings {
  inset: auto !important;
  top: 0;
  left: 50%;
  width: 26px;
  height: 100%;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: translateX(-50%);
  animation: guestbookElasticPulse 2.8s ease-in-out infinite;
}

.guestbook-closed-cover .guestbook-lock-rings::before,
.guestbook-closed-cover .guestbook-lock-rings::after,
.guestbook-closed-cover .guestbook-lock-icon,
.guestbook-closed-cover .guestbook-lock-text,
.guestbook-closed-cover .guestbook-lock-cta {
  display: none !important;
}

@keyframes guestbookElasticShine {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(242, 163, 154, 0)); }
  50% { filter: drop-shadow(0 0 8px rgba(242, 163, 154, 0.42)); }
}

@keyframes guestbookElasticSparkle {
  0%, 100% { opacity: 0.35; }
  45%, 58% { opacity: 1; }
}

@keyframes guestbookElasticPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.7; }
}

@media (max-width: 560px) {
  .guestbook-closed-cover .guestbook-lock-button {
    left: calc(72px - 4px) !important;
    width: 8px !important;
    height: calc(100% - 26px) !important;
  }
}

/* Wraparound elastic: the band passes over the book edges and carries a small top hint. */
.guestbook-closed-cover .guestbook-lock-button {
  top: 50% !important;
  left: calc(25% - 4px) !important;
  height: calc(100% + 78px) !important;
  overflow: visible !important;
}

.guestbook-closed-cover .guestbook-lock-button::before {
  inset: -2px -4px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent),
    linear-gradient(180deg, rgba(120, 74, 78, 0.28) 0 14px, transparent 15px calc(100% - 15px), rgba(120, 74, 78, 0.26) calc(100% - 14px)),
    repeating-linear-gradient(180deg, rgba(255, 250, 246, 0.1) 0 8px, rgba(132, 73, 78, 0.08) 9px 10px);
  box-shadow:
    0 -4px 8px rgba(92, 56, 57, 0.12),
    0 4px 8px rgba(92, 56, 57, 0.12);
}

.guestbook-closed-cover .guestbook-lock-button::after {
  content: "Bấm vào để mở sổ";
  display: block !important;
  left: 50%;
  top: -20px;
  width: max-content;
  max-width: 150px;
  height: auto;
  padding: 7px 10px;
  border: 1px solid rgba(189, 167, 114, 0.34);
  border-radius: 999px;
  color: #8a5a52;
  background: rgba(255, 253, 249, 0.94);
  box-shadow:
    0 10px 24px rgba(93, 58, 52, 0.13),
    0 0 18px rgba(242, 163, 154, 0.2);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  animation: guestbookWrapHint 2.8s ease-in-out infinite;
}

.guestbook-closed-cover .guestbook-lock-rings {
  top: -36px;
  height: calc(100% + 72px);
}

html[lang="en"] .guestbook-closed-cover .guestbook-lock-button::after {
  content: "Tap to open";
}

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

@media (max-width: 560px) {
  .guestbook-closed-cover .guestbook-lock-button {
    left: calc(72px - 4px) !important;
    height: calc(100% + 58px) !important;
  }

  .guestbook-closed-cover .guestbook-lock-button::after {
    display: block !important;
    top: -14px;
    max-width: 126px;
    padding: 6px 8px;
    font-size: 0.58rem;
  }

  .guestbook-closed-cover .guestbook-lock-rings {
    top: -28px;
    height: calc(100% + 56px);
  }
}

/* Final guestbook opener: a real-book leather tab with a brass clasp, kept outside the cover content. */
.guestbook-closed-cover .guestbook-lock-button {
  top: 50% !important;
  right: -86px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 9 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  place-items: center !important;
  width: 88px !important;
  min-width: 0 !important;
  height: 54px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(119, 71, 61, 0.34) !important;
  border-radius: 9px 3px 3px 9px !important;
  color: #6e452c !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 28%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 3px 7px),
    linear-gradient(135deg, #d69a91 0%, #b87970 52%, #9b5e59 100%) !important;
  box-shadow:
    -10px 8px 18px rgba(85, 48, 47, 0.18),
    inset 0 0 0 1px rgba(255, 226, 220, 0.28),
    inset 0 -9px 16px rgba(92, 45, 43, 0.13) !important;
  transform: translateY(-50%) !important;
  transform-origin: left center !important;
  overflow: visible !important;
  animation: guestbookReferenceLockGlow 2.8s ease-in-out infinite !important;
}

.guestbook-closed-cover .guestbook-lock-button::before {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  left: -18px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 3 !important;
  width: 50px !important;
  height: 50px !important;
  border: 1px solid rgba(82, 54, 32, 0.42) !important;
  border-radius: 15px !important;
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, 0.7), transparent 22%),
    radial-gradient(circle at 50% 56%, #5c3923 0 6%, transparent 7%),
    linear-gradient(135deg, #fff1b7 0%, #d5a052 32%, #7b4d29 49%, #5b3721 52%, #c88b42 72%, #f8d990 100%) !important;
  box-shadow:
    0 9px 18px rgba(91, 51, 32, 0.25),
    0 0 18px rgba(246, 208, 121, 0.18),
    inset 0 0 0 3px rgba(255, 236, 176, 0.36),
    inset 0 0 0 9px rgba(111, 69, 34, 0.08) !important;
  transform: translateY(-50%) !important;
}

.guestbook-closed-cover .guestbook-lock-button::after {
  content: "Bấm vào để mở sổ" !important;
  display: block !important;
  position: absolute !important;
  right: auto !important;
  left: 10px !important;
  top: -34px !important;
  bottom: auto !important;
  width: max-content !important;
  max-width: 150px !important;
  height: auto !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(189, 167, 114, 0.34) !important;
  border-radius: 999px !important;
  color: #8a5a52 !important;
  background: rgba(255, 253, 249, 0.94) !important;
  box-shadow:
    0 10px 24px rgba(93, 58, 52, 0.13),
    0 0 18px rgba(242, 163, 154, 0.2) !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  transform: none !important;
  animation: guestbookReferenceHint 2.8s ease-in-out infinite !important;
}

.guestbook-closed-cover .guestbook-lock-button:hover,
.guestbook-closed-cover .guestbook-lock-button:focus-visible {
  transform: translateY(-50%) translateX(2px) !important;
  box-shadow:
    -12px 10px 22px rgba(85, 48, 47, 0.22),
    0 0 20px rgba(245, 199, 122, 0.16),
    inset 0 0 0 1px rgba(255, 226, 220, 0.34) !important;
}

.guestbook-closed-cover .guestbook-lock-rings {
  inset: auto !important;
  top: 50% !important;
  left: -19px !important;
  z-index: 2 !important;
  display: block !important;
  width: 60px !important;
  height: 60px !important;
  border: 1px solid rgba(246, 211, 136, 0.4) !important;
  border-radius: 17px !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateY(-50%) !important;
  animation: guestbookReferencePulse 2.8s ease-out infinite !important;
}

.guestbook-closed-cover .guestbook-lock-rings::before,
.guestbook-closed-cover .guestbook-lock-rings::after {
  display: none !important;
}

.guestbook-closed-cover .guestbook-lock-icon {
  position: relative !important;
  z-index: 4 !important;
  display: grid !important;
  width: 28px !important;
  height: 28px !important;
  color: #4f321f !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateX(-18px) !important;
}

.guestbook-closed-cover .guestbook-lock-icon svg {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2 !important;
}

.guestbook-closed-cover .guestbook-lock-text,
.guestbook-closed-cover .guestbook-lock-cta {
  display: none !important;
}

html[lang="en"] .guestbook-closed-cover .guestbook-lock-button::after {
  content: "Tap to open" !important;
}

@keyframes guestbookReferenceLockGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(242, 204, 125, 0)); }
  50% { filter: drop-shadow(0 0 10px rgba(242, 204, 125, 0.38)); }
}

@keyframes guestbookReferencePulse {
  0% { opacity: 0; transform: translateY(-50%) scale(0.82); }
  28% { opacity: 0.75; }
  100% { opacity: 0; transform: translateY(-50%) scale(1.22); }
}

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

@media (max-width: 560px) {
  .guestbook-closed-cover .guestbook-lock-button {
    top: 86% !important;
    right: -20px !important;
    width: 54px !important;
    height: 42px !important;
  }

  .guestbook-closed-cover .guestbook-lock-button::before {
    left: 0 !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
  }

  .guestbook-closed-cover .guestbook-lock-button::after {
    left: calc(-100vw + 58px) !important;
    top: -30px !important;
    max-width: 126px !important;
    padding: 6px 8px !important;
    font-size: 0.58rem !important;
  }

  .guestbook-closed-cover .guestbook-lock-rings {
    left: -1px !important;
    width: 44px !important;
    height: 44px !important;
  }

  .guestbook-closed-cover .guestbook-lock-icon {
    transform: translateX(0) !important;
  }
}

/* Guestbook realism polish: slimmer cover border, tighter photo block, and a smaller attached clasp. */
.guestbook-closed-cover {
  border-radius: 16px 10px 10px 16px !important;
}

.guestbook-closed-cover::before {
  inset: 8px !important;
  border-color: rgba(192, 166, 111, 0.22) !important;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.36) !important;
}

.guestbook-cover-main {
  grid-template-rows: minmax(92px, 21%) minmax(238px, 53%) minmax(102px, 26%) !important;
  padding: 16px 12px 18px !important;
}

.guestbook-cover-photo {
  border-radius: 4px !important;
  box-shadow:
    0 10px 24px rgba(95, 64, 58, 0.11),
    0 0 0 1px rgba(190, 158, 109, 0.1) !important;
}

.guestbook-cover-photo img {
  transform: none !important;
}

.guestbook-cover-heading {
  font-size: clamp(1.18rem, 1.88vw, 1.82rem) !important;
}

.guestbook-cover-footer {
  gap: 6px !important;
}

.guestbook-cover-date {
  font-size: clamp(1.16rem, 1.9vw, 1.8rem) !important;
}

.guestbook-closed-cover .guestbook-lock-button {
  top: 77% !important;
  right: -15px !important;
  width: 44px !important;
  height: 27px !important;
  border-radius: 9px 3px 3px 9px !important;
  border-color: rgba(116, 64, 58, 0.38) !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 33%),
    repeating-linear-gradient(0deg, rgba(255, 244, 240, 0.1) 0 2px, transparent 3px 6px),
    linear-gradient(135deg, #cf8f87 0%, #b97972 58%, #98605c 100%) !important;
  box-shadow:
    -5px 5px 12px rgba(91, 50, 49, 0.17),
    0 0 0 rgba(247, 211, 132, 0),
    inset 0 0 0 1px rgba(255, 226, 220, 0.28),
    inset 0 -5px 10px rgba(92, 45, 43, 0.13) !important;
  animation: guestbookClaspInvite 2.65s ease-in-out infinite !important;
}

.guestbook-closed-cover .guestbook-lock-button::before {
  left: -7px !important;
  width: 28px !important;
  height: 27px !important;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 26% 28%, #fff3c2 0 4%, transparent 5%),
    radial-gradient(circle at 74% 72%, #6b4125 0 4%, transparent 5%),
    radial-gradient(circle at 50% 58%, #4f301d 0 5%, transparent 6%),
    linear-gradient(135deg, #fff0b5 0%, #d7a456 30%, #8a562f 49%, #58351f 52%, #c88c42 72%, #f8da91 100%) !important;
  box-shadow:
    0 5px 10px rgba(91, 51, 32, 0.2),
    0 0 16px rgba(246, 208, 121, 0.28),
    inset 0 0 0 2px rgba(255, 236, 176, 0.34),
    inset 0 0 0 6px rgba(111, 69, 34, 0.07) !important;
  animation: guestbookClaspGoldPulse 2.65s ease-in-out infinite !important;
}

.guestbook-closed-cover .guestbook-lock-button::after {
  left: -38px !important;
  top: -25px !important;
  padding: 4px 7px !important;
  font-size: 0.54rem !important;
  box-shadow:
    0 8px 18px rgba(93, 58, 52, 0.11),
    0 0 14px rgba(242, 163, 154, 0.18) !important;
}

.guestbook-closed-cover .guestbook-lock-rings {
  left: -1px !important;
  top: 50% !important;
  width: 16px !important;
  height: 18px !important;
  border: 0 !important;
  border-left: 1px solid rgba(121, 67, 59, 0.36) !important;
  border-right: 1px solid rgba(255, 224, 218, 0.35) !important;
  border-radius: 8px 0 0 8px !important;
  background:
    linear-gradient(90deg, rgba(109, 61, 57, 0.18), rgba(255, 230, 224, 0.14), transparent) !important;
  box-shadow:
    0 0 0 0 rgba(246, 208, 121, 0),
    inset 2px 0 6px rgba(255, 238, 214, 0.18) !important;
  animation: guestbookClaspHingeGlow 2.65s ease-in-out infinite !important;
}

.guestbook-closed-cover .guestbook-lock-icon {
  z-index: 4 !important;
  width: 13px !important;
  height: 13px !important;
  color: #442915 !important;
  transform: translateX(-4px) !important;
}

.guestbook-closed-cover .guestbook-lock-icon::before,
.guestbook-closed-cover .guestbook-lock-icon::after {
  content: "" !important;
  position: absolute !important;
  z-index: -1 !important;
  width: 5px !important;
  height: 5px !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle, #fff8d6 0 18%, #ffe28f 28% 48%, transparent 58%) !important;
  box-shadow:
    0 0 8px rgba(255, 228, 142, 0.62),
    10px -6px 0 -2px rgba(255, 244, 194, 0.72),
    -7px 8px 0 -2px rgba(255, 221, 137, 0.54) !important;
  transform: scale(0.9) rotate(45deg) !important;
  animation: guestbookTinySparkle 1.55s ease-in-out infinite !important;
}

.guestbook-closed-cover .guestbook-lock-icon::before {
  left: -6px !important;
  top: -4px !important;
}

.guestbook-closed-cover .guestbook-lock-icon::after {
  right: -6px !important;
  bottom: -4px !important;
  animation-delay: 0.52s !important;
}

.guestbook-closed-cover .guestbook-lock-icon svg {
  width: 11px !important;
  height: 11px !important;
  stroke-width: 2.25 !important;
  filter: drop-shadow(0 1px 0 rgba(255, 236, 176, 0.62)) !important;
}

.guestbook-closed-cover .guestbook-lock-button .guestbook-lock-icon {
  filter:
    drop-shadow(0 0 8px rgba(255, 227, 145, 0.32))
    drop-shadow(0 0 2px rgba(255, 246, 205, 0.44)) !important;
}

@keyframes guestbookClaspInvite {
  0%, 100% {
    transform: translateY(-50%);
    filter: drop-shadow(0 0 2px rgba(246, 208, 121, 0.12));
    box-shadow:
      -5px 5px 12px rgba(91, 50, 49, 0.17),
      0 0 4px rgba(247, 211, 132, 0.08),
      inset 0 0 0 1px rgba(255, 226, 220, 0.28),
      inset 0 -5px 10px rgba(92, 45, 43, 0.13);
  }
  45% {
    transform: translateY(-50%);
    filter:
      drop-shadow(0 0 16px rgba(247, 211, 132, 0.78))
      drop-shadow(0 0 26px rgba(255, 245, 205, 0.34));
    box-shadow:
      -5px 5px 12px rgba(91, 50, 49, 0.17),
      0 0 28px rgba(247, 211, 132, 0.62),
      0 0 42px rgba(255, 245, 205, 0.22),
      inset 0 0 0 1px rgba(255, 241, 224, 0.58),
      inset 0 -5px 10px rgba(92, 45, 43, 0.08);
  }
  58% {
    transform: translateY(-50%) translateX(1px);
  }
  72% {
    transform: translateY(-50%);
    filter: drop-shadow(0 0 11px rgba(247, 211, 132, 0.42));
    box-shadow:
      -5px 5px 12px rgba(91, 50, 49, 0.17),
      0 0 18px rgba(247, 211, 132, 0.28),
      inset 0 0 0 1px rgba(255, 235, 222, 0.38),
      inset 0 -5px 10px rgba(92, 45, 43, 0.1);
  }
}

@keyframes guestbookClaspGoldPulse {
  0%, 100% { filter: brightness(1.04); }
  48% { filter: brightness(1.34) saturate(1.16); }
  72% { filter: brightness(1.14) saturate(1.08); }
}

@keyframes guestbookClaspHingeGlow {
  0%, 100% { opacity: 0.78; box-shadow: 0 0 0 rgba(246, 208, 121, 0), inset 2px 0 6px rgba(255, 238, 214, 0.18); }
  48% { opacity: 1; box-shadow: 0 0 12px rgba(246, 208, 121, 0.28), inset 2px 0 8px rgba(255, 238, 214, 0.3); }
}

@keyframes guestbookTinySparkle {
  0%, 100% {
    opacity: 0.44;
    transform: scale(0.72) rotate(45deg);
  }
  38% {
    opacity: 1;
    transform: scale(1.22) rotate(45deg);
  }
  62% {
    opacity: 0.58;
    transform: scale(0.9) rotate(45deg);
  }
}

@media (max-width: 560px) {
  .guestbook-cover-main {
    grid-template-rows: minmax(82px, 20%) minmax(212px, 52%) minmax(96px, 28%) !important;
    padding: 14px 10px 16px !important;
  }

  .guestbook-closed-cover .guestbook-lock-button {
    top: 82% !important;
    right: -13px !important;
    width: 42px !important;
    height: 28px !important;
  }

  .guestbook-closed-cover .guestbook-lock-button::before {
    left: -5px !important;
    width: 27px !important;
    height: 26px !important;
    border-radius: 8px !important;
  }

  .guestbook-closed-cover .guestbook-lock-button::after {
    left: calc(-100vw + 88px) !important;
    top: -26px !important;
    padding: 5px 7px !important;
    font-size: 0.55rem !important;
  }

  .guestbook-closed-cover .guestbook-lock-rings {
    left: -1px !important;
    width: 15px !important;
    height: 17px !important;
  }

  .guestbook-closed-cover .guestbook-lock-icon {
    transform: translateX(-4px) !important;
  }
}

body.guestbook-spotlight-active::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 54%, rgba(255, 236, 176, 0.22) 0 6%, rgba(255, 236, 176, 0.1) 10%, transparent 22%),
    radial-gradient(circle at 67% 58%, transparent 0 12%, rgba(10, 8, 16, 0.28) 28%, rgba(10, 8, 16, 0.72) 72%),
    rgba(10, 8, 16, 0.58);
  opacity: 0;
  animation: guestbookStageDim 3.2s ease-in-out forwards;
}

body.guestbook-spotlight-active::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 901;
  pointer-events: none;
  background:
    conic-gradient(from 204deg at 72% 54%, transparent 0 8deg, rgba(255, 237, 177, 0.34) 12deg, rgba(255, 237, 177, 0.08) 22deg, transparent 34deg 360deg),
    radial-gradient(circle at 72% 54%, rgba(255, 246, 205, 0.54) 0 2%, rgba(255, 218, 128, 0.22) 6%, transparent 17%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: guestbookStageBeam 3.2s ease-in-out forwards;
}

body.guestbook-spotlight-active .guestbook-closed-cover {
  z-index: 920 !important;
  filter:
    drop-shadow(0 30px 34px rgba(5, 8, 20, 0.38))
    drop-shadow(0 0 34px rgba(255, 221, 145, 0.2)) !important;
}

body.guestbook-spotlight-active .guestbook-lock-button {
  z-index: 930 !important;
  animation: guestbookSpotlightLock 0.9s ease-in-out infinite !important;
}

body.guestbook-spotlight-active .guestbook-lock-button::before {
  animation: guestbookSpotlightGold 0.9s ease-in-out infinite !important;
}

body.guestbook-spotlight-active .guestbook-lock-button::after {
  box-shadow:
    0 8px 18px rgba(93, 58, 52, 0.11),
    0 0 22px rgba(255, 222, 145, 0.42),
    0 0 34px rgba(255, 244, 204, 0.18) !important;
}

body.guestbook-spotlight-active .guestbook-lock-icon {
  filter:
    drop-shadow(0 0 12px rgba(255, 232, 158, 0.8))
    drop-shadow(0 0 24px rgba(255, 245, 205, 0.46)) !important;
}

body.guestbook-spotlight-active .guestbook-lock-icon::before,
body.guestbook-spotlight-active .guestbook-lock-icon::after {
  box-shadow:
    0 0 10px rgba(255, 232, 158, 0.92),
    12px -7px 0 -2px rgba(255, 247, 205, 0.9),
    -8px 9px 0 -2px rgba(255, 224, 139, 0.78),
    4px 12px 0 -3px rgba(255, 248, 220, 0.72) !important;
  animation: guestbookSpotlightSparkle 0.82s ease-in-out infinite !important;
}

@keyframes guestbookStageDim {
  0% { opacity: 0; }
  18%, 72% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes guestbookStageBeam {
  0% { opacity: 0; transform: scale(0.98); }
  22%, 74% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.03); }
}

@keyframes guestbookSpotlightLock {
  0%, 100% {
    transform: translateY(-50%);
    filter: drop-shadow(0 0 10px rgba(255, 220, 134, 0.55));
    box-shadow:
      -5px 5px 12px rgba(91, 50, 49, 0.17),
      0 0 22px rgba(247, 211, 132, 0.42),
      inset 0 0 0 1px rgba(255, 235, 222, 0.42),
      inset 0 -5px 10px rgba(92, 45, 43, 0.1);
  }
  50% {
    transform: translateY(-50%) translateX(1px) scale(1.04);
    filter: drop-shadow(0 0 18px rgba(255, 229, 157, 0.8));
    box-shadow:
      -5px 5px 12px rgba(91, 50, 49, 0.17),
      0 0 34px rgba(247, 211, 132, 0.64),
      inset 0 0 0 1px rgba(255, 241, 224, 0.58),
      inset 0 -5px 10px rgba(92, 45, 43, 0.08);
  }
}

@keyframes guestbookSpotlightGold {
  0%, 100% { filter: brightness(1.18) saturate(1.1); }
  50% { filter: brightness(1.48) saturate(1.24); }
}

@keyframes guestbookSpotlightSparkle {
  0%, 100% {
    opacity: 0.62;
    transform: scale(0.72) rotate(45deg);
  }
  45% {
    opacity: 1;
    transform: scale(1.52) rotate(45deg);
  }
  72% {
    opacity: 0.82;
    transform: scale(1) rotate(45deg);
  }
}

@media (max-width: 560px) {
  body.guestbook-spotlight-active::before {
    background:
      radial-gradient(circle at 82% 66%, rgba(255, 236, 176, 0.22) 0 7%, rgba(255, 236, 176, 0.1) 13%, transparent 26%),
      radial-gradient(circle at 78% 66%, transparent 0 14%, rgba(10, 8, 16, 0.3) 30%, rgba(10, 8, 16, 0.72) 74%),
      rgba(10, 8, 16, 0.58);
  }

  body.guestbook-spotlight-active::after {
    background:
      conic-gradient(from 210deg at 82% 66%, transparent 0 8deg, rgba(255, 237, 177, 0.34) 12deg, rgba(255, 237, 177, 0.08) 24deg, transparent 38deg 360deg),
      radial-gradient(circle at 82% 66%, rgba(255, 246, 205, 0.5) 0 3%, rgba(255, 218, 128, 0.2) 8%, transparent 20%);
  }
}

/* Standalone music control: keep audio separate from the quick navigation dock. */
.floating-music-toggle {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 125;
  display: grid;
  width: 52px;
  height: 52px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: white;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.3), transparent 28%),
    rgba(204, 70, 88, 0.92);
  box-shadow:
    0 14px 30px rgba(86, 37, 44, 0.26),
    0 0 0 5px rgba(255, 232, 236, 0.32);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.floating-music-toggle:hover,
.floating-music-toggle:focus-visible {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.34), transparent 28%),
    rgba(174, 74, 83, 0.98);
  box-shadow:
    0 16px 34px rgba(86, 37, 44, 0.34),
    0 0 0 6px rgba(255, 232, 236, 0.38);
  outline: none;
  transform: translateY(-3px) scale(1.04);
}

.floating-music-toggle svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

.floating-music-toggle.is-playing::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(204, 70, 88, 0.28);
  border-radius: inherit;
  animation: music-pulse 1.8s ease-out infinite;
}

.floating-music-toggle.is-awaiting-play {
  animation: music-waiting 1.4s ease-in-out infinite alternate;
}

@media (max-width: 560px) {
  .floating-music-toggle {
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
  }

  .floating-music-toggle svg {
    width: 20px;
    height: 20px;
  }
}

/* Final 4-photo album order: 1 landscape, 2 portraits, 1 landscape. */
.gallery-layout-four {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  grid-template-rows:
    minmax(86px, auto)
    minmax(280px, 31vw)
    minmax(380px, 43vw)
    minmax(280px, 31vw) !important;
  grid-template-areas:
    "copy copy copy copy copy copy copy copy copy copy copy copy"
    "photo1 photo1 photo1 photo1 photo1 photo1 photo1 photo1 photo1 photo1 photo1 photo1"
    "photo2 photo2 photo2 photo2 photo2 photo2 photo3 photo3 photo3 photo3 photo3 photo3"
    "photo4 photo4 photo4 photo4 photo4 photo4 photo4 photo4 photo4 photo4 photo4 photo4" !important;
  gap: clamp(14px, 2vw, 26px) !important;
  align-items: stretch !important;
}

.gallery-layout-four .gallery-editorial-copy {
  grid-area: copy !important;
  justify-self: center !important;
  align-self: center !important;
  max-width: min(760px, 100%) !important;
  padding: 0 !important;
  text-align: center !important;
}

.gallery-layout-four .gallery-editorial-copy span {
  justify-content: center !important;
}

.gallery-layout-four .gallery-editorial-copy span::after {
  display: none !important;
}

.gallery-layout-four .gallery-editorial-copy strong {
  font-size: clamp(2.45rem, 5vw, 5rem) !important;
  line-height: 0.92 !important;
}

.gallery-layout-four .gallery-frame-1 {
  grid-area: photo1 !important;
  --gallery-y: 0px !important;
  --gallery-rotate: -0.35deg !important;
}

.gallery-layout-four .gallery-frame-2 {
  grid-area: photo2 !important;
  --gallery-y: 0px !important;
  --gallery-rotate: 0.35deg !important;
}

.gallery-layout-four .gallery-frame-3 {
  grid-area: photo3 !important;
  --gallery-y: 0px !important;
  --gallery-rotate: -0.25deg !important;
}

.gallery-layout-four .gallery-frame-4 {
  grid-area: photo4 !important;
  --gallery-y: 0px !important;
  --gallery-rotate: 0.25deg !important;
}

.gallery-layout-four .gallery-frame-1,
.gallery-layout-four .gallery-frame-4 {
  min-height: clamp(280px, 31vw, 470px) !important;
  aspect-ratio: 16 / 9 !important;
}

.gallery-layout-four .gallery-frame-2,
.gallery-layout-four .gallery-frame-3 {
  min-height: clamp(380px, 43vw, 640px) !important;
  aspect-ratio: 4 / 5 !important;
}

.gallery-layout-four .gallery-frame::before {
  content: none !important;
}

.gallery-layout-four .gallery-photo,
.gallery-layout-four .gallery-frame.is-contain .gallery-photo {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

@media (max-width: 900px) {
  .gallery-layout-four {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    grid-template-rows: auto !important;
    grid-template-areas:
      "copy copy copy copy copy copy"
      "photo1 photo1 photo1 photo1 photo1 photo1"
      "photo2 photo2 photo2 photo3 photo3 photo3"
      "photo4 photo4 photo4 photo4 photo4 photo4" !important;
  }

  .gallery-layout-four .gallery-frame-1,
  .gallery-layout-four .gallery-frame-4 {
    min-height: clamp(220px, 50vw, 420px) !important;
  }

  .gallery-layout-four .gallery-frame-2,
  .gallery-layout-four .gallery-frame-3 {
    min-height: clamp(300px, 68vw, 540px) !important;
  }
}

@media (max-width: 560px) {
  .gallery-layout-four {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "copy"
      "photo1"
      "photo2"
      "photo3"
      "photo4" !important;
  }

  .gallery-layout-four .gallery-frame-1,
  .gallery-layout-four .gallery-frame-2,
  .gallery-layout-four .gallery-frame-3,
  .gallery-layout-four .gallery-frame-4 {
    min-height: auto !important;
    aspect-ratio: 4 / 5 !important;
  }

  .gallery-layout-four .gallery-frame-1,
  .gallery-layout-four .gallery-frame-4,
  .gallery-layout-four .gallery-frame.is-landscape {
    aspect-ratio: 16 / 10 !important;
  }
}

/* Mobile album mode: show complete photos vertically instead of the desktop collage. */
@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  .gallery-section {
    overflow-x: hidden;
  }

  .gallery.gallery-layout-four,
  .gallery.gallery-layout-six,
  .gallery.gallery-layout-eight {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    grid-template-areas: none !important;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    padding: 16px !important;
    gap: 16px !important;
    overflow: visible;
    background:
      linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(246, 238, 226, 0.78)),
      radial-gradient(circle at 50% 0%, rgba(204, 154, 91, 0.14), transparent 34%);
    border-radius: 12px;
    touch-action: pan-y;
  }

  .gallery.gallery-layout-four::before,
  .gallery.gallery-layout-six::before,
  .gallery.gallery-layout-eight::before,
  .gallery.gallery-layout-four::after,
  .gallery.gallery-layout-six::after,
  .gallery.gallery-layout-eight::after {
    content: none !important;
  }

  .gallery-layout-four .gallery-editorial-copy,
  .gallery-layout-six .gallery-editorial-copy,
  .gallery-layout-eight .gallery-editorial-copy {
    grid-column: 1 !important;
    grid-row: auto !important;
    grid-area: auto !important;
    display: grid !important;
    min-height: auto;
    padding: 14px 10px 6px !important;
    place-content: center;
    text-align: center !important;
  }

  .gallery-layout-four .gallery-editorial-copy strong,
  .gallery-layout-six .gallery-editorial-copy strong,
  .gallery-layout-eight .gallery-editorial-copy strong {
    font-size: clamp(2.6rem, 14vw, 4.2rem) !important;
    line-height: 0.9 !important;
  }

  .gallery-layout-four .gallery-frame,
  .gallery-layout-six .gallery-frame,
  .gallery-layout-eight .gallery-frame,
  .gallery-layout-four .gallery-frame-1,
  .gallery-layout-four .gallery-frame-2,
  .gallery-layout-four .gallery-frame-3,
  .gallery-layout-four .gallery-frame-4,
  .gallery-layout-six .gallery-frame-1,
  .gallery-layout-six .gallery-frame-2,
  .gallery-layout-six .gallery-frame-3,
  .gallery-layout-six .gallery-frame-4,
  .gallery-layout-six .gallery-frame-5,
  .gallery-layout-six .gallery-frame-6,
  .gallery-layout-eight .gallery-frame-1,
  .gallery-layout-eight .gallery-frame-2,
  .gallery-layout-eight .gallery-frame-3,
  .gallery-layout-eight .gallery-frame-4,
  .gallery-layout-eight .gallery-frame-5,
  .gallery-layout-eight .gallery-frame-6,
  .gallery-layout-eight .gallery-frame-7,
  .gallery-layout-eight .gallery-frame-8 {
    grid-column: auto !important;
    grid-row: auto !important;
    grid-area: auto !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: clamp(280px, 76vw, 430px) !important;
    aspect-ratio: 4 / 5 !important;
    padding: 10px !important;
    transform: none !important;
  }

  .gallery-layout-four .gallery-frame.is-landscape,
  .gallery-layout-six .gallery-frame.is-landscape,
  .gallery-layout-eight .gallery-frame.is-landscape,
  .gallery-layout-four .gallery-frame-3,
  .gallery-layout-four .gallery-frame-4 {
    min-height: clamp(220px, 58vw, 340px) !important;
    aspect-ratio: 16 / 10 !important;
  }

  .gallery-layout-four .gallery-frame:hover,
  .gallery-layout-six .gallery-frame:hover,
  .gallery-layout-eight .gallery-frame:hover,
  .gallery-layout-four .gallery-frame:focus-within,
  .gallery-layout-six .gallery-frame:focus-within,
  .gallery-layout-eight .gallery-frame:focus-within {
    transform: none !important;
  }

  .gallery .gallery-frame .gallery-photo,
  .gallery.gallery-layout-four .gallery-photo,
  .gallery.gallery-layout-six .gallery-photo,
  .gallery.gallery-layout-eight .gallery-photo {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  .gallery .gallery-frame figcaption {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Soft section transitions: feather photo backdrops so adjacent images do not meet as a hard line. */
.section.has-photo-backdrop {
  background-image:
    linear-gradient(180deg, rgba(255, 250, 245, 0.96) 0%, rgba(255, 250, 245, 0.7) 36%, rgba(255, 250, 245, 0) 100%),
    linear-gradient(0deg, rgba(255, 250, 245, 0.95) 0%, rgba(255, 250, 245, 0.66) 38%, rgba(255, 250, 245, 0) 100%),
    radial-gradient(ellipse at 18% 0%, rgba(242, 163, 154, 0.12), transparent 46%),
    linear-gradient(
      rgba(var(--section-tint, 255, 250, 245), var(--section-overlay-opacity, 0.72)),
      rgba(var(--section-tint, 255, 250, 245), var(--section-overlay-opacity, 0.72))
    ),
    var(--section-image) !important;
  background-position:
    center top,
    center bottom,
    center top,
    center,
    center;
  background-repeat: no-repeat;
  background-size:
    100% clamp(88px, 10vw, 150px),
    100% clamp(104px, 12vw, 170px),
    100% clamp(180px, 22vw, 300px),
    auto,
    cover;
}

.details-section.has-photo-backdrop {
  background-position:
    center top,
    center bottom,
    center top,
    center center,
    center top;
}

/* Live handwriting preview: the guestbook opens and mirrors the current wish draft. */
.guestbook-live-preview {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(48%, 430px);
  height: min(58vh, 540px);
  min-height: 420px;
  opacity: 0;
  transform: translate(-50%, -50%) translateX(24%) rotate(0.45deg) scale(0.98);
  transition: opacity 0.35s ease, transform 0.45s ease;
  pointer-events: none;
}

.guestbook-stage.is-live-writing.is-book-open .guestbook-live-preview {
  opacity: 1;
  transform: translate(-50%, -50%) translateX(24%) rotate(0.45deg);
}

.guestbook-stage.is-live-writing .guestbook-book {
  filter: drop-shadow(0 24px 28px rgba(5, 8, 20, 0.32)) saturate(0.96);
}

.guestbook-live-paper {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  padding: clamp(32px, 4vw, 46px) clamp(28px, 4vw, 48px) clamp(34px, 4vw, 48px);
  overflow: hidden;
  border-radius: 4px 10px 10px 4px;
  color: #533c39;
  background:
    linear-gradient(90deg, transparent 0 27px, rgba(177, 83, 88, 0.16) 27px 29px, transparent 29px),
    repeating-linear-gradient(to bottom, transparent 0 32px, rgba(95, 126, 145, 0.16) 32px 33px),
    radial-gradient(circle at 16% 10%, rgba(185, 142, 70, 0.1), transparent 30%),
    #fffaf0;
  box-shadow:
    inset 18px 0 26px rgba(70, 50, 37, 0.08),
    inset 0 0 34px rgba(92, 63, 42, 0.08),
    0 14px 34px rgba(45, 31, 25, 0.16);
}

.guestbook-live-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 8%, rgba(184, 95, 102, 0.1), transparent 25%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent 36%);
  pointer-events: none;
}

.guestbook-live-kicker {
  position: relative;
  z-index: 1;
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(185, 142, 70, 0.22);
  border-radius: 999px;
  color: rgba(122, 82, 63, 0.72);
  background: rgba(255, 253, 249, 0.68);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guestbook-live-text,
.guestbook-live-signature {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #5a3f4a;
  text-shadow: 0 0 0.01px currentColor;
}

.guestbook-live-text {
  align-self: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Caveat", "Dancing Script", cursive;
  font-size: clamp(1.22rem, 1.9vw, 1.78rem);
  font-weight: 700;
  line-height: 1.13;
}

.guestbook-live-text::after {
  content: "";
  display: inline-block;
  width: 0.12em;
  height: 0.82em;
  margin-left: 0.08em;
  border-radius: 999px;
  background: currentColor;
  vertical-align: -0.08em;
  animation: liveInkBlink 0.72s ease-in-out infinite;
}

.guestbook-live-signature {
  justify-self: end;
  max-width: 80%;
  padding-top: 10px;
  font-family: "Great Vibes", "Dancing Script", cursive;
  font-size: clamp(1.45rem, 2.5vw, 2.32rem);
  line-height: 1;
  color: #a84f5a;
}

.guestbook-live-pen {
  position: absolute;
  z-index: 3;
  left: var(--pen-x, 22%);
  top: var(--pen-y, 34%);
  width: clamp(112px, 12.4vw, 166px);
  height: clamp(38px, 4.2vw, 58px);
  transform: translate(-2%, -51%) rotate(-18deg);
  transform-origin: 2% 50%;
  filter: drop-shadow(0 12px 14px rgba(57, 37, 31, 0.22));
  transition: left 0.18s ease, top 0.18s ease;
  animation: livePenWrite 0.42s ease-in-out infinite alternate;
}

.guestbook-live-pen i {
  position: absolute;
  left: -2px;
  top: 50%;
  width: 36px;
  height: 12px;
  border-bottom: 2px solid rgba(90, 63, 74, 0.36);
  border-radius: 50%;
  transform: translate(-10%, -18%) rotate(8deg);
  transform-origin: left center;
}

.guestbook-live-pen::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(90, 63, 74, 0.82), rgba(90, 63, 74, 0.18) 64%, transparent 70%);
  transform: translate(-50%, -8%);
  animation: liveInkTouch 0.7s ease-in-out infinite;
}

.guestbook-live-pen img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

@keyframes liveInkBlink {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 1; }
}

@keyframes liveInkTouch {
  0%, 100% { opacity: 0.42; transform: translate(-50%, -8%) scale(0.72); }
  50% { opacity: 1; transform: translate(-50%, -8%) scale(1.08); }
}

@keyframes livePenWrite {
  from { transform: translate(-2%, -51%) rotate(-19.5deg); }
  to { transform: translate(0%, -47%) rotate(-15deg); }
}

@media (max-width: 900px) {
  .guestbook-live-preview {
    width: min(82%, 390px);
    height: min(58vh, 500px);
    min-height: 390px;
    transform: translate(-50%, -50%) rotate(0.45deg) scale(0.98);
  }

  .guestbook-stage.is-live-writing.is-book-open .guestbook-live-preview {
    transform: translate(-50%, -50%) rotate(0.45deg);
  }
}

@media (max-width: 560px) {
  .guestbook-live-preview {
    width: min(86%, 340px);
    height: 420px;
    min-height: 380px;
  }

  .guestbook-live-paper {
    padding: 30px 26px 34px 36px;
  }

  .guestbook-live-text {
    font-size: clamp(1.08rem, 5vw, 1.4rem);
  }

  .guestbook-live-signature {
    font-size: clamp(1.42rem, 7vw, 2rem);
  }
}

/* Zoom-safe story chapter rail: keep the final chapter reachable at desktop zoom levels. */
@media (min-width: 901px) {
  .story-section {
    height: auto !important;
    min-height: calc(100svh - 62px);
    align-items: start;
    overflow: visible;
  }

  .story-showcase {
    height: auto;
    min-height: min(74vh, 560px);
    align-items: stretch;
  }

  .story-chapter-list {
    position: relative;
    height: auto;
    min-height: 0;
    max-height: min(72vh, 620px);
    padding-bottom: clamp(58px, 8vh, 96px);
    align-content: start;
    grid-template-rows: auto auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(185, 142, 70, 0.42) rgba(255, 252, 247, 0.45);
  }

  .story-scroll-cue {
    position: sticky;
    bottom: 14px;
    z-index: 6;
    display: block;
    width: fit-content;
    margin: -42px auto 0;
    padding: 8px 14px;
    border: 1px solid rgba(185, 142, 70, 0.26);
    border-radius: 999px;
    color: #8e6d3a;
    background: rgba(255, 252, 247, 0.92);
    box-shadow: 0 12px 28px rgba(94, 58, 52, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    font-family: "Cormorant Garamond", serif;
    font-size: 0.88rem;
    font-style: italic;
    font-weight: 800;
    letter-spacing: 0.01em;
    pointer-events: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.28s ease, transform 0.28s ease;
  }

  .story-chapter-list.has-more:not(.is-at-end) .story-scroll-cue {
    opacity: 1;
  }

  .story-chapter-list.has-more:not(.is-at-end) .story-scroll-cue {
    animation: storyScrollCue 1.45s ease-in-out infinite;
  }

  @keyframes storyScrollCue {
    0%, 100% { transform: translateY(5px); }
    50% { transform: translateY(-1px); }
  }

  .story-chapter-list::-webkit-scrollbar {
    width: 6px;
  }

  .story-chapter-list::-webkit-scrollbar-track {
    background: rgba(255, 252, 247, 0.45);
    border-radius: 999px;
  }

  .story-chapter-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(185, 142, 70, 0.42);
  }

  .story-timeline {
    align-content: start;
    grid-template-rows: none;
    padding-bottom: clamp(24px, 4vh, 44px);
  }

  .story-card {
    min-height: clamp(92px, 12vh, 132px);
    align-items: center;
    overflow: hidden;
  }

  .story-chapter-copy {
    gap: 4px;
  }

  .story-chapter-date,
  .story-chapter-title {
    overflow: visible;
  }

  .story-chapter-title {
    display: block;
    -webkit-line-clamp: unset;
    line-height: 1.28;
  }

  .story-card .story-lock-status {
    margin-top: 5px;
  }

  .story-card:last-child {
    margin-bottom: clamp(12px, 2vh, 24px);
  }
}

/* Gentle guestbook nudge: when the book is closed, give it a small elegant sway. */
.guestbook-stage:not(.is-book-open) .guestbook-closed-cover {
  transform-origin: 50% 78%;
  animation: guestbookClosedCoverNudge 5.8s ease-in-out infinite;
}

.guestbook-stage:not(.is-book-open) .guestbook-closed-cover:hover,
.guestbook-stage:not(.is-book-open) .guestbook-closed-cover:focus-within,
body.guestbook-spotlight-active .guestbook-closed-cover {
  animation-play-state: paused;
}

@keyframes guestbookClosedCoverNudge {
  0%, 64%, 100% {
    transform: translate(-50%, -50%) translateY(0) rotate(-1.2deg);
  }
  70% {
    transform: translate(-50%, -50%) translateY(-2px) rotate(-1.75deg);
  }
  76% {
    transform: translate(-50%, -50%) translateY(1px) rotate(-0.7deg);
  }
  82% {
    transform: translate(-50%, -50%) translateY(-1px) rotate(-1.48deg);
  }
  88% {
    transform: translate(-50%, -50%) translateY(0) rotate(-1.02deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .guestbook-stage:not(.is-book-open) .guestbook-closed-cover {
    animation: none;
  }
}

/* RSVP guest suggestions: helps invited guests pick their existing admin record. */
.rsvp-section .form label {
  position: relative;
}

.guest-suggestions {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  right: 0;
  z-index: 12;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(185, 142, 70, 0.24);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.98);
  box-shadow: 0 18px 34px rgba(69, 46, 42, 0.16);
  backdrop-filter: blur(14px);
}

.guest-suggestions[hidden] {
  display: none;
}

.guest-suggestion-title,
.guest-suggestion-empty {
  margin: 0;
  color: #8e6d3a;
  font-family: "Cormorant Garamond", serif;
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 800;
}

.guest-suggestion-option {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(185, 142, 70, 0.16);
  border-radius: 10px;
  padding: 8px 10px;
  color: #3c2f2b;
  background: rgba(255, 255, 255, 0.88);
  text-align: left;
  cursor: pointer;
}

.guest-suggestion-option:hover,
.guest-suggestion-option:focus-visible {
  border-color: rgba(184, 95, 102, 0.3);
  background: #fff6f7;
  outline: 0;
}

.guest-suggestion-option strong {
  font-size: 0.94rem;
}

.guest-suggestion-option span {
  color: var(--muted);
  font-size: 0.78rem;
}
