/* ==========================================================================
   PHÒNG TRANH (GALLERY) — theme chính của thiệp
   Tường giấy xám nhạt, mực đen, khung tranh đen + passe-partout trắng,
   nhãn in hoa giãn chữ và tiêu đề serif như nhãn tác phẩm trong bảo tàng.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. NỀN & BỐ CỤC CHUNG
   -------------------------------------------------------------------------- */
/* Vùng ngoài thiệp: xám đá đậm hơn nền thiệp để khổ 900px nổi rõ */
body {
  background: var(--gl-outside, #DEDBD3);
  background-image: none;
  color: var(--gl-ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
}

::selection { background: var(--gl-ink); color: var(--gl-wall); }

:focus-visible {
  outline: 2px solid var(--gl-ink) !important;
  outline-offset: 3px;
}

/* Khổ thiệp tối đa 900px; cột nội dung tối đa 560px, căn giữa */
:root {
  --gl-card-max: 900px;
  --gl-content-max: 560px;
  --gl-gutter: 28px;
  --gl-content-width: min(var(--gl-content-max), 100% - 2 * var(--gl-gutter));
  --gl-inline-pad: max(var(--gl-gutter), (100% - var(--gl-content-max)) / 2);
}

.app-container {
  width: min(var(--gl-card-max), 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
  background: var(--gl-wall);
  counter-reset: room;
}

/* Nhãn in hoa dùng chung (số phòng, tên phòng, chú thích) */
.room-head,
.label-caption,
.field-label,
.ticket-head,
.ticket-guest-label,
.exit-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   2. MỖI PHÒNG: VẠCH ĐEN TRÊN ĐẦU + "PHÒNG 01 ........ TÊN PHÒNG"
   -------------------------------------------------------------------------- */
.room {
  width: var(--gl-content-width);
  margin: 72px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--gl-ink);
}

.room-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: 0;
  color: var(--gl-ink);
}

/* Đánh số phòng tự động — phòng bị ẩn (display: none) không được đếm */
.room-head { counter-increment: room; }
.room-no { flex: none; }
.room-no::after { content: " " counter(room, decimal-leading-zero); }

.room-head .room-name {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: var(--gl-muted);
  text-align: right;
}

.room-title {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  color: var(--gl-ink);
}

/* Hiệu ứng xuất hiện khi cuộn: nhẹ, như bước vào phòng mới */
.reveal-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2, .8, .2, 1), transform .9s cubic-bezier(.2, .8, .2, 1);
  margin-bottom: 0;
}
.reveal-section.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal-section { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   3. KHUNG TRANH: VIỀN ĐEN + PASSE-PARTOUT TRẮNG + ẢNH
   -------------------------------------------------------------------------- */
.artwork-frame {
  display: block;
  background: var(--gl-ink);
  padding: 12px;
}
.artwork-mat {
  display: block;
  position: relative;
  background: var(--gl-white);
  padding: 16px;
}
.artwork-mat img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--gl-mat);
}

/* --------------------------------------------------------------------------
   4. BÌA: VÉ VÀO TRIỂN LÃM
   -------------------------------------------------------------------------- */
.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--gl-outside, #DEDBD3);
  overflow-y: auto;
  display: flex;
  justify-content: center;
  transition: transform 1.8s cubic-bezier(0.65, 0, 0.35, 1), opacity 1.8s ease;
}

.invite-opening .envelope-screen,
.invite-open .envelope-screen {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-box {
  width: min(var(--gl-card-max), 100%);
  min-height: 100%;
  display: flex;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

/* Vé có khung: viền đen ngoài + đường chỉ trong như khung tranh */
.exhibit-ticket {
  flex: 1;
  box-sizing: border-box;
  max-width: var(--gl-content-max);
  min-height: calc(100dvh - 32px);
  padding: 36px 26px;
  background: var(--gl-wall);
  border: 1px solid var(--gl-ink);
  outline: 1px solid var(--gl-ink);
  outline-offset: -8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  transition: transform 1.1s cubic-bezier(.65, 0, .35, 1), opacity .8s ease;
}

.invite-opening .exhibit-ticket {
  transform: translateY(-40px);
  opacity: 0;
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.ticket-head .envelope-date { color: var(--gl-ink); }

.ticket-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.artwork-frame--cover { padding: 16px; }
.artwork-frame--cover .artwork-mat { padding: 20px; }
.artwork-frame--cover .artwork-mat::before {
  content: "";
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--gl-mat);
}
.artwork-frame--cover .cover-artwork-img {
  position: absolute;
  inset: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  aspect-ratio: auto;
}
.artwork-frame--cover .cover-artwork-img[hidden] { display: none; }

/* Nhãn tác phẩm treo cạnh tranh */
.wall-label {
  align-self: flex-start;
  max-width: 270px;
  background: var(--gl-white);
  border: 1px solid var(--gl-line);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--gl-ink);
}
.wall-label p { margin: 0; }

.envelope-names {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}
.envelope-name-amp { font-weight: 400; font-style: italic; }
.wall-label .wall-label-title { margin-top: 2px; font-family: var(--font-display); font-size: 13px; }
.wall-label-medium { color: var(--gl-muted); white-space: pre-line; font-size: 13.5px; }

.ticket-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
}
.ticket-guest { min-width: 0; }
.ticket-guest-label { display: block; font-size: 10px; color: var(--gl-muted); }
.envelope-invite-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.25;
  color: var(--gl-ink);
  overflow-wrap: anywhere;
}

/* Nút chính (đen đặc) */
.btn-open,
.btn-submit-wish,
.rsvp-btn-submit,
.btn-modal-refresh {
  flex: none;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background: var(--gl-ink);
  color: var(--gl-wall);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, opacity .2s ease;
}
.btn-open:hover,
.btn-submit-wish:hover,
.rsvp-btn-submit:hover,
.btn-modal-refresh:hover { background: #333230; }
.btn-open:disabled { opacity: .45; cursor: progress; }

/* Lớp chờ tải dữ liệu thiệp trên bìa */
#envelope-screen .cover-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gl-wall);
}
#envelope-screen .cover-loading-overlay[hidden] { display: none; }
.cover-loading-spinner {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--gl-line);
  border-top-color: var(--gl-ink);
  border-radius: 50%;
  animation: gl-spin .9s linear infinite;
}
@keyframes gl-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   5. PHÒNG: SAVE THE DATE (HERO)
   -------------------------------------------------------------------------- */
