/* Phiên bản 3 — Thánh Đường
   Xanh đêm và ngà, viền vàng mảnh, khung vòm cửa nhà thờ, hoa lá nét mảnh. */

:root {
  --night: #1b2439;
  --night-2: #222d46;
  --ivory: #f5f0e6;
  --ivory-2: #ebe4d6;
  --gold: #b9985f;
  --gold-soft: rgba(185, 152, 95, .45);
  --gold-faint: rgba(185, 152, 95, .2);
  --ink: #1f2434;
  --muted: #6e7182;
  --muted-n: #a4a9b8;

  /* hoa lá — mặc định: hồng phấn & xanh lá xám */
  --fl-line: #8e9c78;
  --fl-leaf: #d3d9c3;
  --fl-petal: #f3dcd4;
  --fl-petal-line: #c48e82;
  --fl-center: #c9a46a;
}
.fl-gold {
  --fl-line: var(--gold);
  --fl-leaf: rgba(185, 152, 95, .1);
  --fl-petal: var(--night);
  --fl-petal-line: #d4b887;
  --fl-center: var(--gold);
}

/* ---------------- Phông chữ: Cổ điển (EB Garamond) ---------------- */
:root {
  --f-names: 'EB Garamond';
  --f-head: 'EB Garamond';
  --f-body: 'EB Garamond';
  --f-caps: 'Cormorant SC';
  --caps-tt: none; --caps-size: 14px; --caps-ls: .22em; --caps-w: 600;
  --names-scale: 1; --names-style: normal; --names-w: 400;
  --head-w: 400; --body-size: 18px; --body-w: 400;
}
body {
  background: var(--ivory);
  color: var(--ink);
  font: var(--body-w) var(--body-size)/1.65 var(--f-body), Georgia, serif;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--night); }
.menu-open, .menu-open body { overflow: hidden; }

.smallcaps {
  font: var(--caps-w) var(--caps-size)/1.3 var(--f-caps), var(--f-body), serif;
  letter-spacing: var(--caps-ls);
  text-transform: var(--caps-tt);
  color: var(--gold);
}

.night { background: var(--night); color: var(--ivory); }
.ivory { background: var(--ivory); }

/* hoa lá */
.fl-st, .fl-r, .fl-s { fill: none; stroke: var(--fl-line); stroke-width: 1; }
.fl-l { fill: var(--fl-leaf); stroke: var(--fl-line); stroke-width: 1; }
.fl-p { fill: var(--fl-petal); stroke: var(--fl-petal-line); stroke-width: 1; }
.fl-s { stroke: var(--fl-petal-line); }
.fl-d { fill: var(--fl-petal-line); }
.fl-c { fill: var(--fl-center); }

.divider { display: block; width: 200px; height: 40px; margin: 0 auto; }

/* ================= MENU NỔI (máy tính) ================= */
.rail {
  position: fixed; left: 22px; top: 50%; z-index: 50;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center;
  width: 54px; padding: 16px 0 10px;
  background: var(--night);
  border: 1px solid var(--gold-soft);
  border-radius: 999px 999px 27px 27px;
  box-shadow: 0 12px 32px rgba(12, 16, 28, .22);
}
.rail__top { display: block; width: 30px; height: 30px; margin-bottom: 8px; }
.rail__top svg { width: 100%; height: 100%; }

.rail__list { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--gold-faint); border-bottom: 1px solid var(--gold-faint); }
.rail__list a {
  position: relative;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  color: var(--muted-n); text-decoration: none;
}
.rail__no { font: 600 13px/1 'Cormorant SC', 'EB Garamond', serif; letter-spacing: .04em; transition: color .25s; }
.rail__list a::before {
  content: ''; position: absolute; inset: 6px;
  border: 1px solid transparent; border-radius: 50%;
  transition: border-color .25s;
}
.rail__list a:hover, .rail__list a.is-active { color: var(--ivory); }
.rail__list a.is-active::before { border-color: var(--gold-soft); }

