/* ===== TOKENS ===== */
:root {
  --green-900: #0f2018;
  --green-700: #1c362c;
  --green-500: #335948;
  --ivory: #faf7f2;
  --tint: #f3efe6;
  --paper: rgba(255, 253, 249, 0.85);
  --brass: #b8924e;
  --brass-soft: #dec8a1;
  --gold-light: #f7e8c4;
  --gold-glow: #e5be6b;
  --ink: #19241f;
  --muted: #56645d;
  --line: rgba(216, 203, 180, 0.65);
  --glass-bg: rgba(255, 253, 249, 0.75);
  --glass-border: rgba(216, 182, 110, 0.35);
  --glass-shadow: 0 16px 40px rgba(15, 32, 24, 0.08);
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --radius: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased
}

body.is-locked {
  overflow: hidden
}

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

a {
  color: inherit;
  text-decoration: none
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px
}

[hidden] {
  display: none !important
}

/* ===== LAYOUT CHUNG ===== */
.section {
  padding: 96px 24px
}

.section.tint {
  background: var(--tint)
}

.wrap {
  max-width: 1080px;
  margin: 0 auto
}

.wrap.narrow {
  max-width: 640px;
  text-align: center
}

.sec-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  line-height: 1.15;
  text-align: center;
  color: var(--green-700);
  margin-bottom: 56px
}

.sec-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  background: var(--brass);
  margin: 20px auto 0
}

.sec-title.light {
  color: #fff
}

.sec-title.light::after {
  background: var(--brass-soft)
}

.kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--brass);
  margin-bottom: 12px
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 500;
  font-size: .95rem;
  transition: background .25s, color .25s, border-color .25s
}

.btn-primary {
  background: var(--green-700);
  color: #fff
}

.btn-primary:hover {
  background: var(--green-500)
}

.btn-outline {
  border: 1px solid var(--green-700);
  color: var(--green-700)
}

.btn-outline:hover {
  background: var(--green-700);
  color: #fff
}

/* ===== MỞ THIỆP ===== */
.opening {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  color: #f4ecd9;
  background: radial-gradient(ellipse at 50% 30%, var(--green-700), var(--green-900) 75%);
  transition: transform 1s cubic-bezier(.7, 0, .2, 1), opacity .6s .5s
}

.opening.is-gone {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none
}

.opening-guest {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--brass-soft)
}

.opening-names {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 1.1;
  display: flex;
  flex-wrap: wrap;
  gap: .2em .4em;
  justify-content: center;
  align-items: baseline
}

.opening-names i {
  font-weight: 500;
  color: var(--brass-soft)
}

.opening-date {
  font-size: .95rem;
  letter-spacing: .04em;
  opacity: .85
}

.opening-hint {
  font-size: .85rem;
  opacity: .7
}

/* phong thư */
.envelope {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 3/2;
  margin: 28px 0 8px;
  perspective: 900px;
  transition: transform .3s
}

.envelope:hover {
  transform: translateY(-4px)
}

.env-body {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #e2d5b6;
  border-radius: 4px;
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%)
}

.env-flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 58%;
  background: #dccfae;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  transition: transform .8s ease .1s, z-index 0s .4s;
  z-index: 4
}

.env-letter {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 6%;
  bottom: 6%;
  z-index: 2;
  background: var(--paper);
  color: var(--green-700);
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform .9s ease .5s;
  text-align: center
}

.env-letter small {
  font-size: .7rem;
  color: var(--muted)
}

.env-letter strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1
}

.env-letter em {
  font-family: var(--font-display);
  color: var(--brass)
}

.envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #eadfc6;
  border-radius: 4px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .4);
  z-index: 1
}

.env-seal {
  position: absolute;
  left: 50%;
  top: 58%;
  z-index: 5;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #8c2f2f;
  color: #f4dcc0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
  transition: opacity .3s
}

.envelope.is-open .env-flap {
  transform: rotateX(180deg);
  z-index: 0
}

.envelope.is-open .env-letter {
  transform: translateY(-38%)
}

