.opening-film {
  position: fixed; inset: 0; z-index: 1000; overflow: hidden;
  isolation: isolate; outline: 0;
  background: #fff2de; color: #442e31;
  --film-serif: "Songti SC","STSong","Noto Serif CJK SC",serif;
}
.opening-film[hidden] { display: none; }
.opening-pending .opening-film[hidden], .opening-film.is-playing { display: grid; }
.film-scene {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 55px 6vw 35px; overflow: hidden; opacity: 0;
}
.film-scene--follow { background: #fff2de; opacity: 1; }
.film-scene--luoyang { background: #452839; color: #fff1d8; }
.film-scene--cake { background: #fbe8dd; }
.film-skip {
  position: absolute; z-index: 4; right: max(20px,env(safe-area-inset-right)); top: max(18px,env(safe-area-inset-top));
  min-height: 42px; padding: 0 15px; border-radius: 30px;
  border: 1px solid #b79b8a; background: #fff7e9; color: #543d3c;
  font-size: 13px; letter-spacing: .04em;
}
.film-skip span { margin-left: .4em; }
.film-skip:hover { background: white; }
.film-skip:focus-visible { outline: 3px solid #8d3951; outline-offset: 4px; }
.film-follow-card { width: min(85vw, 640px); text-align: center; }
.film-mast, .film-place, .film-dates, .film-signoff { font-size: clamp(12px,1.15vw,16px); letter-spacing: .1em; }
.film-mast, .film-dates { display: flex; align-items: center; justify-content: center; gap: 14px; }
.film-mast time, .film-dates time { font-family: Georgia,serif; font-variant-numeric: lining-nums tabular-nums; }
.film-mast span { padding-left: 14px; border-left: 1px solid #bfae98; }
.film-names { display: flex; justify-content: center; align-items: center; gap: clamp(12px,3.3vw,56px); margin: 25px 0 4px; }
.film-name { white-space: nowrap; font: 700 clamp(37px,7.6vw,104px)/1.25 var(--film-serif); letter-spacing: -.045em; }
.film-joining-word {
  color: #91364a; font: 500 clamp(20px,3vw,42px)/1.2 "Kaiti SC","STKaiti",var(--film-serif);
  rotate: -5deg;
}
.film-ink { width: 75%; max-width: 510px; height: auto; margin: 0 auto; }
.film-ink path { stroke: #bf4358; stroke-width: 3.6; stroke-dasharray: 1; stroke-dashoffset: 0; stroke-linecap: round; stroke-linejoin: round; }
.film-meeting { display: flex; align-items: center; justify-content: center; gap: clamp(32px,8vw,140px); }
.film-print {
  background: #fff7e4; padding: clamp(6px,.9vw,12px); margin: 0;
  box-shadow: 8px 13px 0 #321e2a; rotate: -5deg;
  width: min(38vw,45svh,465px); position: relative;
}
.film-print::before {
  content: ""; position: absolute; z-index: 1; width: 29%; height: 5.5%; left: 34%; top: -2.5%;
  background: #e2bc82c9; rotate: 4deg; clip-path: polygon(2% 0,100% 4%,98% 54%,100% 98%,0 100%,2% 60%,0 41%);
}
.film-print img { width: 100%; height: auto; }
.film-place { color: #f1cab6; }
.film-meeting-title { font: 600 clamp(36px,5vw,80px)/1.33 var(--film-serif); letter-spacing: -.035em; margin-top: .35em; }
.film-finale { text-align: center; }
.film-dates { gap: 12px; color: #634544; }
.film-dates > span { width: 28px; height: 1px; background: #ac8c76; }
.film-cake-wrap { width: min(42vw,47svh,445px); margin: 12px auto 7px; position: relative; }
.film-cake-wrap img { width: 100%; height: auto; filter: drop-shadow(0 8px 5px #60473025); }
.film-cake-wrap .film-sparks { position: absolute; inset: -4% -23%; width: 146%; height: 108%; overflow: visible; stroke-width: 3.5; stroke-linecap: round; }
.film-finale-title {
  font: 600 clamp(37px,5vw,72px)/1.25 "Kaiti SC","STKaiti","KaiTi",var(--film-serif);
  color: #95354a; letter-spacing: .07em;
}
.film-signoff { margin-top: .48em; }
.film-signoff span { color: #a3374d; margin-inline: .35em; }
.is-playing.opening-film { animation: film-fade-home 1050ms ease-in-out 7100ms both; }
.is-playing .film-scene--luoyang { animation: film-move-photo 590ms cubic-bezier(.4,0,.24,1) 2090ms both; }
.is-playing .film-scene--cake { animation: film-paper-reveal 640ms ease-in-out 4550ms both; }
.is-playing .film-name--hui { animation: film-from-left 580ms cubic-bezier(.16,.78,.2,1) both; }
.is-playing .film-name--jing { animation: film-from-right 650ms cubic-bezier(.16,.78,.2,1) 160ms both; }
.is-playing .film-joining-word { animation: film-rise 440ms ease-out 400ms both; }
.is-playing .film-ink path { animation: film-draw 820ms ease-in-out 890ms both; }
.is-playing .film-print { animation: film-slip 880ms cubic-bezier(.2,.78,.19,1) 2210ms both; }
.is-playing .film-meeting-copy { animation: film-rise 650ms ease-out 2420ms both; }
.is-playing .film-cake-wrap img { animation: film-cake-arrives 900ms cubic-bezier(.22,.75,.24,1) 4640ms both; }
.is-playing .film-sparks { animation: film-spark 870ms ease-out 5230ms both; }
.is-playing .film-finale-title { animation: film-rise 630ms ease-out 5120ms both; }
.is-playing .film-signoff { animation: film-rise 500ms ease-out 5410ms both; }
@keyframes film-fade-home { from { opacity: 1; } to { opacity: 0; } }
@keyframes film-move-photo { from { opacity: 1; clip-path: inset(0 0 100%); } to { opacity: 1; clip-path: inset(0); } }
@keyframes film-paper-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes film-from-left { from { opacity: 0; transform: translate(-.7em,.14em) rotate(-5deg); } to { opacity: 1; transform: none; } }
@keyframes film-from-right { from { opacity: 0; transform: translate(.65em,.14em) rotate(4deg); } to { opacity: 1; transform: none; } }
@keyframes film-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes film-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes film-slip { from { opacity: .4; translate: -8vw 12vh; rotate: -14deg; } to { opacity: 1; translate: 0; rotate: -5deg; } }
@keyframes film-cake-arrives { from { opacity: 0; scale: .84; translate: 0 15px; } to { opacity: 1; scale: 1; translate: 0; } }
@keyframes film-spark { 0% { opacity: 0; scale: .8; } 50% { opacity: 1; } 100% { opacity: .85; scale: 1; } }
@media (max-width: 650px) and (orientation: portrait) {
  .film-meeting { flex-direction: column; gap: 28px; text-align: center; }
  .film-print { width: min(60vw,34svh,320px); }
  .film-meeting-title { font-size: clamp(29px,7.2vw,42px); }
  .film-meeting-title br { display: none; }
  .film-cake-wrap { width: min(72vw,43svh,330px); margin-block: 19px 9px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .film-scene { padding: 10px 5vw; }
  .film-print { width: 57svh; }
  .film-cake-wrap { width: 52svh; margin-block: 4px; }
  .film-finale-title { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) {
  .opening-film *, .opening-film.is-playing { animation: none !important; }
  .opening-film[data-still-scene] .film-scene { opacity: 0; }
  .opening-film[data-still-scene="follow"] .film-scene--follow,
  .opening-film[data-still-scene="luoyang"] .film-scene--luoyang,
  .opening-film[data-still-scene="cake"] .film-scene--cake { opacity: 1; }
}