.hero-section { margin-top: 0; padding-top: 64px; border-top: 0; }
.hero-section .room-head { padding-top: 18px; border-top: 1px solid var(--gl-ink); }

.hero-title-box { margin-top: 18px; }
.hero-names {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.08;
  color: var(--gl-ink);
  overflow-wrap: anywhere;
}
/* "Minh Đức / & Ngọc Lan": xuống dòng trước dấu & */
.hero-names .amp { font-style: italic; font-size: .7em; }
.hero-names .amp::before { content: ""; display: block; }
.hero-invite-guest {
  margin: 12px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gl-muted);
}

.envelope-stage { margin-top: 24px; }
.photo-frame { cursor: zoom-in; }
.photo-frame img { transition: opacity .3s ease; }
.photo-frame:hover img { opacity: .92; }

.hero-quote,
.countdown-quote,
.gallery-caption,
.announcement-text,
.story-banner blockquote {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--gl-text);
}

/* --------------------------------------------------------------------------
   6. PHÒNG: HAI GIA ĐÌNH & LỄ THÀNH HÔN
   -------------------------------------------------------------------------- */
.red-card { background: none; border: 0; padding: 0; box-shadow: none; }

.announcement-text { font-size: 15px; }

.couple-highlight-names {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "n1 n2" "r1 r2";
  column-gap: 14px;
  margin-top: 20px;
}
.couple-highlight-names .groom-name { grid-area: n1; }
.couple-highlight-names .bride-name { grid-area: n2; }
.couple-highlight-names .role-badge:nth-of-type(1) { grid-area: r1; }
.couple-highlight-names .role-badge:nth-of-type(3) { grid-area: r2; }
.couple-highlight-names .amp { display: none; }
.couple-highlight-names .groom-name,
.couple-highlight-names .bride-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.couple-highlight-names .role-badge { font-size: 12px; color: var(--gl-muted); }

.parents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.family-side {
  padding-top: 10px;
  border-top: 1px solid var(--gl-line);
  font-size: 12px;
  line-height: 1.55;
  min-width: 0;
}
.family-side small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gl-muted);
}
.family-side h4 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(1.55em * 2);
  margin: 4px 0 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--gl-ink);
  overflow-wrap: anywhere;
}
.family-side p { margin: 4px 0 0; color: var(--gl-muted); overflow-wrap: anywhere; }

.ceremony-room {
  margin-top: 72px;
  padding-top: 18px;
  border-top: 1px solid var(--gl-ink);
}

.ceremony-time-badge {
  display: grid;
  gap: 4px;
  margin-top: 20px;
}
.ceremony-time-badge .date-big {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1;
  letter-spacing: -.5px;
  color: var(--gl-ink);
}
.ceremony-time-badge .time { margin-top: 10px; font-size: 13px; font-weight: 600; }
.ceremony-time-badge .lunar { font-size: 13px; color: var(--gl-muted); }

.wall-label--box {
  display: block;
  max-width: none;
  margin-top: 20px;
  padding: 14px 16px;
  font-size: 13px;
}
.label-caption { display: block; font-size: 10px; color: var(--gl-muted); }
.ceremony-note { margin: 2px 0 0; }

/* --------------------------------------------------------------------------
   7. PHÒNG: ALBUM — TƯỜNG TRANH
   -------------------------------------------------------------------------- */
.artwork-wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  align-items: end;
}

.artwork-item {
  grid-column: span 2;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: zoom-in;
  color: var(--gl-muted);
}
.artwork-item .artwork-frame { padding: 4px; }
.artwork-item .artwork-mat { padding: 5px; overflow: hidden; }
.artwork-item img { aspect-ratio: 1; transition: transform .5s ease; }
.artwork-item:hover img { transform: scale(1.03); }
.artwork-no { display: block; margin-top: 4px; font-size: 10px; font-weight: 600; letter-spacing: 1px; }

.artwork-item.is-feature { grid-column: span 4; grid-row: span 2; }
.artwork-item.is-feature .artwork-frame { padding: 6px; }
.artwork-item.is-feature .artwork-mat { padding: 8px; }
.artwork-item.is-feature img { aspect-ratio: 4 / 5; }
.artwork-wall.is-single .artwork-item.is-feature { grid-column: 1 / -1; }

.artwork-more {
  position: absolute;
  inset: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 26, .62);
  color: var(--gl-wall);
  font-family: var(--font-display);
  font-size: 24px;
}

.gallery-caption { font-size: 15px; }

/* Lightbox: phòng chiếu tối */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px;
  background: rgba(20, 20, 20, .96);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox-modal.open { opacity: 1; visibility: visible; }
.lightbox-modal img {
  max-width: min(92vw, 720px);
  max-height: 80vh;
  object-fit: contain;
  border: 10px solid var(--gl-white);
  border-radius: 0;
  box-shadow: none;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(245, 244, 240, .5);
  border-radius: 0;
  background: transparent;
  color: var(--gl-wall);
  font-size: 22px;
  line-height: 1;
}
.lightbox-close { top: 16px; right: 16px; font-size: 16px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 28px; }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }
.lightbox-nav[hidden], .lightbox-counter[hidden] { display: none; }
.lightbox-counter {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gl-muted-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
}

/* --------------------------------------------------------------------------
   8. PHÒNG: TIỆC CƯỚI — PHÒNG TỐI
   -------------------------------------------------------------------------- */
.room--dark {
  width: auto;
  margin: 72px 0 0;
  padding: 40px var(--gl-inline-pad);
  border-top: 0;
  background: var(--gl-ink);
  color: var(--gl-wall);
}
.room--dark .room-head { color: var(--gl-wall); }
.room--dark .room-head .room-name { color: var(--gl-muted-dark); }