.envelope.is-open .env-seal {
  opacity: 0
}

/* ===== NHẠC ===== */
.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  display: none
}

body:not(.is-locked) .music-toggle {
  display: grid;
  place-items: center
}

.music-toggle.is-playing i {
  animation: spin 3s linear infinite
}

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

/* ===== NAV ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 241, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line)
}

.nav {
  max-width: 1080px;
  margin: 0 auto;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--green-700)
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: .92rem
}

.nav-links a {
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s
}

.nav-links a:hover {
  color: var(--green-700);
  border-color: var(--brass)
}

.nav-toggle {
  display: none;
  font-size: 1.2rem;
  padding: 8px
}

/* ===== HERO ===== */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center
}

.hero-names {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1.05;
  color: var(--green-700);
  display: flex;
  flex-direction: column
}

.hero-names i {
  font-weight: 500;
  color: var(--brass);
  font-size: .6em;
  line-height: 1.2
}

.hero-date {
  margin-top: 20px;
  font-weight: 500;
  color: var(--green-500)
}

.hero-quote {
  margin-top: 24px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 30ch
}

.hero-guest {
  margin-top: 20px;
  padding-left: 14px;
  border-left: 2px solid var(--brass);
  color: var(--muted);
  font-size: .95rem
}

.hero-photo {
  aspect-ratio: 4/5;
  border-radius: 200px 200px var(--radius) var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--green-500), var(--green-900));
  box-shadow: 0 20px 50px rgba(20, 41, 31, .25)
}

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

/* ===== GIA ĐÌNH ===== */
.family-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 820px;
  margin: 0 auto
}

.family-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center
}

.family-card h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--green-700);
  margin-bottom: 14px
}

.family-card .address {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .92rem
}

.family-invite {
  max-width: 52ch;
  margin: 44px auto 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.55
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--brass-soft);
  transform: translateX(-.5px)
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 48px
}

.tl-item:last-child {
  margin-bottom: 0
}

.tl-dot {
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  min-width: 64px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--green-700);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-align: center;
  z-index: 1
}

.tl-content {
  grid-column: 1;
  text-align: right
}

.tl-item:nth-child(even) .tl-content {
  grid-column: 2;
  text-align: left
}

.tl-content h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--green-700);
  margin-bottom: 6px
}

.tl-content p {
  color: var(--muted);
  font-size: .95rem
}

/* ===== ALBUM (sửa lệch khi hover) ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 14px
}

.g-item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--green-700);
  isolation: isolate;
  transform: translateZ(0)
}

/* khung đứng yên, chỉ ảnh bên trong phóng to */
.g-item:nth-child(6n+1) {
  grid-row: span 2
}

.g-item:nth-child(6n+4) {
  grid-column: span 2
}

.g-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transform-origin: 50% 50%;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
  backface-visibility: hidden
}

.g-item figcaption,
.g-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 16px 14px;
  color: #fff;
  font-size: .88rem;
  text-align: left;
  background: linear-gradient(transparent, rgba(10, 20, 15, .75));
  opacity: 0;
  transition: opacity .35s
}

@media (hover:hover) {
  .g-item:hover img {
    transform: scale(1.06)
  }

  .g-item:hover .g-cap,
  .g-item:focus-visible .g-cap {
    opacity: 1
  }
}

.gallery-hint {
  margin-top: 24px;
  text-align: center;
  font-size: .88rem;
  color: var(--muted)
}

