.opening {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fbf7ff;
  background: transparent;
  overflow: hidden;
  isolation: isolate;
  --roof-start: 65%;
  --roof-end: 34%;
}
.opening::backdrop { background: transparent; }
.opening-active { overflow: hidden; }
.opening-active:not(.opening-docked) .site-header .brand-sign { visibility: hidden; }
.opening-docked .opening-mark { visibility: hidden; }
.opening-ground, .opening-panel, .opening-shot, .opening-shot img, .opening-trace, .opening-trace i { position: absolute; inset: 0; width: 100%; height: 100%; }
.opening-ground {
  background: radial-gradient(ellipse at 51% 43%,#563660,#321d3b 42%,#211327 85%);
}
.opening-panel-left { clip-path: polygon(0 0,var(--roof-start) 0,var(--roof-end) 100%,0 100%); }
.opening-panel-right { clip-path: polygon(var(--roof-start) 0,100% 0,100% 100%,var(--roof-end) 100%); }
.opening-shot { opacity: 0; }
.opening-shot img { object-fit: cover; object-position: 52% 53%; filter: saturate(.66) contrast(1.13) brightness(.72); }
.opening-shot::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(ellipse at 52% 48%,#27152db8 3%,#2b1b2e40 48%,#1f152c22 78%),
              linear-gradient(0deg,#1e1225ba 0%,transparent 31%),#3e296f21;
}
.opening.has-photo.is-playing .opening-shot { animation: roof-camera 3.18s cubic-bezier(.19,.8,.3,1) both; }
@keyframes roof-camera {
  from { opacity: 0; transform: scale(1.025) translateY(1%); }
  15% { opacity: 1; }
  to { opacity: 1; transform: scale(1.105) translateY(-1.8%); }
}
.opening-trace { opacity: 0; filter: drop-shadow(0 0 8px #d8e898aa); }
.opening-trace i {
  background: linear-gradient(0deg,#f3f4d5,#f9fbdf 28%,#dbe8a7 72%,#eeeaf6);
  clip-path: polygon(var(--roof-start) 0,calc(var(--roof-start) + .19%) 0,calc(var(--roof-end) + .19%) 100%,var(--roof-end) 100%);
}
.opening.is-playing .opening-trace { animation: roof-trace .65s .42s var(--ease) both; }
@keyframes roof-trace {
  0% { opacity: 0; clip-path: inset(100% 0 0); }
  22% { opacity: 1; }
  74% { opacity: 1; clip-path: inset(0); }
  100% { opacity: 0; clip-path: inset(0); }
}
.opening.is-playing .opening-panel-left { animation: shift-roof-left .93s .78s var(--ease) both; }
.opening.is-playing .opening-panel-right { animation: shift-roof-right .93s .78s var(--ease) both; }
@keyframes shift-roof-left { to { transform: translate3d(-4%,-2%,0); } }
@keyframes shift-roof-right { to { transform: translate3d(4%,2%,0); } }

.opening-lockup {
  position: absolute;
  inset: 0;
  display: grid;
  justify-content: center;
  justify-items: center;
  align-content: center;
  padding: min(6vh,3.5rem) 1rem 4.2rem;
  pointer-events: none;
  text-align: center;
}
.opening-mark { width: clamp(6.8rem,16vw,11.1rem); color: #fffbff; filter: drop-shadow(0 2px 11px #1c0f24); }
.opening-mark .mark-piece { opacity: 0; }
.opening.is-playing .mark-left { animation: mark-left-cut .58s .88s var(--ease) both; }
.opening.is-playing .mark-right { animation: mark-right-cut .56s 1.12s var(--ease) both; }
.opening.is-playing .mark-bar { animation: mark-bar-cut .54s 1.43s var(--ease) both; }
@keyframes mark-left-cut {
  from { opacity: .15; clip-path: inset(100% 0 0); transform: translate(-1.75rem,1.28rem) rotate(-7deg); }
  to { opacity: 1; clip-path: inset(0); transform: none; }
}
@keyframes mark-right-cut {
  from { opacity: .15; clip-path: inset(0 0 100%); transform: translate(1.6rem,-1.25rem) rotate(7deg); }
  to { opacity: 1; clip-path: inset(0); transform: none; }
}
@keyframes mark-bar-cut {
  from { opacity: .15; clip-path: inset(0 0 0 100%); transform: translate(2.2rem,-.82rem); }
  to { opacity: 1; clip-path: inset(0); transform: none; }
}
.opening-lockup h2 {
  font-size: clamp(3.05rem,8.7vw,7.1rem);
  line-height: .97;
  margin: .05rem 0 .55rem;
  text-shadow: 0 3px 18px #21102d;
  opacity: 0;
}
.opening-lockup p {
  color: #faf1fd;
  font-size: clamp(.7rem,1.7vw,1rem);
  font-weight: 590;
  letter-spacing: .08em;
  text-shadow: 0 2px 8px #21102d;
  opacity: 0;
}
.opening.is-playing h2 { animation: title-cut .56s 1.65s var(--ease) both; }
.opening.is-playing .opening-lockup p { animation: title-hold 1.28s 1.87s var(--ease) both; }
@keyframes title-cut {
  from { opacity: .13; clip-path: inset(0 100% 0 0); transform: translateX(-.32rem); }
  to { opacity: 1; clip-path: inset(0); transform: none; }
}
@keyframes title-hold {
  0% { opacity: 0; transform: translateY(.35rem); }
  36%,100% { opacity: 1; transform: none; }
}
.opening-credit {
  position: absolute;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1.08rem, env(safe-area-inset-bottom));
  padding: .18rem .4rem;
  background: #22142bc7;
  font-size: .66rem;
  visibility: hidden;
}
.opening.has-photo .opening-credit { visibility: visible; }
.opening-skip {
  position: absolute;
  right: max(1.25rem, 4vw, env(safe-area-inset-right));
  bottom: max(1.65rem, 4vh, calc(env(safe-area-inset-bottom) + .8rem));
  display: inline-grid;
  place-items: center;
  min-height: 2.75rem;
  padding: .5rem .91rem;
  color: #fffaff;
  border: 1px solid #c4afcb;
  background: #27162ee6;
  cursor: pointer;
  font-size: .9rem;
}
.opening-skip:hover { color: #24142b; background: var(--highlight); border-color: var(--highlight); }
.opening-skip:focus-visible { outline-color: #e8f3ae; }
.opening.is-exiting .opening-ground { animation: drop-ground .34s ease both; }
.opening.is-exiting .opening-panel-left { animation: exit-roof-left .85s var(--ease) both; }
.opening.is-exiting .opening-panel-right { animation: exit-roof-right .88s var(--ease) both; }
.opening.is-exiting .opening-panel-right::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--profile-curtain-color);
  animation: continue-profile-pane .59s .12s ease both;
}
.opening.is-exiting .opening-lockup :is(h2,p) { animation: drop-title .52s .09s var(--ease) both; }
.opening.is-exiting .opening-mark { filter: none; }
.opening.is-exiting .opening-credit { opacity: 0; }
@keyframes drop-ground { to { opacity: 0; } }
@keyframes exit-roof-left {
  from { transform: translate3d(-4%,-2%,0); }
  to { transform: translate3d(-103%,-18%,0); }
}
@keyframes exit-roof-right {
  from {
    clip-path: polygon(var(--roof-start) 0,100% 0,100% 100%,var(--roof-end) 100%);
    transform: translate3d(4%,2%,0);
  }
  to {
    clip-path: var(--opening-profile-clip);
    transform: none;
  }
}
@keyframes continue-profile-pane { from { opacity: 0; } to { opacity: 1; } }
@keyframes drop-title {
  from { opacity: 1; }
  to { opacity: 0; filter: blur(.18rem); transform: translateY(-.7rem) scale(.97); }
}
@media (max-width: 41rem) {
  .opening { --roof-start: 77%; --roof-end: 25%; }
  .opening-shot img { object-position: 63% center; }
  .opening-credit { bottom: max(.54rem, env(safe-area-inset-bottom)); left: .45rem; }
  .opening-lockup { padding-bottom: 4.6rem; }
  .opening-mark { width: clamp(6.45rem,25vw,9rem); }
}
