﻿:root {
  --bg: #f2eeea;
  --card: #f8f6f1;
  --text: #1e5000f5;
  --muted: #7f7468;
  --accent: #5e6d48;
  --ring: #e4ddd1;
  --page-bg-image: url("https://s3.vn-hcm-1.vietnix.cloud/cuoiroine/background-169.webp");
  --page-bg-position: center;
  --intro-overlay-tint-top: rgba(255, 248, 242, 0.18);
  --intro-overlay-tint-bottom: rgba(243, 229, 216, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  position: relative;
}

body::before {
  content: none;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: var(--page-bg-image);
  background-size: cover;
  background-position: var(--page-bg-position);
  background-repeat: no-repeat;
  background-attachment: fixed;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
}

a {
  color: var(--accent);
}

.hidden {
  display: none !important;
}

.site {
  position: relative;
  z-index: 1;
  width: min(80vw, 1120px);
  max-width: 80vw;
  margin: 0 auto;
  padding: 14px 10px 34px;
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity 760ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 760ms ease;
  will-change: transform, opacity, filter;
}

.site.is-hidden-soft {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  filter: blur(10px);
}

.site.is-closing {
  animation: invitationClose 820ms cubic-bezier(0.2, 0.9, 0.22, 1) forwards;
  pointer-events: none;
}

.site-card {
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: 16px;
  box-shadow: none;
  padding: 22px 18px;
  margin-bottom: 10px;
  height: auto;
  overflow: visible;
  transition: transform 300ms ease, opacity 300ms ease;
}

.center {
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 11px;
  color: var(--muted);
}

.section-title,
h1,
h2,
h3,
h4,
.month,
.year,
.quote {
  font-family: "Cormorant Garamond", serif;
}

.section-title {
  font-size: clamp(32px, 5vw, 44px);
  margin: 8px 0 10px;
}

.hero {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}

.hero.site-card {
  background: transparent;
  margin-bottom: 28px;
  height: 80vh;
  padding: 0 !important;
  overflow: hidden;
}

.hero::before,
.hero::after {
  display: none;
}

.hero::before {
  width: 360px;
  height: 360px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 74%);
}

.hero::after {
  width: 280px;
  height: 280px;
  right: -100px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(186, 129, 93, 0.16) 0%, rgba(186, 129, 93, 0) 76%);
}


.site-btn {
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  border: 1px solid var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 220ms ease, background-color 220ms ease, color 220ms ease, box-shadow 220ms ease;
}

.site-btn.primary {
  background: var(--accent);
  color: #fff;
}

.site-btn.ghost {
  background: transparent;
  color: var(--accent);
}

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

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.form-control,
.form-select {
  border: 1px solid #dbc5b7;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.96);
  color: var(--text);
  padding: 10px 12px;
  box-shadow: none;
}

.form-control::placeholder {
  color: #8c8178;
}

.form-control:focus,
.form-select:focus {
  border-color: #9fb093;
  box-shadow: 0 0 0 0.18rem rgba(95, 117, 74, 0.12);
  background-color: #fff;
}

.hero-stage {
  position: relative;
  z-index: 1;
  height: 100%;
  display: block;
  padding: 0;
}

.hero-poster {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: inherit;
  overflow: hidden;
  background: #0f0f0f;
  box-shadow: none;
}

.hero-poster picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  cursor: zoom-in;
  transform: none;
  filter: saturate(0.95) contrast(1.03);
}

.hero-overlay-text {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 14px 20px;
  text-align: center;
  color: #fff;
  background: linear-gradient(
    to top,
    rgba(16, 14, 12, 0.48) 0%,
    rgba(16, 14, 12, 0.26) 30%,
    rgba(16, 14, 12, 0.1) 56%,
    rgba(16, 14, 12, 0) 100%
  );
  backdrop-filter: blur(0.9px);
  -webkit-backdrop-filter: blur(0.9px);
}

.hero-script {
  margin: 0;
  font-family: "Great Vibes", "Cormorant Garamond", serif;
  font-size: clamp(58px, 8.2vw, 82px);
  line-height: 0.9;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.hero-names {
  margin: 8px 0 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(10px, 1.5vw, 14px);
  letter-spacing: 0.36em;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.hero-date {
  margin: 8px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(28px, 4.1vw, 46px);
  letter-spacing: 0.1em;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.our-story-card {
  background: var(--card);
  padding-top: 32px;
  padding-bottom: 30px;
  overflow: hidden;
}

.story-canvas {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 4 / 3;
  margin: 8px auto 18px;
  border-radius: 24px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
}

.story-envelope {
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: min(74%, 380px);
  aspect-ratio: 7 / 4;
  transform: translateX(-50%);
  z-index: 2;
  filter: drop-shadow(0 10px 16px rgba(44, 48, 27, 0.24));
}

.story-letter {
  position: absolute;
  left: 50%;
  bottom: 44%;
  width: 64%;
  height: 62%;
  transform: translateX(-50%);
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #fffef9 0%, #f4eddf 100%);
  border: 1px solid #e8e0d4;
  z-index: 1;
}

.story-flap-back {
  position: absolute;
  inset: 0;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(165deg, #7c8c4d 0%, #69793f 56%, #5a6a36 100%);
  overflow: hidden;
  z-index: 2;
}

.story-flap-back::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(45, 52, 28, 0.2), rgba(45, 52, 28, 0.03), rgba(45, 52, 28, 0.2));
  clip-path: polygon(0 100%, 50% 52%, 100% 100%, 100% 0, 0 0);
}

.story-envelope::before,
.story-envelope::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 32%;
  height: 66%;
  background: linear-gradient(170deg, #6f7f43 0%, #5a6933 100%);
  z-index: 4;
}

.story-envelope::before {
  left: 0;
  clip-path: polygon(0 100%, 0 0, 100% 44%);
}

.story-envelope::after {
  right: 0;
  clip-path: polygon(100% 100%, 100% 0, 0 44%);
}

.story-flap-front {
  position: absolute;
  inset: auto 0 0 0;
  height: 76%;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #7a8a4b 0%, #67783d 54%, #596a35 100%);
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
  z-index: 5;
}

.story-flap-front::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(45, 53, 25, 0.34) 0%,
    rgba(45, 53, 25, 0.08) 35%,
    rgba(45, 53, 25, 0.08) 65%,
    rgba(45, 53, 25, 0.32) 100%
  );
}