/* ===== SỰ KIỆN ===== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 820px;
  margin: 0 auto
}

.event-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center
}

.event-card.is-main {
  background: var(--green-700);
  border-color: var(--green-700);
  color: #eee6d2
}

.event-card.is-main h3,
.event-card.is-main .link {
  color: #fff
}

.event-card.is-main i {
  color: var(--brass-soft)
}

.event-card i {
  font-size: 1.5rem;
  color: var(--brass)
}

.event-card h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-700);
  margin: 10px 0 4px
}

.event-card .time {
  font-family: var(--font-body);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums
}

.event-card p {
  margin-top: 6px;
  font-size: 1rem;
  line-height: 1.6
}

.event-card .link {
  display: inline-block;
  margin-top: 16px;
  color: var(--green-700);
  border-bottom: 1px solid var(--brass);
  font-weight: 500;
  font-size: .92rem
}

.map-box {
  max-width: 820px;
  margin: 32px auto 0;
  padding: 40px 24px;
  border: 1px dashed var(--brass-soft);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center
}

.map-box>i {
  font-size: 1.6rem;
  color: var(--brass)
}

.map-box .btn {
  margin-top: 12px
}

/* ===== ĐẾM NGƯỢC ===== */
.countdown {
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  color: #fff
}

.count-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 620px;
  margin: 0 auto;
  text-align: center
}

.count-grid div {
  padding: 22px 8px;
  border: 1px solid rgba(216, 194, 154, .4);
  border-radius: var(--radius)
}

.count-grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums
}

.count-grid span {
  font-size: .85rem;
  color: var(--brass-soft)
}

/* ===== LƯU BÚT ===== */
.gb-book {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(20, 41, 31, .12)
}

/* trang trái: form trên nền xanh */
.gb-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 44px 38px;
  color: #eee6d2;
  background: linear-gradient(165deg, var(--green-700), var(--green-900))
}

.gb-form h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.1;
  color: #fff
}

.gb-intro {
  font-size: .92rem;
  line-height: 1.6;
  color: var(--brass-soft);
  margin-bottom: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(216, 194, 154, .3)
}

.gb-form label {
  font-weight: 500;
  font-size: .88rem;
  margin-top: 8px
}

.gb-form input,
.gb-form textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #fffdf9;
  color: var(--ink);
  resize: none
}

.gb-form input:focus,
.gb-form textarea:focus {
  outline: 2px solid var(--brass-soft);
  outline-offset: 1px
}

.gb-count {
  font-size: .78rem;
  color: var(--brass-soft);
  text-align: right
}

.gb-form .btn-primary {
  margin-top: 10px;
  align-self: flex-start;
  background: var(--brass);
  color: #fff
}

.gb-form .btn-primary:hover {
  background: #bf9a5c
}

.gb-form .btn-primary:disabled {
  opacity: .6;
  cursor: wait
}

.gb-status {
  min-height: 1.4em;
  font-size: .88rem;
  color: #f0e4c8
}

/* trang phải: bảng lời chúc, chiều cao = chiều cao form */
.gb-board {
  position: relative;
  min-height: 440px
}

.gb-board-in {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column
}

.gb-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 30px 32px 18px;
  border-bottom: 1px solid var(--line)
}

.gb-board-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--green-700)
}

.gb-pill {
  flex: none;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--tint);
  font-size: .85rem;
  color: var(--muted)
}

.gb-pill strong {
  color: var(--green-700)
}

.gb-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 32px 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--brass-soft) transparent;
  overscroll-behavior: contain
}

.gb-scroll::-webkit-scrollbar {
  width: 6px
}

.gb-scroll::-webkit-scrollbar-thumb {
  background: var(--brass-soft);
  border-radius: 6px
}

.gb-list {
  display: flex;
  flex-direction: column
}

.gb-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line)
}

.gb-item:last-child {
  border-bottom: 0
}

.gb-item.is-new {
  margin: 0 -14px;
  padding: 20px 14px;
  background: #fffaf0;
  border-radius: var(--radius);
  border-bottom-color: transparent
}

.gb-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  background: var(--green-700)
}

.gb-avatar.c1 {
  background: var(--brass)
}

.gb-avatar.c2 {
  background: #8a4b44
}

.gb-avatar.c3 {
  background: #5a6f86
}

.gb-avatar.c4 {
  background: #6f7d4f
}

.gb-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px
}

.gb-head strong {
  font-weight: 600;
  font-size: .98rem;
  color: var(--ink)
}

.gb-head time {
  font-size: .78rem;
  color: var(--muted)
}

.gb-text {
  margin-top: 4px;
  font-size: .95rem;
  line-height: 1.7;
  color: #35413b;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden
}

