/* Illustrated chapter signatures: the plate stays still while its small printed motif moves. */
.dateSignature {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(25px, 3vw, 36px);
  margin-top: 4px;
  color: #dfb677;
  border-block: 1px solid #ae895459;
  background: linear-gradient(105deg, #172b40, #21384a 52%, #172b40);
  overflow: hidden;
  pointer-events: none;
}
.dateSignature::before, .dateSignature::after {
  content: ""; position: absolute; top: 50%; width: calc(50% - 29px); height: 3px;
  border-block: 1px solid #c5a27570;
}
.dateSignature::before { left: 0 }
.dateSignature::after { right: 0 }
.signatureMark { width: 42px; height: 22px; position: relative }
.signatureMark i { display: block; position: absolute }
.dateSignature[data-partner="a"] .signatureMark { width: 22px; border: 1.5px solid; border-radius: 50%; background: radial-gradient(circle, #e8c689 1.4px, transparent 1.8px) }
.dateSignature[data-partner="a"] i { height: 7px; width: 1.5px; background: currentColor; left: calc(50% - .75px); bottom: 50%; transform-origin: bottom }
.dateSignature[data-partner="a"] i:nth-child(2) { height: 5px; transform: rotate(115deg) }
.dateSignature[data-partner="a"] i:nth-child(3) { display: none }
.dateSignature[data-partner="b"] i { width: 15px; height: 9px; border: 1.5px solid; border-radius: 50%; bottom: 3px; left: 5px; rotate: -12deg }
.dateSignature[data-partner="b"] i:nth-child(2) { left: 19px; bottom: 6px; color: #ed997b }
.dateSignature[data-partner="b"] i:nth-child(3) { width: 3px; height: 14px; left: 25px; bottom: 2px; background: #e2c391; border: 0; z-index: -1 }
.dateSignature[data-partner="b"] .signatureMark { isolation: isolate }
.dateSignature[data-partner="c"] .signatureMark { overflow: hidden; border-block: 1px solid; height: 19px }
.dateSignature[data-partner="c"] i:first-child { inset: 3px -20px; border-block: 1px solid; background: repeating-linear-gradient(90deg, transparent 0 10px, currentColor 10px 12px) }
.dateSignature[data-partner="c"] i:nth-child(2),.dateSignature[data-partner="c"] i:nth-child(3) { inset: 0 -20px auto; height: 2px; background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 6px) }
.dateSignature[data-partner="c"] i:nth-child(3) { top: auto; bottom: 0 }
.dateSignature[data-partner="d"] .signatureMark { border-top: 1px solid }
.dateSignature[data-partner="d"] i { width: 9px; height: 16px; left: 3px; top: 1px; background: repeating-linear-gradient(145deg,#87b0b5 0 3px,#435f7a 3px 5px); transform-origin: 50% 0 }
.dateSignature[data-partner="d"] i:nth-child(2) { left: 16px; height: 19px }
.dateSignature[data-partner="d"] i:nth-child(3) { left: 29px; height: 14px }
.dateSignature[data-partner="e"] .signatureMark { background: linear-gradient(currentColor,currentColor) center / 34px 1px no-repeat }
.dateSignature[data-partner="e"] i { border: 1px solid; border-radius: 50%; width: 6px; height: 6px; background: #21384a; left: 3px; top: 8px }
.dateSignature[data-partner="e"] i:nth-child(2) { left: auto; right: 3px }
.dateSignature[data-partner="e"] i:nth-child(3) { left: 7px; width: 7px; height: 7px; background: #ea9875; border: 0; top: 7.5px; transform: rotate(45deg); border-radius: 1px }
.dateSignature[data-partner="f"] .signatureMark { width: 22px; border-radius: 50%; border: 1px solid; background: repeating-radial-gradient(circle,#1a2c39 0 2px,#85765e 2px 3px) }
.dateSignature[data-partner="f"] i:first-child { inset: 6px; border-radius: 50%; background: #e8aa80 }
.dateSignature[data-partner="f"] i:nth-child(2) { left: 4px; top: 3px; height: 10px; width: 2px; background: #ead3ac; transform: rotate(35deg) }
.chapterTrack { width: min(9.2rem,100%); padding: .65rem .3rem .25rem }
.chapterTrack span { display: flex; position: relative; align-items:center; justify-content:space-between; height: 8px; background: linear-gradient(#8c7e656b,#8c7e656b) center / 100% 1px no-repeat }
.chapterTrack span::before { content:""; position:absolute; inset: 3px 0; background:#d89c66; transform-origin:left; transform:scaleX(calc(var(--current) / 3)) }
.chapterTrack i { position:relative; width:7px; height:7px; rotate:45deg; border:1px solid #bb9b75; background:#192a3e }
.chapterTrack .visited { background:#caa779 }
.chapterTrack .here { background:#ed9566; outline:1px solid #e5b486; outline-offset:2px }
.affinity { position: relative }
.affinity meter { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); margin: 0; overflow:hidden }
.affinityTrack { position:relative; display:block; margin-top:.45rem; height:8px; overflow:hidden; background:#d5bf9e }
.affinityTrack i { position:absolute; inset:0; transform-origin:left; transform:scaleX(var(--after)); background:linear-gradient(90deg,#ab3a24,#cd6642) }
.dateBody .choice,.dateBody .option,.endActions button { touch-action: manipulation }
.dateBody .choice:focus-visible,.dateBody .option:focus-visible,.endActions button:focus-visible { outline:2px solid #e6ab77;outline-offset:2px }
@media (prefers-reduced-motion: no-preference) {
  /* The opening plays once. Neither curtain moves the illustration or holds up the controls. */
  .page-opening .actPrint .cinemaArt { animation: none }
  .page-opening .actPrint::before,.page-opening .actPrint::after {
    content:""; pointer-events:none;position:absolute;z-index:1;inset:0 50% 0 0;
    background:repeating-linear-gradient(90deg,#172b42 0 8px,#21364a 9px 10px,#172b42 11px 17px);
    border-right:2px solid #c69967;animation:dateCurtainLeft .8s cubic-bezier(.32,.02,.21,1) both;
  }
  .page-opening .actPrint::after { inset:0 0 0 50%;border-right:0;border-left:2px solid #c69967;animation-name:dateCurtainRight }
  .page-filter .dateCopy h2,.page-cast .indexHeader h2,.page-opening .cinemaCopy h1 { animation:dateTypeset .5s ease-out both }
  .page-bridge .dateVisual,.page-scene .dateVisual { animation:dateMount .62s ease-out backwards }
  .dateSignature[data-partner="a"] i:first-child { animation:dateClock 3s steps(12,end) }
  .dateSignature[data-partner="b"] i:nth-child(2) { animation:dateRing 1.3s .12s cubic-bezier(.3,.1,.36,1) 2 }
  .dateSignature[data-partner="c"] i { animation:dateFilm 1s steps(8,end) 3 }
  .dateSignature[data-partner="d"] i { animation:dateCloth 1.65s ease-in-out 2 }
  .dateSignature[data-partner="d"] i:nth-child(2) { animation-delay:.15s }
  .dateSignature[data-partner="d"] i:nth-child(3) { animation-delay:.29s }
  .dateSignature[data-partner="e"] i:nth-child(3) { animation:dateJourney 2.5s ease-in-out alternate 2 }
  .dateSignature[data-partner="f"] .signatureMark { animation:dateSpin 2s linear 2 }
  .enterTrack span::before { animation:dateTrackIn .65s ease-out both }
  .enterTrack .here { animation:dateStop .7s ease-out backwards }
  .dateSpread .dateHeading h2 { animation:dateTypeset .38s ease-out backwards }
  .dateSpread .datePlace { animation:datePlace .48s ease-out backwards }
  .dateBody .prose p.dateCueSeen,.endBody.dateCueSeen > p:first-child { animation:dateVoice .4s ease-out backwards }
  .page-reply .dateBody .prose p.dateCueSeen { animation-duration:.54s }
  .page-reply .dateBody .prose p:nth-child(2).dateCueSeen { animation-delay:.09s }
  .dateSpread .dateBody :is(.choice,.option).dateCueSeen,.dateDesk .senderChoice.dateCueSeen { animation:dateAnswer .34s ease-out backwards }
  .dateBody :is(.choice,.option):nth-last-child(2).dateCueSeen { animation-delay:.05s }
  .dateBody :is(.choice,.option):last-child.dateCueSeen { animation-delay:.09s }
  .dateBody button:active,.endActions button:active { translate:0 1px }
  .page-reply[data-new-reply] .replyChoice { animation:dateUnderline .45s ease-out both }
  .page-reply[data-new-reply] .affinity.dateCueSeen .affinityTrack i { animation:dateGain .82s cubic-bezier(.25,.7,.22,1) both }
  .page-reply[data-new-reply] .affinity.dateCueSeen em { animation:dateGainMark .65s ease-out backwards }
  .page-reward .stillCanvas { animation:stillArrives .6s ease-out }
  .rewardPrint.dateCueSeen figcaption strong { animation:dateTypeset .5s .17s ease-out backwards }
  .dateEnding .endHeading.dateCueSeen .endStamp,.passStub strong { animation:dateSeal .56s cubic-bezier(.23,.7,.3,1) backwards }
  .dateEnding .endHeading.dateCueSeen h1 { animation:dateTypeset .55s .09s ease-out backwards }
  .dateEnding .endHeading.dateCueSeen blockquote { animation:dateVoice .55s .18s ease-out backwards }
  .dateEnding[data-outcome="farewell"] .endHeading.dateCueSeen blockquote { animation:dateDusk .85s ease-out backwards }
  .stillSheet { animation:dateMount .4s ease-out backwards }
}
@keyframes dateCurtainLeft { to { transform:translateX(-101%) } }
@keyframes dateCurtainRight { to { transform:translateX(101%) } }
@keyframes dateClock { to { transform:rotate(1turn) } }
@keyframes dateRing { 0% { transform:translate(-15px,-10px) rotate(-24deg);opacity:.5 } 65% { transform:translate(1px,1px) rotate(5deg) } 82% { transform:translate(-1px,-1px) } 100% { transform:none } }
@keyframes dateFilm { to { transform:translateX(12px) } }
@keyframes dateCloth { 0%,100% { transform:skewX(0) } 35% { transform:skewX(13deg) } 75% { transform:skewX(-8deg) } }
@keyframes dateJourney { 0%,12% { translate:0 } 86%,100% { translate:20px } }
@keyframes dateSpin { to { transform:rotate(1turn) } }
@keyframes dateTrackIn { from { transform:scaleX(calc(var(--previous) / 3)) } }
@keyframes dateStop { 0% { box-shadow:0 0 0 0 #f2bf8a } 85% { box-shadow:0 0 0 6px #f2bf8a00 } }
@keyframes dateMount { from { opacity:.74;transform:translateY(5px) } to { opacity:1;transform:none } }
@keyframes dateTypeset { from { opacity:.35;transform:translateY(3px) } to { opacity:1;transform:none } }
@keyframes datePlace { from { opacity:.45;translate:6px 0 } to { opacity:1;translate:0 } }
@keyframes dateVoice { from { opacity:.66;translate:0 5px } to { opacity:1;translate:0 } }
@keyframes dateAnswer { from { opacity:.7;translate:-7px 0 } to { opacity:1;translate:0 } }
@keyframes dateUnderline { 0% { box-shadow:inset 4px 0 #e3a06b;background-color:#eebf771c } 100% { box-shadow:inset 0 0 transparent;background-color:transparent } }
@keyframes dateGain { from { transform:scaleX(var(--before)) } to { transform:scaleX(var(--after)) } }
@keyframes dateGainMark { 0% { opacity:.3;transform:translateY(6px) rotate(-5deg) } 65% { transform:translateY(-2px) rotate(1deg) } 100% { opacity:1;transform:none } }
@keyframes stillArrives { from { opacity:.76 } to { opacity:1 } }
@keyframes dateSeal { 0% { opacity:0;transform:translateY(-5px) rotate(-7deg) scale(1.18) } 72% { opacity:1;transform:rotate(-2deg) scale(.97) } }
@keyframes dateDusk { from { opacity:.38 } to { opacity:1 } }

/* Light belongs to the setting. Only this translucent print layer drifts. */
.datePlate { position:relative;isolation:isolate;outline:1px solid #bc976755;outline-offset:3px;overflow:hidden }
.datePlate .chapterPrint { outline:0 }
@media (prefers-reduced-motion:no-preference) {
  .datePlate::after { content:"";position:absolute;pointer-events:none;inset:0;opacity:0 }
  .datePlate[data-light="river"]::after {
    inset:73% 0 0;background:repeating-linear-gradient(177deg,transparent 0 9px,#f5cc92 10px,transparent 12px 18px);
    mask-image:linear-gradient(90deg,transparent 5%,#0008 40%,#000 65%,transparent 100%);
    animation:dateReflections 5.5s ease-in-out infinite;
  }
  .datePlate[data-light="film"]::after {
    background:conic-gradient(from 64deg at 2% 66%,transparent 0deg,#ffdf997d 4deg,#f9d29742 24deg,transparent 28deg);
    animation:dateLamplight 6s ease-in-out infinite;
  }
  .datePlate[data-light="train"]::after {
    inset:56% -25% 5%;background:linear-gradient(108deg,transparent 35%,#ffdb9d50 45%,transparent 54%);
    animation:datePassingLight 7s ease-in-out infinite;
  }
  .datePlate[data-light="lantern"]::after {
    background:radial-gradient(ellipse at 8% 12%,#ffbc6559,transparent 45%),radial-gradient(ellipse at 88% 78%,#f9a66b26,transparent 37%);
    animation:dateLamplight 5.8s ease-in-out infinite;
  }
}
@keyframes datePassingLight { 0%,46%,100% { transform:translateX(-38%);opacity:0 } 62% { opacity:.75 } 90% { transform:translateX(38%);opacity:0 } }
@keyframes dateLamplight { 0%,100% { opacity:.1 } 52% { opacity:.78 } 76% { opacity:.39 } }
@keyframes dateReflections { 0%,100% { translate:-4px 0;opacity:.04 } 52% { translate:4px 2px;opacity:.22 } }

.livingStill { position:relative;display:block;width:100%;aspect-ratio:3/2;line-height:0 }
.livingStill img { display:block;width:100%;height:auto }
.livingStill video { position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none }
.livingStill[data-playing] video { opacity:1 }