.rail__label {
  position: absolute; left: calc(100% + 16px); top: 50%;
  transform: translate(-6px, -50%);
  white-space: nowrap;
  padding: 8px 16px;
  background: var(--night); color: var(--ivory);
  border: 1px solid var(--gold-soft);
  font: var(--caps-w) var(--caps-size)/1 var(--f-caps), serif;
  letter-spacing: var(--caps-ls); text-transform: var(--caps-tt);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.rail__label::before {
  content: ''; position: absolute; right: 100%; top: 50%;
  width: 7px; height: 7px; margin-right: -4px;
  background: var(--night);
  border-left: 1px solid var(--gold-soft); border-bottom: 1px solid var(--gold-soft);
  transform: translateY(-50%) rotate(45deg);
}
.rail__list a:hover .rail__label,
.rail__list a:focus-visible .rail__label { opacity: 1; transform: translate(0, -50%); }

.rail__gallery {
  position: relative;
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-top: 8px;
  color: var(--gold); border-radius: 50%;
}
.rail__gallery svg { width: 20px; height: 20px; }
.rail__gallery:hover { background: rgba(185, 152, 95, .14); }
.rail__gallery:hover .rail__label,
.rail__gallery:focus-visible .rail__label { opacity: 1; transform: translate(0, -50%); }

/* ================= ĐIỆN THOẠI: thanh trên, menu, thanh dưới ================= */
.topbar, .tabbar, .drawer { display: none; }

@media (max-width: 1179px) {
  .rail { display: none; }

  .topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 60;
    display: flex; align-items: center; justify-content: space-between;
    height: calc(58px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 6px 0 20px;
    color: var(--ivory);
    border-bottom: 1px solid transparent;
    transition: background-color .3s, border-color .3s;
  }
  .topbar.is-solid, .menu-open .topbar { background: var(--night); border-color: var(--gold-faint); }
  .topbar__mark { font: italic 400 22px/1 'EB Garamond', serif; color: var(--gold); text-decoration: none; }

  .burger {
    width: 48px; height: 48px;
    display: grid; place-content: center; gap: 6px;
    background: none; border: 0; cursor: pointer;
  }
  .burger span { display: block; width: 22px; height: 1px; background: var(--gold); transition: transform .3s ease, opacity .2s ease; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .drawer {
    position: fixed; inset: 0; z-index: 55;
    display: block; overflow: auto;
    background: var(--night); color: var(--ivory);
    padding: calc(84px + env(safe-area-inset-top)) 28px calc(110px + env(safe-area-inset-bottom));
  }
  .drawer[hidden] { display: none; }
  .drawer__fl {
    position: absolute; right: -50px; bottom: 70px;
    width: 280px; height: auto; aspect-ratio: 252 / 240;
    transform: scaleX(-1); opacity: .45; pointer-events: none;
  }
  .drawer__inner { position: relative; max-width: 460px; }
  .drawer__list a {
    display: flex; align-items: baseline; gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--gold-faint);
    font: var(--head-w) 32px/1.2 var(--f-head), serif;
    color: var(--ivory); text-decoration: none;
  }
  .drawer__list a span { width: 30px; font: 600 13px/1 'Cormorant SC', serif; color: var(--gold); letter-spacing: .04em; }
  .drawer__list a.is-active { color: var(--gold); }

  .drawer__places { margin-top: 40px; }
  .drawer__places .smallcaps { margin-bottom: 12px; }
  .drawer__places ul { display: grid; gap: 8px; }
  .placelink {
    display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--gold-faint);
    color: var(--ivory); text-decoration: none;
    transition: border-color .2s, background-color .2s;
  }
  .placelink:active, .placelink:hover { border-color: var(--gold); background: rgba(185, 152, 95, .08); }
  .placelink__pin { width: 20px; height: 20px; color: var(--gold); }
  .placelink__main { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
  .placelink__main b { font: 600 13px/1.3 var(--f-caps), serif; letter-spacing: .16em; color: var(--gold); }
  .placelink__main span { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .placelink__when { display: flex; flex-direction: column; align-items: flex-end; font-size: 17px; line-height: 1.3; }
  .placelink__when small { font: 400 11px/1.3 system-ui, sans-serif; color: var(--muted-n); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
    background: var(--night);
    border-top: 1px solid var(--gold-soft);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 3px 0;
    color: var(--muted-n); text-decoration: none;
    font: 500 10.5px/1.2 system-ui, -apple-system, 'Segoe UI', sans-serif;
    letter-spacing: .02em;
  }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a.is-active { color: var(--gold); }
  .tabbar__main i {
    display: grid; place-items: center;
    width: 50px; height: 58px; margin-top: -30px;
    background: var(--night);
    border: 1px solid var(--gold);
    border-radius: 999px 999px 6px 6px;
    color: var(--gold);
  }
  .tabbar__main svg { width: 14px; height: 22px; }
  .tabbar__main.is-active i { background: var(--gold); color: var(--night); }

  section[id], article[id] { scroll-margin-top: 70px; }
  .foot { padding-bottom: calc(64px + 70px + env(safe-area-inset-bottom)) !important; }
}

/* ================= MỞ ĐẦU ================= */
.nave {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: 100vh; min-height: 100svh;
  padding: 70px clamp(24px, 5vw, 80px) 90px clamp(110px, 10vw, 150px);
  background: var(--night); color: var(--ivory);
}
.nave__bg { position: absolute; height: auto; aspect-ratio: 252 / 240; pointer-events: none; }
.nave__bg--a { width: 460px; top: -70px; right: -90px; transform: rotate(180deg); opacity: .24; }
.nave__bg--b { width: 380px; bottom: -80px; left: -60px; opacity: .22; }

.nave__inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 100px); align-items: center;
  width: 100%; max-width: 1140px; margin: 0 auto;
}
.nave__visual { display: flex; justify-content: center; }
.nave__text { text-align: center; }
.nave__cross { display: block; width: 16px; height: 26px; margin: 0 auto 16px; color: var(--gold); }

