.arcade-prologue {
  --opening-cream: #fff0cb;
  --opening-pine: #173e41;
  position: fixed;
  inset: 0;
  z-index: 52;
  height: var(--vh, 100dvh);
  isolation: isolate;
  overflow: hidden;
  color: var(--opening-cream);
  background: var(--opening-pine);
  touch-action: manipulation;
}
.arcade-prologue[hidden], .arcade-prologue [hidden] { display: none !important; }
.prologue-cover, .prologue-cover img, .prologue-film, .prologue-title {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.prologue-cover img { object-fit: cover; object-position: 66% 49%; }
.prologue-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 5% max(28px, env(safe-area-inset-bottom)) max(7.5%, env(safe-area-inset-left));
  background: linear-gradient(88deg, #103839bf 0%, #15393899 23%, #142f3000 53%);
}
.prologue-title h1 {
  margin: 0 0 .32em;
  font: bold clamp(64px, min(8.8vw,16vh),164px)/.82 'Libre Caslon Display', Georgia, serif;
  letter-spacing: -.052em;
  color: var(--opening-cream);
  text-shadow: .018em .025em #192f2e, .035em .048em #192f2e, .047em .061em #973c39;
  transform: rotate(-4deg);
}
.prologue-title h1 span, .prologue-title h1 em { display: block; }
.prologue-title h1 em { margin: .05em 0 0 .40em; color: #ffd07d; font-size: 1.24em; line-height: .84; }
.arcade-prologue .prologue-play {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .65em;
  min-width: clamp(156px,16vw,244px);
  min-height: clamp(55px,7.3vh,79px);
  padding: .29em 1em .35em;
  margin-left: clamp(6px,2.4vw,46px);
  border: 2px solid var(--opening-cream);
  border-radius: 45% 22% 36% 22% / 12% 25% 12% 26%;
  box-shadow: inset 0 0 0 3px #ae413b, inset 0 0 0 4px #ecc68c, 3px 5px 0 #173f3b;
  color: var(--opening-cream);
  background: #a43b39;
  font: 700 clamp(28px,3vw,48px)/1 'Libre Caslon Display', Georgia, serif;
  cursor: pointer;
}
.prologue-play i {
  width: .52em; height: .55em;
  background: currentColor;
  clip-path: polygon(6% 0,100% 50%,6% 100%);
}
.prologue-daily { display: inline-flex; align-items: center; min-height: 44px; margin: 9px 0 0 clamp(6px,2.4vw,46px); padding: 0 14px; border-radius: 22px; background: #163b3bd9; color: #ffdfaf; font: 700 16px Georgia, serif; text-underline-offset: 4px; }
.arcade-prologue :is(a,button):focus-visible { outline: 3px solid white; outline-offset: 5px; }
.arcade-prologue .prologue-play:hover { background: #933632; }
.arcade-prologue .prologue-play:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px #ae413b, inset 0 0 0 3px #ecc68c, 1px 2px 0 #173f3b; }
.prologue-film {
  background: repeating-linear-gradient(112deg,transparent 0px 8px,#f2b75c06 9px 10px), #173d3d;
}
.prologue-frame {
  position: absolute;
  inset: max(12px, min(2.8vw,3vh));
  overflow: hidden;
  border: 1px solid #e8c184;
  background: #234745 url('./art/cover.webp') 65% 49% / cover;
  box-shadow: 0 0 0 3px #203f3c, 0 0 0 4px #65846c;
}
.prologue-shot {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--shot-focus,50%) 50%;
  opacity: 0;
}
.prologue-shot.is-exposed, .prologue-shot.is-printed { opacity: 1; }
.prologue-shot[data-shot="0"].is-exposed { animation: opening-address 1750ms ease-out both; }
.prologue-shot[data-shot="1"].is-exposed { animation: opening-plop 1250ms ease-out both; }
.prologue-shot[data-shot="2"].is-exposed { animation: opening-depart 1650ms cubic-bezier(.17,.72,.25,1) both; }
@keyframes opening-address { from { transform: scale(1.015) translateX(.25%); } to { transform: scale(1.055) translateX(-.35%); } }
@keyframes opening-plop { 0% { transform: scale(1.07) rotate(-.5deg); } 30% { transform: scale(1.035) rotate(.12deg); } 100% { transform: scale(1.055); } }
@keyframes opening-depart { from { transform: scale(1.075) translateX(1.35%); } to { transform: scale(1.025) translateX(-.45%); } }
.arcade-prologue[data-paused] .prologue-shot { animation-play-state: paused; }
.prologue-caption {
  position: absolute;
  left: clamp(12px,4.8vw,100px);
  bottom: clamp(16px,5.8vh,69px);
  padding: .23em .65em .28em;
  border: 1px solid #513e2c;
  border-radius: 3% 5% 2% 4% / 9% 13% 9% 16%;
  color: #21433d;
  background: #fff0cc;
  box-shadow: .07em .11em 0 #783a36;
  font: italic bold clamp(25px,3.15vw,54px)/1.03 'Libre Caslon Display', Georgia, serif;
  transform: rotate(-2deg);
}
.arcade-prologue[data-beat="1"] .prologue-caption {
  left: auto; right: 8%;
  color: #9c3434;
  transform: rotate(5deg);
}
.arcade-prologue .prologue-skip {
  position: absolute;
  top: max(17px,calc(env(safe-area-inset-top) + 6px));
  right: max(17px,calc(env(safe-area-inset-right) + 6px));
  margin: 0;
  min-width: 71px; min-height: 44px;
  padding: 6px 13px;
  border: 1px solid #d6bd86;
  border-radius: 22px 21px 19px 22px;
  background: #183a39f5;
  color: var(--opening-cream);
  font: 700 14px/1 'DM Sans', system-ui, sans-serif;
  cursor: pointer;
}
.prologue-skip span { padding-left: 3px; font-size: 18px; line-height: .5; }
@media (max-width:700px) { .prologue-frame { background-image: url('./art/cover-small.webp'); } }
@media (orientation:portrait) {
  .prologue-cover { height: 81%; }
  .prologue-cover img { object-position: 72% 45%; }
  .prologue-title {
    justify-content: flex-end;
    align-items: center;
    padding: 20px 10px max(7vh,calc(env(safe-area-inset-bottom) + 20px));
    background: linear-gradient(0deg,#153e40 0 18%,#153e40ee 25%,#153e40bd 36%,#153e4000 59%);
  }
  .prologue-title h1 { text-align: center; font-size: clamp(58px,min(16.5vw,10.8vh),122px); margin: 0 0 .30em; }
  .prologue-title h1 em { margin-left: .4em; }
  .arcade-prologue .prologue-play { min-width: clamp(160px,44vw,235px); margin: 0; }
  .prologue-daily { margin-left: 0; }
  .prologue-frame {
    inset: 50% 0 auto;
    height: min(86%,100vw);
    transform: translateY(-50%);
    border-inline: 0;
  }
  .prologue-caption { bottom: 7%; }
  .prologue-film {
    background: radial-gradient(ellipse at 50% 0%,#42604d,transparent 57%),
      repeating-linear-gradient(112deg,transparent 0 8px,#f3be6509 9px 10px),#153b3c;
  }
}
@media (orientation:landscape) and (max-height:465px) {
  .prologue-title h1 { font-size: clamp(48px,min(9.4vw,18vh),78px); }
  .arcade-prologue .prologue-play { min-height: 45px; min-width: 145px; font-size: 27px; }
  .prologue-caption { font-size: clamp(23px,6.2vh,29px); }
}
@media (prefers-reduced-motion:reduce) {
  .prologue-shot.is-exposed { animation: none !important; }
}