.story-seal {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: radial-gradient(circle at 34% 30%, #a9bc6b 0%, #7d8f4c 58%, #546433 100%);
  border: 2px solid rgba(230, 238, 201, 0.68);
  box-shadow: 0 3px 7px rgba(49, 55, 26, 0.26);
  z-index: 6;
}

.story-photo {
  position: absolute;
  width: min(47%, 220px);
  background: #fff;
  padding: 8px 8px 24px;
  border-radius: 2px;
  box-shadow: 0 8px 14px rgba(30, 25, 18, 0.16);
  z-index: 6;
  --story-photo-transform: none;
  transform: var(--story-photo-transform);
  opacity: 1;
  visibility: visible;
  filter: none;
  pointer-events: auto;
  cursor: zoom-in;
}

.story-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

.story-photo-left {
  left: 26%;
  top: 8%;
  --story-photo-transform: translateX(-50%) rotate(-13deg);
}

.story-photo-left img {
  object-position: center 34%;
}

.story-photo-right {
  right: 12%;
  top: 4%;
  --story-photo-transform: rotate(6deg);
}

.story-photo-right img {
  object-position: center center;
}

.story-bloom {
  position: absolute;
  width: 92px;
  height: 40px;
  opacity: 0.55;
  z-index: 3;
}

.story-bloom::before,
.story-bloom::after {
  content: "";
  position: absolute;
  border-radius: 20px 20px 2px 20px;
  background: linear-gradient(160deg, #fefdf6 0%, #e4efd0 80%);
}

.story-bloom::before {
  width: 36px;
  height: 20px;
  left: 6px;
  top: 8px;
  transform: rotate(-24deg);
}

.story-bloom::after {
  width: 28px;
  height: 16px;
  left: 34px;
  top: 18px;
  transform: rotate(14deg);
}

.story-bloom-left {
  left: 16px;
  bottom: 56px;
  transform: rotate(-14deg);
}

.story-bloom-right {
  right: 12px;
  bottom: 44px;
  transform: rotate(18deg);
}

.story-title {
  margin: 0;
  font-family: "Great Vibes", "Cormorant Garamond", serif;
  font-size: clamp(56px, 7.6vw, 86px);
  line-height: 0.9;
  color: #6a564d;
}

.story-copy {
  max-width: 760px;
  margin: 12px auto 0;
  color: #6f5d55;
  font-size: clamp(15px, 2.1vw, 20px);
  line-height: 1.72;
}


@media (max-width: 640px) {
  .hero.site-card {
    padding: 0 !important;
  }

  .hero-stage {
    min-height: auto;
    padding: 0;
  }

  .hero-poster {
    width: 100%;
    border-radius: inherit;
  }

  .hero-photo {
    object-position: center center;
  }

  .hero-overlay-text {
    padding: 12px 10px 14px;
  }

  .hero-script {
    font-size: clamp(40px, 11vw, 56px);
  }

  .hero-names {
    font-size: clamp(9px, 2.7vw, 12px);
    letter-spacing: 0.24em;
  }

  .hero-date {
    margin-top: 6px;
    font-size: clamp(22px, 6.6vw, 32px);
  }

  .our-story-card {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .story-canvas {
    border-radius: 18px;
    margin-bottom: 14px;
  }

  .story-envelope {
    width: min(80%, 320px);
    bottom: 16px;
  }

  .story-seal {
    width: 30px;
    height: 30px;
  }

  .story-photo {
    width: min(50%, 178px);
    padding: 6px 6px 20px;
  }

  .story-photo-left {
    left: 25%;
    top: 12%;
  }

  .story-photo-right {
    right: 11%;
    top: 8%;
  }

  .story-title {
    font-size: clamp(42px, 11vw, 62px);
  }

  .story-copy {
    font-size: clamp(14px, 3.8vw, 18px);
    line-height: 1.5;
  }
}

.sub {
  font-size: 13px;
  color: #7e665d;
}

.year {
  margin: 6px 0 0;
  color: #5f6f4f;
  font-size: clamp(50px, 8vw, 80px);
  line-height: 1;
}

.month {
  margin: 0;
  color: #5f6f4f;
  font-family: "Great Vibes", "Cormorant Garamond", serif;
  font-size: clamp(58px, 9vw, 92px);
  line-height: 0.9;
}

.save-date-card {
  background: #f3f3f0;
  padding-top: 34px;
  padding-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.save-date-card .eyebrow {
  color: #5f6f4f;
  letter-spacing: 0.24em;
  margin-bottom: 6px;
}

.save-date-card .year {
  font-size: clamp(80px, 12.8vw, 130px);
  line-height: 0.9;
  margin: 0;
}

.flat-calendar {
  margin: 14px auto 0;
  max-width: 500px;
}

.flat-weekdays,
.flat-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px 6px;
}

.flat-weekdays span {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #5f6f4f;
  text-transform: uppercase;
}

.flat-days {
  margin-top: 10px;
}

.flat-days span {
  height: 36px;
  display: grid;
  place-items: center;
  color: #4f6a40;
  font-size: clamp(17px, 2.4vw, 22px);
  font-family: "Cormorant Garamond", serif;
  line-height: 1;
}

.flat-days .empty {
  opacity: 0;
}

.flat-days .wedding-day {
  position: relative;
  font-weight: 600;
}

.flat-days .wedding-day::after {
  content: "❤";
  position: absolute;
  top: 3px;
  right: 8px;
  transform: rotate(-14deg);
  font-size: 9px;
  color: #b86a6a;
  opacity: 0.9;
}

.save-divider {
  margin: 12px auto 12px;
  width: min(460px, 86%);
  height: 20px;
  position: relative;
}

.save-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #9fb092 18%, #9fb092 82%, transparent 100%);
  transform: translateY(-50%);
  opacity: 0.75;
}

.save-divider span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 20px;
  display: grid;
  place-items: center;
}

.save-divider span::before {
  content: "\273F";
  color: #6a7f5b;
  font-size: 16px;
  line-height: 1;
}

.countdown-note {
  margin: 18px auto 0;
  max-width: 520px;
  color: #4f6a40;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(19px, 2.6vw, 34px);
  line-height: 1.22;
}

.countdown-plain {
  margin-top: 14px;
  color: #4f6a40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
}

.countdown-part {
  min-width: 84px;
  text-align: center;
}

.countdown-part b {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(40px, 5.8vw, 60px);
  font-weight: 500;
  margin-bottom: 11px;
}

.countdown-part small {
  display: block;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  color: #6f8360;
}

.countdown-sep {
  display: inline-block;
  transform: translateY(12px);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(30px, 4.2vw, 46px);
  opacity: 0.9;
}

.save-date-card .month {
  margin-top: -14px;
  margin-bottom: 16px;
  font-size: clamp(46px, 8vw, 86px);
  line-height: 0.94;
  letter-spacing: 0.01em;
}

.save-date-card .flat-calendar {
  margin-top: 4px;
}

.event-box {
  border-radius: 18px;
  padding: 16px;
  background: #faf4ee;
}

.event-box h4 {
  margin: 0 0 8px;
  font-size: 30px;
}

.timeline-card {
  overflow: hidden;
}

.timeline-title {
  color: #3e5a2f;
  margin-bottom: 14px;
}

.timeline-board {
  position: relative;
  width: min(100%, 940px);
  min-height: 500px;
  margin: 0 auto;
  border-radius: 26px;
  border: none;
  background: transparent;
  overflow: hidden;
  padding: 34px 0 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "welcome camera"
    "wine dinner";
  align-items: center;
  column-gap: clamp(28px, 4vw, 72px);
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 6%;
  bottom: 6%;
  width: 1px;
  transform: translateX(-50%);
  background: #d4c8b8;
}

.timeline-item {
  position: relative;
  width: 100%;
  color: #3f382f;
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 1;
}

.timeline-center-icon {
  display: inline-grid;
  place-items: center;
  width: 126px;
  height: 126px;
  z-index: 2;
  justify-self: center;
}

.timeline-center-icon img,
.timeline-center-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.timeline-center-icon svg {
  fill: none;
  stroke: #65744f;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timeline-center-icon img {
  object-fit: contain;
}

.timeline-center-icon-camera {
  grid-area: camera;
  align-self: center;
  justify-self: center;
  padding-top: 0;
  padding-left: 0;
  transform: translate(8px, 4px);
}

.timeline-center-icon-wine {
  grid-area: wine;
  align-self: center;
  justify-self: center;
  padding-top: 0;
  padding-left: 0;
  transform: translate(-8px, -4px);
}

.timeline-item h4 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 42px);
  line-height: 1.08;
  font-family: "Cormorant Garamond", serif;
}