.gb-text.is-full {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible
}

.gb-toggle {
  margin-top: 4px;
  font-size: .84rem;
  color: var(--green-500);
  text-decoration: underline;
  text-underline-offset: 3px
}

.gb-empty {
  margin-top: 24px;
  padding: 28px;
  text-align: center;
  font-style: italic;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius)
}

.gb-more {
  display: flex;
  margin: 18px auto 0
}

/* ===== MỪNG CƯỚI ===== */
.gift-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px
}

.gift-card .bank {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--green-700)
}

.gift-card .account {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: .06em;
  margin: 6px 0 12px;
  font-variant-numeric: tabular-nums
}

.gift-card .qr {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin-top: 20px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius)
}

/* ===== KẾT ===== */
.final {
  background: var(--green-900);
  color: #eee6d2;
  text-align: center
}

.final-names {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.2
}

.final-names i {
  color: var(--brass-soft);
  font-weight: 500
}

.footer {
  padding: 24px;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
  background: var(--tint)
}

/* ===== MODAL ẢNH ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 18, 14, .94)
}

.modal.is-open {
  display: flex
}

.modal-figure {
  max-width: min(92vw, 1100px);
  text-align: center
}

.modal-figure img {
  max-height: 82vh;
  width: auto;
  margin: 0 auto;
  border-radius: 4px;
  object-fit: contain
}

.modal-figure figcaption {
  margin-top: 12px;
  color: #e8dfc9;
  font-size: .92rem
}

.modal-btn {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background .2s
}

.modal-btn:hover {
  background: rgba(255, 255, 255, .25)
}

.modal-close {
  top: 18px;
  right: 18px
}

.modal-prev {
  left: 18px;
  top: 50%;
  transform: translateY(-50%)
}

.modal-next {
  right: 18px;
  top: 50%;
  transform: translateY(-50%)
}

.modal-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #cfc6b0;
  font-size: .85rem
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 300;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--green-900);
  color: #fff;
  font-size: .9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0)
}

/* ===== RESPONSIVE ===== */
@media (max-width:860px) {
  .section {
    padding: 72px 20px
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
    gap: 36px;
    text-align: center
  }

  .hero-names {
    align-items: center
  }

  .hero-quote {
    margin-inline: auto
  }

  .hero-guest {
    text-align: left;
    max-width: 30ch;
    margin-inline: auto
  }

  .hero-photo {
    order: -1;
    max-width: 340px;
    margin: 0 auto;
    width: 100%
  }

  .family-grid,
  .event-grid {
    grid-template-columns: 1fr
  }

  .gb-book {
    grid-template-columns: 1fr
  }

  .gb-form {
    padding: 32px 24px
  }

  .gb-board {
    min-height: 0
  }

  .gb-board-in {
    position: static
  }

  .gb-board-head {
    padding: 24px 20px 14px
  }

  .gb-scroll {
    max-height: 480px;
    padding: 0 20px 24px
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px
  }

  .g-item:nth-child(6n+4) {
    grid-column: auto
  }

  .nav-toggle {
    display: block
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    display: none
  }

  .nav-links.is-open {
    display: flex
  }

  .nav-links a {
    padding: 14px 24px;
    border: 0
  }

  .timeline::before {
    left: 20px
  }

  .tl-item {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 56px
  }

  .tl-dot {
    left: 0;
    transform: none;
    min-width: 42px;
    font-size: .85rem;
    padding: 3px 8px
  }

  .tl-content,
  .tl-item:nth-child(even) .tl-content {
    grid-column: 1;
    text-align: left;
    padding-top: 34px
  }
}

@media (prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: .01ms !important
  }

  html {
    scroll-behavior: auto
  }
}

/* =====================================================================
   HIỆU ỨNG GIAO DIỆN NÂNG CẤP & HIỆU ỨNG NỀN SANG TRỌNG (LUXURY GLASS & PARTICLES)
   ===================================================================== */

/* Canvas hoa rơi & trái tim */
.bg-effects-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 12;
}