.reception-card { background: none; border: 0; padding: 0; box-shadow: none; }

.reception-lead {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.18;
  color: var(--gl-wall);
}

.reception-date-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 14px;
  font-size: 13px;
}
.reception-day-time span { font-weight: 600; }
.reception-date-block { display: flex; align-items: baseline; gap: 6px; }
.reception-date-num { font-weight: 600; }
.reception-date-divider { display: none; }
.reception-date-month-year { display: flex; gap: 6px; }
.reception-date-month-year strong { font-weight: 600; }
.reception-lunar { margin: 2px 0 0; font-size: 13px; color: var(--gl-muted-dark); }

.reception-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--gl-muted);
  border-bottom: 1px solid var(--gl-muted);
}
.reception-time-col { padding: 12px 0; min-width: 0; }
.reception-time-col + .reception-time-col { padding-left: 16px; border-left: 1px solid var(--gl-muted); }
.reception-time-col small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gl-muted-dark);
}
.reception-time-col strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.3;
}

.calendar-paper {
  margin-top: 22px;
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
  color: var(--gl-wall);
}
.calendar-paper-title {
  padding-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.calendar-grid-header,
.calendar-grid-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  font-size: 12px;
  text-align: center;
}
.calendar-grid-header span,
.calendar-grid-days span {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calendar-grid-header span { font-size: 10px; font-weight: 600; color: var(--gl-muted-dark); }
.calendar-grid-days .wedding-day {
  background: var(--gl-wall);
  color: var(--gl-ink);
  font-weight: 600;
}

.reception-actions { display: flex; gap: 10px; margin-top: 22px; }
.reception-actions button {
  flex: 1;
  min-height: 48px;
  padding: 0 8px;
  border: 1px solid var(--gl-wall);
  border-radius: 0;
  background: transparent;
  color: var(--gl-wall);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background .2s ease, color .2s ease;
}
.reception-actions .btn-cream-solid { background: var(--gl-wall); color: var(--gl-ink); }
.reception-actions .btn-gold-outline:hover { background: rgba(245, 244, 240, .1); }
.reception-actions .btn-cream-solid:hover { background: var(--gl-mat); }

/* --------------------------------------------------------------------------
   9. PHÒNG: ĐỊA ĐIỂM (& TIỆC NHÀ GÁI)
   -------------------------------------------------------------------------- */
.venue-card { background: none; border: 0; padding: 0; box-shadow: none; }
.venue-name {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.venue-address { margin: 4px 0 0; font-size: 13px; color: var(--gl-muted); }

.map-embed-wrapper {
  margin-top: 16px;
  height: 220px;
  background: var(--gl-mat);
  border: 1px solid var(--gl-ink);
}
.map-embed-wrapper iframe {
  display: block;
  width: 100%;
  height: 100%;
}

/* Nút viền (link) */
.venue-direction-btn,
#reception-bride .rb-direction,
.gift-envelope-trigger,
.btn-line,
.btn-modal-cancel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid var(--gl-ink);
  border-radius: 0;
  background: transparent;
  color: var(--gl-ink);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.venue-direction-btn:hover,
#reception-bride .rb-direction:hover,
.gift-envelope-trigger:hover,
.btn-line:hover,
.btn-modal-cancel:hover { background: var(--gl-ink); color: var(--gl-wall); filter: none; }

/* Tiệc nhà gái: cùng ngôn ngữ phòng sáng */
#reception-bride {
  --rb-ink: var(--gl-ink);
  --rb-muted: var(--gl-muted);
  --rb-paper: transparent;
  --rb-border: var(--gl-line);
  width: var(--gl-content-width);
  max-width: none;
  margin: 72px auto 0;
  padding: 18px 0 0;
  text-align: left;
  font-family: var(--font-body);
}
#reception-bride .bride-reception-card { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
#reception-bride .rb-heading { margin: 0; font: inherit; letter-spacing: inherit; color: var(--gl-muted); }
#reception-bride .rb-lead,
#reception-bride .rb-venue-label { margin-top: 18px; font-size: 10px; font-weight: 600; letter-spacing: 2px; }
#reception-bride .rb-weekday { margin: 6px 0 0; font-size: 13px; font-weight: 600; letter-spacing: 0; }
#reception-bride .rb-date { justify-content: flex-start; margin: 6px 0 0; }
#reception-bride .rb-day { font-family: var(--font-display); font-weight: 400; font-size: 64px; }
#reception-bride .rb-year { font-family: var(--font-display); font-weight: 400; }
#reception-bride .rb-lunar { font-size: 13px; text-transform: none; }
#reception-bride .rb-times {
  justify-content: stretch;
  gap: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--gl-ink);
  border-bottom: 1px solid var(--gl-ink);
  margin-top: 18px;
}
#reception-bride .rb-time-col { padding: 12px 0; }
#reception-bride .rb-time-col + .rb-time-col { padding-left: 16px; border-left: 1px solid var(--gl-ink); }
#reception-bride .rb-time-col small { font-size: 10px; font-weight: 600; letter-spacing: 2px; }
#reception-bride .rb-time-col strong { font-family: var(--font-display); font-weight: 400; font-size: 30px; }
#reception-bride .rb-venue-name-row { justify-content: flex-start; margin: 4px 0 0; }
#reception-bride .rb-venue-name { font-family: var(--font-display); font-weight: 400; font-size: 26px; }
#reception-bride .rb-venue-address { margin-top: 4px; font-size: 13px; }

/* --------------------------------------------------------------------------
   10. PHÒNG: ĐẾM NGƯỢC
   -------------------------------------------------------------------------- */
.countdown-card { background: none; border: 0; padding: 0; box-shadow: none; text-align: left; }
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  background: var(--gl-ink);
  border: 1px solid var(--gl-ink);
}
.count-box {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  background: var(--gl-wall);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.count-box .num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  color: var(--gl-ink);
  font-variant-numeric: tabular-nums;
}
.count-box .lbl {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gl-muted);
}
.countdown-quote { font-size: 16px; }

/* --------------------------------------------------------------------------
   11. PHÒNG: LỊCH TRÌNH
   -------------------------------------------------------------------------- */
