/* nguoc.vn — giao diện thiệp theo recipe damcuoinha */
html[data-dcn] body.demo {
  background: var(--dcn-bg);
  color: var(--dcn-ink);
  font-family: var(--dcn-font);
}
html[data-dcn] .invite { background: var(--dcn-bg); }
html[data-dcn] [hidden] { display: none !important; }
html[data-dcn] .dcn-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s ease-in-out, transform .8s ease-in-out;
}
html[data-dcn] .dcn-reveal.is-in { opacity: 1; transform: none; }
@keyframes dcnGalleryFade { from { opacity: .25; transform: scale(1.015); } to { opacity: 1; transform: none; } }
html[data-dcn] [data-gal-block] .igal img:first-child { animation: dcnGalleryFade .7s ease-out both; }

html[data-dcn] .ihead,
html[data-dcn] .iblock {
  color: var(--dcn-ink);
  font-family: var(--dcn-font);
}
html[data-dcn] .iblock {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 22px 0 26px;
  backdrop-filter: none;
  box-shadow: none;
}
html[data-dcn] .iblock--plain { padding: 12px 0 0; }

/* đầu mục: nhãn Crimson Pro + tiêu đề serif, giữ đúng tỉ lệ bản gốc */
html[data-dcn] .card-section-head { text-align: center; margin-bottom: 18px; }
html[data-dcn] .ilabel {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 2px;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--dcn-ink);
  opacity: 1;
}
html[data-dcn] .ititle {
  font-family: var(--dcn-font);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  margin-top: 4px;
  color: var(--dcn-ink);
}
html[data-dcn] .itext {
  color: var(--dcn-ink);
  font-size: 11.5px;
  line-height: 1.9;
  opacity: .8;
}
html[data-dcn] .itext p { margin: 0 0 10px; }
html[data-dcn] .itext p:last-child { margin-bottom: 0; }

/* màn hình mở đầu: ảnh bìa tràn + tên coupe chồng lên như bản gốc */
html[data-dcn] .ihead {
  position: relative;
  min-height: min(118vw, 520px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 16px;
  margin: 0 0 8px;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .52)), var(--cover-url) center / cover no-repeat;
}
html[data-dcn] .ihead:after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--dcn-bg);
  opacity: .06;
  pointer-events: none;
}
html[data-dcn] .ihead > * { position: relative; z-index: 1; color: #fff; }
html[data-dcn] .ihead__eyebrow {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 12.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff !important;
  opacity: .9;
}
html[data-dcn] .ihead__names {
  font-family: var(--dcn-font);
  font-size: clamp(32px, 9vw, 44px);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.2;
  color: #fff !important;
}
html[data-dcn] .ihead__amp { display: inline; font-size: .72em; color: #fff !important; margin: 0 .18em; }
html[data-dcn] .ihead__date,
html[data-dcn] .ihead__sub { color: #fff !important; opacity: .85; }

/* Ảnh bìa gallery đã có sẵn chữ của nhà thiết kế; làm mờ lớp nền này để
   chữ do người dùng nhập không bị chồng lên chữ có sẵn trong ảnh. */
html[data-mau-cover]:not([data-mau='polaroid-do-gach']) .ihead {
  background: linear-gradient(180deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, .58)), var(--dcn-bg);
}
html[data-mau-cover]:not([data-mau='polaroid-do-gach']) .ihead::before {
  content: '';
  position: absolute;
  inset: -24px;
  background: var(--cover-url) center / cover no-repeat;
  filter: blur(14px);
  z-index: 0;
  pointer-events: none;
}

html[data-dcn] .pair__col,
html[data-dcn] .cer__row,
html[data-dcn] .gift__it,
html[data-dcn] .tl,
html[data-dcn] .countdown div {
  background: transparent;
  border-color: var(--dcn-soft);
}
html[data-dcn] .pair__tag,
html[data-dcn] .gift__side,
html[data-dcn] .cer__row span { color: var(--dcn-emp-ink); opacity: .9; }
html[data-dcn] .cer__row b { font-weight: 500; }
html[data-dcn] .tl__time { color: var(--dcn-emp-ink); }

html[data-dcn] .form input,
html[data-dcn] .form select,
html[data-dcn] .form textarea {
  background: var(--dcn-panel);
  color: var(--dcn-ink);
  border-color: var(--dcn-soft);
  font-family: var(--dcn-font);
  font-size: 12px;
}
html[data-dcn] .form input::placeholder,
html[data-dcn] .form textarea::placeholder { color: var(--dcn-ink); opacity: .45; }
html[data-dcn] .form select option { background: var(--dcn-bg); color: var(--dcn-ink); }
html[data-dcn] .btn {
  background: var(--dcn-emp-ink);
  color: var(--dcn-bg);
  border-color: var(--dcn-emp-ink);
  font-family: var(--dcn-font);
}
html[data-dcn] .form .ok { color: var(--dcn-emp-ink); }

/* nền giấy / hạt nhẹ */
html[data-dcn] .invite::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .4;
  z-index: 0;
  background-image:
    radial-gradient(circle at 12% 8%, var(--dcn-soft) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 22%, var(--dcn-soft) 0 1px, transparent 2px);
  background-size: 90px 120px, 130px 170px;
}
html[data-dcn] .ihead,
html[data-dcn] .iblock,
html[data-dcn] .credit { position: relative; z-index: 1; }
html[data-dcn] .ihero { z-index: 1; }
html[data-dcn][data-dcn-tone='dark'] .ihero:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .46));
}