/* Background Ambient Glow Orbs */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.glow-orb.orb-1 {
  width: 450px;
  height: 450px;
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, rgba(229, 190, 107, 0.4), rgba(63, 107, 87, 0.2));
}

.glow-orb.orb-2 {
  width: 550px;
  height: 550px;
  top: 40%;
  right: -150px;
  background: radial-gradient(circle, rgba(184, 146, 78, 0.35), rgba(32, 61, 50, 0.25));
  animation-delay: -6s;
}

.glow-orb.orb-3 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: 20%;
  background: radial-gradient(circle, rgba(247, 232, 196, 0.4), rgba(40, 80, 60, 0.2));
  animation-delay: -12s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(60px, 40px) scale(1.15);
  }

  100% {
    transform: translate(-40px, 80px) scale(0.95);
  }
}

/* Glassmorphism cho các Card */
.family-card,
.event-card,
.map-box,
.gift-card,
.count-grid div {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* Hiệu ứng Hover nâng card lên nhẹ nhàng */
.family-card:hover,
.event-card:hover,
.map-box:hover,
.gift-card:hover,
.count-grid div:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 48px rgba(15, 32, 24, 0.14), 0 0 20px rgba(229, 190, 107, 0.25);
  border-color: rgba(216, 182, 110, 0.7) !important;
}

.event-card.is-main {
  background: linear-gradient(145deg, rgba(28, 54, 44, 0.95), rgba(15, 32, 24, 0.98)) !important;
  border-color: rgba(229, 190, 107, 0.5) !important;
  box-shadow: 0 20px 50px rgba(15, 32, 24, 0.3);
}

.event-card.is-main:hover {
  box-shadow: 0 28px 60px rgba(15, 32, 24, 0.4), 0 0 25px rgba(229, 190, 107, 0.35);
}

/* =====================================================================
   NÂNG CẤP MÀN HÌNH MỞ THIỆP (LUXURY OPENING SCREEN & ENVELOPE FX)
   ===================================================================== */

.opening {
  background: radial-gradient(circle at 50% 35%, #183025 0%, #0c1a14 60%, #060e0a 100%) !important;
  overflow: hidden;
}

/* Hoa văn góc hoàng gia */
.opening-ornament {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(229, 190, 107, 0.35);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.5s ease;
}

.opening-ornament.top-left {
  top: 24px;
  left: 24px;
  border-right: none;
  border-bottom: none;
}

.opening-ornament.top-right {
  top: 24px;
  right: 24px;
  border-left: none;
  border-bottom: none;
}

.opening-ornament.bottom-left {
  bottom: 24px;
  left: 24px;
  border-right: none;
  border-top: none;
}

.opening-ornament.bottom-right {
  bottom: 24px;
  right: 24px;
  border-left: none;
  border-top: none;
}

/* Hào quang chuyển động quanh phong thư */
.envelope-aura {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(229, 190, 107, 0.25) 0%, rgba(51, 89, 72, 0.1) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  animation: pulseAura 4s ease-in-out infinite alternate;
}

@keyframes pulseAura {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.25);
    opacity: 0.9;
  }
}

/* Tinh chỉnh chữ và cảm xúc màn hình mở */
.opening-guest {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.95rem !important;
  opacity: 0.9;
  z-index: 3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.opening-date {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem !important;
  color: var(--brass-soft);
  z-index: 3;
  margin-bottom: 6px;
}

/* Hiệu ứng phong thư nổi bật & Bồng bềnh (Floating) */
.envelope {
  z-index: 3;
  filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.5));
  animation: floatEnvelope 3.5s ease-in-out infinite alternate;
}

@keyframes floatEnvelope {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  100% {
    transform: translateY(-8px) rotate(0.5deg);
  }
}

.envelope:hover {
  transform: translateY(-12px) scale(1.03) !important;
  animation: none;
}