.timeline-item p {
  margin: 4px 0 0;
  font-size: clamp(13px, 1.5vw, 18px);
  color: #6b6258;
}

.timeline-item.left {
  grid-area: welcome;
  width: min(100%, 320px);
  align-self: center;
  justify-self: center;
  padding-right: 0;
}

.timeline-item.right {
  grid-area: dinner;
  width: min(100%, 320px);
  align-self: center;
  justify-self: center;
  padding-left: 0;
}

.timeline-item.t1 {
  align-self: center;
}

.timeline-item.t2 {
  align-self: center;
}

.gallery {
  position: relative;
  width: min(92vw, 430px);
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  background: #151515;
  height: auto;
  will-change: transform;
  contain: layout paint;
}

.gallery #memoryImage {
  cursor: zoom-in;
}

.memory-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  transform: translateZ(0) scale(1.04);
  filter: blur(2px);
  transition: opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1100ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 900ms ease;
  pointer-events: none;
  will-change: opacity, transform, filter;
  backface-visibility: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 240ms ease, visibility 240ms ease, background-color 240ms ease;
}

.lightbox[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(10, 10, 12, 0);
}

.lightbox-image {
  max-width: min(96vw, 1600px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  transform: scale(1);
  opacity: 1;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
}

.lightbox[aria-hidden="true"] .lightbox-image {
  transform: scale(0.94);
  opacity: 0;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(0);
  opacity: 1;
  transition: transform 220ms ease, opacity 180ms ease;
}

.lightbox[aria-hidden="true"] .lightbox-close {
  transform: translateY(-8px);
  opacity: 0;
}

#memoryPrevImage {
  z-index: 1;
}

#memoryImage {
  z-index: 2;
}

.memory-layer.active {
  opacity: 1;
  transform: translateZ(0) scale(1);
  filter: blur(0);
}