.timeline-card { background: none; border: 0; padding: 0; box-shadow: none; }
.timeline-list { margin-top: 16px; counter-reset: tl; }
.timeline-item {
  display: grid;
  grid-template-columns: 28px 72px minmax(0, 1fr);
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--gl-line);
  counter-increment: tl;
}
.timeline-line-col { grid-column: 1; grid-row: 1; font-size: 11px; color: var(--gl-muted); }
.timeline-line-col::before { content: counter(tl, decimal-leading-zero); }
.timeline-dot { display: none; }
.timeline-left { grid-column: 2; grid-row: 1; }
.timeline-time { font-family: var(--font-display); font-size: 22px; color: var(--gl-ink); }
.timeline-right { grid-column: 3; grid-row: 1; }
.timeline-text { font-size: 14px; color: var(--gl-ink); }

/* --------------------------------------------------------------------------
   12. PHÒNG: TRANG PHỤC — BẢNG MÀU NHƯ MẪU SƠN
   -------------------------------------------------------------------------- */
.dresscode-card { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; text-align: left; overflow: visible; }
.dresscode-note {
  margin: 16px 0 0;
  max-width: none;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  color: var(--gl-text);
}
.dresscode-palettes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  justify-content: stretch;
}
.dresscode-item { display: block; max-width: none; transform: none !important; }
.dresscode-swatch {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 0;
  border: 1px solid var(--gl-line);
  box-shadow: none;
  transform: none !important;
}
.dresscode-name {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  color: var(--gl-ink);
}

/* --------------------------------------------------------------------------
   13. PHÒNG: CHUYỆN CHÚNG MÌNH
   -------------------------------------------------------------------------- */
.story-banner { background: none; border: 0; padding: 0; box-shadow: none; text-align: left; }
.story-banner blockquote { margin: 18px 0 0; font-size: 20px; }
.story-banner p { margin: 10px 0 0; font-size: 13px; color: var(--gl-muted); }
.story-banner .btn-line { margin-top: 16px; }

/* --------------------------------------------------------------------------
   14. PHÒNG: SỔ CẢM NHẬN
   -------------------------------------------------------------------------- */
.guestbook-card { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.guestbook-form { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 0; }
.field-label { display: block; margin-top: 4px; color: var(--gl-ink); }

.form-input,
.form-textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--gl-ink);
  border-radius: 0;
  background: var(--gl-white);
  color: var(--gl-ink);
  font-family: var(--font-body);
  box-shadow: none;
}
.form-textarea { min-height: 112px; resize: none; }
.form-input::placeholder,
.form-textarea::placeholder { color: #8A877F; }
.form-input:focus,
.form-textarea:focus { border-color: var(--gl-ink); box-shadow: 0 0 0 2px rgba(26, 26, 26, .12); }

.guestbook-actions { display: flex; gap: 10px; }
.btn-wish-icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gl-ink);
  border-radius: 0;
  background: transparent;
  color: var(--gl-ink);
}
.btn-wish-icon:hover { background: var(--gl-ink); color: var(--gl-wall); }
.btn-submit-wish { flex: 1; }
.btn-submit-wish.is-submitting,
.rsvp-btn-submit.is-submitting { opacity: .6; cursor: progress; }

.wishes-list {
  margin-top: 22px;
  max-height: 460px;
  padding-right: 4px;
  gap: 10px;
}
.wishes-list::-webkit-scrollbar-thumb { background: var(--gl-line); border-radius: 0; }
.wish-item {
  padding: 12px 14px;
  background: var(--gl-white);
  border: 1px solid var(--gl-line);
  border-radius: 0;
  box-shadow: none;
}
.wish-item-header { gap: 12px; margin-bottom: 2px; }
.wish-author {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gl-ink);
  overflow-wrap: anywhere;
}
.wish-time { flex: none; font-size: 11px; color: var(--gl-muted); }
.wish-message {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  color: var(--gl-ink);
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   15. PHÒNG: HỘP QUÀ MỪNG
   -------------------------------------------------------------------------- */
.gift-section { padding: 18px 0 0; text-align: left; }
.gift-wrapper { display: block; max-width: none; }
.gift-heading { margin: 0; font: inherit; letter-spacing: inherit; color: var(--gl-muted); text-align: right; }
.gift-note { margin: 16px 0 0; font-size: 13px; color: var(--gl-text); }
.gift-envelope-trigger { flex-direction: row; margin-top: 14px; }
.gift-hint-text { margin: 0; font: inherit; letter-spacing: inherit; color: inherit; }
.gift-envelope-trigger:hover .gift-hint-text { color: inherit; transform: none; }

/* --------------------------------------------------------------------------
   16. LỐI RA (FOOTER)
   -------------------------------------------------------------------------- */
.exit-room {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 72px;
  padding: 56px var(--gl-inline-pad) max(48px, env(safe-area-inset-bottom));
  background: var(--gl-ink);
  color: var(--gl-wall);
  text-align: left;
}
.exit-label { color: var(--gl-muted-dark); }
.exit-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.1;
}
.exit-names { margin: 8px 0 0; font-size: 13px; }
.exit-names:empty { display: none; }
.exit-room .gift-thankyou-text {
  margin: 4px 0 0;
  max-width: none;
  padding: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  text-align: left;
  color: var(--gl-muted-dark);
}
.exit-room .gift-brand-footer {
  margin-top: 18px;
  opacity: 1;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: left;
  color: var(--gl-muted-dark);
}

/* --------------------------------------------------------------------------
   17. NÚT NỔI: NHẠC & NGÔN NGỮ
   -------------------------------------------------------------------------- */
.floating-music {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 800;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gl-ink);
  border-radius: 0;
  background: var(--gl-wall);
  color: var(--gl-ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease, background .2s ease, color .2s ease;
}
.invite-open .floating-music { opacity: 1; visibility: visible; }
.floating-music.playing { background: var(--gl-ink); color: var(--gl-wall); }
.floating-music.playing .music-icon { animation: gl-pulse 1.6s ease-in-out infinite; }
.music-icon { display: flex; }
@keyframes gl-pulse { 50% { transform: translateY(-2px); } }

