/* Mẫu thiệp "Hồng Đào" */
:root {
	--paper: #f7f1e8;
	--paper-2: #efe5d6;
	--red: #8e1f2b;
	--red-deep: #6d141f;
	--gold: #b08a52;
	--gold-soft: #d9c29a;
	--ink: #3a2a25;
	--muted: #7d685e;
	--serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--script: "Dancing Script", "Brush Script MT", cursive;
	--sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.hd { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 19px; line-height: 1.6; background: var(--red-deep) radial-gradient(circle at 50% 0, #9e2a36 0, var(--red-deep) 70%) fixed; }
img { max-width: 100%; display: block; }
p { margin: 0 0 .8em; }

/* Cột thiệp (giống màn hình điện thoại trên máy tính) */
.hd-page { max-width: 480px; margin: 0 auto; background: var(--paper); min-height: 100vh; overflow: hidden; box-shadow: 0 0 80px rgba(0, 0, 0, .35); position: relative; }
.hd-page::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: radial-gradient(rgba(176, 138, 82, .12) 1px, transparent 1px); background-size: 18px 18px; }
.hd--banner .hd-page { padding-top: 30px; }

/* ---------- Opening ---------- */
.hd-open { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; text-align: center; color: #f7e9d2; background: var(--red) radial-gradient(circle at 50% 35%, #a52a37 0, var(--red) 45%, var(--red-deep) 100%); transition: transform 1.1s cubic-bezier(.7, 0, .2, 1), opacity 1.1s; }
.hd-open::before, .hd-open::after { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(217, 194, 154, .55); pointer-events: none; }
.hd-open::after { inset: 26px; border-color: rgba(217, 194, 154, .25); }
html.ts-opened .hd-open { transform: translateY(-100%); opacity: .6; pointer-events: none; }
.hd-open__inner { padding: 24px; max-width: 420px; }
.hd-open__seal { width: 110px; height: 110px; margin: 0 auto 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 58px; color: var(--red); background: radial-gradient(circle at 35% 30%, #f3dcae, var(--gold) 70%); box-shadow: 0 0 0 6px rgba(217, 194, 154, .25), 0 12px 30px rgba(0, 0, 0, .3); font-family: "Noto Serif SC", "Songti SC", serif; animation: hd-pulse 2.6s ease-in-out infinite; }
@keyframes hd-pulse { 50% { transform: scale(1.05); } }
.hd-open__eyebrow { font-family: var(--sans); letter-spacing: .35em; text-transform: uppercase; font-size: 12px; color: var(--gold-soft); margin-bottom: 6px; }
.hd-open__names { font-family: var(--script); font-weight: 500; font-size: 58px; line-height: 1.15; margin: 0; color: #fff3df; }
.hd-open__names span { display: inline-block; font-size: .6em; color: var(--gold-soft); margin: 0 .15em; }
.hd-open__date { font-size: 22px; letter-spacing: .2em; margin: 8px 0 26px; }
.hd-open__to { font-family: var(--sans); font-size: 13px; letter-spacing: .08em; color: var(--gold-soft); margin-bottom: 26px; }
.hd-open__to strong { display: inline-block; margin-top: 4px; font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: 0; color: #fff; }
.hd-open__btn { font-family: var(--sans); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; padding: 14px 36px; border-radius: 99px; border: 1px solid var(--gold-soft); background: rgba(255, 255, 255, .06); color: #fff3df; cursor: pointer; transition: .3s; }
.hd-open__btn:hover { background: var(--gold); border-color: var(--gold); color: var(--red-deep); }

/* ---------- Chung ---------- */
.hd-section { position: relative; padding: 56px 28px; text-align: center; }
.hd-section + .hd-section { padding-top: 24px; }
.hd-eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: .4em; font-size: 12px; color: var(--red); margin: 0 0 22px; }
.hd-title { font-weight: 500; font-size: 36px; line-height: 1.15; margin: 0 0 22px; color: var(--red); }
.hd-title em { display: block; font-family: var(--script); font-style: normal; font-size: 30px; color: var(--gold); margin-top: 2px; }
.hd-title::after { content: ""; display: block; width: 64px; height: 10px; margin: 12px auto 0; background: radial-gradient(circle, var(--gold) 2px, transparent 2.5px) center/10px 10px repeat-x; }
.hd-sub { color: var(--muted); font-size: 18px; }
.hd-btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--sans); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 12px 22px; border-radius: 99px; border: 1px solid var(--red); background: var(--red); color: #fff; text-decoration: none; cursor: pointer; transition: .25s; }
.hd-btn:hover { background: var(--red-deep); }
.hd-btn--ghost { background: transparent; color: var(--red); }
.hd-btn--ghost:hover { background: var(--red); color: #fff; }
.hd-btn--block { width: 100%; padding: 15px; }
.hd-btn--sm { padding: 8px 14px; font-size: 11px; }

/* ---------- Hero ---------- */
.hd-hero { padding: 52px 28px 40px; text-align: center; position: relative; }
.hd-arch { width: 78%; margin: 0 auto; aspect-ratio: 3 / 4; border-radius: 999px 999px 6px 6px; overflow: hidden; border: 1px solid var(--gold); padding: 8px; background: var(--paper); box-shadow: 0 20px 40px -24px rgba(80, 30, 20, .5); }
.hd-arch img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px 999px 2px 2px; }
.hd-hero__names { font-family: var(--script); font-weight: 500; color: var(--red); font-size: 60px; line-height: 1.1; margin: 26px 0 8px; }
.hd-hero__names span { display: block; font-size: 32px; color: var(--gold); line-height: 1; margin: 2px 0; }
.hd-hero__date span { white-space: nowrap; }
.hd-hero__date { display: flex; align-items: center; justify-content: center; gap: 16px; font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hd-hero__date b { font-family: var(--serif); font-weight: 500; font-size: 30px; letter-spacing: .08em; color: var(--ink); padding: 0 16px; border-left: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.hd-hero__lunar { font-style: italic; color: var(--muted); font-size: 17px; margin-top: 8px; }

/* ---------- Lời mời ---------- */
.hd-families { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; margin-bottom: 34px; }
.hd-families h3 { font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--red); margin: 0 0 8px; }
.hd-families p { margin: 0; font-size: 17px; line-height: 1.4; }
.hd-families small { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); font-style: italic; line-height: 1.35; }
.hd-families__mark { font-size: 30px; color: var(--red); opacity: .85; padding-top: 18px; }
.hd-invite__card { border: 1px solid var(--gold-soft); outline: 1px solid var(--gold-soft); outline-offset: 5px; padding: 26px 22px 16px; margin: 0 6px 40px; background: rgba(255, 255, 255, .35); }
.hd-invite__label { font-family: var(--sans); text-transform: uppercase; letter-spacing: .3em; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.hd-invite__guest { font-family: var(--script); font-size: 36px; color: var(--red); line-height: 1.25; margin-bottom: 14px; }
.hd-couple { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hd-person { margin: 0; }
.hd-person__photo { aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 1px solid var(--gold); padding: 5px; margin: 0 auto 12px; width: 82%; }
.hd-person__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.hd-person small { display: block; font-family: var(--sans); text-transform: uppercase; letter-spacing: .25em; font-size: 11px; color: var(--gold); }
.hd-person strong { display: block; font-weight: 600; font-size: 20px; line-height: 1.3; margin: 2px 0 4px; }
.hd-person span { display: block; color: var(--muted); font-size: 15px; line-height: 1.4; }

.hd-quote { margin: 8px 0; padding: 46px 36px; text-align: center; color: #f7e9d2; background: var(--red) radial-gradient(circle at 50% 0, #a52a37, var(--red)); }
.hd-quote p { margin: 0; font-style: italic; font-size: 23px; line-height: 1.5; }

/* ---------- Lịch ---------- */
.hd-cal__grid { table-layout: fixed; width: 100%; max-width: 340px; margin: 0 auto 30px; border-collapse: collapse; font-family: var(--sans); font-size: 14px; }
.hd-cal__grid th { font-weight: 500; font-size: 11px; color: var(--gold); letter-spacing: .1em; padding: 6px 0 10px; }
.hd-cal__grid td { padding: 4px 0; height: 40px; color: var(--ink); }
.hd-cal__grid .is-day { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: #fff; font-weight: 500; }
.hd-cal__grid .is-day::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--red); clip-path: path("M18 33 C18 33 2 23 2 12 C2 6 6.5 2.5 11 2.5 C14 2.5 16.5 4.5 18 7 C19.5 4.5 22 2.5 25 2.5 C29.5 2.5 34 6 34 12 C34 23 18 33 18 33Z"); }
.hd-cal__grid .is-day { isolation: isolate; }
.hd-count { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 360px; margin: 0 auto; }
.hd-count > div { background: #fff; border: 1px solid var(--paper-2); border-radius: 12px; padding: 12px 4px 8px; }
.hd-count b { display: block; font-size: 32px; font-weight: 500; line-height: 1.1; color: var(--red); font-variant-numeric: tabular-nums; }
.hd-count span { font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hd-count__done { display: none; grid-column: 1 / -1; font-family: var(--script); font-size: 28px; color: var(--red); margin: 0; }
.hd-count.is-done > div { display: none; }
.hd-count.is-done .hd-count__done { display: block; }

/* ---------- Câu chuyện ---------- */
.hd-story__text { text-align: center; font-size: 19px; color: #4d3b34; }
.hd-story__text p:first-child::first-letter { font-family: var(--script); font-size: 2.2em; color: var(--red); line-height: 1; }

/* ---------- Sự kiện ---------- */
.hd-event { background: #fff; border: 1px solid var(--paper-2); border-radius: 200px 200px 16px 16px; padding: 46px 24px 26px; margin: 0 auto 18px; max-width: 380px; box-shadow: 0 16px 30px -24px rgba(80, 30, 20, .45); }
.hd-event h3 { font-weight: 500; font-size: 28px; color: var(--red); margin: 0 0 10px; }
.hd-event__time { font-family: var(--sans); font-size: 14px; letter-spacing: .04em; margin-bottom: 2px; }
.hd-event__lunar { font-style: italic; font-size: 16px; color: var(--muted); }
.hd-event__place { font-weight: 600; font-size: 20px; margin: 12px 0 2px; }
.hd-event__addr { color: var(--muted); font-size: 16px; line-height: 1.4; }
.hd-event__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Album ---------- */
.hd-gallery { padding-left: 14px; padding-right: 14px; }
.hd-gallery__grid { columns: 2; column-gap: 10px; }
.hd-gallery__grid a { display: block; margin-bottom: 10px; break-inside: avoid; border-radius: 6px; overflow: hidden; }
.hd-gallery__grid img { width: 100%; height: auto; transition: transform .6s; }
.hd-gallery__grid a:hover img { transform: scale(1.04); }

/* ---------- RSVP ---------- */
.hd-form { text-align: left; background: #fff; border: 1px solid var(--paper-2); border-radius: 18px; padding: 22px 20px; font-family: var(--sans); font-size: 14px; }
.hd-form label { display: block; font-weight: 500; color: var(--muted); margin-bottom: 14px; font-size: 13px; }
.hd-form input[type=text], .hd-form select, .hd-form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: 15px var(--sans); color: var(--ink); border: 1px solid #e4d8ca; border-radius: 10px; background: #fffdfa; }
.hd-form input:focus, .hd-form select:focus, .hd-form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 138, 82, .18); }
.hd-form__guest { font-size: 15px; margin-bottom: 14px; }
.hd-form__guest small { color: var(--muted); }
.hd-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hd-form__row[hidden] { display: none; }
.hd-choice { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.hd-choice label { margin: 0; }
.hd-choice input { position: absolute; opacity: 0; }
.hd-choice span { display: block; padding: 12px 14px; border: 1px solid #e4d8ca; border-radius: 10px; color: var(--ink); font-size: 15px; cursor: pointer; transition: .2s; }
.hd-choice span::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 10px; vertical-align: -2px; border-radius: 50%; border: 1px solid var(--gold); }
.hd-choice input:checked + span { border-color: var(--red); background: #fbf1ef; }
.hd-choice input:checked + span::before { background: var(--red); border-color: var(--red); box-shadow: inset 0 0 0 3px #fff; }
.hd-choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(176, 138, 82, .3); }
.ts-rsvp-result { margin: 12px 0 0; text-align: center; font-size: 14px; min-height: 1em; }
.ts-rsvp-result.is-ok { color: #2e7a4f; }
.ts-rsvp-result.is-err { color: var(--red); }

/* ---------- Lời chúc ---------- */
.hd-wishes__list { max-height: 460px; overflow-y: auto; display: grid; gap: 12px; padding: 4px; text-align: left; }
.ts-wish { background: #fff; border-radius: 14px; padding: 14px 16px; border-left: 3px solid var(--gold); }
.ts-wish p { margin: 0 0 6px; font-size: 18px; line-height: 1.45; }
.ts-wish strong { font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--red); }
.ts-wish.is-new { animation: hd-in .6s ease; }
@keyframes hd-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Mừng cưới ---------- */
.hd-gift__box { width: 56px; height: 56px; color: var(--gold); margin: 0 auto 10px; display: block; }
.hd-modal__panel { position: relative; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; background: var(--paper); border-radius: 22px 22px 0 0; padding: 30px 22px 26px; text-align: center; transform: translateY(30px); transition: transform .3s; }
[data-ts-modal].is-on .hd-modal__panel { transform: none; }
@media (min-width: 640px) { .hd-modal__panel { border-radius: 22px; } }
.hd-modal__panel h3 { font-weight: 500; font-size: 30px; color: var(--red); margin: 0 0 18px; }
.hd-modal__close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--muted); cursor: pointer; }
.hd-qr-list { display: grid; gap: 16px; }
.hd-qr { background: #fff; border-radius: 16px; padding: 16px; border: 1px solid var(--paper-2); }
.hd-qr__label { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: .2em; color: var(--gold); margin-bottom: 10px; }
.hd-qr img { width: 200px; height: 200px; object-fit: contain; margin: 0 auto 10px; background: var(--paper); border-radius: 8px; }
.hd-qr__acc { font-family: var(--sans); font-size: 15px; margin: 0; }
.hd-qr__acc span { color: var(--muted); }
.hd-qr__holder { font-family: var(--sans); font-size: 13px; color: var(--muted); letter-spacing: .05em; margin-bottom: 10px; }

/* ---------- Kết ---------- */
.hd-closing { position: relative; padding: 0 0 60px; text-align: center; }
.hd-closing__img { aspect-ratio: 4 / 5; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.hd-closing__img img { width: 100%; height: 100%; object-fit: cover; }
.hd-closing__text { padding: 0 30px; margin-top: -40px; position: relative; }
.hd-closing__thanks { font-family: var(--script); font-size: 54px; color: var(--red); line-height: 1.1; margin-bottom: 12px; }
.hd-closing__names { font-family: var(--sans); text-transform: uppercase; letter-spacing: .35em; font-size: 13px; color: var(--gold); margin-top: 18px; }

@media (max-width: 380px) {
	body.hd { font-size: 18px; }
	.hd-hero__names { font-size: 50px; }
	.hd-open__names { font-size: 48px; }
	.hd-families p { font-size: 16px; }
}