.arch-frame {
  position: relative;
  width: min(380px, 100%);
  padding: 10px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px 999px 0 0;
}
.arch { aspect-ratio: 3 / 4; border-radius: 999px 999px 0 0; background: var(--night-2); }
.arch.is-empty::after { color: var(--muted-n); }
.arch__fl { position: absolute; height: auto; aspect-ratio: 252 / 240; pointer-events: none; }
.arch__fl--l { width: 64%; left: -24%; bottom: -12%; }
.arch__fl--r { width: 50%; right: -18%; bottom: -10%; transform: scaleX(-1) rotate(-8deg); }

.nave__names {
  margin: 26px 0 18px;
  font-family: var(--f-names), serif;
  font-weight: var(--names-w);
  font-style: var(--names-style);
  font-size: calc(clamp(52px, 6.2vw, 92px) * var(--names-scale));
  line-height: 1.04;
  display: flex; flex-direction: column; align-items: center;
}
.nave__names small {
  display: block;
  font: italic 400 .3em/1.2 var(--f-head), serif;
  color: var(--muted-n);
  margin-bottom: .15em;
}
.nave__names em {
  font: italic 400 .5em/1.15 var(--f-head), serif;
  color: var(--gold);
}

.nave__date {
  margin-top: 18px;
  font: var(--caps-w) calc(var(--caps-size) + 1px)/1.5 var(--f-caps), serif;
  letter-spacing: calc(var(--caps-ls) * .7); text-transform: var(--caps-tt);
}
.nave__lunar { font-style: italic; color: var(--muted-n); font-size: .95em; }

