#cinema-layer {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

#cinema-layer > * {
  pointer-events: auto;
}

/* 开场海报 */

.title-poster {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #191712;
  color: var(--ink);
  font-family: SimSun, STSong, serif;
  animation: poster-in 0.9s steps(6, end) both;
}

.title-poster.is-leaving {
  animation: poster-out 0.7s steps(5, end) both;
}

.poster-photo {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(rgba(0, 0, 0, 0.35) 0.8px, transparent 1px) 0 0 / 4px 4px,
    linear-gradient(90deg, rgba(25, 23, 18, 0.92) 0 30%, rgba(25, 23, 18, 0.2) 55%, rgba(25, 23, 18, 0.05)),
    url("../assets/images/frames/street-flash.jpg") center / cover;
  filter: grayscale(0.55) contrast(1.15) sepia(0.18);
}

.poster-title-strip {
  position: absolute;
  left: 4.5%;
  top: 8%;
  width: 22%;
  padding: 2.4% 1.6% 2%;
  transform: rotate(-2.2deg);
  border: 3px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(29, 70, 116, 0.08) 1px, transparent 1px) 0 0 / 9px 9px,
    var(--paper);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.6);
  text-align: center;
}

.poster-title-strip h1 {
  margin: 0;
  color: var(--print-green);
  font: 900 clamp(64px, 8.6vw, 168px)/1.02 SimSun, STSong, serif;
  writing-mode: vertical-rl;
  letter-spacing: 0.08em;
  margin-inline: auto;
  text-shadow: 4px 4px 0 var(--print-red);
}

.poster-title-strip p {
  margin: 4% 0 0;
  padding-top: 4%;
  border-top: 2px dashed var(--ink);
  font: 700 clamp(13px, 1.25vw, 22px) SimSun, STSong, serif;
  letter-spacing: 0.18em;
}

.poster-tape {
  position: absolute;
  width: 46%;
  height: 26px;
  background: rgba(240, 226, 160, 0.78);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.poster-tape-top {
  left: 27%;
  top: -15px;
  transform: rotate(4deg);
}

.poster-clip {
  position: absolute;
  padding: 0.5% 1%;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55);
  font: 900 clamp(13px, 1.3vw, 24px) SimSun, STSong, serif;
  white-space: nowrap;
}

.poster-clip-a {
  left: 30%;
  top: 16%;
  transform: rotate(3deg);
  background: #fff7c2;
  color: var(--print-red);
}

.poster-clip-b {
  left: 31%;
  top: 56%;
  transform: rotate(-3deg);
  background: var(--ink);
  color: #f6eedb;
}

.poster-clip-c {
  left: 37%;
  top: 64%;
  transform: rotate(2deg);
  background: var(--paper);
}

.poster-question {
  position: absolute;
  right: 4%;
  bottom: 21%;
  max-width: 36%;
  margin: 0;
  padding: 1% 1.6%;
  transform: rotate(-1deg);
  border-left: 14px solid var(--print-red);
  background: rgba(229, 221, 200, 0.94);
  font: 900 clamp(18px, 2vw, 36px)/1.3 SimSun, STSong, serif;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.55);
}

.poster-footer {
  position: absolute;
  left: 4.5%;
  bottom: 4%;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #e9e1cc;
  font: 700 clamp(11px, 0.95vw, 16px) SimSun, STSong, serif;
}