#memoryImage.active {
  pointer-events: auto;
}

.nav-btn {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  border: 0;
  width: 52px;
  height: 72px;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 0;
  transition: background-color 180ms ease, transform 180ms ease;
}

.nav-btn svg {
  width: 28px;
  height: 28px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
}

#prevMemoryBtn {
  left: 14px;
}

#nextMemoryBtn {
  right: 14px;
}

.nav-btn:hover {
  background: rgba(0, 0, 0, 0.16);
}

.thumbs-wrap {
  margin-top: 10px;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: min(100%, 900px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  padding: 2px 0;
}

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

.thumbs button {
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 0;
  aspect-ratio: 9 / 16;
  width: 52px;
  min-width: 52px;
  overflow: hidden;
  cursor: pointer;
}

.thumbs button.active {
  border-color: var(--accent);
}

.thumbs img {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
}

.thumbs-arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #d8cdbf;
  background: #fffdf8;
  color: #60544b;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.thumbs-arrow svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gift {
  margin-top: 14px;
  border-radius: 20px;
  border: 1px solid var(--ring);
  background: #f4e9df;
  padding: 16px;
}

.rsvp-choice-group {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rsvp-choice-group legend {
  grid-column: 1 / -1;
  padding: 0;
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: #5d4a40;
}

.rsvp-choice {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #ded0c4;
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.88);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.35;
  transition: border-color 180ms ease, background-color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease, color 180ms ease;
}

.rsvp-choice:hover {
  border-color: #c9b8aa;
  background: #fff;
  transform: translateY(-1px);
}

.rsvp-choice input[type="radio"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  aspect-ratio: 1 / 1;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  box-sizing: border-box;
  border-radius: 6px;
  border: 2px solid #bfae9f;
  background-color: #fff;
  flex: 0 0 22px;
  box-shadow: none;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease,
    background-color 180ms ease;
}

.rsvp-choice input[type="radio"]::after {
  content: "";
  width: 10px;
  height: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 2px;
  background: transparent;
  transform: translate(-50%, -50%);
  transition: background-color 180ms ease;
}

.rsvp-choice input[type="radio"]:checked {
  border-color: #58754a;
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(88, 117, 74, 0.12);
}

.rsvp-choice input[type="radio"]:checked::after {
  background: #58754a;
}

.rsvp-choice input[type="radio"]:focus-visible {
  box-shadow: 0 0 0 4px rgba(88, 117, 74, 0.12);
}

.rsvp-choice:has(input[type="radio"]:checked) {
  border-color: #9fb093;
  background: linear-gradient(180deg, #fffefd 0%, #f3f8ef 100%);
  box-shadow: 0 8px 18px rgba(76, 96, 63, 0.08);
  color: #405238;
}

.rsvp-choice:has(input[type="radio"]:focus-visible) {
  outline: 2px solid rgba(88, 117, 74, 0.25);
  outline-offset: 2px;
}

.rsvp-choice span {
  flex: 1 1 auto;
  color: #53463d;
}

@media (max-width: 480px) {
  .rsvp-choice-group {
    grid-template-columns: 1fr;
  }

  .rsvp-choice {
    width: 100%;
    border-radius: 18px;
  }
}

#guestCountField {
  position: relative;
  gap: 10px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(159, 176, 147, 0.5);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 253, 250, 0.96) 0%, rgba(247, 244, 239, 0.94) 100%);
  box-shadow: 0 12px 24px rgba(94, 109, 72, 0.06);
  transition: opacity 180ms ease, transform 180ms ease;
}

#guestCountField.is-hidden {
  display: none;
}

#guestCountField .form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-height: 54px;
  padding: 12px 48px 12px 16px;
  border-radius: 16px;
  border-color: rgba(110, 127, 93, 0.42);
  background-color: rgba(255, 255, 255, 0.96);
  background-image:
    linear-gradient(45deg, transparent 50%, #567047 50%),
    linear-gradient(135deg, #567047 50%, transparent 50%);
  background-position:
    calc(100% - 24px) calc(50% - 3px),
    calc(100% - 18px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  color: #49613d;
  font-weight: 500;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

#guestCountField .form-select:hover {
  border-color: rgba(86, 112, 71, 0.56);
  transform: translateY(-1px);
}

#guestCountField .form-select:focus {
  border-color: #8ca07d;
  box-shadow: 0 0 0 0.22rem rgba(95, 117, 74, 0.14);
}

#guestCountField .form-select option {
  color: #415437;
  background: #fffdf9;
}

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

.form-note {
  margin: 2px 0 0;
  font-size: 13px;
  color: #8a7f73;
}

.form-status {
  min-height: 20px;
  margin: 0;
  font-size: 14px;
  color: #7b5c47;
}

.form-status.is-error {
  color: #b54848;
}

.form-status.is-info {
  color: #5c6f4a;
}

.gift-modal {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.gift-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gift-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 16, 15, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.gift-modal-card {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  margin-top: 0;
  box-shadow: 0 24px 60px rgba(48, 39, 29, 0.18);
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 240ms ease;
}

.gift-modal.is-open .gift-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.gift-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #d8c9bc;
  background: rgba(255, 255, 255, 0.9);
  color: #5b463f;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.gift-header {
  text-align: center;
  margin-bottom: 10px;
}

.gift-header .eyebrow {
  margin: 0;
}

.gift-title {
  margin: 4px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1;
  color: #5b463f;
}

.gift-copy {
  max-width: 760px;
  margin: 12px auto 0;
  font-size: 15px;
  line-height: 1.7;
  color: #6b5f57;
}

.gift-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 14px;
}