/* Đếm ngược — ô hình vòm */
.cd { margin-top: 40px; }
.cd__label { font: var(--caps-w) var(--caps-size)/1.3 var(--f-caps), serif; letter-spacing: var(--caps-ls); text-transform: var(--caps-tt); color: var(--gold); }
.cd__cells { display: flex; justify-content: center; gap: clamp(10px, 1.4vw, 16px); margin-top: 18px; }
.cd__cell {
  position: relative;
  width: clamp(70px, 6.6vw, 90px);
  padding: 26px 0 14px;
  display: flex; flex-direction: column; align-items: center;
  border: 1px solid var(--gold-soft);
  border-radius: 999px 999px 0 0;
}
.cd__cell::before {
  content: ''; position: absolute; inset: 4px;
  border: 1px solid var(--gold-faint); border-radius: inherit;
  pointer-events: none;
}
.cd__cell span {
  font: var(--head-w) clamp(32px, 3.2vw, 44px)/1 var(--f-head), serif;
  font-variant-numeric: lining-nums tabular-nums;
}
.cd__cell small {
  margin-top: 8px;
  font: var(--caps-w) 11px/1 var(--f-caps), serif;
  letter-spacing: .18em; text-transform: var(--caps-tt);
  color: var(--gold);
}
.cd__done { display: none; margin-top: 16px; font-style: italic; font-size: 1.2em; }
.cd.is-done .cd__cells { display: none; }
.cd.is-done .cd__done { display: block; }

/* ================= LỜI MỜI ================= */
.invite { position: relative; overflow: hidden; padding: 120px 20px 100px; text-align: center; }
.corner-fl { position: absolute; height: auto; aspect-ratio: 252 / 240; pointer-events: none; }
.corner-fl--l { width: 300px; top: -36px; left: -50px; transform: scaleY(-1); }
.corner-fl--r { width: 260px; top: -36px; right: -50px; transform: scale(-1, -1); }
.corner-fl--br { width: 300px; bottom: -40px; right: -50px; transform: scaleX(-1); }

.scripture { position: relative; max-width: 560px; margin: 0 auto; }
.scripture p { font: italic var(--head-w) clamp(23px, 2.8vw, 30px)/1.42 var(--f-head), serif; }
.scripture p::before { content: '“'; }
.scripture p::after { content: '”'; }
.scripture cite {
  display: block; margin-top: 16px;
  font: normal var(--caps-w) 13px/1 var(--f-caps), serif;
  letter-spacing: .2em; text-transform: var(--caps-tt); color: var(--gold);
}

.houses {
  position: relative;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 40px;
  max-width: 760px; margin: 96px auto 0;
}
.house .smallcaps { margin-bottom: 14px; }
.house p:not(.smallcaps) { font-size: 1.1em; line-height: 1.5; }
.house .house__addr { margin-top: 10px; font-size: .85em; color: var(--muted); }
.houses__rings { width: 46px; height: 46px; margin-top: 14px; color: var(--gold); --rings-gap: var(--ivory); }

.invite__text { margin: 80px auto 44px; font-style: italic; font-size: 1.1em; color: var(--muted); }

.pair { display: flex; justify-content: center; gap: clamp(32px, 8vw, 120px); margin-bottom: 70px; }
.pair p { display: flex; flex-direction: column; gap: 6px; }
.pair__saint { margin-top: 4px; font-style: italic; font-size: 1.05em; color: var(--muted); line-height: 1; }
.pair__name { font: var(--head-w) clamp(30px, 4vw, 44px)/1.1 var(--f-head), serif; color: var(--night); }

/* ================= TIÊU ĐỀ ================= */
.heading { position: relative; text-align: center; margin-bottom: 72px; }
.heading h2 { font: var(--head-w) clamp(40px, 5.4vw, 64px)/1.08 var(--f-head), serif; margin-top: 10px; }

