/* ==========================================================================
   Thiệp mời — Tơ Duyên Đỏ Đậm (clone)
   Palette & typography follow the silk-ribbon-darkred theme.
   ========================================================================== */

@font-face {
  font-family: 'Carattere';
  src: url('../assets/fonts/Carattere-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aguafina Script';
  src: url('../assets/fonts/AguafinaScript-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Whisper';
  src: url('../assets/fonts/Whisper-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Uchen';
  src: url('../assets/fonts/Uchen-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Serif';
  src: url('../assets/fonts/NotoSerif-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pattaya';
  src: url('../assets/fonts/Pattaya-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'The Nautigal';
  src: url('../assets/fonts/TheNautigal-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #931434;
  --dark: #460011;
  --accent: #913b51;
  --cream: #f3dfc3;
  --maroon: #4a0a19;
  --paper: #ffffff;
  --line: rgba(147, 20, 52, 0.24);
  --serif: 'Times New Roman', 'Noto Serif', 'Uchen', serif;
  --body: 'Times New Roman', 'Noto Serif', serif;
  --script: 'Carattere', 'Aguafina Script', cursive;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #f6f0ea;
  color: var(--primary);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

::selection {
  background: rgba(147, 20, 52, 0.16);
}

/* --------------------------------------------------------------------------
   cover / envelope gate
   -------------------------------------------------------------------------- */

.cover {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, #ffffff 0%, #fdf9fa 46%, #f8eef1 100%);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}

.cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover-flower {
  display: none;
}

.cover-card {
  position: relative;
  width: 310px;
  max-width: 100%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(147, 20, 52, 0.15);
  box-shadow:
    0 30px 70px -20px rgba(0, 0, 0, 0.38),
    0 8px 24px rgba(0, 0, 0, 0.14),
    0 0 60px rgba(147, 20, 52, 0.12);
  text-align: center;
  padding: 104px 26px 48px;
  overflow: hidden;
  animation: coverIn 1.1s var(--ease) both;
}

@keyframes coverIn {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cover-card::before,
.cover-card::after {
  content: '';
  position: absolute;
  width: 128px;
  height: 128px;
  background: url('../assets/img/theme/flower-decoration.webp') center / contain no-repeat;
  opacity: 0.85;
  pointer-events: none;
}

.cover-card::before {
  top: -52px;
  left: -54px;
  transform: rotate(32deg) scaleX(-1);
}

.cover-card::after {
  bottom: -58px;
  right: -56px;
  transform: rotate(-34deg);
}

.cover-seal {
  position: absolute;
  top: 50px;
  left: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 30%, #931434, #750016);
  box-shadow: 0 4px 20px rgba(147, 20, 52, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.28);
  animation: sealPulse 2.4s ease-in-out infinite;
  z-index: 3;
}

.cover-seal svg {
  width: 26px;
  height: 26px;
  fill: #fefbf4;
}

@keyframes sealPulse {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(147, 20, 52, 0.45), 0 0 0 0 rgba(147, 20, 52, 0.28), inset 0 2px 4px rgba(255, 255, 255, 0.28);
  }

  50% {
    box-shadow: 0 4px 24px rgba(147, 20, 52, 0.55), 0 0 0 12px rgba(147, 20, 52, 0), inset 0 2px 4px rgba(255, 255, 255, 0.28);
  }
}

.cover-names {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.12;
  color: var(--primary);
  font-family: var(--script);
  font-size: 30px;
  font-weight: 400;
}

.cover-names .amp {
  font-family: 'Baskerville', var(--serif);
  font-size: 20px;
  line-height: 1;
  margin: 1px 0;
  color: var(--primary);
}

.cover-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 10px;
  color: var(--primary);
  opacity: 0.8;
  font-size: 14px;
}

.cover-ornament i {
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--primary));
}

.cover-ornament i:last-child {
  background: linear-gradient(to left, transparent, var(--primary));
}

.cover-date {
  margin: 0 0 4px;
  color: rgba(70, 0, 17, 0.78);
  font-family: var(--body);
  font-size: 18px;
  letter-spacing: 0.01em;
}

.cover-note {
  margin: 0 0 20px;
  color: rgba(70, 0, 17, 0.7);
  font-size: 18px;
  font-weight: 300;
}

.btn-open {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 36px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fefbf4;
  font-family: var(--body);
  font-size: 17px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px -6px rgba(147, 20, 52, 0.55);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s;
}

.btn-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -6px rgba(147, 20, 52, 0.6);
  background: #a1183c;
}

.btn-open:active {
  transform: translateY(0) scale(0.99);
}

.btn-open .shine {
  position: absolute;
  top: 0;
  left: -40%;
  width: 32px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  animation: shine 3.4s ease-in-out infinite;
}

@keyframes shine {
  0% {
    left: -40%;
  }

  55%,
  100% {
    left: 130%;
  }
}

/* --------------------------------------------------------------------------
   page / stage
   -------------------------------------------------------------------------- */

.page {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s var(--ease) 0.15s, visibility 1s;
}

body.opened .page {
  opacity: 1;
  visibility: visible;
}

.stage {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--paper);
  color: var(--primary);
  overflow: hidden;
  box-shadow: 0 0 50px rgba(70, 0, 17, 0.1), 0 0 0 1px rgba(147, 20, 52, 0.08);
}

/* PC: phóng to đồng đều cả thiệp (giữ nguyên bố cục mobile, chữ + ảnh to theo) */
@media (min-width: 1024px) and (min-height: 700px) {
  .stage {
    zoom: 1.12;
  }
}

@media (min-width: 1366px) and (min-height: 820px) {
  .stage {
    zoom: 1.22;
  }
}

@media (min-width: 1800px) and (min-height: 960px) {
  .stage {
    zoom: 1.32;
  }
}

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

.wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.sec-title {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--primary);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: pre-line;
}

.sec-title--right {
  text-align: right;
}

.sec-title--center {
  text-align: center;
}

/* --------------------------------------------------------------------------
   hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-inner {
  position: relative;
  width: 100%;
  max-width: 441px;
  margin: 0 auto;
}

.deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.deco img {
  position: absolute;
  max-width: none;
  object-fit: cover;
  will-change: transform;
}

.d-line-r {
  right: -20%;
  top: 21px;
  height: 532px;
  width: 178px;
}

.d-flower {
  left: 217px;
  top: -80px;
  height: 504px;
  width: auto;
  transform: rotate(-40deg);
}

.d-line-l {
  bottom: -117px;
  left: -45px;
  height: 499px;
  width: 167px;
  transform: scaleX(-1);
}

.d-ribbon {
  bottom: -35px;
  left: -246px;
  height: 328px;
  width: 986px;
}

.hero-media {
  position: relative;
  padding-top: 49.2%;
  padding-bottom: 59.4%;
}

.collage {
  position: relative;
  margin-left: 12.3%;
  width: 75.4%;
  aspect-ratio: 331.11 / 394.7;
}

.polaroid-slot {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.polaroid-slot--one {
  left: 0;
  top: 0;
  width: 62.6%;
  aspect-ratio: 207.33 / 254.13;
}

.polaroid-slot--two {
  left: 33.6%;
  top: 33.2%;
  width: 66.4%;
  aspect-ratio: 219.82 / 263.56;
}

.polaroid {
  position: relative;
  margin: 0;
  width: 86%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 5px solid #752e3f;
  box-shadow: 0 16px 34px -16px rgba(70, 0, 17, 0.45), 0 3px 10px rgba(70, 0, 17, 0.16);
  aspect-ratio: 178.353 / 230.6;
  transform: rotate(-8.25deg) skewX(-0.57deg);
}

.polaroid--two {
  width: 81.2%;
  transform: rotate(12.17deg) skewX(0.83deg);
}

.polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.hero-names {
  position: relative;
  margin-top: 6.3%;
  padding: 0 15.9%;
  z-index: 2;
}

.hero-amp {
  position: absolute;
  left: 50%;
  top: 65%;
  transform: translate(-50%, -50%);
  font-family: 'Whisper', var(--script);
  font-size: 170px;
  line-height: 1;
  color: rgba(145, 59, 81, 0.1);
  user-select: none;
  pointer-events: none;
}

.hero-name {
  position: relative;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 7.26vw, 32px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--primary);
}

.hero-name--groom {
  text-align: left;
}

.hero-name--bride {
  text-align: right;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   ceremony info
   -------------------------------------------------------------------------- */

.info {
  padding: 14px 0 90px;
}

.info .orn-line-l {
  display: none !important;
}

.parents {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0 12px;
  margin-top: 22px;
  color: var(--primary);
  text-align: left;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.parents-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.parents-label {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
}

.parents-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.parents-addr {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(70, 0, 17, 0.85);
  white-space: pre-line;
}

.parents-divider {
  width: 1px;
  align-self: stretch;
  background: var(--primary);
  opacity: 0.55;
}

.announce {
  margin: 24px 0 20px;
  color: var(--primary);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-align: left;
  white-space: pre-line;
}

.couple-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 320px;
}

.couple-name {
  margin: 0;
  font-family: var(--script);
  font-size: 35px;
  font-weight: 400;
  line-height: 1.12;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.couple-role {
  margin: 0;
  font-family: 'Uchen', var(--serif);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #460011;
  opacity: 0.85;
}

.amp-script {
  font-family: 'Aguafina Script', var(--script);
  font-size: 32px;
  line-height: 1;
  margin: 2px 0;
  color: var(--primary);
}

.date-block {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: 240px;
}

.date-where {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: pre-line;
}

.date-at {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-at strong {
  font-size: 15px;
  letter-spacing: 0.04em;
}

.weekday {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.date-line {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.date-line .weekday {
  margin: 0;
}

.big-date {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 0.95;
  color: var(--primary);
}

.big-date .day {
  font-family: var(--serif);
  font-size: 58px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.big-date .mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.big-date .mid b {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.big-date .year {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.lunar {
  margin: 6px 0 0;
  font-size: 11px;
  font-style: italic;
  color: rgba(70, 0, 17, 0.72);
}

/* decorative side ornaments for sections */
.orn {
  position: absolute;
  pointer-events: none;
  max-width: none;
  z-index: 0;
  opacity: 0.95;
}

.orn-flower-l {
  left: -130px;
  top: 10px;
  width: 300px;
  transform: rotate(18deg);
  opacity: 0.95;
}

.orn-flower-r {
  right: -135px;
  bottom: -65px;
  width: 270px;
  transform: rotate(-32deg);
  opacity: 0.95;
}

.orn-line-r {
  right: -120px;
  top: 0;
  width: 170px;
  height: 480px;
  object-fit: cover;
  opacity: 0.6;
}

.orn-line-l {
  left: -95px;
  bottom: 0;
  width: 190px;
  height: 440px;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0.9;
}

.orn-ribbon {
  display: none !important;
}

.party .orn-ribbon {
  display: none !important;
}

/* --------------------------------------------------------------------------
   gallery
   -------------------------------------------------------------------------- */

.gallery-wrap {
  position: relative;
  padding: 4px 0 18px;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}

.gallery-wrap .sec-title {
  padding: 0 20px;
}

.carousel {
  position: relative;
  height: 360px;
  margin-top: 14px;
  touch-action: pan-y;
}

.carousel-stage {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1000px;
}

.car-card {
  position: absolute;
  left: 50%;
  top: 4%;
  height: 92%;
  aspect-ratio: 0.6665 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #eee;
  box-shadow: 0 18px 40px -18px rgba(70, 0, 17, 0.55);
  transform-style: preserve-3d;
  transition: transform 0.55s var(--ease), opacity 0.55s var(--ease), filter 0.55s var(--ease);
  cursor: pointer;
  will-change: transform;
}

.car-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  image-rendering: auto;
}

.car-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(70, 0, 17, 0.16), transparent 40%);
  pointer-events: none;
}

.car-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: block;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary);
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(70, 0, 17, 0.22);
  transition: background 0.25s, transform 0.2s;
}

.car-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}

.car-arrow--prev {
  left: 2%;
}

.car-arrow--next {
  right: 2%;
}

.dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.25;
  transition: width 0.3s var(--ease), opacity 0.3s;
}

.dots button.is-active {
  width: 24px;
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   party / countdown / calendar / rsvp
   -------------------------------------------------------------------------- */

.party {
  padding: 40px 0 30px;
}

.party-head {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 6px;
}

.party-lead {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(70, 0, 17, 0.85);
}

.party-time {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.party-time small {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.countdown {
  margin: 26px auto 0;
  text-align: center;
}

.countdown-title {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.65;
}

.count-grid {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.count-cell {
  min-width: 64px;
  padding: 10px 8px 8px;
  border: 1px solid rgba(147, 20, 52, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.count-cell b {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.count-cell span {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}

.agenda {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.agenda-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid rgba(147, 20, 52, 0.2);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.55);
}

.agenda-chip b {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.calendar {
  margin: 28px auto 0;
  max-width: 330px;
  border: 1px solid rgba(147, 20, 52, 0.18);
  border-radius: 10px;
  padding: 12px 12px 10px;
  background: rgba(255, 255, 255, 0.6);
}

.cal-title {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--primary);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: 11px;
  text-align: center;
}

.cal-dow {
  padding: 4px 0;
  font-size: 9px;
  letter-spacing: 0.06em;
  opacity: 0.55;
}

.cal-day {
  padding: 5px 0;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.cal-day.is-empty {
  opacity: 0;
}

.cal-day.is-today {
  box-shadow: inset 0 0 0 1px rgba(147, 20, 52, 0.35);
}

.cal-day.is-wedding {
  background: var(--primary);
  color: #fefbf4;
  font-weight: 700;
  box-shadow: 0 4px 10px -3px rgba(147, 20, 52, 0.6);
}

.btn-ics {
  display: flex;
  margin: 10px auto 0;
  padding: 6px 14px;
  border: 1px solid rgba(147, 20, 52, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: background 0.25s, color 0.25s;
}

.btn-ics:hover {
  background: var(--primary);
  color: #fefbf4;
}

.rsvp {
  margin: 34px auto 0;
  max-width: 380px;
  text-align: left;
  position: relative;
  z-index: 5;
  background: #ffffff;
  border: 1px solid rgba(147, 20, 52, 0.24);
  border-radius: 12px;
  padding: 22px 20px 20px;
  box-shadow: 0 10px 30px -8px rgba(70, 0, 17, 0.1);
}

.rsvp h3 {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--primary);
}

.rsvp .rsvp-note {
  margin: 0 0 14px;
  font-size: 12px;
  color: rgba(70, 0, 17, 0.75);
}

.rsvp form {
  display: grid;
  gap: 10px;
}

.rsvp input[type='text'],
.rsvp input[type='number'],
.rsvp textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(147, 20, 52, 0.35);
  border-radius: 6px;
  background: #ffffff;
  color: var(--dark);
  font-family: var(--body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rsvp input:focus,
.rsvp textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(147, 20, 52, 0.08);
}

.rsvp textarea {
  resize: vertical;
}

.radio-row {
  display: flex;
  gap: 16px;
  font-size: 12px;
  flex-wrap: wrap;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.radio-row input {
  accent-color: var(--primary);
}

.guest-count {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.guest-count input {
  width: 70px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fefbf4;
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.08em;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: #a1183c;
  box-shadow: 0 6px 16px -6px rgba(147, 20, 52, 0.6);
}

.btn-primary:active {
  transform: scale(0.985);
}

.form-done {
  margin: 10px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(147, 20, 52, 0.3);
  border-radius: 8px;
  background: rgba(243, 223, 195, 0.35);
  font-size: 13px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   venue
   -------------------------------------------------------------------------- */

.venue {
  padding: 60px 0 46px;
}

.venue .wrap {
  text-align: center;
}

.venue h3 {
  margin: 0 0 6px;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: left;
}

.venue-address {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  color: rgba(70, 0, 17, 0.9);
  white-space: pre-line;
}

.venue-name {
  display: block;
  font-weight: 700;
}

.map-frame {
  display: block;
  width: 100%;
  height: 267px;
  margin: 16px 0 0;
  border: 1px solid var(--primary);
  border-radius: 10px;
  overflow: hidden;
  background: #f4ece4;
}

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

.btn-directions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 18px;
  border: 1px solid rgba(70, 0, 17, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--dark);
  font-size: 12px;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
}

.btn-directions:hover {
  background: var(--primary);
  color: #fefbf4;
  border-color: var(--primary);
}

.btn-directions svg {
  width: 14px;
  height: 14px;
}

.venue h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: left;
}

.venue-address {
  margin: 0 0 4px;
  font-size: 13.5px;
  line-height: 1.6;
  text-align: left;
  color: rgba(70, 0, 17, 0.9);
  white-space: pre-line;
}

/* --------------------------------------------------------------------------
   dress code
   -------------------------------------------------------------------------- */

.dress {
  padding: 26px 0 34px;
  text-align: center;
}

.dress p {
  margin: 6px 0 18px;
  font-size: 13px;
  color: rgba(70, 0, 17, 0.8);
}

.dress-colors {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.dress-color {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.dress-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(70, 0, 17, 0.14);
  box-shadow: 0 4px 10px -4px rgba(70, 0, 17, 0.35);
}

.dress-name {
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   timeline
   -------------------------------------------------------------------------- */

.timeline {
  padding: 34px 0 60px;
}

.tl-list {
  position: relative;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.tl-list::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(147, 20, 52, 0.35) 12%, rgba(147, 20, 52, 0.35) 88%, transparent);
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 10px 0;
  align-items: center;
}

.tl-icon {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(147, 20, 52, 0.28);
  box-shadow: 0 3px 10px -4px rgba(70, 0, 17, 0.4);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.tl-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.tl-body {
  padding-top: 2px;
}

.tl-time {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--primary);
}

.tl-title {
  margin: 1px 0 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tl-desc {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(70, 0, 17, 0.72);
}

/* --------------------------------------------------------------------------
   guestbook
   -------------------------------------------------------------------------- */

.guestbook {
  padding: 28px 0 16px;
}

.gb-note {
  margin: 6px 0 16px;
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(70, 0, 17, 0.72);
}

.gb-form {
  display: grid;
  gap: 8px;
  margin-left: auto;
  max-width: 340px;
  position: relative;
  z-index: 3;
}

.gb-form input,
.gb-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(147, 20, 52, 0.35);
  border-radius: 6px;
  background: #ffffff;
  color: var(--dark);
  font-family: var(--body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gb-form input:focus,
.gb-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(147, 20, 52, 0.08);
}

.gb-form textarea {
  resize: vertical;
  min-height: 90px;
}

.gb-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.gb-magic {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid rgba(147, 20, 52, 0.24);
  border-radius: 999px;
  background: rgba(147, 20, 52, 0.06);
  color: var(--primary);
  font-size: 11px;
  transition: background 0.2s;
}

.gb-magic:hover {
  background: rgba(147, 20, 52, 0.12);
}

.gb-list {
  display: grid;
  gap: 8px;
  margin: 14px auto 0;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(147, 20, 52, 0.3) transparent;
}

.gb-list::-webkit-scrollbar {
  width: 4px;
}

.gb-list::-webkit-scrollbar-thumb {
  background: rgba(147, 20, 52, 0.28);
  border-radius: 4px;
}

.gb-card {
  border: 1px solid rgba(147, 20, 52, 0.33);
  border-radius: 8px;
  padding: 11px 13px;
  text-align: left;
  background: rgba(255, 255, 255, 0.6);
}

.gb-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.gb-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.gb-time {
  font-size: 10px;
  opacity: 0.6;
  white-space: nowrap;
}

.gb-msg {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(70, 0, 17, 0.88);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.gb-empty {
  margin: 0;
  padding: 8px 14px;
  text-align: center;
  font-size: 13px;
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   gift box
   -------------------------------------------------------------------------- */

.gift {
  padding: 22px 0 8px;
}

.gift .wrap {
  text-align: center;
}

.gift-sub {
  margin: 6px auto 0;
  max-width: 300px;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.75;
}

/* hai bao lì xì */
.envelopes-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 18px;
}

.envelope-card {
  position: relative;
  width: 118px;
  height: 168px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  color: #fbe7b5;
  font-family: inherit;
  background:
    radial-gradient(circle at 20% 85%, rgba(255, 215, 140, 0.18) 0 18px, transparent 19px),
    radial-gradient(circle at 85% 70%, rgba(255, 215, 140, 0.14) 0 12px, transparent 13px),
    linear-gradient(160deg, #c8102e 0%, #a50d27 55%, #7d0a1e 100%);
  box-shadow:
    0 14px 26px -12px rgba(125, 10, 30, 0.75),
    inset 0 0 0 2px rgba(240, 200, 120, 0.55),
    inset 0 0 0 5px rgba(165, 13, 39, 1),
    inset 0 0 0 6px rgba(240, 200, 120, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  animation: envFloat 3.6s ease-in-out infinite;
}

.envelope-card--bride {
  animation-delay: -1.8s;
}

.envelope-card:hover,
.envelope-card:focus-visible {
  transform: translateY(-5px) rotate(-1.5deg);
  outline: none;
}

.envelope-card--bride:hover,
.envelope-card--bride:focus-visible {
  transform: translateY(-5px) rotate(1.5deg);
}

@keyframes envFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

.envelope-card--single {
  width: 136px;
  height: 188px;
}

.envelope-card--single .envelope-top {
  height: 70px;
}

.envelope-card--single .envelope-seal {
  top: 46px;
  width: 38px;
  height: 38px;
  font-size: 19px;
}

.envelope-card--single .envelope-content {
  inset: 92px 8px 12px;
}

.envelope-card--single .envelope-name {
  font-size: 14px;
}

/* nắp bao */
.envelope-top {
  position: absolute;
  inset: 0 0 auto 0;
  height: 62px;
  background: linear-gradient(180deg, #d81d3a, #b0122d);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
}

.envelope-seal {
  position: absolute;
  left: 50%;
  top: 40px;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #e0b04f 60%, #b8862e);
  color: #a50d27;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.envelope-content {
  position: absolute;
  inset: 80px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.envelope-tag {
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}

.envelope-for {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.envelope-name {
  margin: 0;
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #ffe9a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.envelope-btn-pill {
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe9a8, #e0b04f);
  color: #7d0a1e;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* tabs trong modal */
.modal-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0 0 6px;
}

.modal-tab {
  padding: 5px 12px;
  border: 1px solid rgba(147, 20, 52, 0.25);
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.modal-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.bank-card[hidden] {
  display: none;
}

.footer {
  padding: 18px 64px calc(78px + env(safe-area-inset-bottom));
  text-align: center;
}

.footer-text {
  margin: 0 auto;
  max-width: 300px;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--primary);
}

.footer-credit {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  opacity: 0.55;
  text-decoration: none;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   music toggle
   -------------------------------------------------------------------------- */

.music-toggle {
  position: fixed;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(147, 20, 52, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  box-shadow: 0 8px 24px -8px rgba(70, 0, 17, 0.45);
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.music-toggle:hover {
  transform: scale(1.06);
}

.music-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.music-toggle.is-playing svg {
  animation: discSpin 5s linear infinite;
}

.music-toggle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(147, 20, 52, 0.3);
  animation: musicPing 2.4s ease-out infinite;
}

.music-toggle.is-playing::after {
  animation-duration: 2.4s;
}

.music-toggle.is-paused::after {
  display: none;
}

@keyframes discSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes musicPing {
  0% {
    transform: scale(0.94);
    opacity: 0.55;
  }

  70% {
    transform: scale(1.22);
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   dialogs
   -------------------------------------------------------------------------- */

dialog.modal {
  padding: 0;
  border: 0;
  background: transparent;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
}

dialog.modal::backdrop {
  background: rgba(32, 4, 10, 0.62);
  backdrop-filter: blur(3px);
}

dialog.modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-height: 88vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  padding: 26px 20px 22px;
  color: var(--primary);
  animation: modalIn 0.35s var(--ease) both;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-title {
  margin: 0 0 4px;
  text-align: center;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-sub {
  margin: 0 0 18px;
  text-align: center;
  font-size: 11px;
  opacity: 0.65;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(147, 20, 52, 0.08);
  color: var(--primary);
  font-size: 16px;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(147, 20, 52, 0.16);
}

.bank-card {
  border: 1px solid rgba(147, 20, 52, 0.22);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
  background: linear-gradient(160deg, #fff, #fdf7f0);
}

.bank-qr {
  width: 96px;
  height: 96px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(147, 20, 52, 0.15);
}

.bank-qr.is-empty {
  display: grid;
  place-items: center;
  font-size: 9px;
  text-align: center;
  opacity: 0.55;
  padding: 6px;
}

.bank-info {
  min-width: 0;
}

.bank-role {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}

.bank-name {
  margin: 2px 0 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.bank-line {
  margin: 0;
  font-size: 11px;
  color: rgba(70, 0, 17, 0.8);
}

.bank-num {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.bank-num code {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.copy-btn {
  padding: 3px 8px;
  border: 1px solid rgba(147, 20, 52, 0.3);
  border-radius: 999px;
  background: transparent;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}

.copy-btn:hover {
  background: var(--primary);
  color: #fff;
}

.bank-empty {
  padding: 18px;
  text-align: center;
  font-size: 12px;
  opacity: 0.6;
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(18, 2, 6, 0.94);
  padding: 14px 10px calc(8px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}

.lightbox.is-open {
  display: flex;
}

.lb-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  padding: 0 8px 10px;
}

.lb-count {
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.lb-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
}

.lb-stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.lb-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, calc(100vw - 120px));
  /* trừ thanh trên (~52px) + dải ảnh nhỏ (~76px) + padding */
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  image-rendering: auto;
}

@media (max-width: 600px) {
  .lb-img {
    max-width: 100%;
  }
}

.lb-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.lb-arrow:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lb-arrow--prev {
  left: 4px;
}

.lb-arrow--next {
  right: 4px;
}

.lb-thumbs {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 4px;
  scrollbar-width: none;
  justify-content: center;
}

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

.lb-thumb {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  overflow: hidden;
  opacity: 0.55;
  background: #222;
  outline: 0 solid var(--cream);
}

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

.lb-thumb.is-active {
  opacity: 1;
  outline: 2px solid var(--cream);
}

/* reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(12px);
  z-index: 300;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(70, 0, 17, 0.94);
  color: #fefbf4;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

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

/* utility */
[hidden] {
  display: none !important;
}