.gift-grid .event-box {
  width: min(100%, 420px);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition: opacity 280ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.gift-modal.is-open .gift-grid .event-box {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.qr-bank {
  width: min(262px, 97%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  margin: 10px auto 8px;
  border-radius: 12px;
  border: 1px solid #e6d7cc;
  background: #fff;
  padding: 6px;
  cursor: zoom-in;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 320ms ease 90ms, transform 480ms cubic-bezier(0.22, 1, 0.36, 1) 90ms;
}

.gift-modal.is-open .qr-bank {
  opacity: 1;
  transform: scale(1);
}

.quote {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: radial-gradient(circle at top, #fff8f2 0%, #f3e5d8 52%, #ead6c7 100%);
  display: grid;
  place-items: center;
  padding: 20px;
}

.intro-card {
  position: relative;
  max-width: 760px;
  text-align: center;
}

.intro-card h1 {
  margin: 8px 0 0;
  font-size: clamp(42px, 6vw, 62px);
  color: #6d554c;
}

.intro-card p {
  line-height: 1.7;
}

.heart-btn {
  margin: 14px auto 0;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(160deg, #7a564b 0%, #6f4e45 60%, #5b3f38 100%);
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(111, 78, 69, 0.35);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms ease, filter 260ms ease;
  animation: envelopePulse 2.6s ease-in-out infinite;
}

.heart-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 16px 34px rgba(111, 78, 69, 0.45);
  filter: saturate(1.08);
}

.heart-btn:active {
  transform: translateY(0) scale(0.98);
}

.envelope-btn {
  position: relative;
}

.envelope-btn svg {
  width: 30px;
  height: 30px;
  display: block;
  stroke: #fff !important;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: none;
  color: #fff !important;
}

.envelope-btn svg rect,
.envelope-btn svg path {
  stroke: #fff !important;
  color: #fff !important;
}

.intro-note {
  margin-top: 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: 34px;
  color: #6d554c;
}

.music-btn {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 25;
  width: 46px;
  height: 46px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition: transform 220ms ease, background-color 220ms ease;
}

.music-btn:hover {
  transform: translateY(-1px) scale(1.04);
}

.petals {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 5;
}

.petal {
  position: absolute;
  top: -10%;
  border-radius: 70% 0 70% 0;
  background: #efbfcb;
  animation: fall linear infinite, sway ease-in-out infinite;
  will-change: transform;
}

.intro-overlay {
  background-image: linear-gradient(
    to bottom,
    var(--intro-overlay-tint-top),
    var(--intro-overlay-tint-bottom)
  );
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  transition:
    opacity 840ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 840ms ease;
  will-change: transform, opacity, filter;
}

.intro-overlay.is-hidden-soft {
  opacity: 0;
  transform: scale(1.03);
  filter: blur(8px);
}

.intro-card {
  animation: introFloat 3.4s ease-in-out infinite;
}

@keyframes envelopePulse {
  0%,
  100% {
    box-shadow: 0 12px 28px rgba(111, 78, 69, 0.3);
  }
  50% {
    box-shadow: 0 16px 36px rgba(111, 78, 69, 0.46);
  }
}

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

@keyframes invitationClose {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(26px) scale(0.94);
    filter: blur(5px);
  }
}

@keyframes fall {
  0% {
    transform: translate3d(0, -12vh, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(18px, 52vh, 0) rotate(140deg);
  }
  100% {
    transform: translate3d(-22px, 112vh, 0) rotate(300deg);
  }
}

@keyframes sway {
  0%,
  100% {
    margin-left: 0;
  }
  50% {
    margin-left: 16px;
  }
}

@media (max-width: 900px) {
  .thumbs button {
    width: 50px;
    min-width: 50px;
  }
}

@media (max-width: 640px) {
  .thumbs-wrap {
    width: 100%;
  }

  .thumbs {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .site {
    padding: 16px 10px 28px;
  }

  .site-card {
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
  }

  .hero-stage {
    min-height: auto;
  }

  .hero-overlay-text {
    padding: 10px 10px 12px;
  }

  .hero-script {
    font-size: clamp(40px, 12vw, 54px);
  }

  .hero-names {
    font-size: clamp(9px, 2.8vw, 12px);
    line-height: 1;
    margin-top: 4px;
    letter-spacing: 0.2em;
  }

  .hero-date {
    font-size: clamp(22px, 7vw, 30px);
    margin-top: 2px;
  }

  .flat-calendar {
    max-width: 100%;
  }

  .flat-weekdays,
  .flat-days {
    gap: 8px 2px;
  }

  .flat-weekdays span {
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .flat-days span {
    height: 30px;
    font-size: clamp(15px, 4.6vw, 20px);
  }

  .countdown-note {
    font-size: clamp(18px, 5.8vw, 28px);
    margin-top: 14px;
  }

  .countdown-plain {
    gap: 2px;
  }

  .countdown-part {
    min-width: 66px;
  }

  .countdown-part b {
    font-size: clamp(30px, 10vw, 46px);
  }

  .countdown-part small {
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .countdown-sep {
    transform: translateY(8px);
    font-size: clamp(24px, 8vw, 34px);
  }

  .intro-card h1 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .intro-note {
    font-size: clamp(28px, 9vw, 38px);
  }

  .timeline-board {
    width: min(100%, 540px);
    min-height: 390px;
    border-radius: 20px;
    grid-template-columns: 1fr 1fr;
    padding: 22px 0;
  }

  .timeline-item {
    width: 100%;
  }

  .timeline-item.left {
    width: min(100%, 210px);
    transform: translateX(16px);
  }

  .timeline-item.right {
    width: min(100%, 210px);
    padding-left: 0;
    padding-right: 0;
    transform: translateX(24px);
  }

  .timeline-center-icon {
    width: 58px;
    height: 58px;
  }

  .timeline-center-icon img,
  .timeline-center-icon svg {
    width: 100%;
    height: 100%;
  }

  .timeline-center-icon-camera {
    transform: translate(2px, 0);
  }

  .timeline-center-icon-wine {
    transform: translate(-4px, 0);
  }

  .timeline-item h4 {
    font-size: clamp(20px, 5.8vw, 30px);
  }

  .timeline-item p {
    font-size: clamp(12px, 3.4vw, 16px);
  }

  .timeline-center-icon {
    width: 98px;
    height: 98px;
  }
}

@media (max-width: 375px) {
  .site {
    padding: 12px 8px 24px;
  }

  .site-card {
    padding: 14px;
    border-radius: 16px;
  }

  .hero-stage {
    min-height: auto;
  }

  .hero-poster {
    border-radius: inherit;
  }

  .hero-script {
    font-size: clamp(34px, 11.2vw, 46px);
  }

  .hero-names {
    font-size: clamp(8px, 2.8vw, 11px);
    letter-spacing: 0.16em;
  }

  .hero-date {
    font-size: clamp(18px, 6vw, 24px);
  }

  .flat-weekdays span {
    font-size: 8px;
    letter-spacing: 0.06em;
  }

  .flat-days span {
    height: 28px;
    font-size: clamp(14px, 4.4vw, 18px);
  }

  .save-divider {
    width: 92%;
  }

  .countdown-part {
    min-width: 60px;
  }

  .countdown-part b {
    font-size: clamp(28px, 9vw, 40px);
  }
}

.invitation-card {
  position: relative;
  overflow: hidden;
  font-family: "Cormorant Garamond", serif;
}

.invitation-card .invite-name {
  font-family: "Great Vibes", "Cormorant Garamond", serif;
}

.wedding-logo {
  width: min(512px, 95%);
  display: block;
  margin: 4px auto 20px;
  opacity: 0.95;
  animation: crestFloat 2.8s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, filter;
}

.family-grid {
  position: relative;
  max-width: 520px;
  margin: 0 auto 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.family-grid::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: #ddd3c7;
  transform: translateX(-50%);
}

.family-box {
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  color: #4e433b;
}

.family-box p:not(.family-label) {
  font-size: 21.6px;
}

.family-label {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 24px;
  font-weight: 900;
  color: #6e6258;
}

.invite-text {
  margin: 12px 0 12px;
  font-family: "Cormorant Garamond", serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
}

.invite-couple-block {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  justify-items: center;
  gap: 0;
  font-size: 0.92em;
}

.invite-name {
  margin: 0;
  display: block;
  font-family: "Great Vibes", "Cormorant Garamond", serif;
  font-size: clamp(52px, 6.2vw, 74px);
  line-height: 0.9;
  white-space: nowrap;
  color: #4a3e37;
}

.invite-name-groom {
  animation-delay: 0s;
}

.invite-name-bride {
  animation-delay: 0.45s;
}

.name-divider {
  display: block;
  width: 1px;
  height: 16px;
  margin-left: auto;
  margin-right: auto;
  background: #d7ccc0;
  opacity: 0.95;
}

.name-divider-top {
  margin-top: 4px;
  margin-bottom: 10px;
}

.name-divider-bottom {
  margin-top: 8px;
  margin-bottom: 12px;
}

.invite-rings {
  position: relative;
  margin: 2px auto 12px;
  width: clamp(32px, 4.8vw, 50px);
  color: #6a5e55;
}

.invite-rings svg {
  width: 100%;
  height: auto;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes crestFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 2px 4px rgba(95, 112, 77, 0.16));
  }
  50% {
    transform: translateY(-6px) scale(1.02);
    filter: drop-shadow(0 12px 24px rgba(95, 112, 77, 0.3));
  }
}

.invite-ceremony {
  margin: 10px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 19px;
  color: #8a7f73;
}

.invite-date-row {
  margin: 10px auto 0;
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: #5c5048;
}

.invite-date-row small {
  display: block;
  font-family: "Cormorant Garamond", serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 0.95;
  font-weight: 600;
  white-space: nowrap;
}

.invite-date-row > div:first-child,
.invite-date-row > div:last-child {
  position: relative;
  display: flex;
  align-items: center;
  transform: translateY(10px);
}

.invite-date-row > div:first-child {
  text-align: right;
  justify-content: flex-end;
}

.invite-date-row > div:last-child {
  text-align: left;
  justify-content: flex-start;
}

.invite-day {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(86px, 9.2vw, 118px);
  line-height: 0.88;
  font-weight: 600;
}

.invite-lunar {
  margin: 24px 0 0;
  color: #8c8074;
  font-size: 20px;
}

.invite-at {
  margin: 10px 0 0;
  font-family: "Cormorant Garamond", serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  color: #5d5148;
}

.invite-venue {
  margin: 2px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: clamp(26px, 3.3vw, 40px);
  line-height: 1;
  color: #4a3f39;
}

.invite-address {
  margin: 2px 0 0;
  color: #5f544c;
  font-size: clamp(13px, 1.65vw, 20px);
}

.invite-map {
  display: inline-block;
  margin-top: 2px;
  color: #5d6d4a;
  font-size: clamp(13px, 1.65vw, 20px);
  text-decoration: none;
}

.save-date-card {
  background: #f8f7f2;
  padding-top: 22px;
  padding-bottom: 16px;
}

.save-date-card .eyebrow {
  margin: 0;
  color: #7b8671;
  letter-spacing: 0.26em;
}

.save-date-card .year {
  margin: 6px 0 0;
  color: #5f704d;
  font-size: clamp(102px, 17vw, 142px);
  line-height: 0.76;
  font-weight: 600;
}

.save-date-card .month {
  margin: 14px 0 30px;
  font-family: "Great Vibes", "Cormorant Garamond", serif;
  color: #566546;
  font-size: clamp(58px, 9.2vw, 92px);
  line-height: 0.9;
}

.flat-calendar {
  margin-top: 0;
  max-width: 430px;
}

.flat-weekdays,
.flat-days {
  gap: 8px 4px;
}

.flat-weekdays span {
  font-size: 8px;
  color: #6e7f5d;
  letter-spacing: 0.11em;
  font-weight: 500;
}

.flat-weekdays span:nth-child(1),
.flat-weekdays span:nth-child(2),
.flat-weekdays span:nth-child(3),
.flat-weekdays span:nth-child(4),
.flat-weekdays span:nth-child(5),
.flat-weekdays span:nth-child(6),
.flat-weekdays span:nth-child(7) {
  font-weight: 800;
}

.flat-days span {
  height: 30px;
  color: #4f5e45;
  font-size: clamp(19px, 3vw, 23px);
}

.flat-days .wedding-day {
  font-weight: 800;
  color: #3f4e39;
}

.flat-days .wedding-day::after {
  content: "\2661";
  top: 2px;
  right: 7px;
  color: #6b7f57;
}

.countdown-note {
  margin-top: 8px;
  color: #56654a;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(20px, 5vw, 46px);
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.countdown-plain {
  margin-top: 4px;
  gap: 2px;
  color: #58664b;
}

.countdown-part {
  min-width: 72px;
}

.countdown-part b {
  margin-bottom: 0;
  font-size: clamp(48px, 6.3vw, 64px);
  line-height: 0.9;
}

.countdown-part small {
  font-size: 9px;
  letter-spacing: 0.14em;
  margin-top: 24px;
  color: #8a9582;
}

.countdown-sep {
  transform: translateY(8px);
  font-size: clamp(30px, 4.3vw, 42px);
}

@media (max-width: 640px) {
  .site {
    padding: 10px 8px 24px;
  }

  .site-card {
    padding: 18px 12px;
    border-radius: 14px;
  }

  .family-grid {
    gap: 12px;
  }

  .family-box {
    font-size: 14px;
  }

  .family-box p:not(.family-label) {
    font-size: 18px;
  }

  .family-label {
    font-size: 20px;
  }

  .invite-text {
    font-size: clamp(16px, 4.8vw, 24px);
  }

  .invite-couple-block {
    transform: scale(0.92);
    transform-origin: center top;
  }

  .invite-name {
    font-size: clamp(40px, 8.8vw, 56px);
  }

  .invite-rings {
    width: clamp(28px, 9vw, 38px);
    margin: 2px auto 10px;
  }

  .name-divider {
    height: 12px;
  }

  .name-divider-top {
    margin-top: 2px;
    margin-bottom: 8px;
  }

  .name-divider-bottom {
    margin-top: 6px;
    margin-bottom: 10px;
  }

  .invite-ceremony {
    margin-top: 8px;
    font-size: 16px;
  }

  .invite-date-row {
    margin-top: 6px;
    gap: 10px;
  }

  .invite-date-row small {
    font-size: clamp(13px, 3.6vw, 17px);
  }

  .invite-date-row > div:first-child,
  .invite-date-row > div:last-child {
    transform: translateY(6px);
  }

  .invite-day {
    font-size: clamp(70px, 16.5vw, 88px);
    line-height: 0.88;
  }

  .invite-lunar {
    margin-top: 18px;
    font-size: 16px;
  }

  .invite-at {
    margin-top: 8px;
  }

  .invite-venue {
    font-size: clamp(22px, 6.2vw, 30px);
  }

  .invite-address {
    font-size: clamp(11px, 3.1vw, 15px);
  }

  .invite-map {
    font-size: clamp(11px, 3.1vw, 15px);
  }

  .countdown-note {
    font-size: clamp(20px, 6.4vw, 30px);
  }

  .countdown-part {
    min-width: 56px;
  }

  .countdown-part b {
    font-size: clamp(32px, 9vw, 44px);
  }

  .countdown-sep {
    transform: translateY(5px);
    font-size: clamp(22px, 6vw, 30px);
  }

  .gift-copy {
    font-size: 14px;
    line-height: 1.6;
  }

  .gift-modal {
    padding: 12px;
  }

  .gift-modal-card {
    max-height: 90vh;
    padding-top: 48px;
  }

  .gift-modal-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }
}

.site-btn.primary {
  color: #fff !important;
}

@media (max-width: 640px) {
  .site {
    width: 100%;
    max-width: 100%;
    padding: 12px 10px 24px;
  }

  .site-card {
    padding: 18px 14px;
    margin-bottom: 14px;
    border-radius: 18px;
  }

  .hero.site-card {
    height: min(78vh, 720px);
    margin-bottom: 18px;
  }

  .hero-overlay-text {
    padding: 14px 12px 16px;
  }

  .hero-script {
    font-size: clamp(42px, 10.5vw, 56px);
  }

  .hero-names {
    letter-spacing: 0.22em;
  }

  .save-date-card {
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .save-date-card .year {
    font-size: clamp(82px, 20vw, 122px);
  }

  .save-date-card .month {
    margin: 10px 0 22px;
    font-size: clamp(48px, 10vw, 74px);
  }

  .countdown-note {
    white-space: normal;
    max-width: 18ch;
  }

  .countdown-plain {
    gap: 4px;
    justify-content: center;
  }

  .countdown-part {
    min-width: 60px;
  }

  .story-canvas {
    width: 100%;
    aspect-ratio: 5 / 4;
  }

  .story-copy {
    text-align: left;
    line-height: 1.65;
  }

  .family-grid {
    gap: 14px;
    max-width: 100%;
  }

  .family-label {
    letter-spacing: 0.18em;
  }

  .invite-text {
    font-size: clamp(18px, 5.4vw, 24px);
  }

  .invite-name {
    white-space: normal;
    line-height: 0.95;
  }

  .invite-date-row {
    gap: 8px;
  }

  .invite-day {
    font-size: clamp(64px, 15vw, 84px);
  }

  .timeline-board {
    min-height: 320px;
    padding: 16px 0;
  }

  .timeline-item.left,
  .timeline-item.right {
    width: min(100%, 180px);
    transform: none;
  }

  .timeline-item.left {
    justify-self: center;
  }

  .timeline-item.right {
    justify-self: center;
  }

  .timeline-item h4 {
    font-size: clamp(18px, 5vw, 28px);
  }

  .timeline-center-icon {
    width: 86px;
    height: 86px;
  }

  .gallery {
    width: min(calc(100% - 10px), 430px);
    border-radius: 16px;
  }

  .nav-btn {
    width: 42px;
    height: 58px;
  }

  .nav-btn svg {
    width: 22px;
    height: 22px;
  }

  .thumbs-wrap {
    width: 100%;
    gap: 6px;
  }

  .thumbs {
    gap: 6px;
  }

  .thumbs button {
    width: 46px;
    min-width: 46px;
    border-radius: 10px;
  }

  .gift-modal {
    padding: 10px;
  }

  .gift-modal-card {
    width: 100%;
    max-height: 88vh;
    padding: 48px 18px 18px;
    border-radius: 18px;
  }

  .gift-modal-close {
    top: 8px;
    right: 8px;
  }

  .gift-grid {
    padding-inline: 4px;
  }

  .gift-grid .event-box {
    width: min(100%, 360px);
    padding-left: 14px;
    padding-right: 14px;
  }

  .qr-bank {
    width: min(208px, calc(100% - 12px));
  }

  .quote {
    font-size: clamp(24px, 7vw, 34px);
  }

  .music-btn {
    right: 10px;
    bottom: 10px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 375px) {
  .site {
    padding: 10px 8px 20px;
  }

  .hero.site-card {
    height: min(74vh, 620px);
  }

  .hero-script {
    font-size: clamp(36px, 10.8vw, 46px);
  }

  .invite-name {
    font-size: clamp(34px, 10vw, 46px);
  }

  .timeline-board {
    min-height: 290px;
  }

  .timeline-item.left,
  .timeline-item.right {
    width: min(100%, 150px);
  }

  .timeline-center-icon {
    width: 72px;
    height: 72px;
  }

  .thumbs button {
    width: 44px;
    min-width: 44px;
  }
}

@media (max-width: 360px) {
  .site-card {
    padding: 14px 12px;
  }

  .section-title {
    font-size: clamp(26px, 8.2vw, 34px);
  }

  .hero-script {
    font-size: clamp(32px, 10.5vw, 42px);
  }

  .hero-names,
  .eyebrow {
    letter-spacing: 0.16em;
  }

  .invite-text {
    font-size: clamp(16px, 5vw, 20px);
  }

  .invite-name {
    font-size: clamp(30px, 9.4vw, 40px);
  }

  .invite-day {
    font-size: clamp(56px, 14vw, 72px);
  }

  .invite-address,
  .invite-map,
  .invite-lunar {
    font-size: 12px;
  }

  .story-title {
    font-size: clamp(34px, 10vw, 44px);
  }

  .story-copy {
    font-size: 13px;
    line-height: 1.55;
  }

  .timeline-item h4 {
    font-size: clamp(16px, 4.8vw, 22px);
  }

  .timeline-item p,
  .timeline-item .sub {
    font-size: 12px;
    line-height: 1.45;
  }

  .countdown-part {
    min-width: 48px;
  }

  .countdown-part b {
    font-size: clamp(26px, 8.6vw, 34px);
  }

  .countdown-part small,
  .countdown-note {
    font-size: 11px;
  }

  .form-grid label,
  .form-status,
  .form-note,
  .gift-copy,
  .sub {
    font-size: 13px;
  }

  .form-grid input,
  .form-grid select {
    font-size: 14px;
    padding: 9px 11px;
  }

  .gift-title {
    font-size: clamp(26px, 8vw, 34px);
  }

  .gift-grid .event-box {
    width: min(100%, 320px);
    padding: 14px 14px;
  }

  .qr-bank {
    width: min(192px, calc(100% - 14px));
  }

  .quote {
    font-size: clamp(22px, 6.6vw, 30px);
  }
}

@media (max-width: 340px) {
  .site {
    padding-inline: 6px;
  }

  .hero-script {
    font-size: 30px;
  }

  .invite-name {
    font-size: 28px;
  }

  .invite-day {
    font-size: 52px;
  }

  .countdown-part {
    min-width: 44px;
  }

  .countdown-part b {
    font-size: 24px;
  }

  .thumbs button {
    width: 40px;
    min-width: 40px;
  }
}

body
  :is(
    h1,
    h2,
    h3,
    h4,
    p,
    span,
    small,
    strong,
    em,
    a,
    label,
    button,
    select,
    option,
    input,
    textarea
  ) {
  color: var(--text) !important;
}

.envelope-btn,
.envelope-btn svg,
.envelope-btn svg rect,
.envelope-btn svg path {
  color: #fff !important;
  stroke: #fff !important;
}