.floating-lang { top: 16px; right: 16px; }
.lang-trigger-btn,
.lang-dropdown {
  border: 1px solid var(--gl-ink);
  border-radius: 0;
  background: var(--gl-wall);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.lang-trigger-btn {
  min-height: 36px;
  padding: 0 10px 0 12px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gl-ink);
}
.lang-trigger-btn:hover,
.floating-lang.is-open .lang-trigger-btn {
  background: var(--gl-ink);
  border-color: var(--gl-ink);
  color: var(--gl-wall);
  box-shadow: none;
  transform: none;
}
.lang-dropdown { padding: 0; gap: 0; top: calc(100% - 1px); }
.lang-btn {
  min-height: 40px;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gl-ink);
}
.lang-btn:hover { background: var(--gl-mat); color: var(--gl-ink); }
.lang-btn.active { background: var(--gl-ink); color: var(--gl-wall); box-shadow: none; }

/* --------------------------------------------------------------------------
   18. MODAL: RSVP, GỢI Ý LỜI CHÚC, HỘP QUÀ
   -------------------------------------------------------------------------- */
.modal-overlay,
.wish-suggestions-modal {
  background: rgba(26, 26, 26, .72);
  backdrop-filter: none;
}
.wish-suggestions-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.wish-suggestions-modal.open { opacity: 1; visibility: visible; }

.modal-box,
.wish-modal-card,
.gift-modal-box {
  width: min(440px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 28px 22px 24px;
  background: var(--gl-wall);
  border: 0;
  border-top: 6px solid var(--gl-ink);
  border-radius: 0;
  box-shadow: none;
  color: var(--gl-ink);
  text-align: left;
}

.modal-close,
.wish-modal-close,
.gift-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gl-ink);
  border-radius: 0;
  background: transparent;
  color: var(--gl-ink);
  font-size: 14px;
  transform: none;
}
.modal-close:hover,
.wish-modal-close:hover,
.gift-modal-close:hover { background: var(--gl-ink); color: var(--gl-wall); }

.modal-title,
.wish-modal-title h3,
.gift-modal-title {
  margin: 0 56px 6px 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  color: var(--gl-ink);
}
.modal-subtitle,
.wish-modal-subtitle {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--gl-muted);
  text-align: left;
}

/* RSVP */
.rsvp-modal-box { position: relative; }
.rsvp-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.rsvp-form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gl-ink);
}
select.form-input { appearance: auto; }
.rsvp-choices { gap: 8px; margin: 0; }
.rsvp-radio-label {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--gl-line);
  border-radius: 0;
  background: var(--gl-white);
  font-size: 14px;
}
.rsvp-radio-label:has(input:checked) { border-color: var(--gl-ink); background: var(--gl-white); color: var(--gl-ink); box-shadow: inset 0 0 0 1px var(--gl-ink); }
.rsvp-radio-label input { accent-color: var(--gl-ink); }
.rsvp-btn-submit { width: 100%; margin-top: 6px; }

/* Gợi ý lời chúc */
.wish-modal-card { position: relative; }
.wish-modal-header { display: block; }
.wish-modal-title { display: block; }
.wish-suggestions-list { display: flex; flex-direction: column; gap: 8px; }
.wish-suggestion-item {
  padding: 12px 14px;
  background: var(--gl-white);
  border: 1px solid var(--gl-line);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color .2s ease;
}
.wish-suggestion-item:hover { border-color: var(--gl-ink); }
.wish-modal-footer { display: flex; gap: 10px; margin-top: 16px; }
.wish-modal-footer button { flex: 1; margin: 0; justify-content: center; }

/* Hộp quà */
.gift-modal-box { position: relative; display: block; padding: 0; animation: none; }
.gift-modal-header { position: static; padding: 28px 22px 0; background: none; color: var(--gl-ink); text-align: left; }
.gift-modal-body { padding: 18px 22px 24px; background: none; }
.gift-cols-container { gap: 14px; }
.gift-person-card {
  padding: 14px;
  background: var(--gl-white);
  border: 1px solid var(--gl-line);
  text-align: left;
  align-items: stretch;
}
.gift-qr-card {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0 0 12px;
  padding: 8px;
  background: var(--gl-ink);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.gift-qr-img { background: var(--gl-white); padding: 6px; }
.gift-bank-info { text-align: left; margin-bottom: 10px; }
.gift-bank-name {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gl-muted);
}
.gift-bank-number {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .5px;
  color: var(--gl-ink);
  overflow-wrap: anywhere;
}
.gift-bank-owner { font-size: 12px; color: var(--gl-muted); text-transform: uppercase; letter-spacing: 1px; }
.gift-actions-row { display: flex; gap: 8px; justify-content: stretch; }
.btn-copy-acc,
.btn-save-qr {
  flex: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--gl-ink);
  border-radius: 0;
  background: transparent;
  color: var(--gl-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: none;
}
.btn-copy-acc { background: var(--gl-ink); color: var(--gl-wall); }
.btn-save-qr:hover { background: var(--gl-ink); color: var(--gl-wall); transform: none; }