/* ================= LỊCH CƯỚI ================= */
.rites { padding: 110px 20px 120px; }
.rites__grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 44px 28px;
  max-width: 1020px; margin: 0 auto;
}
.rite {
  position: relative;
  text-align: center;
  padding: 104px 36px 44px;
  border: 1px solid var(--gold-soft);
  border-radius: 50% 50% 0 0 / 170px 170px 0 0;
}
.rite::before {
  content: ''; position: absolute; inset: 7px;
  border: 1px solid rgba(185, 152, 95, .18);
  border-radius: inherit;
  pointer-events: none;
}
.rite__crown {
  position: absolute; top: -22px; left: 50%;
  transform: translateX(-50%);
  padding: 0 8px; line-height: 0;
  background: var(--night);
}
.rite__crown svg { width: 110px; height: 48px; }
.rite__title { font: var(--head-w) clamp(30px, 3.2vw, 38px)/1.15 var(--f-head), serif; margin: 12px 0 10px; }
.rite .divider { margin-bottom: 12px; }
.rite__day { font: var(--caps-w) var(--caps-size)/1 var(--f-caps), serif; letter-spacing: var(--caps-ls); text-transform: var(--caps-tt); color: var(--muted-n); }
.rite__date { font: var(--head-w) 40px/1.1 var(--f-head), serif; margin: 8px 0 4px; font-variant-numeric: lining-nums; }
.rite__time { font-size: 1.05em; }
.rite__lunar { font-style: italic; font-size: .9em; color: var(--muted-n); }
.rite__program { display: inline-grid; gap: 2px; margin: 2px 0 4px; }
.rite__program li { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 12px; }
.rite__program b { font-weight: 500; text-align: right; }
.rite__program li::before { content: ''; grid-column: 2; grid-row: 1; width: 5px; height: 5px; border: 1px solid var(--gold); transform: rotate(45deg) translateY(-3px); }
.rite__program b { grid-column: 1; grid-row: 1; }
.rite__program span { grid-column: 3; grid-row: 1; text-align: left; }

.rite__place { margin: 26px auto 0; padding-top: 22px; border-top: 1px solid rgba(185, 152, 95, .25); max-width: 320px; }
.rite__venue { font-size: 1.1em; }
.rite__addr { font-size: .85em; color: var(--muted-n); }
.rite__note { margin-top: 8px; font-style: italic; font-size: .9em; color: var(--gold); }

.rite__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 24px; margin-top: 26px; }
.rite__links a, .rite__map summary {
  font: var(--caps-w) 13px/1 var(--f-caps), serif;
  letter-spacing: .18em; text-transform: var(--caps-tt);
  color: var(--gold); text-decoration: none;
  padding-bottom: 5px; border-bottom: 1px solid var(--gold-soft);
  cursor: pointer;
}
.rite__links a:hover, .rite__map summary:hover { border-color: var(--gold); }
.rite__map { margin-top: 18px; }
.rite__map summary { display: inline-block; list-style: none; }
.rite__map summary::-webkit-details-marker { display: none; }
.rite__map .map { margin-top: 18px; background: var(--night-2); }
.rite__map .map.is-empty { color: var(--muted-n); font-style: italic; font-size: 16px; }

/* ================= KỶ NIỆM ================= */
.memories { position: relative; overflow: hidden; padding: 110px 20px 140px; }
.timeline { position: relative; max-width: 1020px; margin: 0 auto; }
.timeline::before {
  content: ''; position: absolute; top: 14px; bottom: 60px; left: 50%;
  width: 1px; background: var(--gold-soft);
}

.moment {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 84px;
  margin-bottom: 100px;
}
.moment__mark { position: absolute; left: 50%; top: 0; width: 30px; height: 30px; margin-left: -15px; }
.moment__head { text-align: right; }
.moment:nth-child(even) .moment__head { order: 2; text-align: left; }
.moment__date { font: var(--caps-w) 15px/1 var(--f-caps), serif; letter-spacing: .2em; color: var(--muted); }
.moment__title { font: var(--head-w) clamp(30px, 3.4vw, 42px)/1.1 var(--f-head), serif; margin: 12px 0 10px; color: var(--night); }
.moment__place { font-size: 13px; }
.moment__text { margin-top: 18px; max-width: 400px; }
.moment:nth-child(odd) .moment__text { margin-left: auto; }