.poster-barcode {
  width: 120px;
  height: 42px;
  border: 4px solid #f6eedb;
  background:
    repeating-linear-gradient(90deg, #111 0 2px, #f6eedb 2px 4px, #111 4px 5px, #f6eedb 5px 8px, #111 8px 11px, #f6eedb 11px 12px);
}

.poster-start {
  position: absolute;
  right: 4%;
  bottom: 7%;
  min-width: 15%;
  padding: 0.9% 2%;
  border: 3px outset #fff;
  border-radius: 0;
  background: linear-gradient(180deg, #2f79d5, #0a4ca8);
  color: #fff;
  font: 900 clamp(16px, 1.6vw, 28px) SimSun, STSong, serif;
  letter-spacing: 0.15em;
  cursor: pointer;
  animation: poster-blink 1.2s steps(2, end) 1.2s infinite;
}

.poster-start:active {
  border-style: inset;
}

.poster-start:focus-visible {
  outline: 3px dotted #fff;
  outline-offset: 4px;
}

.poster-hint {
  position: absolute;
  right: 4%;
  bottom: 3.2%;
  margin: 0;
  color: #cfc6b0;
  font-size: clamp(10px, 0.8vw, 14px);
}

@keyframes poster-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes poster-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes poster-blink {
  50% {
    filter: brightness(1.25);
  }
}

/* 章节衔接卡 */

.chapter-card {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background:
    radial-gradient(rgba(255, 255, 255, 0.06) 0.8px, transparent 1px) 0 0 / 4px 4px,
    #12110e;
  animation: poster-in 0.5s steps(4, end) both;
}

.chapter-card-paper {
  min-width: 34%;
  padding: 2.4% 3.6%;
  transform: rotate(-1deg);
  border: 3px solid var(--ink);
  border-top: 16px solid var(--print-red);
  background:
    linear-gradient(90deg, rgba(29, 70, 116, 0.08) 1px, transparent 1px) 0 0 / 9px 9px,
    var(--paper);
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.6);
}

.chapter-card-kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 2px 10px;
  background: var(--ink);
  color: #f6eedb;
  font: 700 clamp(12px, 1vw, 18px) SimSun, STSong, serif;
  letter-spacing: 0.2em;
}

.chapter-card-paper p {
  margin: 0.35em 0;
  color: var(--ink);
  font: 900 clamp(20px, 2.3vw, 42px)/1.35 SimSun, STSong, serif;
  animation: line-in 0.5s steps(4, end) both;
}

.chapter-card-paper p:last-child {
  color: var(--print-red);
}

.chapter-card-skip {
  position: absolute;
  right: 3%;
  bottom: 4%;
  padding: 4px 12px;
  border: 2px outset #fff;
  border-radius: 0;
  background: var(--system-panel);
  font: 12px SimSun, STSong, serif;
  cursor: pointer;
}

@keyframes line-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* 结尾总结 */

.ending-summary {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(14, 13, 11, 0.55);
  color: #f6eedb;
  font-family: SimSun, STSong, serif;
  animation: poster-in 0.8s ease both;
}

.ending-lines {
  text-align: center;
  animation: poster-out 0.8s ease both;
}

.ending-lines p {
  margin: 0.5em 0;
  font: 700 clamp(18px, 2vw, 36px)/1.4 SimSun, STSong, serif;
  text-shadow: 2px 2px 0 #000;
  animation: line-in 1s ease both;
}

.ending-lines p:last-child {
  margin-top: 1.1em;
  color: #ffd2cf;
  font-size: clamp(22px, 2.6vw, 46px);
}

.ending-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: rgba(14, 13, 11, 0.94);
  animation: poster-in 1.4s ease both;
}

.ending-title h2 {
  margin: 0;
  color: var(--paper);
  font: 900 clamp(64px, 8vw, 150px)/1 SimSun, STSong, serif;
  letter-spacing: 0.2em;
  text-shadow: 5px 5px 0 var(--print-red);
}

.ending-title p {
  margin: 0;
  font: 700 clamp(18px, 1.8vw, 32px) SimSun, STSong, serif;
  letter-spacing: 0.14em;
}

.ending-stamp {
  padding: 4px 16px;
  transform: rotate(-3deg);
  border: 4px double var(--print-red);
  color: #ffb8b2;
  font: 900 clamp(14px, 1.2vw, 22px) SimSun, STSong, serif;
  letter-spacing: 0.3em;
}

.ending-restart {
  margin-top: 10px;
  padding: 6px 18px;
  border: 2px outset #fff;
  border-radius: 0;
  background: var(--system-panel);
  color: var(--ink);
  font: 700 clamp(14px, 1.1vw, 20px) SimSun, STSong, serif;
  cursor: pointer;
}