@media (max-width: 520px) {
  .gift-modal-box { width: 100%; border-radius: 0; }
  .gift-modal-title { font-size: 26px; }
  .gift-qr-card { width: 100%; height: auto; padding: 8px; border-radius: 0; }
  .gift-cols-container { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gift-cols-container.single-col { grid-template-columns: 1fr; justify-items: center; }
  .gift-cols-container.single-col .gift-person-card { width: 100%; max-width: 280px; }
  .gift-person-card { padding: 10px; }
  .gift-actions-row { flex-direction: column; }
  .gift-actions-row > * { width: 100%; }
  .gift-bank-number { font-size: 17px; }
  .btn-copy-acc, .btn-save-qr { padding: 0 6px; font-size: 10px; }
}

/* Toast */
.toast {
  border-radius: 0;
  border: 0;
  background: var(--gl-ink);
  color: var(--gl-wall);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 12px 18px;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   19. MÀN HÌNH LỖI / THIỆP KHÔNG TỒN TẠI
   -------------------------------------------------------------------------- */
.not-found-screen { background: var(--gl-wall); }
.not-found-card {
  max-width: 420px;
  padding: 32px 24px;
  background: var(--gl-white);
  border: 1px solid var(--gl-line);
  border-top: 6px solid var(--gl-ink);
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}
.not-found-icon { color: var(--gl-ink); margin-bottom: 14px; }
.not-found-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  color: var(--gl-ink);
}
.not-found-desc { font-size: 14px; color: var(--gl-muted); }

/* --------------------------------------------------------------------------
   20. MÀN HÌNH RỘNG: GIỮ CỘT THIỆP, THÊM KHOẢNG THỞ
   -------------------------------------------------------------------------- */
@media (min-width: 900px) {
  .app-container { box-shadow: 0 0 0 1px #CFCBC2; }
}

@media (max-width: 360px) {
  :root { --gl-gutter: 20px; }
  .exhibit-ticket { padding-left: 20px; padding-right: 20px; }
  .hero-names { font-size: 38px; }
  .count-box .num { font-size: 40px; }
  .timeline-item { grid-template-columns: 24px 64px minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   THANG CHỮ ĐỒNG NHẤT — các text cùng cấp dùng chung một định dạng
   -------------------------------------------------------------------------- */
/* Cấp 1: tiêu đề khối (display 30px) */
.room-title,
.reception-lead,
.venue-name,
#reception-bride .rb-venue-name,
.reception-time-col strong,
#reception-bride .rb-time-col strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
}
/* Cấp 2: ngày lớn */
.ceremony-time-badge .date-big,
#reception-bride .rb-day {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 46px;
  line-height: 1;
  letter-spacing: -.5px;
}
/* Cấp 3: tên / tiêu đề phụ (display 22px) */
.couple-highlight-names .groom-name,
.couple-highlight-names .bride-name,
.envelope-names,
.envelope-invite-text,
.timeline-time {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
}
/* Cấp 4: chữ phụ / địa chỉ / âm lịch / mô tả (13px, xám) */
.venue-address,
#reception-bride .rb-venue-address,
.reception-lunar,
#reception-bride .rb-lunar,
.ceremony-time-badge .lunar,
.wall-label-medium,
.story-banner p,
.gift-note,
.exit-names {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}
.venue-address,
#reception-bride .rb-venue-address,
.ceremony-time-badge .lunar,
.wall-label-medium,
.story-banner p { color: var(--gl-muted); }
.reception-lunar { color: var(--gl-muted-dark); }
/* Cấp 5: dòng giờ / thứ ngày (13px, đậm vừa) */
.ceremony-time-badge .time,
#reception-bride .rb-weekday,
.reception-date-line {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
}
/* Cấp 6: nhãn nhỏ viết hoa (10px) */
.ticket-guest-label,
.label-caption,
.family-side small,
.reception-time-col small,
#reception-bride .rb-time-col small,
#reception-bride .rb-venue-label,
.gift-bank-name,
.exit-room .gift-brand-footer {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 2px;
  text-transform: uppercase;
}
/* Tên khách mời trên vé: nhỏ hơn một chút */
.envelope-invite-text { font-size: 18px; }

/* Hiệu ứng mở bìa như thiệp 19: cả bìa trượt lên trên */
body.invite-opening .envelope-screen {
  transform: translateY(-100%);
  opacity: .9;
  visibility: visible;
  pointer-events: none;
}
body.invite-open .envelope-screen { display: none !important; }
body.invite-opening .envelope-box,
body.invite-opening .exhibit-ticket {
  transform: none;
  opacity: 1;
  filter: none;
}
/* Nút hộp quà: xếp dọc, không xuống dòng chữ, không đè nhau */
.gift-actions-row { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; margin-top: 10px; }
.gift-actions-row > * { width: 100%; box-sizing: border-box; }
.btn-copy-acc,
.btn-save-qr {
  height: auto;
  min-height: 40px;
  padding: 8px 10px;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 0;
  box-shadow: none;
}
.btn-copy-acc span,
.btn-save-qr span { white-space: nowrap; }
.btn-copy-acc svg,
.btn-save-qr svg { flex: none; }
/* Tiệc nhà gái: dòng ngày giống tiệc nhà trai (thứ + ngày + tháng + năm cùng một dòng 13px đậm) */
#reception-bride .rb-date-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 14px;
}
#reception-bride .rb-date-line .rb-weekday,
#reception-bride .rb-date-line .rb-date,
#reception-bride .rb-date-line .rb-month-year { margin: 0; padding: 0; border: 0; }
#reception-bride .rb-date,
#reception-bride .rb-month-year { display: flex; align-items: baseline; gap: 6px; }
#reception-bride .rb-date-line .rb-weekday { text-transform: none; }
#reception-bride .rb-day,
#reception-bride .rb-month,
#reception-bride .rb-year {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  padding: 0;
  border: 0;
  color: inherit;
}
#reception-bride .rb-lunar { margin: 2px 0 0; color: var(--gl-muted); }
/* Nhãn "Tiệc cưới sẽ diễn ra..." cùng cấp nhãn nhỏ */
#reception-bride .rb-lead { margin: 18px 0 0; font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--gl-muted); }
#reception-bride .rb-venue-label { color: var(--gl-muted); }
/* Họ hai bên gia đình: cùng cỡ chữ phụ 13px */
.family-side,
.couple-highlight-names .role-badge { font-size: 13px; }
#reception-bride .rb-date-line .rb-month-year { flex-direction: row; text-align: left; border-left: 0; padding-left: 0; }
#reception-bride .rb-date-line .rb-month { color: inherit; }

/* Tên địa điểm: cùng format ở Lễ thành hôn, Địa điểm, Tiệc nhà gái + icon vị trí */
.ceremony-note-lead { display: block; font-size: 13px; line-height: 1.5; color: var(--gl-muted); }
.ceremony-venue-name,
.venue-name,
#reception-bride .rb-venue-name {
  display: block;
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  color: var(--gl-ink);
  overflow-wrap: anywhere;
}
.ceremony-venue-name::before,
.venue-name::before,
#reception-bride .rb-venue-name::before {
  content: "";
  display: inline-block;
  width: .7em;
  height: .7em;
  margin-right: .3em;
  vertical-align: -.02em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Câu dẫn đầu phòng (Trân trọng báo tin / Mời bạn nâng ly...): cùng một format */