.moment__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.moment__photos .ph { aspect-ratio: 1; background: var(--ivory-2); }
.moment__photos .ph:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 5; border-radius: 999px 999px 0 0; }
.moment__photos .ph.is-empty::after { color: var(--muted); }
.moment__more {
  grid-column: 2; justify-self: start;
  margin-top: 18px;
  font: var(--caps-w) 13px/1 var(--f-caps), serif; letter-spacing: .18em;
  color: var(--gold); text-decoration: none;
  padding-bottom: 6px; border-bottom: 1px solid var(--gold-soft);
  transition: border-color .2s;
}
.moment__more:hover { border-color: var(--gold); }
.moment__more span[aria-hidden] { display: inline-block; transition: transform .25s; }
.moment__more:hover span[aria-hidden] { transform: translateX(4px); }
.moment:nth-child(even) .moment__more { grid-column: 1; grid-row: 2; }

/* Mở đầu: chữ hiện lần lượt khi vào trang */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.nave__text > *, .nave__visual {
  animation: rise 1s cubic-bezier(.2, .7, .2, 1) both;
}
.nave__visual { animation-delay: .1s; }
.nave__text > :nth-child(2) { animation-delay: .15s; }
.nave__text > :nth-child(3) { animation-delay: .3s; }
.nave__text > :nth-child(4) { animation-delay: .45s; }
.nave__text > :nth-child(5), .nave__text > :nth-child(6) { animation-delay: .55s; }
.nave__text > :nth-child(7) { animation-delay: .7s; }
@media (prefers-reduced-motion: reduce) { .nave__text > *, .nave__visual { animation: none; } }

.moment--next { margin-bottom: 0; }
.moment--next .moment__mark { width: 40px; height: 40px; margin-left: -20px; top: -5px; }
.moment--next .moment__head { grid-column: 1; }

/* ================= LỜI CHÚC ================= */
.vigil { position: relative; overflow: hidden; padding: 110px 20px 120px; text-align: center; }
.vigil__fl { position: absolute; bottom: -50px; height: auto; aspect-ratio: 252 / 240; width: 340px; opacity: .3; pointer-events: none; }
.vigil__fl--l { left: -40px; }
.vigil__fl--r { right: -40px; transform: scaleX(-1); }
.vigil .divider { margin-bottom: 40px; }
.vigil__thanks { position: relative; font-style: italic; color: var(--muted-n); max-width: 460px; margin: 56px auto 0; }
.vigil__sign {
  position: relative; margin-top: 26px;
  font-family: var(--f-names), serif; font-style: var(--names-style); font-weight: var(--names-w);
  font-size: calc(34px * var(--names-scale)); line-height: 1.2;
  color: var(--gold);
}

.contact { position: relative; margin: 64px auto 0; max-width: 560px; }
.contact .smallcaps { margin-bottom: 16px; }
.contact__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact__item {
  display: grid; grid-template-columns: 20px auto; grid-template-rows: auto auto;
  column-gap: 12px; align-items: center; text-align: left;
  padding: 12px 22px 12px 18px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  color: var(--ivory); text-decoration: none;
  transition: border-color .2s, background-color .2s;
}
.contact__item:hover { border-color: var(--gold); background: rgba(185, 152, 95, .08); }
.contact__item svg { grid-row: span 2; width: 20px; height: 20px; color: var(--gold); }
.contact__who { font-size: 13px; line-height: 1.3; color: var(--muted-n); }
.contact__num { font-size: 21px; line-height: 1.2; letter-spacing: .03em; font-variant-numeric: lining-nums; }