/* intro: ảnh mẫu + lời mở đầu */
html[data-dcn] .dcn-intro__img { overflow: hidden; border-radius: 2px; }
html[data-dcn] .dcn-intro__img img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; }
html[data-dcn] .dcn-intro__text {
  margin-top: 18px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.95;
  white-space: pre-line;
  opacity: .82;
}

/* profile: ảnh tròn 120px như bản gốc */
html[data-dcn] .dcn-profile__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
html[data-dcn] .dcn-profile--left .dcn-profile__card:first-child { order: 2; }
html[data-dcn] .dcn-profile__card { min-width: 0; text-align: center; }
html[data-dcn] .dcn-profile__photo {
  width: 120px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--dcn-soft);
  border-radius: 50%;
  background: var(--dcn-soft);
}
html[data-dcn] .dcn-profile--square .dcn-profile__photo { border-radius: 2px; aspect-ratio: 3 / 4; }
html[data-dcn] .dcn-profile__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
html[data-dcn] .dcn-profile__tag {
  display: block;
  margin: 10px 0 3px;
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--dcn-emp-ink);
}
html[data-dcn] .dcn-profile__card b { display: block; font-size: 14px; font-weight: 500; }
html[data-dcn] .dcn-profile__card p { margin: 6px 0 0; font-size: 10.5px; line-height: 1.7; opacity: .7; }
html[data-dcn] .dcn-profile__card p p { margin: 0 0 6px; }

/* ảnh giữa thân thiệp */
html[data-dcn] .dcn-mid { padding: 14px 0 22px; }
html[data-dcn] .dcn-mid__frame { display: grid; grid-template-columns: 1fr; gap: 10px; }
html[data-dcn] .dcn-mid--pair .dcn-mid__frame { grid-template-columns: 1fr 1fr; }
html[data-dcn] .dcn-mid__frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border: 4px solid var(--dcn-bg);
  outline: 1px solid var(--dcn-soft);
  border-radius: 2px;
}
html[data-dcn] .dcn-mid--type2 .dcn-mid__frame img,
html[data-dcn] .dcn-mid--type3 .dcn-mid__frame img { aspect-ratio: 1; }
html[data-dcn] .dcn-mid__text { margin: 10px 0 0; text-align: center; font-size: 11px; opacity: .75; }
html[data-dcn] .dcn-mid__banner { position: relative; }
html[data-dcn] .dcn-mid__banner img { width: 100%; aspect-ratio: 325 / 215; object-fit: cover; display: block; border-radius: 2px; }
html[data-dcn] .dcn-mid__banner-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--dcn-font);
  font-size: 15px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
  white-space: nowrap;
}

html[data-dcn] .dcn-dress__dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
html[data-dcn] .dcn-dress__dots i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--dcn-soft); }

/* album: ảnh lớn đầu + dải thumbnail */
html[data-dcn] [data-gal-block] .igal { grid-template-columns: repeat(4, 1fr); gap: 6px; }
html[data-dcn] [data-gal-block] .igal img { border-radius: 2px; aspect-ratio: 1; }
html[data-dcn] [data-gal-block] .igal img:first-child { grid-column: 1 / -1; aspect-ratio: 3 / 4; }

/* ending: ảnh nền + lời cảm ơn */
html[data-dcn] .dcn-end {
  min-height: 240px;
  display: grid;
  place-items: center;
  background-image: var(--dcn-end-img);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
html[data-dcn] .dcn-end:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .55));
}
html[data-dcn][data-dcn-tone='dark'] .dcn-end:before {
  background: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .55));
}
html[data-dcn] .dcn-end__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.95;
  white-space: pre-line;
  padding: 20px;
}
html[data-dcn] .dcn-end__inner p { margin: 0 0 10px; }

@media (max-width: 360px) {
  html[data-dcn] .ilabel { font-size: 11.5px; letter-spacing: 1.6px; }
  html[data-dcn] .ititle { font-size: 15.5px; }
  html[data-dcn] .dcn-profile__grid { gap: 10px; }
}