.announcement-text,
.reception-lead,
#reception-bride .rb-lead {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  color: inherit;
}
/* Câu chú thích cuối phòng (Đếm ngược / Album): cùng một format */
.countdown-quote,
.gallery-caption {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  text-align: left;
  color: var(--gl-text);
}

/* Khách mời nằm ngay dưới nhãn tranh, nút mở ở cuối — bìa responsive co giãn theo chiều cao màn hình để không bị tràn */
.envelope-screen {
  overflow: hidden;
  align-items: center;
}
.envelope-box {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  box-sizing: border-box;
  align-items: stretch;
  padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
}
.exhibit-ticket {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  padding: clamp(18px, 3dvh, 32px) clamp(18px, 4vw, 26px);
  gap: clamp(10px, 1.8dvh, 22px);
  overflow: hidden;
}
.ticket-head,
.wall-label,
.ticket-guest,
.ticket-foot {
  flex-shrink: 0;
}
.ticket-body {
  flex: 1 1 auto;
  min-height: 0;
  justify-content: flex-start;
  gap: clamp(8px, 1.5dvh, 16px);
}
.artwork-frame--cover {
  flex: 0 1 auto;
  min-height: 0;
  width: 100%;
  max-width: min(100%, calc((100dvh - 330px) * 0.8));
  margin: 0 auto;
  padding: clamp(10px, 1.6dvh, 16px);
  box-sizing: border-box;
}
.artwork-frame--cover .artwork-mat {
  padding: clamp(12px, 2dvh, 20px);
}
.artwork-frame--cover .cover-artwork-img {
  inset: clamp(12px, 2dvh, 20px);
  width: calc(100% - 2 * clamp(12px, 2dvh, 20px));
  height: calc(100% - 2 * clamp(12px, 2dvh, 20px));
}
.ticket-body .ticket-guest { margin-top: 2px; }
.ticket-foot { justify-content: flex-end; margin-top: auto; }