/* Cải tiến phong thư bên trong */
.env-body {
  background: linear-gradient(135deg, #f0e6cb 0%, #d8cbac 100%) !important;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.08);
}

.env-flap {
  background: linear-gradient(135deg, #e4d7b6 0%, #ccbfa0 100%) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Tem sáp hoàng gia cao cấp */
.env-seal {
  background: radial-gradient(circle at 35% 35%, #b33939 0%, #7c1d1d 70%, #521111 100%) !important;
  color: #f7e8c4 !important;
  border: 2px solid rgba(247, 232, 196, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: sealGlow 2.5s infinite ease-in-out;
}

@keyframes sealGlow {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(229, 190, 107, 0.25), 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    box-shadow: 0 0 0 12px rgba(229, 190, 107, 0.12), 0 8px 25px rgba(229, 190, 107, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%) scale(1.08);
  }
}

/* Dòng gợi ý chạm phong thư */
.opening-hint {
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(229, 190, 107, 0.25);
  font-size: 0.9rem !important;
  letter-spacing: 0.03em;
  color: var(--brass-soft);
  backdrop-filter: blur(8px);
  animation: hintBlink 2s ease-in-out infinite;
}

.hint-icon {
  animation: bounceHand 1.2s ease-in-out infinite;
}

@keyframes bounceHand {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes hintBlink {

  0%,
  100% {
    opacity: 0.75;
  }

  50% {
    opacity: 1;
  }
}

/* Khi mở thiệp ra: Thêm hiệu ứng mờ dần khung viền và hào quang để tách biệt hoàn toàn với nội dung bên trong */
.opening.is-gone .opening-ornament,
.opening.is-gone .envelope-aura {
  opacity: 0;
  transform: scale(1.1);
  transition: all 0.6s ease;
}

.env-seal {
  box-shadow: 0 0 0 4px rgba(229, 190, 107, 0.3), 0 6px 20px rgba(0, 0, 0, 0.4);
  animation: pulseSeal 2.5s infinite ease-in-out;
}

@keyframes pulseSeal {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(229, 190, 107, 0.3), 0 6px 20px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(229, 190, 107, 0.15), 0 10px 30px rgba(229, 190, 107, 0.4);
    transform: translate(-50%, -50%) scale(1.06);
  }
}

/* Hero Section Enhancements */
.hero-photo {
  border: 4px solid var(--glass-border);
  box-shadow: 0 24px 60px rgba(15, 32, 24, 0.25), 0 0 30px rgba(229, 190, 107, 0.2);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.hero-photo:hover {
  transform: scale(1.02) rotate(-0.5deg);
  box-shadow: 0 30px 70px rgba(15, 32, 24, 0.35), 0 0 40px rgba(229, 190, 107, 0.35);
}

/* Shimmer hiệu ứng tiêu đề */
.sec-title {
  position: relative;
  letter-spacing: -0.01em;
}

.sec-title::after {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brass), var(--gold-glow), var(--brass), transparent);
  width: 100px;
}

/* Đếm ngược đếm ngày */
.count-grid div {
  position: relative;
}

.count-grid div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
}

/* Sổ lưu bút Glassmorphic */
.gb-book {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

.gb-form {
  background: linear-gradient(160deg, rgba(28, 54, 44, 0.96), rgba(15, 32, 24, 0.98)) !important;
}

/* Nút bấm hiệu ứng sang trọng */
.btn-primary {
  background: linear-gradient(135deg, var(--green-700), #0f2018);
  border: 1px solid rgba(229, 190, 107, 0.4);
  box-shadow: 0 8px 20px rgba(15, 32, 24, 0.25);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  box-shadow: 0 12px 28px rgba(15, 32, 24, 0.35), 0 0 15px rgba(229, 190, 107, 0.3);
  transform: translateY(-2px);
}

/* Nút nhạc lung linh */
.music-toggle {
  background: linear-gradient(135deg, var(--green-700), var(--brass));
  border: 2px solid var(--gold-light);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(229, 190, 107, 0.4);
  transition: all 0.3s ease;
}

.music-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4), 0 0 30px rgba(229, 190, 107, 0.6);
}

/* Animations Xuất hiện khi cuộn (Scroll Reveal) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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