.foot { background: var(--night); color: var(--ivory); text-align: center; padding: 0 20px 64px; border-top: 1px solid var(--gold-faint); padding-top: 56px; }
.foot .nave__cross { margin-bottom: 16px; }
.foot__date { margin-top: 6px; font-style: italic; color: var(--muted-n); }

/* ================= MÀN HÌNH VỪA ================= */
@media (max-width: 1179px) {
  .nave { padding: calc(80px + env(safe-area-inset-top)) clamp(20px, 5vw, 60px) 80px; }
}

/* ================= MÀN HÌNH NHỎ ================= */
@media (max-width: 860px) {
  .nave { min-height: 0; padding-bottom: 130px; }
  .nave__inner { grid-template-columns: 1fr; gap: 64px; }
  .nave__text { order: -1; }
  .nave__bg--a { width: 300px; right: -100px; top: -40px; }
  .nave__bg--b { width: 260px; }
  .nave__names { margin: 18px 0 10px; font-size: calc(clamp(46px, 13vw, 64px) * var(--names-scale)); }
  .cd { margin-top: 30px; }
  .cd__cells { gap: 8px; }
  .cd__cell { width: 22%; max-width: 82px; padding-top: 22px; }
  .cd__cell span { font-size: 32px; }
  .arch-frame { width: min(300px, 78vw); }
}

@media (max-width: 760px) {
  body { font-size: calc(var(--body-size) - 1px); }

  .invite, .rites, .memories, .vigil { padding: 84px 16px; }
  .corner-fl--l { width: 170px; top: -24px; left: -40px; opacity: .75; }
  .corner-fl--r { width: 150px; top: -24px; right: -40px; opacity: .75; }
  .corner-fl--br { width: 190px; right: -40px; opacity: .8; }
  .invite { padding-top: 110px; }

  .houses { grid-template-columns: 1fr; gap: 22px; margin-top: 64px; }
  .houses__rings { margin: 0 auto; }
  .pair { flex-direction: column; gap: 26px; }
  .invite__text br { display: none; }

  .rites__grid { grid-template-columns: 1fr; gap: 50px; }
  .rite { padding: 96px 22px 36px; }

  .timeline::before { left: 13px; }
  .moment, .moment:nth-child(even) { grid-template-columns: 1fr; gap: 26px; padding-left: 44px; margin-bottom: 70px; }
  .moment__mark { left: 13px; }
  .moment--next .moment__mark { left: 13px; }
  .moment__head, .moment:nth-child(even) .moment__head { order: 0; text-align: left; }
  .moment:nth-child(odd) .moment__text { margin-left: 0; }
  .moment__more, .moment:nth-child(even) .moment__more { grid-column: auto; grid-row: auto; margin-top: -4px; }

  .vigil__fl { width: 200px; opacity: .25; }
}

/* ================= KHOÁ TRANG (mật khẩu) ================= */
.gate {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 24px 18px;
  overflow: auto;
  background: var(--night); color: var(--ivory);
  transition: opacity .8s ease, visibility .8s;
}
.gate.is-open { opacity: 0; visibility: hidden; }
.gate__fl { position: absolute; height: auto; aspect-ratio: 252 / 240; pointer-events: none; opacity: .3; }
.gate__fl--a { width: 380px; right: -70px; top: -60px; transform: rotate(180deg); }
.gate__fl--b { width: 340px; left: -60px; bottom: -60px; }