@media (max-height: 700px) {
  .exhibit-ticket { padding: 16px 18px; gap: 8px; }
  .ticket-body { gap: 8px; }
  .artwork-frame--cover { max-width: min(100%, calc((100dvh - 285px) * 0.8)); padding: 8px; }
  .artwork-frame--cover .artwork-mat { padding: 10px; }
  .artwork-frame--cover .cover-artwork-img { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
  .wall-label { padding: 8px 12px; }
  .btn-open { min-height: 42px; padding: 0 18px; }
}

/* Nút điều hướng Lightbox: hình tròn nền đen đậm, icon SVG trắng, viền rõ ràng */
.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  background: rgba(18, 18, 18, 0.9) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.lightbox-nav[hidden],
.lightbox-counter[hidden] {
  display: none !important;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-nav.prev {
  left: 14px;
}
.lightbox-nav.next {
  right: 14px;
}
.lightbox-close {
  top: 16px;
  right: 16px;
  transform: none;
}
.lightbox-nav:hover {
  background: #FFFFFF !important;
  color: #111111 !important;
  transform: translateY(-50%) scale(1.08);
}
.lightbox-close:hover {
  background: #FFFFFF !important;
  color: #111111 !important;
  transform: scale(1.08);
}
.lightbox-nav svg,
.lightbox-close svg {
  display: block;
  pointer-events: none;
  stroke: currentColor;
}

/* ==========================================================================
   HIỆU ỨNG CUỘN 4S CHO CẢ CÁC KHỐI & TEXT (TRÁI QUA PHẢI / PHẢI QUA TRÁI)
   ========================================================================== */
:root {
  --reveal-duration: 4s;
  --reveal-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --slide-distance-wide: 54px;
  --slide-distance-medium: 36px;
}

/* Reset các wrapper trung gian để tránh nhân chồng nhiều lớp opacity: 0 làm ẩn khối lâu */
.red-card,
.parents-grid,
.family-side,
.family-side:first-child,
.family-side:last-child,
.couple-highlight-names,
.ceremony-room,
.artwork-wall,
.reception-card,
.reception-header,
.reception-times,
.reception-actions,
.venue-card,
.bride-reception-card,
.rb-times,
.rb-venue,
.countdown-card,
.countdown-grid,
.timeline-card,
.timeline-list,
.dresscode-card,
.dresscode-palettes,
.guestbook-card,
.guestbook-form,
.wishes-list,
.gift-wrapper {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* 1. Khối phòng lớn (.reveal-section, #reception-bride, footer) lướt mượt 4s */
.reveal-section,
#reception-bride,
footer.exit-room {
  opacity: 0 !important;
  transform: translateY(32px) !important;
  transition: opacity 0.85s ease-out 0s,
              transform var(--reveal-duration) var(--reveal-ease) 0s !important;
}

.reveal-section.visible,
.visible.reveal-section,
#reception-bride.visible,
footer.exit-room.visible,
.visible footer.exit-room {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* 2. Các khối con + TEXT: Trượt từ TRÁI qua PHẢI trong 4s */
.room-head > .room-no,
.hero-names,
.announcement-text,
.couple-highlight-names .groom-name,
.couple-highlight-names .role-badge:nth-of-type(1),
.family-side:first-child small,
.family-side:first-child h4,
.family-side:first-child p,
.ceremony-time-badge .date-big,
.ceremony-time-badge .lunar,
.ceremony-note-lead,
.artwork-item.is-feature,
.artwork-item:nth-child(2),
.artwork-item:nth-child(4),
.reception-lead,
.reception-day-time,
.reception-lunar,
.reception-time-col:first-child,
.reception-actions #btn-add-calendar,
.venue-name,
#reception-bride .rb-lead,
#reception-bride .rb-weekday,
#reception-bride .rb-lunar,
#reception-bride .rb-welcome-col,
#reception-bride .rb-venue-label,
#reception-bride .rb-venue-name-row,
.countdown-grid .count-box:nth-child(1),
.countdown-grid .count-box:nth-child(2),
.timeline-item:nth-child(odd),
.timeline-time,
.dresscode-note,
.dresscode-item:nth-child(odd),
.guestbook-title,
.guestbook-form label[for="wish-name"],
.guestbook-form #wish-name,
.wishes-list .wish-item:nth-child(odd),
.gift-note,
.exit-label,
.exit-names {
  opacity: 0 !important;
  transform: translateX(calc(-1 * var(--slide-distance-wide))) scale(0.97) !important;
  transition: opacity 0.9s ease-out 0s,
              transform var(--reveal-duration) var(--reveal-ease) 0s !important;
}

/* 3. Các khối con + TEXT: Trượt từ PHẢI qua TRÁI trong 4s */
.room-head > .room-name,
.hero-invite-guest,
.hero-quote,
.couple-highlight-names .bride-name,
.couple-highlight-names .role-badge:nth-of-type(3),
.family-side:last-child small,
.family-side:last-child h4,
.family-side:last-child p,
.ceremony-time-badge .time,
.wall-label--box .label-caption,
.ceremony-venue-name,
.artwork-item:nth-child(3),
.artwork-item:nth-child(5),
.artwork-item:nth-child(6),
.gallery-caption,
.reception-date-block,
.reception-time-col:last-child,
.reception-actions #btn-trigger-rsvp,
.venue-address,
.venue-direction-btn,
#reception-bride .rb-date,
#reception-bride .rb-feast-col,
#reception-bride .rb-venue-address,
#reception-bride .rb-direction,
.countdown-grid .count-box:nth-child(3),
.countdown-grid .count-box:nth-child(4),
.countdown-quote,
.timeline-item:nth-child(even),
.timeline-text,
.dresscode-item:nth-child(even),
.guestbook-form label[for="wish-message"],
.guestbook-form #wish-message,
.guestbook-actions,
.wishes-list .wish-item:nth-child(even),
.gift-envelope-trigger,
.exit-title,
.gift-thankyou-text,
.exit-room .gift-brand-footer {
  opacity: 0 !important;
  transform: translateX(var(--slide-distance-wide)) scale(0.97) !important;
  transition: opacity 0.9s ease-out 0s,
              transform var(--reveal-duration) var(--reveal-ease) 0s !important;
}

/* 4. Các khối media / lịch / bản đồ ở tâm: Trượt từ DƯỚI lên trong 4s */
.envelope-stage,
.wall-label--box,
.calendar-paper,
.calendar-paper-title,
.calendar-grid-days span,
.map-embed-wrapper {
  opacity: 0 !important;
  transform: translateY(var(--slide-distance-medium)) scale(0.96) !important;
  transition: opacity 0.9s ease-out 0s,
              transform var(--reveal-duration) var(--reveal-ease) 0s !important;
}

/* 5. Khi cuộn tới (.visible): tất cả các khối và text trượt mượt 4s về vị trí chuẩn */
.visible .room-head > .room-no,
.visible .room-head > .room-name,
.visible .hero-names,
.visible .hero-invite-guest,
.visible .hero-quote,
.visible .envelope-stage,
.visible .announcement-text,
.visible .couple-highlight-names .groom-name,
.visible .couple-highlight-names .bride-name,
.visible .couple-highlight-names .role-badge:nth-of-type(1),
.visible .couple-highlight-names .role-badge:nth-of-type(3),
.visible .family-side:first-child small,
.visible .family-side:first-child h4,
.visible .family-side:first-child p,
.visible .family-side:last-child small,
.visible .family-side:last-child h4,
.visible .family-side:last-child p,
.visible .ceremony-time-badge .date-big,
.visible .ceremony-time-badge .time,
.visible .ceremony-time-badge .lunar,
.visible .wall-label--box,
.visible .wall-label--box .label-caption,
.visible .ceremony-note-lead,
.visible .ceremony-venue-name,
.visible .artwork-item,
.visible .gallery-caption,
.visible .reception-lead,
.visible .reception-day-time,
.visible .reception-date-block,
.visible .reception-lunar,
.visible .reception-time-col:first-child,
.visible .reception-time-col:last-child,
.visible .calendar-paper,
.visible .calendar-paper-title,
.visible .calendar-grid-days span,
.visible .reception-actions #btn-add-calendar,
.visible .reception-actions #btn-trigger-rsvp,
.visible .venue-name,
.visible .venue-address,
.visible .map-embed-wrapper,
.visible .venue-direction-btn,
#reception-bride.visible .rb-lead,
#reception-bride.visible .rb-weekday,
#reception-bride.visible .rb-date,
#reception-bride.visible .rb-lunar,
#reception-bride.visible .rb-welcome-col,
#reception-bride.visible .rb-feast-col,
#reception-bride.visible .rb-venue-label,
#reception-bride.visible .rb-venue-name-row,
#reception-bride.visible .rb-venue-address,
#reception-bride.visible .rb-direction,
.visible .countdown-grid .count-box,
.visible .countdown-quote,
.visible .timeline-item,
.visible .timeline-time,
.visible .timeline-text,
.visible .dresscode-note,
.visible .dresscode-item,
.visible .guestbook-title,
.visible .guestbook-form label,
.visible .guestbook-form #wish-name,
.visible .guestbook-form #wish-message,
.visible .guestbook-actions,
.visible .wishes-list .wish-item,
.wishes-list.visible .wish-item,
.wish-item.visible,
.visible .gift-note,
.visible .gift-envelope-trigger,
footer.exit-room.visible .exit-label,
footer.exit-room.visible .exit-title,
footer.exit-room.visible .exit-names,
footer.exit-room.visible .gift-thankyou-text,
footer.exit-room.visible .gift-brand-footer,
.visible .exit-label,
.visible .exit-title,
.visible .exit-names,
.visible .gift-thankyou-text,
.visible .exit-room .gift-brand-footer {
  opacity: 1 !important;
  transform: translate(0, 0) scale(1) !important;
}
