/* This stage is mounted only during play. Its native portrait coordinates stay together. */
.play-screen .acting-mount {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.play-screen .stage { z-index: 1; }
.acting-stage, .acting-scenery, .acting-weather, .acting-cast, .acting-vignette, .acting-background {
  position: absolute;
  inset: 0;
}
.acting-stage {
  isolation: isolate;
  overflow: hidden;
  background: #302730;
  --figure-height: min(89svh, 87vw);
  --figure-top: max(3.35rem,9.5svh);
}
.acting-scenery { overflow: hidden; background: #302730; }
.acting-background {
  display: block;
  opacity: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 53% 43%;
  transition: opacity .7s ease;
}
.acting-background.in-view { opacity: 1; }
.acting-background[data-scene="office"] { object-position: 48% 42%; }
.acting-background[data-scene="rain"] { object-position: 51% 43%; }
.acting-background[data-scene="dawn"] { object-position: 52% 43%; }
.acting-background[data-scene="kiss"] { object-position: 61% 42%; }
.acting-background[data-scene="title"] { object-position: 77% 42%; }
.acting-background[data-scene="leon"] { object-position: 60% 42%; }
.acting-weather {
  overflow: hidden;
  opacity: 0;
  transition: opacity .65s ease;
  background: linear-gradient(180deg,rgba(65,82,100,.11),transparent 78%);
}
.acting-weather.raining, .acting-weather.lit { opacity: 1; }
.acting-weather.lit { background: radial-gradient(ellipse at 73% 12%, rgba(250,225,186,.11), transparent 52%); }
.acting-stage[data-background="scene"] .acting-weather.raining {
  mask-image: linear-gradient(#000 5%,rgba(0,0,0,.9) 21%,transparent 53%);
}
.acting-drop {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 1px;
  height: var(--length);
  opacity: 0;
  background: linear-gradient(transparent,rgba(226,233,238,.64),transparent);
}
.acting-cast { overflow: hidden; }
.acting-seat {
  --from: -1.2rem;
  --cx: calc(50% - min(14vw, 21svh));
  --breath: 5.95s;
  --delay: -3.1s;
  position: absolute;
  top: var(--figure-top);
  height: var(--figure-height);
  left: var(--cx);
  width: 0;
  z-index: 1;
  transition: left .68s cubic-bezier(.23,.67,.22,.99);
}
.acting-seat[data-actor="leon"] {
  top: calc(var(--figure-top) - min(2.3svh, 1.25rem));
  --from: 1.2rem;
  --cx: calc(50% + min(14vw, 21svh));
  --delay: -.47s;
  --breath: 6.8s;
}
.acting-cast.solo .acting-seat.present { --cx: 50%; }
.acting-seat.foreground { z-index: 2; }
.acting-entry, .acting-light, .acting-pose {
  position: relative;
  width: max-content;
  height: 100%;
}
.acting-entry {
  left: 0;
  opacity: 0;
  transform: translate3d(calc(-50% + var(--from)),.15rem,0);
  transition: opacity .52s ease, transform .66s cubic-bezier(.18,.66,.26,.99);
}
.acting-seat.ready.present .acting-entry {
  opacity: 1;
  transform: translate3d(-50%,0,0);
}
.acting-light { transition: filter .46s ease; }
.acting-seat.listening .acting-light { filter: brightness(.86) saturate(.91); }
.acting-pose {
  width: auto;
  aspect-ratio: var(--native-ratio,2 / 3);
  isolation: isolate;
  transform-origin: 50% 86%;
}
.acting-body { display: block; width: auto; height: 100%; max-width: none; }
.acting-patch, .acting-cheek {
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  max-width: none;
  opacity: 0;
  pointer-events: none;
}
.acting-patch { object-fit: fill; }
.acting-soft { z-index: 1; transition: opacity .16s ease-out; }
.acting-seat.soft .acting-soft.registered { opacity: 1; }
.acting-eyes, .acting-mouth { z-index: 3; }
.acting-pose.is-blinking .acting-eyes.registered,
.acting-pose.is-articulating .acting-mouth.registered { opacity: 1; }
.acting-cheek {
  z-index: 2;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(176,71,76,.28), rgba(200,102,107,.10) 48%, transparent 75%);
  transition: opacity 1.15s ease;
}
.acting-seat.soft:not(.has-soft) .acting-cheek { opacity: .68; }
.acting-vignette {
  background: linear-gradient(180deg,rgba(31,20,33,.6),rgba(31,20,33,.015) 17%,transparent 43%,rgba(31,20,33,.31) 77%,rgba(31,20,33,.75));
}
.acting-vignette.morning {
  background: linear-gradient(180deg,rgba(38,26,34,.58),transparent 19%,transparent 45%,rgba(42,26,38,.22) 73%,rgba(35,24,36,.66));
}
@media (prefers-reduced-motion: no-preference) {
  .acting-seat.ready.present .acting-pose {
    animation: acting-breathe var(--breath) ease-in-out var(--delay) infinite;
  }
  @keyframes acting-breathe {
    0%,100% { transform: translateY(0) rotate(0deg); }
    52% { transform: translateY(-.14rem) rotate(.13deg); }
  }
  .acting-weather.raining .acting-drop {
    animation: acting-drizzle var(--period) linear var(--offset) infinite;
  }
  @keyframes acting-drizzle {
    0% { transform: translate3d(0,-19px,0) rotate(13deg); opacity: 0; }
    17% { opacity: .52; }
    77% { opacity: .32; }
    100% { transform: translate3d(-20px,76px,0) rotate(13deg); opacity: 0; }
  }
  .acting-stage.suspended .acting-pose, .acting-stage.suspended .acting-drop { animation-play-state: paused; }
}
@media (max-width: 740px) {
  .acting-stage {
    --figure-height: min(78svh,143vw);
    --figure-top: max(4rem, 12svh);
  }
  .acting-seat { --cx: 28.5%; }
  .acting-seat[data-actor="leon"] { --cx: 71.5%; }
  .acting-vignette {
    background: linear-gradient(180deg,rgba(31,20,33,.67),rgba(31,20,33,.02) 15%,transparent 41%,rgba(31,20,33,.3) 67%,#211723 98%);
  }
  .play-screen .stage {
    padding-top: max(10rem, 33svh);
    padding-bottom: max(.75rem,calc(env(safe-area-inset-bottom) + .35rem));
  }
}
@media (max-height: 560px) and (min-width: 600px) {
  .acting-stage { --figure-top: 2.7rem; --figure-height: 96svh; }
  .play-screen .stage { padding-top: 30svh; }
  .play-screen .dialogue { padding-block: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .acting-background, .acting-weather, .acting-seat, .acting-entry, .acting-light, .acting-cheek, .acting-soft { transition: none; }
}

.acting-background[data-scene="postscript"] { object-position: 53% 30%; }
.acting-background[data-scene="dawnDoor"] { object-position: 65% 30%; }
.acting-background[data-scene="halfSpoon"] { object-position: 54% 30%; }
.acting-background[data-scene="unsent"] { object-position: 61% 30%; }

/* Give a landscape event picture room for both faces and the object between them. */
@media (max-width: 740px) and (orientation: portrait) {
  .acting-stage[data-mode="cg"] .acting-scenery::before {
    position: absolute;
    inset: -1.5rem;
    content: "";
    background: linear-gradient(0deg,#211723d9,#21172355), var(--revealed-art) center / cover;
    filter: blur(1rem);
  }
  .acting-stage[data-mode="cg"] .acting-background.in-view {
    top: max(2.8rem, 5.5svh);
    height: min(66svh, 108vw);
    mask-image: linear-gradient(180deg, transparent, #000 8%, #000 86%, transparent);
  }
  .end-screen::before {
    height: min(64svh, 104vw);
    mask-image: linear-gradient(180deg,#000 78%,transparent);
  }
  .end-screen[data-ending="dawnDoor"]::before {
    position: relative;
    inset: auto;
    order: 1;
    flex: none;
    z-index: 0;
    margin-bottom: -1.5rem;
  }
  .end-screen[data-ending="dawnDoor"] .end-content {
    order: 2;
    position: relative;
    z-index: 1;
    margin: 0;
    padding-top: 0;
  }
}

/* The alternate expression has its own registered lids and speaking lips. */
.soft-eyes, .soft-mouth { z-index: 3; }
.acting-seat.soft.has-soft.expression-eyes .acting-pose.is-blinking .acting-eyes,
.acting-seat.soft.has-soft.expression-mouth .acting-pose.is-articulating .acting-mouth { opacity: 0; }
.acting-seat.soft.has-soft .acting-pose.is-blinking .soft-eyes.registered,
.acting-seat.soft.has-soft .acting-pose.is-articulating .soft-mouth.registered { opacity: 1; }