.gate__card {
  position: relative;
  width: min(420px, 100%);
  padding: 64px 36px 36px;
  text-align: center;
  border: 1px solid var(--gold-soft);
  border-radius: 999px 999px 0 0 / 210px 210px 0 0;
  background: var(--night);
  animation: rise 1s cubic-bezier(.2, .7, .2, 1) both;
}
.gate__card::before {
  content: ''; position: absolute; inset: 7px;
  border: 1px solid var(--gold-faint); border-radius: inherit;
  pointer-events: none;
}
.gate__rings { display: block; width: 52px; height: 52px; margin: 0 auto 20px; color: var(--gold); }
.gate__kicker {
  font: var(--caps-w) var(--caps-size)/1.3 var(--f-caps), serif;
  letter-spacing: var(--caps-ls); color: var(--gold);
}
.gate__title {
  display: flex; flex-direction: column; align-items: center;
  margin: 14px 0 10px;
  font: 400 clamp(36px, 9vw, 46px)/1.05 var(--f-names), serif;
}
.gate__title span { white-space: nowrap; }
.gate__title em { font: italic 400 .55em/1.2 var(--f-head), serif; color: var(--gold); }
.gate__lead { font-style: italic; color: var(--muted-n); }

.gate__field { position: relative; margin-top: 30px; text-align: left; }
.gate__label {
  display: block; margin-bottom: 8px;
  font: var(--caps-w) 13px/1 var(--f-caps), serif; letter-spacing: .18em; color: var(--muted-n);
}
.gate__input {
  width: 100%; height: 50px;
  padding: 0 64px 0 16px;
  background: rgba(245, 240, 230, .04);
  border: 1px solid var(--gold-soft);
  border-radius: 0;
  color: var(--ivory);
  font: 400 19px/1 var(--f-body), serif; letter-spacing: .06em;
  outline: none;
  transition: border-color .2s, background-color .2s;
}
.gate__input:focus { border-color: var(--gold); background: rgba(245, 240, 230, .07); }
.gate__eye {
  position: absolute; right: 6px; bottom: 7px;
  height: 36px; padding: 0 10px;
  background: none; border: 0; cursor: pointer;
  font: var(--caps-w) 12px/1 var(--f-caps), serif; letter-spacing: .14em; color: var(--gold);
}
.gate__error { min-height: 24px; margin-top: 10px; font-size: 15px; font-style: italic; color: #e6a89a; }
.gate__btn {
  width: 100%; height: 50px; margin-top: 4px;
  background: var(--gold); color: var(--night);
  border: 0; cursor: pointer;
  font: var(--caps-w) 14px/1 var(--f-caps), serif; letter-spacing: .24em;
  transition: background-color .2s;
}
.gate__btn:hover { background: #cdb07a; }
.gate__note { margin-top: 16px; font-size: 13.5px; color: var(--muted-n); }

.gate__card.is-wrong { animation: gate-shake .45s ease; }
.gate__card.is-wrong .gate__input { border-color: #e6a89a; }
@keyframes gate-shake {
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); }
}
@media (max-width: 480px) {
  .gate__card { padding: 56px 22px 28px; border-radius: 999px 999px 0 0 / 160px 160px 0 0; }
  .gate__fl--a { width: 240px; }
  .gate__fl--b { width: 220px; }
}

/* ================= THÔNG BÁO CÓ BẢN MỚI ================= */
.update {
  position: fixed; left: 50%; bottom: 24px; z-index: 150;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 8px 8px 20px;
  background: var(--night); color: var(--ivory);
  border: 1px solid var(--gold);
  box-shadow: 0 12px 32px rgba(12, 16, 28, .3);
  font-size: 16px; white-space: nowrap;
  opacity: 0; transform: translate(-50%, 16px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}
.update.is-in { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.update__go {
  margin-left: 10px; height: 36px; padding: 0 16px;
  background: var(--gold); color: var(--night); border: 0; cursor: pointer;
  font: var(--caps-w) 13px/1 var(--f-caps), serif; letter-spacing: .16em;
}
.update__x {
  width: 36px; height: 36px; background: none; border: 0; cursor: pointer;
  color: var(--muted-n); font-size: 22px; line-height: 1;
}
@media (max-width: 1179px) {
  .update { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .gpage .update { bottom: calc(20px + env(safe-area-inset-bottom)); }
}
