/* Huy & Ngân — Wedding Film. Stage thiết kế ở 1920×1080, scale theo cửa sổ. */

@font-face { font-family: "Noto Serif Display"; src: url("fonts/NotoSerifDisplay-variable.ttf") format("truetype"); font-weight: 100 900; font-stretch: 62.5% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif Display"; src: url("fonts/NotoSerifDisplay-Italic-variable.ttf") format("truetype"); font-weight: 100 900; font-stretch: 62.5% 100%; font-style: italic; font-display: swap; }
@font-face { font-family: Nunito; src: url("fonts/Nunito-variable.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }

:root {
  --brand: #e9c9a4;   /* màu nhấn champagne, thay đỏ Netflix */
  --serif: "Noto Serif Display", Georgia, serif; /* dấu tiếng Việt chuẩn; Cormorant lệch dấu chữ thường (â, ấ) */
  --sans: Nunito, -apple-system, "Segoe UI", sans-serif;
  --soft-shadow: 0 2px 30px #1a101466, 0 1px 3px #1a101433;
  --scrim: linear-gradient(0deg, #1a1014b3 0%, #1a101466 26%, #1a101414 46%, transparent 58%); /* dải tối sau chữ: ảnh studio nền sáng */
  --cream: #f6ece6;
  --cream-2: #fbf3ee;
  --ink: #3a2e32;
  --rose: #c98a7a;
  --champagne: #e9c9a4;
  --plum: #2a1f25;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.25, .8, .25, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-scene: 1.3s;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body { font-family: var(--sans); color: #fff; cursor: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.show-cursor { cursor: default; }

#letterbox { position: fixed; inset: 0; background: #000; }
#stage {
  position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; overflow: hidden;
  background: #000; transform-origin: 0 0; isolation: isolate; box-shadow: 0 0 0 3px #000;
}

/* Grain + vignette toàn khung, rất nhẹ để tránh dải màu trên LED */
#stage::after {
  content: ""; position: absolute; inset: 0; z-index: 50; pointer-events: none; opacity: .07; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.view { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s linear .8s; }
.view.active { opacity: 1; visibility: visible; transition: opacity .8s var(--ease); }

img { display: block; }
.ph { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); }

/* ============ GATE ============ */
.gate { background: radial-gradient(ellipse 60% 60% at 50% 50%, #3b2a33 0%, #1d1519 70%, #120c0f 100%); display: grid; place-items: center; z-index: 60; }
.gate .gate-in { text-align: center; animation: rise 1.2s var(--ease) both; }
.gate .wordmark { font-size: 40px; margin-bottom: 30px; }
.gate h1 { font-family: var(--serif); font-weight: 300; font-size: 120px; line-height: 1; letter-spacing: .01em; margin: 0 0 14px; }
.gate p { font-size: 22px; font-weight: 500; color: #d8c9cf; margin: 0 0 56px; letter-spacing: .32em; }
.gate button {
  display: inline-flex; align-items: center; gap: 14px;
  font: 600 24px var(--sans); letter-spacing: .02em; color: #1a1216; background: #fffaf6; border: 0; border-radius: 999px; padding: 18px 44px 18px 36px; cursor: pointer;
  box-shadow: 0 14px 40px #0006, inset 0 0 0 1px #ffffff; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.gate button:hover { transform: translateY(-2px); box-shadow: 0 20px 50px #0008, inset 0 0 0 1px #ffffff; }
.gate button .ic { width: 22px; height: 22px; }
.gate .hint { margin-top: 44px; font-size: 16px; color: #9f8e96; letter-spacing: .04em; line-height: 1.8; }
.gate .hint b { color: #e8dbe1; font-weight: 600; display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 6px; background: #ffffff14; }
.gate .loading { margin-top: 18px; font-size: 16px; color: #8d7b84; min-height: 20px; }

/* ============ MONOGRAM (thay logo) ============ */
.wordmark { color: var(--brand); font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1; letter-spacing: .14em; display: inline-block; white-space: nowrap; text-shadow: 0 2px 14px #0003; }

/* ============ PROFILES ============ */
.profiles { background: radial-gradient(ellipse 60% 60% at 50% 55%, #4a3740 0%, #2c2127 60%, #1b1418 100%); }
.profiles .wordmark { position: absolute; left: 86px; top: 54px; }
.profiles h2 { position: absolute; top: 236px; left: 0; right: 0; margin: 0; text-align: center; font-family: var(--serif); font-weight: 300; font-size: 72px; letter-spacing: .01em; color: #fff; transition: opacity .5s var(--ease-soft), transform .7s var(--ease); }
.profile-row { position: absolute; top: 440px; left: 50%; transform: translateX(-50%); display: flex; gap: 46px; }
.profile { width: 200px; text-align: center; color: #a8999f; transform-origin: center 42%; transition: transform .6s var(--ease), opacity .5s var(--ease), color .3s; opacity: 0; }
.profiles.active .profile { animation: avatarIn .8s var(--ease) both; }
.profiles.active .profile:nth-child(2) { animation-delay: .08s; }
.profiles.active .profile:nth-child(3) { animation-delay: .16s; }
.profiles.active .profile:nth-child(4) { animation-delay: .24s; }
.profiles.active .profile:nth-child(5) { animation-delay: .32s; }
@keyframes avatarIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
.avatar { width: 200px; height: 200px; border-radius: 32px; overflow: hidden; border: 2px solid #ffffff1f; background: var(--shade, #666); box-shadow: 0 18px 40px #0006; transition: border-color .5s var(--ease-soft), box-shadow .5s var(--ease-soft); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 25%); }
.avatar.guest img { transform: scale(.94); }
.profile .name { display: block; margin-top: 20px; font-size: 22px; font-weight: 500; letter-spacing: .02em; }
.profile.targeted { transform: translateY(-8px) scale(1.06); color: #fff; }
.profile.targeted .avatar { border-color: #ffffffcc; box-shadow: 0 22px 50px #0009, 0 0 0 6px #ffffff14; }
.profiles.leaving .profile:not(.couple) { opacity: 0 !important; transform: translateY(10px) scale(.94); transition: opacity .45s, transform .45s; animation: none; }
.profiles.leaving h2 { opacity: 0; transform: translateY(-10px); }
.profiles.leaving .profile.couple { animation: none; opacity: 1; transform: translateY(-8px) scale(1.06); transition: transform .85s var(--ease); }
.profiles.centered .profile.couple { opacity: 1; transform: translate(var(--sx, 0), var(--sy, 0)) scale(1.25); color: #fff; }
.profiles.centered .profile.couple .name { opacity: 0; transition: opacity .3s; }
.spinner { position: absolute; left: 50%; top: 68%; width: 40px; height: 40px; margin-left: -20px; border: 2px solid #ffffff26; border-top-color: var(--brand); border-radius: 50%; opacity: 0; transition: opacity .4s; }
.profiles.loading .spinner { opacity: 1; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.profiles.exiting { opacity: 0; transition: opacity .55s ease; }

/* ============ HOME ============ */
.home { background: #2a1d22; }
.home .hero { position: absolute; top: 0; right: 0; width: 72%; height: 100%; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%); mask-image: linear-gradient(90deg, transparent 0%, #000 34%); }
.home .hero img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); filter: saturate(1.04) brightness(1.02); transform: scale(1.04); transition: transform 9s linear; }
.home.active .hero img { transform: scale(1); }
.home::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #2a1d22 0%, #2a1d22f0 24%, #2a1d2290 42%, transparent 60%), linear-gradient(0deg, #2a1d22 0%, #2a1d22a0 18%, transparent 42%); pointer-events: none; }
.home .wordmark { position: absolute; left: 86px; top: 54px; z-index: 2; }
.home-copy { position: absolute; z-index: 2; left: 96px; top: 200px; width: 820px; }
.home-copy > * { opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease-soft), transform 1.2s var(--ease); }
.home.active .home-copy > * { opacity: 1; transform: none; }
.home.active .home-copy > :nth-child(2) { transition-delay: .12s; }
.home.active .home-copy > :nth-child(3) { transition-delay: .24s; }
.home.active .home-copy > :nth-child(4) { transition-delay: .36s; }
.kicker { font-size: 20px; font-weight: 800; letter-spacing: .26em; color: #f0dfd6; display: flex; align-items: center; gap: 14px; }
.kicker .n { color: var(--brand); font-family: var(--serif); font-size: 34px; letter-spacing: 0; }
.home-copy h2 { font-family: var(--serif); font-weight: 300; font-size: 132px; line-height: .95; letter-spacing: .005em; margin: 14px 0 18px; text-shadow: var(--soft-shadow); }
.meta { font-size: 22px; font-weight: 500; color: #efe4de; display: flex; gap: 18px; align-items: center; letter-spacing: .04em; }
.meta > :empty { display: none; }
.meta .match { color: var(--brand); font-weight: 600; }
.meta .badge { border: 1px solid #ffffff66; border-radius: 999px; padding: 1px 10px; font-size: 16px; }
.actions { margin-top: 36px; display: flex; gap: 14px; }
.btn { display: inline-flex; align-items: center; gap: 12px; border: 0; border-radius: 999px; padding: 15px 38px 15px 30px; font: 600 24px var(--sans); letter-spacing: .02em; cursor: pointer; transition: transform .45s var(--ease), background .4s var(--ease-soft), box-shadow .4s var(--ease-soft); }
.btn.primary { background: #fffaf6; color: #1a1216; box-shadow: 0 10px 30px #0005; }
.btn.secondary { background: #ffffff1f; color: #fff; box-shadow: inset 0 0 0 1px #ffffff33; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn .ic { width: 22px; height: 22px; }
.btn.secondary .ic { filter: invert(1); }
.btn.pressed { transform: scale(.96); }
.gallery { position: absolute; z-index: 2; left: 96px; right: 96px; bottom: 50px; }
.gallery .label { font-size: 18px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: #f3e8e2cc; margin-bottom: 18px; opacity: 0; transition: opacity .9s var(--ease-soft) .5s; }
.home.active .gallery .label { opacity: 1; }
.gallery .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery .card { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #6b5a62; box-shadow: 0 14px 36px #0006, inset 0 0 0 1px #ffffff1a; opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease-soft), transform 1.2s var(--ease); }
.home.active .gallery .card { opacity: 1; transform: none; }
.home.active .gallery .card:nth-child(2) { transition-delay: .08s; }
.home.active .gallery .card:nth-child(3) { transition-delay: .16s; }
.home.active .gallery .card:nth-child(4) { transition-delay: .24s; }
.home.active .gallery .card:nth-child(5) { transition-delay: .32s; }
.gallery .card img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); }
.gallery .card span { position: absolute; left: 16px; bottom: 14px; font-size: 15px; font-weight: 600; letter-spacing: .12em; color: #fff; background: #0000004d; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 4px 12px; border-radius: 999px; }
.home.dim .home-copy, .home.dim .gallery { opacity: 0; transition: opacity .35s; }

/* ============ PREVIEW MODAL ============ */
.preview { background: #0f0a0cb0; backdrop-filter: blur(6px); z-index: 5; transition: opacity .45s var(--ease), visibility 0s linear .45s; }
.preview.active { transition: opacity .45s var(--ease); }
.modal { position: absolute; left: 50%; top: 50%; width: 1240px; height: 900px; transform: translate(-50%, -50%) scale(.94) translateY(24px); border-radius: 28px; overflow: hidden; background: #181115; box-shadow: 0 40px 120px #000b, inset 0 0 0 1px #ffffff12; transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.preview.active .modal { transform: translate(-50%, -50%) scale(1); }
.modal .mhero { position: absolute; inset: 0 0 24% 0; }
.modal .mhero img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); }
.modal .mhero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #181115 0%, #18111500 45%), linear-gradient(90deg, #18111599, transparent 50%); }
.modal .mclose { position: absolute; right: 26px; top: 26px; width: 48px; height: 48px; border-radius: 50%; background: #18111599; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px #ffffff22; display: grid; place-items: center; }
.modal .mclose img { width: 18px; filter: invert(1); opacity: .9; }
.modal .mcopy { position: absolute; left: 60px; bottom: 150px; width: 70%; }
.modal .mcopy .n { color: var(--brand); font-family: var(--serif); font-size: 22px; letter-spacing: .25em; }
.modal .mcopy .n small { color: #ddd; font-family: var(--sans); font-weight: 600; font-size: 18px; margin-left: 8px; }
.modal h2 { font-family: var(--serif); font-weight: 300; font-size: 100px; line-height: .95; letter-spacing: .005em; margin: 6px 0 14px; }
.modal p:empty { display: none; }
.modal p { font-size: 20px; font-weight: 500; letter-spacing: .04em; color: #efe4decc; margin: 0 0 28px; }
.modal .mbottom { position: absolute; left: 60px; right: 60px; bottom: 56px; display: flex; justify-content: space-between; font-size: 16px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: #d7cbd0aa; }
.modal .mbottom .badge { border: 1px solid #aaa; padding: 0 7px; border-radius: 3px; margin: 0 8px; }

/* ============ MỞ MÀN: monogram hiện dần (hoặc video riêng) ============ */
.intro { background: radial-gradient(ellipse 55% 55% at 50% 50%, #2e2128 0%, #1a1216 70%, #120c0f 100%); z-index: 8; transition: opacity 1.2s var(--ease-soft), visibility 0s linear 1.2s; }
.intro.active { transition: opacity .8s var(--ease-soft); }
.intro video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: none; }
.intro.video video { display: block; }
.intro.video .mono-reveal { display: none; }
.mono-reveal { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; color: #fff; }
.mono-reveal .mono { font-family: var(--serif); font-weight: 300; font-size: 260px; line-height: 1; letter-spacing: .02em; display: flex; align-items: baseline; gap: 28px; }
.mono-reveal .amp { font-style: italic; font-weight: 300; font-size: 170px; color: var(--brand); }
.mono-reveal .mono > span, .mono-reveal .mline, .mono-reveal .mdate { opacity: 0; }
.mono-reveal .mline { width: 0; height: 1px; margin: 34px 0 28px; background: linear-gradient(90deg, transparent, #ffffffaa, transparent); }
.mono-reveal .mdate { font-size: 22px; font-weight: 500; letter-spacing: .5em; margin-right: -.5em; color: #e8dbe1; }
.intro.reveal .m1 { animation: monoIn 1.8s var(--ease) .2s both; }
.intro.reveal .amp { animation: ampIn 2s var(--ease) .7s both; }
.intro.reveal .m2 { animation: monoIn 1.8s var(--ease) .45s both; }
.intro.reveal .mline { animation: lineIn 1.6s var(--ease) 1.3s both; }
.intro.reveal .mdate { animation: softRise 1.4s var(--ease) 1.7s both; }
.intro.reveal .mono-reveal { animation: revealOut 1.1s var(--ease-soft) 3.5s both; }
@keyframes monoIn { from { opacity: 0; transform: translateY(18px); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes ampIn { from { opacity: 0; transform: scale(.86); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes lineIn { from { opacity: 0; width: 0; } to { opacity: 1; width: 360px; } }
@keyframes revealOut { to { opacity: 0; transform: scale(1.03); filter: blur(6px); } }

/* ============ FILM ============ */
.film { background: var(--cream); overflow: hidden; }
.film::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 80% 70% at 50% 40%, #fff6f0 0%, var(--cream) 60%, #efdfd6 100%); }
.scene { position: absolute; inset: 0; z-index: 1; will-change: transform, opacity, clip-path; }
.scene.out { z-index: 0; }

/* chuyển cảnh */
.scene[data-tr="wipe"].in { animation: wipeIn var(--t-scene) var(--ease-io) both; }
.scene[data-tr="wipe"].out { animation: dimOut var(--t-scene) ease both; }
.scene[data-tr="push"].in { animation: pushIn var(--t-scene) var(--ease-io) both; }
.scene[data-tr="push"].out { animation: pushOut var(--t-scene) var(--ease-io) both; }
.scene[data-tr="zoomfade"].in { animation: zoomIn var(--t-scene) var(--ease) both; }
.scene[data-tr="zoomfade"].out { animation: zoomOut var(--t-scene) ease both; }
.scene[data-tr="rise"].in { animation: riseIn var(--t-scene) var(--ease) both; }
.scene[data-tr="rise"].out { animation: fadeOut .9s ease both; }
.scene[data-tr="iris"].in { animation: irisIn 1.5s var(--ease-io) both; }
.scene[data-tr="iris"].out { animation: dimOut 1.5s ease both; }
.scene[data-tr="cut"].in { animation: fadeIn .5s ease both; }
.scene[data-tr="cut"].out { animation: fadeOut .5s ease both; }
@keyframes wipeIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes dimOut { from { opacity: 1; filter: brightness(1); } to { opacity: 1; filter: brightness(.85); } }
@keyframes pushIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pushOut { from { transform: none; } to { transform: translateX(-28%); opacity: .4; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes zoomOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.97); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(5%); } to { opacity: 1; transform: none; } }
@keyframes irisIn { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(80% at 50% 50%); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes softRise { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }
/* ô chữ trống: ẩn khi chiếu, mờ khi sửa trong dashboard */
.is-empty { display: none !important; }
#stage.edit .is-empty { display: block !important; min-height: .6em; opacity: .35; }

/* Ảnh trong ô: .ph bọc ảnh chính (.main) và bản mờ (.bg) chỉ hiện khi thu nhỏ dưới 1× */
.ph { position: relative; width: 100%; height: 100%; }
.ph img { position: absolute; inset: 0; }
.ph .bg { display: none; }
.ph.under .bg { display: block; object-position: 50% 50% !important; transform: scale(1.18) !important; filter: blur(36px) brightness(.92) saturate(1.1); animation: none !important; }
.blurbg .ph .bg { display: none; }

/* Ken Burns: ảnh tràn khung zoom rất chậm */
.kb { position: absolute; inset: 0; overflow: hidden; }
.kb img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform-origin: var(--focal, 50% 30%); animation: kenburns var(--dur, 8s) linear both; }
.kb.alt img { animation-name: kenburnsAlt; }
@keyframes kenburns { from { transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)) translate(0, 0); } to { transform: scale(calc(var(--zoom, 1) * 1.09)) scaleX(var(--flip, 1)) translate(-1.2%, 1%); } }
@keyframes kenburnsAlt { from { transform: scale(calc(var(--zoom, 1) * 1.09)) scaleX(var(--flip, 1)) translate(1%, -1%); } to { transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)) translate(0, 0); } }

/* nền blur cho ảnh dọc / cảnh tiêu điểm */
.blurbg { position: absolute; inset: -6%; }
.blurbg img { width: 100%; height: 100%; object-fit: cover; filter: blur(42px) saturate(1.1) brightness(1.08); transform: scale(1.1); }
.blurbg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #fbf3ee55, #f6ece6aa); }

/* Khung ảnh chung */
.frame { position: absolute; overflow: hidden; border-radius: 14px; background: #e9dcd4; box-shadow: 0 30px 70px #5a40402e, 0 6px 18px #5a404022, inset 0 0 0 1px #ffffffaa; }
.frame img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); }

/* --- Scene: title --- */
.s-title .kb::after { content: ""; position: absolute; inset: 0; background: var(--scrim); }
.s-title .tcopy { position: absolute; left: 0; right: 0; bottom: 88px; text-align: center; }
.s-title .tname { font-family: var(--serif); font-weight: 300; font-size: 136px; line-height: 1; letter-spacing: .08em; margin-right: -.08em; color: var(--light, #fff); text-shadow: var(--soft-shadow); white-space: nowrap; }
.s-title .tname span { display: inline-block; opacity: 0; transform: translateY(16px); filter: blur(8px); animation: letterIn 1.4s var(--ease) both; animation-delay: calc(.6s + var(--i) * 60ms); }
@keyframes letterIn { to { opacity: 1; transform: none; filter: blur(0); } }
.s-title .line { width: 0; height: 1px; margin: 30px auto 26px; background: linear-gradient(90deg, transparent, var(--light, #fff), transparent); opacity: .85; animation: lineGrow 1.8s var(--ease) 1.6s both; }
@keyframes lineGrow { to { width: 320px; } }
.s-title .tdate { font-family: var(--serif); font-weight: 300; font-size: 60px; letter-spacing: .2em; margin-right: -.2em; color: var(--light, #fff); text-shadow: var(--soft-shadow); opacity: 0; animation: rise 1.4s var(--ease) 2s both; }
.s-title .tlunar { margin-top: 16px; font-size: 20px; font-weight: 600; letter-spacing: .36em; margin-right: -.36em; text-transform: uppercase; color: var(--light, #fbeee6); text-shadow: 0 1px 12px #2a1d2255; opacity: 0; animation: rise 1.4s var(--ease) 2.4s both; }
.s-title .tkicker { display: none; font-size: 26px; font-weight: 800; letter-spacing: .32em; color: #fbeee6; text-shadow: 0 2px 12px #2a1d2266; margin-bottom: 18px; opacity: 0; animation: rise 1s var(--ease) .2s both; }
.s-title .tkicker .n { color: var(--brand); font-family: var(--serif); font-size: 30px; letter-spacing: 0; margin-right: 18px; vertical-align: -2px; }

/* --- Scene: full --- */
@keyframes riseX { from { opacity: 0; transform: translate(-50%, 24px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes softIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* --- Scene: strip (photobooth trên nền lụa) --- */
.s-strip { background: #f4f1ea; overflow: hidden; }
.s-strip .silk { position: absolute; inset: -10%; will-change: transform; background:
  radial-gradient(ellipse 55% 40% at 20% 25%, #ffffff 0%, #ffffff00 70%),
  radial-gradient(ellipse 60% 35% at 70% 70%, #fffdf7 0%, #fffdf700 70%),
  radial-gradient(ellipse 40% 60% at 85% 20%, #ece7dc 0%, #ece7dc00 70%),
  radial-gradient(ellipse 50% 30% at 35% 85%, #e9e3d8 0%, #e9e3d800 70%),
  linear-gradient(160deg, #f8f6f1 0%, #efebe3 45%, #f6f3ec 100%);
  animation: silkDrift var(--dur, 12s) ease-in-out both; }
.s-strip .silk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, #ffffff66 44%, #ffffff00 50%, #ffffff40 58%, transparent 70%); animation: silkSheen var(--dur, 12s) ease-in-out both; }
@keyframes silkDrift { from { transform: translate(0, 0) scale(1.02); } to { transform: translate(-1.5%, 1%) scale(1.06); } }
@keyframes silkSheen { from { transform: translateX(-18%); opacity: .7; } to { transform: translateX(18%); opacity: .9; } }

.s-strip { --ink: #3b3a3a; }
.s-strip .copy { position: absolute; left: 150px; top: 50%; transform: translateY(-50%); width: 700px; text-align: center; color: var(--ink); }
.s-strip .copy > * { opacity: 0; animation: riseSoft 1.4s var(--ease) both; }
.s-strip .copy .script { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 48px; line-height: 1; color: var(--ink); opacity: .75; margin-bottom: 18px; animation-delay: .35s; }
.s-strip .copy .groom { font-family: var(--serif); font-weight: 300; font-size: 120px; line-height: 1.02; letter-spacing: .01em; animation-delay: .55s; }
.s-strip .copy .bride { font-family: var(--serif); font-weight: 300; font-size: 120px; line-height: 1.02; animation-delay: .75s; }
.s-strip .copy .bride .amp { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 96px; color: var(--rose); margin-right: 22px; }
.s-strip .copy .date { font-family: var(--serif); font-weight: 300; font-size: 38px; letter-spacing: .3em; margin-right: -.3em; margin-top: 30px; color: var(--ink); opacity: .85; animation-delay: .95s; }
.s-strip .copy .lunar { font: 500 17px var(--sans); letter-spacing: .32em; margin-right: -.32em; color: var(--rose); margin-top: 16px; text-transform: uppercase; animation-delay: 1.1s; }
@keyframes riseSoft { from { opacity: 0; transform: translateY(14px); filter: blur(5px); } to { opacity: 1; transform: none; filter: blur(0); } }

.s-strip .booth { position: absolute; width: 440px; padding: 16px; will-change: transform; transform-origin: 50% 50%; background: #fffefc; box-shadow: 0 40px 80px #4d3f3633, 0 10px 24px #4d3f3620, inset 0 0 0 1px #ffffff; display: flex; flex-direction: column; gap: 14px; will-change: transform; }
.s-strip .booth .shot { width: 100%; height: 330px; overflow: hidden; background: #e9e2d8; }
.s-strip .booth .shot img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); }
.s-strip .booth.b1 { left: 1077px; top: -318px; z-index: 2; --rot: -7deg; animation: boothDown 1.3s cubic-bezier(.16, 1, .3, 1) both, boothDriftUp var(--dur, 12s) linear 1.3s forwards; }
.s-strip .booth.b2 { left: 1455px; top: -60px; z-index: 1; --rot: 7deg; animation: boothUp 1.3s cubic-bezier(.16, 1, .3, 1) .08s both, boothDriftDown var(--dur, 12s) linear 1.3s forwards; }
@keyframes boothDown { from { transform: rotate(var(--rot)) translateY(-110%); } to { transform: rotate(var(--rot)) translateY(0); } }
@keyframes boothUp { from { transform: rotate(var(--rot)) translateY(110%); } to { transform: rotate(var(--rot)) translateY(0); } }
@keyframes boothDriftUp { from { transform: rotate(var(--rot)) translateY(0); } to { transform: rotate(var(--rot)) translateY(-40px); } }
@keyframes boothDriftDown { from { transform: rotate(var(--rot)) translateY(0); } to { transform: rotate(var(--rot)) translateY(40px); } }

/* --- Chữ cỡ sân khấu cho ảnh lớn --- */

/* --- Scene: groom (hai ảnh tách lệch, tên vắt qua đường chia) --- */
.s-groom { background: #2a1d22; }
.s-groom .pane { position: absolute; top: 0; height: 1080px; overflow: hidden; background: #3a2a30; }
.s-groom .pane img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); animation: paneZoom var(--dur, 10s) linear both; }
.s-groom .p1 { left: 0; width: 1056px; animation: slideL 1.1s var(--ease) both; }
.s-groom .p2 { left: 1056px; width: 864px; animation: slideR 1.1s var(--ease) .1s both; }
@keyframes slideL { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes slideR { from { transform: translateX(100%); } to { transform: none; } }
@keyframes paneZoom { from { transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); } to { transform: scale(calc(var(--zoom, 1) * 1.07)) scaleX(var(--flip, 1)); } }
.s-groom .pane::after { content: ""; position: absolute; inset: 0; background: var(--scrim); }
.s-groom .who { position: absolute; left: 0; right: 0; bottom: 90px; text-align: center; color: var(--light, #fff); z-index: 2; }
.s-groom .who .name { font-family: var(--serif); font-weight: 300; font-size: 230px; line-height: .9; letter-spacing: .01em; text-shadow: var(--soft-shadow); }
.s-groom .who .name span { display: inline-block; opacity: 0; transform: translateY(24px); filter: blur(8px); animation: letterIn 1.4s var(--ease) both; animation-delay: calc(.7s + var(--i) * 90ms); }
.s-groom .who .role { font-size: 26px; font-weight: 600; letter-spacing: .5em; margin-right: -.5em; text-transform: uppercase; color: var(--light, #fff); opacity: 0; margin-top: 18px; text-shadow: 0 1px 12px #2a1d2266; animation: rise 1.4s var(--ease) 1.5s both; }

/* --- Scene: bride (ảnh tràn, ảnh thứ hai quét vào theo đường chéo) --- */
.s-bride { background: #2a1d22; }
.s-bride .pane { position: absolute; top: 0; height: 1080px; overflow: hidden; }
.s-bride .p1 { left: 0; width: 1056px; }
.s-bride .pane img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); animation: paneZoom var(--dur, 10s) linear both; }
.s-bride .p2 { left: 614px; width: 1306px; clip-path: polygon(29.4% 0, 100% 0, 100% 100%, 0 100%); animation: diagIn 1.3s var(--ease) .5s both; }
@keyframes diagIn { from { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); } to { clip-path: polygon(29.4% 0, 100% 0, 100% 100%, 0 100%); } }
.s-bride .seam { position: absolute; left: 803px; top: -60px; width: 6px; height: 1200px; z-index: 1; background: var(--light, #fff); transform: rotate(19.57deg); opacity: 0; animation: fadeIn .6s ease 1.5s both; } /* nằm đúng cạnh chéo của ảnh 2 */
.s-bride .pane::after { content: ""; position: absolute; inset: 0; background: var(--scrim); }
.s-bride .who { position: absolute; left: 110px; bottom: 80px; color: var(--light, #fff); z-index: 2; }
.s-bride .who .name { font-family: var(--serif); font-weight: 300; font-size: 230px; line-height: .9; letter-spacing: .01em; text-shadow: var(--soft-shadow); }
.s-bride .who .name span { display: inline-block; opacity: 0; transform: translateY(24px); filter: blur(8px); animation: letterIn 1.4s var(--ease) both; animation-delay: calc(1s + var(--i) * 90ms); }
.s-bride .who .role { font-size: 26px; font-weight: 600; letter-spacing: .5em; text-transform: uppercase; color: var(--light, #fff); opacity: 0; margin-top: 18px; text-shadow: 0 1px 12px #2a1d2266; animation: rise 1.4s var(--ease) 1.9s both; }

/* --- Scene: split (hai ảnh nửa màn hình, tên chương vắt ngang) --- */

/* --- Scene: full = rèm ánh sáng (10 lá rèm lật mở thành một ảnh tràn khung) --- */
.s-full { background: #2a1d22; }
.s-full .slat { position: absolute; top: 0; width: 192px; height: 1080px; overflow: hidden; transform-origin: 0 50%; backface-visibility: hidden; animation: slatIn 1.1s var(--ease) both; animation-delay: calc(.15s + var(--i) * 70ms); }
.s-full .slat-in { position: absolute; top: 0; width: 1920px; height: 1080px; }
.s-full .slat-in img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); animation: paneZoom var(--dur, 10s) linear both; }
@keyframes slatIn { from { transform: perspective(1600px) rotateY(-88deg); opacity: .2; } to { transform: none; opacity: 1; } }
.s-full::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--scrim); }
.s-full .cap { position: absolute; left: 110px; bottom: 80px; z-index: 2; color: var(--light, #fff); }
.s-full .cap .big { font-family: var(--serif); font-weight: 300; font-size: 170px; line-height: .95; letter-spacing: .01em; text-shadow: var(--soft-shadow); opacity: 0; animation: rise 1.4s var(--ease) 1.1s both; }
.s-full .cap .txt { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 54px; line-height: 1.2; margin-top: 8px; text-shadow: var(--soft-shadow); opacity: 0; animation: rise 1.4s var(--ease) 1.5s both; }

/* --- Scene: split = song ảnh (hai ảnh trượt ngược chiều) --- */
.s-split { background: #1f1719; }
.s-split .pane { position: absolute; top: 0; width: 960px; height: 1080px; overflow: hidden; }
.s-split .pane img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); animation: paneZoom var(--dur, 9s) linear both; }
.s-split .p1 { left: 0; animation: colDown 1.3s var(--ease) both; }
.s-split .p2 { left: 960px; animation: colUp 1.3s var(--ease) .1s both; }
.s-split::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--scrim); }
.s-split .mid { position: absolute; left: 0; right: 0; bottom: 64px; z-index: 3; text-align: center; color: var(--light, #fff); opacity: 0; animation: rise 1s var(--ease) 1.3s both; }
.s-split .mid .sm { font-size: 18px; font-weight: 500; letter-spacing: .5em; margin-right: -.5em; opacity: .85; }
.s-split .mid .big { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 110px; line-height: 1.05; text-shadow: var(--soft-shadow); }

/* --- Liền mạch: dip to white khi sang chương mới --- */
.scene[data-tr="dip"].in { animation: dipIn 1.6s ease-out .55s both; }
.scene[data-tr="dip"].out { animation: dipOut .9s ease-in both; }
@keyframes dipIn { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }
@keyframes dipOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(1.03); } } /* lộ nền kem sáng của .film = khoảnh khắc trắng */

/* --- Scene: columns (ba cột cao hết khung, thị sai) --- */
.s-columns { background: #2a1d22; }
.s-columns .col { position: absolute; top: 0; width: 640px; height: 1080px; overflow: hidden; }
.s-columns .col img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); animation: paneZoom var(--dur, 10s) linear both; }
.s-columns .c1 { left: 0; animation: colDown 1.2s var(--ease) both, colDrift var(--dur, 10s) linear 1.2s forwards; }
.s-columns .c2 { left: 640px; animation: colUp 1.2s var(--ease) .1s both, colDriftUp var(--dur, 10s) linear 1.3s forwards; }
.s-columns .c3 { left: 1280px; animation: colDown 1.2s var(--ease) .2s both, colDrift var(--dur, 10s) linear 1.4s forwards; }
@keyframes colDown { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes colUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes colDrift { from { transform: translateY(0); } to { transform: translateY(26px); } }
@keyframes colDriftUp { from { transform: translateY(0); } to { transform: translateY(-26px); } }
.s-columns .cap { position: absolute; left: 110px; bottom: 90px; z-index: 2; color: var(--light, #fff); font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 60px; text-shadow: var(--soft-shadow); opacity: 0; animation: rise 1.4s var(--ease) 1.5s both; }
.s-columns::after { content: ""; position: absolute; inset: 0; background: var(--scrim); pointer-events: none; }

/* --- Scene: board (bảng polaroid to phủ kín khung, lia máy) --- */
.s-board { background: #2a1d22; overflow: hidden; }
.s-board .blurbg::after { background: linear-gradient(180deg, #2a1d2266, #2a1d22aa); }
.s-board .deck { position: absolute; inset: 0; animation: boardPan var(--dur, 14s) linear both; }
@keyframes boardPan { from { transform: translateX(60px) scale(1.02); } to { transform: translateX(-80px) scale(1.06); } }
.s-board .pola { position: absolute; width: 640px; height: 642px; transform: rotate(var(--rot)); opacity: 0; animation: polaIn 1.4s var(--ease) both; animation-delay: var(--d, 0s); will-change: transform, opacity; }
.s-board .pin { position: relative; width: 100%; height: 100%; background: #fffdfb; padding: 22px 22px 120px; border-radius: 10px; box-shadow: 0 40px 80px #0005, 0 6px 16px #0003; }
.s-board .pola img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); border-radius: 2px; transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); }
.s-board .pcap { position: absolute; left: 0; right: 0; bottom: 38px; text-align: center; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 46px; line-height: 1; color: var(--ink); }
@keyframes polaIn { from { opacity: 0; transform: rotate(var(--rot)) translateY(90px) scale(.9); } to { opacity: 1; transform: rotate(var(--rot)) translateY(0) scale(1); } }
.s-board .tape { position: absolute; width: 150px; height: 40px; background: #e9c9a499; transform: rotate(-6deg); left: calc(50% - 75px); top: -18px; border-radius: 3px; box-shadow: 0 2px 6px #0001; }

/* --- Scene: quote (ảnh tràn, trích dẫn lớn) --- */
.s-quote { background: #2a1d22; }
.s-quote .kb::after { content: ""; position: absolute; inset: 0; background: var(--scrim); }
.s-quote .quote { position: absolute; left: 200px; right: 200px; bottom: 130px; text-align: center; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 76px; line-height: 1.2; color: var(--light, #fff); text-shadow: var(--soft-shadow); opacity: 0; animation: rise 1.6s var(--ease) 1.2s both; }
.s-quote .quote::before, .s-quote .quote::after { content: "“"; color: var(--rose); margin-right: 10px; }
.s-quote .quote::after { content: "”"; margin: 0 0 0 10px; }

/* --- Scene: letter (ảnh trái, mảng màu phải với lá thư) --- */
.s-letter { background: #2a1d22; }
.s-letter .pane { position: absolute; left: 0; top: 0; width: 1152px; height: 1080px; overflow: hidden; }
.s-letter .pane img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); animation: paneZoom var(--dur, 11s) linear both; }
.s-letter .panel { position: absolute; left: 1152px; top: 0; width: 768px; height: 1080px; background: var(--rose); color: var(--light, #fff); padding: 120px 80px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; animation: slideR 1.2s var(--ease) both; }
.s-letter .panel::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0000 0%, #00000022 100%); }
.s-letter .panel > * { position: relative; opacity: 0; animation: riseSoft 1.4s var(--ease) both; }
.s-letter .head { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 48px; line-height: 1; margin-bottom: 26px; animation-delay: .6s; }
.s-letter .body { font-family: var(--serif); font-weight: 300; font-size: 44px; line-height: 1.35; margin-top: 40px; animation-delay: 1.3s; }
.s-letter .date { font-family: var(--serif); font-size: 34px; letter-spacing: .3em; margin-right: -.3em; margin-top: 26px; animation-delay: 1.1s; }
.s-letter .sign { font-family: var(--serif); font-weight: 300; font-size: 104px; line-height: 1.05; letter-spacing: .01em; animation-delay: .8s; }

/* --- Scene: arches (ba cửa vòm trên nền ảnh mờ, ánh sáng lướt) --- */
.s-arches { background: #2a1d22; }
.s-arches .blurbg::after { background: linear-gradient(180deg, #2a1d2288, #2a1d22cc); }
.s-arches .arch { position: absolute; top: 120px; width: 540px; height: 900px; overflow: hidden; border-radius: 270px 270px 24px 24px; box-shadow: 0 30px 80px #0007, inset 0 0 0 2px #ffffff26; opacity: 0; animation: archIn 1.5s var(--ease) both; will-change: transform, opacity; }
.s-arches .a1 { left: 90px; } .s-arches .a2 { left: 690px; animation-delay: .18s; } .s-arches .a3 { left: 1290px; animation-delay: .36s; }
.s-arches .arch img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); animation: paneZoom var(--dur, 10s) linear both; }
@keyframes archIn { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
.s-arches .leak { position: absolute; inset: -20%; pointer-events: none; z-index: 3; background: linear-gradient(115deg, transparent 35%, #ffd9a855 48%, #ffb98a66 52%, transparent 65%); animation: leak var(--dur, 10s) ease-in-out both; }
@keyframes leak { from { transform: translateX(-60%); opacity: 0; } 35% { opacity: .9; } to { transform: translateX(60%); opacity: 0; } }
.s-arches .cap { position: absolute; left: 0; right: 0; top: 36px; text-align: center; z-index: 2; color: var(--light, #fff); font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 52px; line-height: 1; text-shadow: var(--soft-shadow); opacity: 0; animation: rise 1.4s var(--ease) 1.2s both; }

/* --- Scene: mosaic (lưới 3×2 tràn khung, hội tụ về ảnh Hero) --- */
.s-mosaic { background: #2a1d22; }
.s-mosaic .grid { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 6px; transition: opacity 1.1s ease, transform 1.6s var(--ease); }
.s-mosaic.converge .grid { opacity: 0; transform: scale(.94); }
.s-mosaic .tile { position: relative; overflow: hidden; background: #3a2a30; opacity: 0; animation: tileIn .9s var(--ease) both; animation-delay: calc(var(--i) * .13s); }
.s-mosaic .tile img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); transform: scale(var(--zoom, 1)) scaleX(var(--flip, 1)); transform-origin: var(--focal, 50% 30%); animation: paneZoom 20s linear both; animation-delay: calc(var(--i) * -2s); }
@keyframes tileIn { from { opacity: 0; transform: translateY(30px) scale(.94); } to { opacity: 1; transform: none; } }
.s-mosaic .final { position: absolute; left: 50%; top: 50%; width: 1180px; height: 760px; transform: translate(-50%, -50%) scale(.6); border-radius: 28px; overflow: hidden; box-shadow: 0 40px 90px #0007; opacity: 0; transition: opacity 1.2s var(--ease-soft) .4s, transform 1.8s var(--ease) .3s; }
.s-mosaic .final img { width: 100%; height: 100%; object-fit: cover; object-position: var(--focal, 50% 30%); animation: kenburns 12s linear both; transform-origin: var(--focal, 50% 30%); }
.s-mosaic.converge .final { opacity: 1; transform: translate(-50%, -50%) scale(1); top: 44%; }
.s-mosaic .thanks { position: absolute; left: 0; right: 0; bottom: 64px; text-align: center; color: var(--light, #fff); opacity: 0; transform: translateY(16px); filter: blur(4px); transition: opacity 1.4s var(--ease-soft) 1.4s, transform 1.6s var(--ease) 1.4s, filter 1.4s var(--ease-soft) 1.4s; }
.s-mosaic.converge .thanks { opacity: 1; transform: none; filter: blur(0); }
.s-mosaic .thanks .t1 { font-family: var(--serif); font-weight: 300; font-size: 72px; line-height: 1; letter-spacing: .01em; text-shadow: var(--soft-shadow); }
.s-mosaic .thanks .t2 { margin-top: 16px; font-size: 18px; font-weight: 500; letter-spacing: .4em; margin-right: -.4em; text-transform: uppercase; color: var(--light, #fff); opacity: .8; }

/* ============ CURSOR ============ */
.cursor { position: absolute; z-index: 70; left: 0; top: 0; width: 34px; height: 38px; opacity: 0; pointer-events: none; transform: translate(var(--cx, 300px), var(--cy, 800px)); transition: transform 1.25s cubic-bezier(.22, .82, .18, 1), opacity .25s; filter: drop-shadow(1px 3px 3px #0009); }
.cursor img { width: 100%; height: 100%; filter: invert(1); }
.cursor.on { opacity: 1; }
.cursor.pressed { transform: translate(var(--cx, 300px), var(--cy, 800px)) scale(.8); transition: transform .12s, opacity .25s; }

/* ============ HUD ============ */
#hud { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99; background: #120c0fcc; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font: 500 14px var(--sans); letter-spacing: .04em; padding: 10px 20px; border-radius: 999px; box-shadow: inset 0 0 0 1px #ffffff1a; opacity: 0; transition: opacity .5s var(--ease-soft); pointer-events: none; white-space: nowrap; }
#hud.on { opacity: 1; }
#hud b { color: var(--brand); font-weight: 600; }
#stage.paused .scene, #stage.paused .scene * , #stage.paused .kb img { animation-play-state: paused !important; }

/* ============ EDIT MODE (canvas sống trong dashboard) ============
   Mọi hoạt cảnh nhảy thẳng về trạng thái cuối; Ken Burns dừng ở giữa hành trình để căn ảnh đúng với lúc chiếu. */
#stage.edit .scene, #stage.edit .scene *, #stage.edit .scene *::before, #stage.edit .scene *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition: none !important; }
#stage.edit .kb img, #stage.edit .pane img, #stage.edit .col img, #stage.edit .arch img, #stage.edit .slat-in img, #stage.edit .tile img, #stage.edit .s-board .deck { animation-duration: var(--dur, 8s) !important; animation-delay: calc(var(--dur, 8s) / -2) !important; animation-play-state: paused !important; }
#stage.edit .s-strip .copy > *, #stage.edit .s-full .cap > *, #stage.edit .s-split .mid, #stage.edit .s-quote .quote, #stage.edit .s-title .tdate, #stage.edit .s-title .tlunar, #stage.edit .s-letter .panel > *, #stage.edit .who .role, #stage.edit .s-columns .cap, #stage.edit .s-arches .cap { opacity: 1; }
#stage.edit .s-strip .copy .date { opacity: .85; }
#stage.edit .s-mosaic .thanks { opacity: 1; transform: none; }
#stage.edit .s-full .cap .txt:empty::before, #stage.edit .s-quote .quote:empty::before, #stage.edit .s-columns .cap:empty::before, #stage.edit .s-arches .cap:empty::before { content: "Chưa có chữ"; opacity: .45; }
#stage.edit #hud, #stage.edit ~ #hud { display: none; }
#stage.edit .view, #stage.edit .view *, #stage.edit .view *::before, #stage.edit .view *::after { transition: none !important; animation-duration: 1ms !important; animation-delay: 0ms !important; }
#stage.edit .home .hero img { transform: scale(1); }
#stage.edit .cursor { display: none; }

/* cảnh không có chữ: bỏ dải tối dưới đáy, ảnh giữ nguyên độ sáng */
.s-quote:not(:has(.quote:not(.is-empty))) .kb::after,
.s-full:not(:has(.cap > :not(.is-empty)))::after,
.s-split:not(:has(.mid > :not(.is-empty)))::after,
.s-columns:not(:has(.cap:not(.is-empty)))::after { display: none; }
