:root {
  color-scheme: dark;
  --ink: #080505;
  --paper: #f1dfbd;
  --paper-ink: #34241b;
  --wine: #6f1628;
  --wine-deep: #240406;
  --gold: #e2b979;
  --cream: #fff2df;
  --muted: #c9ad8e;
  --panel: rgba(22, 10, 9, 0.74);
  --line: rgba(236, 194, 128, 0.44);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--cream);
  font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 44px;
}

button:disabled {
  cursor: wait;
  opacity: .68;
}

.app-shell {
  min-height: 100svh;
  background: #050303;
}

.letter-scene,
.stage-scene {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(115, 35, 28, .18), transparent 38%),
    #090505;
}

.letter-scene.is-hidden-scene {
  display: none;
}

.stage-scene {
  display: none;
  place-items: center;
  isolation: isolate;
}

.stage-scene.is-active-scene {
  display: grid;
}

.letter-film {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(100vw, 177.78svh);
  height: min(100svh, 56.25vw);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 100px rgba(0, 0, 0, .85);
  isolation: isolate;
}

.letter-video,
.stage-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #060404;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.letter-video.is-active,
.stage-video.is-visible,
.stage-still.is-visible,
.stage-fallback.is-visible {
  opacity: 1;
  visibility: visible;
}

.letter-vignette {
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.05), transparent 34%, rgba(0,0,0,.22)),
    radial-gradient(circle at center, transparent 52%, rgba(0,0,0,.2));
}

.opening-panel {
  position: absolute;
  z-index: 20;
  left: 7%;
  bottom: 8%;
  width: min(520px, 44%);
  padding: 22px 26px;
  border: 1px solid rgba(255, 226, 174, .16);
  background: rgba(13, 8, 8, .48);
  backdrop-filter: blur(8px);
  transition: opacity .7s ease, transform .7s var(--ease), visibility .7s;
}

.opening-panel.is-hidden {
  opacity: 0;
  transform: translateY(18px);
  visibility: hidden;
  pointer-events: none;
}

.eyebrow,
.speaker {
  color: var(--gold);
  letter-spacing: 0;
}

.opening-panel h1,
.chapter-shell h2 {
  margin: 6px 0 10px;
  font-size: clamp(28px, 4.6vw, 58px);
  line-height: 1.25;
  letter-spacing: 0;
}

.opening-panel p {
  line-height: 1.8;
}

.opening-panel button,
.seal-button,
.dialogue-panel button,
.chapter-shell button,
.finale-panel button {
  border: 1px solid var(--line);
  color: var(--cream);
  background: rgba(233, 189, 122, .12);
  padding: 10px 18px;
  cursor: pointer;
}

.progress-label {
  position: absolute;
  z-index: 15;
  left: 18px;
  top: 18px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  color: rgba(255,245,223,.62);
  font-size: 12px;
  pointer-events: none;
}

.desktop-letter-form {
  position: absolute;
  z-index: 30;
  left: 36.4%;
  top: 15.8%;
  width: 27.4%;
  height: 39%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  color: var(--paper-ink);
  transform: perspective(900px) rotateX(.2deg);
}

.desktop-letter-form.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.letter-form-inner {
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2.2%;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.letter-kicker {
  margin: 0;
  color: #3d2a20;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 1.1vw, 18px);
  text-align: center;
}

.paper-field {
  display: grid;
  gap: 3px;
}

.paper-field > span,
.visibility legend {
  color: #3c2c22;
  font-size: clamp(16px, 1.05vw, 17px);
  font-weight: 700;
}

.paper-field input,
.paper-field textarea {
  width: 100%;
  padding: 4px 2px;
  border: 0;
  border-bottom: 1px solid rgba(81,55,41,.34);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #2f261f;
  font-size: clamp(16px, 1.05vw, 17px);
  line-height: 1.32;
}

.paper-field input::placeholder,
.paper-field textarea::placeholder {
  color: rgba(46, 36, 30, .62);
}

.paper-field input:focus,
.paper-field textarea:focus {
  border-bottom-color: rgba(121, 30, 50, .48);
}

.paper-field textarea {
  resize: none;
  min-height: 3em;
}

.paper-field small {
  justify-self: end;
  color: rgba(45,35,28,.7);
  font-size: clamp(11px, .72vw, 12px);
}

.visibility {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(16px, 1.02vw, 17px);
}

.visibility label {
  display: flex;
  gap: 5px;
  align-items: center;
  color: #342820;
}

.visibility input {
  accent-color: var(--wine);
}

.form-status {
  min-height: 1em;
  margin: 0;
  color: #7b2034;
  font-size: clamp(13px, .84vw, 14px);
}

.seal-button {
  align-self: center;
  padding: 7px 14px;
  background: linear-gradient(180deg, #8b2c42, #68192d);
  color: #fff7e7;
  font-size: clamp(16px, 1.02vw, 17px);
  font-weight: 700;
}

@media (min-width: 761px) and (max-height: 660px) {
  .letter-form-inner { gap: 1.4%; }
  .letter-kicker,
  .paper-field > span,
  .visibility legend,
  .paper-field input,
  .paper-field textarea,
  .visibility,
  .seal-button { font-size: 13px; }
  .paper-field textarea { min-height: 2.45em; }
  .paper-field small,
  .form-status { font-size: 10px; }
  .seal-button { padding: 5px 11px; }
}

.letter-form.is-sealing,
.mobile-letter-form.is-sealing {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.reveal-step {
  opacity: 0;
  transform: translateY(7px);
}

.is-visible .reveal-step,
.mobile-letter-form.is-visible .reveal-step {
  animation: revealUp .7s var(--ease) forwards;
}

.is-visible .reveal-step:nth-child(1),
.mobile-letter-form.is-visible .reveal-step:nth-child(1) { animation-delay: .55s; }
.is-visible .reveal-step:nth-child(2),
.mobile-letter-form.is-visible .reveal-step:nth-child(2) { animation-delay: .9s; }
.is-visible .reveal-step:nth-child(3),
.mobile-letter-form.is-visible .reveal-step:nth-child(3) { animation-delay: 1.2s; }
.is-visible .reveal-step:nth-child(4),
.mobile-letter-form.is-visible .reveal-step:nth-child(4) { animation-delay: 1.5s; }
.is-visible .reveal-step:nth-child(5),
.mobile-letter-form.is-visible .reveal-step:nth-child(5) { animation-delay: 1.75s; }
.is-visible .reveal-step:nth-child(6),
.mobile-letter-form.is-visible .reveal-step:nth-child(6) { animation-delay: 2s; }

@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

.mobile-letter-form {
  display: none;
}

.stage-media {
  width: min(100vw, 177.78svh);
  height: min(56.25vw, 100svh);
  max-width: 100vw;
  max-height: 100svh;
}

.stage-video {
  z-index: 2;
}

.stage-still,
.stage-fallback {
  z-index: 1;
}

.stage-fallback {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #f4ddbe;
  background:
    linear-gradient(90deg, rgba(68, 5, 5, .72), transparent 21%, transparent 79%, rgba(68, 5, 5, .72)),
    radial-gradient(circle at 50% 20%, rgba(236, 176, 95, .3), transparent 32%),
    #090605;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.stage-fallback.has-message {
  z-index: 11;
}

.curtains {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52vw;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 8px, rgba(0,0,0,.08) 8px 22px),
    linear-gradient(90deg, #3a0608, #8b1518 45%, #260405);
  box-shadow: inset 0 0 60px rgba(0,0,0,.55);
  transition: transform 930ms cubic-bezier(.73, 0, .22, 1);
}

.curtain-left {
  left: 0;
  transform: translateX(-100%);
}

.curtain-right {
  right: 0;
  transform: translateX(100%);
}

.curtains.is-closed .curtain-left,
.curtains.is-closed .curtain-right {
  transform: translateX(0);
}

.dialogue-panel,
.chapter-menu,
.chapter-shell,
.finale-panel {
  position: absolute;
  z-index: 12;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 360ms ease, transform 360ms ease;
}

.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dialogue-panel {
  left: 50%;
  bottom: clamp(10px, 2.2svh, 26px);
  width: min(780px, calc(100vw - 28px));
  padding: 12px 16px;
  transform: translate(-50%, 14px);
  background: rgba(22, 10, 9, .62);
  border: 1px solid rgba(236, 194, 128, .36);
  backdrop-filter: blur(7px);
}

.dialogue-panel.is-active {
  transform: translate(-50%, 0);
}

.speaker-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.line-progress {
  flex: 1;
  height: 2px;
  background: rgba(255, 238, 210, .2);
  position: relative;
}

.line-progress::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress-width, 0%);
  background: var(--gold);
}

.dialogue-line {
  margin: 8px 0 10px;
  min-height: 3.9em;
  white-space: pre-line;
  line-height: 1.52;
  font-size: clamp(16px, 1.75vw, 23px);
}

.chapter-menu {
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  align-content: center;
  gap: clamp(14px, 3vw, 30px);
  padding: 18svh clamp(18px, 6vw, 100px) 11svh;
}

.sign-rail {
  position: absolute;
  left: 8vw;
  right: 8vw;
  top: 17svh;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(232,190,128,.75), transparent);
}

.chapter-sign {
  position: relative;
  min-height: 220px;
  padding: 26px 18px 24px;
  border: 1px solid rgba(232,190,128,.58);
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(71, 28, 18, .94), rgba(24, 10, 8, .96)),
    #23100c;
  box-shadow: 0 22px 38px rgba(0,0,0,.34);
  transform: translateY(-80svh);
  opacity: 0;
  cursor: pointer;
}

.chapter-menu.is-active .chapter-sign {
  animation: signDrop 1.85s cubic-bezier(.22, .95, .25, 1) forwards;
}

.chapter-menu.is-active .chapter-sign:nth-of-type(2) { animation-delay: .26s; }
.chapter-menu.is-active .chapter-sign:nth-of-type(3) { animation-delay: .52s; }

.chapter-sign::before,
.chapter-sign::after {
  content: "";
  position: absolute;
  top: -18svh;
  width: 1px;
  height: 18svh;
  background: rgba(232,190,128,.48);
}

.chapter-sign::before { left: 24%; }
.chapter-sign::after { right: 24%; }

.chapter-sign span,
.chapter-sign em {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.chapter-sign strong {
  display: block;
  margin: 16px 0 12px;
  font-size: clamp(23px, 3vw, 36px);
  line-height: 1.32;
}

@keyframes signDrop {
  0% { opacity: 0; transform: translateY(-80svh) rotate(-1deg); }
  68% { opacity: 1; transform: translateY(7px) rotate(.7deg); }
  84% { transform: translateY(-2px) rotate(-.22deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0deg); }
}

.finale-link,
.easter-egg {
  grid-column: 1 / -1;
  justify-self: center;
}

.finale-link {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.32);
  color: var(--cream);
  padding: 10px 18px;
}

.finale-link.is-final-ready {
  animation: finaleReveal 560ms ease both;
}

@keyframes finaleReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.easter-egg {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(233, 189, 122, .64);
  opacity: 0;
}

.easter-egg.is-visible {
  opacity: 1;
}

.chapter-shell {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100svh - 28px);
  overflow: auto;
  padding: clamp(18px, 3vw, 32px);
  background: rgba(13, 7, 6, .78);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.chapter-shell header {
  text-align: center;
}

.chapter-shell h2 {
  font-size: clamp(28px, 4.2vw, 54px);
}

.chapter-media {
  aspect-ratio: 16 / 9;
  margin: 18px 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(232,190,128,.32);
  background: rgba(0,0,0,.28);
}

.chapter-media[hidden] {
  display: none;
}

.chapter-media-item {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #060303;
}

.chapter-story {
  line-height: 1.8;
  color: #ead8c2;
}

.chapter-shell.is-media-empty .chapter-story {
  max-width: 760px;
  margin: clamp(22px, 4svh, 42px) auto 22px;
  padding: clamp(22px, 4vw, 40px);
  border-top: 1px solid rgba(232,190,128,.18);
  border-bottom: 1px solid rgba(232,190,128,.18);
  background:
    radial-gradient(circle at 50% 0, rgba(232,190,128,.12), transparent 58%),
    linear-gradient(90deg, transparent, rgba(82,22,20,.12), transparent);
}

.finale-panel {
  width: min(720px, calc(100vw - 28px));
  padding: 24px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.finale-panel p {
  margin: 8px 0;
  font-size: clamp(22px, 3.4vw, 40px);
  line-height: 1.5;
}

.finale-panel strong {
  display: block;
  margin: 18px 0;
  color: var(--gold);
}

.finale-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* R6: one theater, four stage sets. */
.curtains {
  z-index: 60;
}

.dialogue-panel,
.chapter-menu,
.chapter-shell,
.finale-panel {
  z-index: 20;
}

.chapter-set {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  isolation: isolate;
}

.chapter-set--main {
  opacity: 0;
  visibility: hidden;
}

.chapter-set::before,
.chapter-set::after,
.set-light,
.set-backdrop,
.set-midground,
.set-foreground {
  position: absolute;
  inset: 0;
  content: "";
}

.chapter-set::before {
  z-index: 0;
}

.chapter-set::after {
  z-index: 1;
  top: auto;
  height: 34%;
  transform-origin: 50% 100%;
}

.set-light {
  z-index: 2;
  opacity: 0;
  transition: opacity 900ms ease, transform 1100ms var(--ease);
}

.set-light-left {
  transform: translateX(-3%);
}

.set-light-right {
  transform: translateX(3%);
}

.set-backdrop { z-index: 3; }
.set-midground { z-index: 4; }
.set-foreground { z-index: 6; }

.stage-scene.is-set-revealed .set-light {
  opacity: 1;
  transform: translateX(0);
}

.set-media-frame {
  position: absolute;
  z-index: 5;
  top: 28%;
  left: 50%;
  width: min(760px, 58vw);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 700ms ease 260ms, transform 900ms var(--ease) 260ms;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.set-media-frame[hidden] {
  display: none;
}

.stage-scene.is-set-revealed .set-media-frame:not([hidden]) {
  opacity: .92;
  transform: translate(-50%, 0);
}

.chapter-media-item {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

/* Memory set: sepia scrim, window shadow and an understated bench. */
.chapter-set--memory::before {
  background:
    linear-gradient(90deg, rgba(38, 21, 13, .86), rgba(92, 62, 37, .24) 48%, rgba(30, 18, 13, .78)),
    linear-gradient(180deg, rgba(44, 27, 18, .5), rgba(22, 14, 11, .38));
  backdrop-filter: sepia(.34) saturate(.68) brightness(.76);
}

.chapter-set--memory::after {
  background:
    radial-gradient(ellipse at 42% 100%, rgba(200, 139, 74, .2), transparent 58%),
    linear-gradient(180deg, transparent, rgba(48, 27, 15, .48));
}

.chapter-set--memory .set-light-left {
  background: linear-gradient(118deg, rgba(243, 187, 109, .33), rgba(218, 145, 71, .08) 31%, transparent 52%);
  clip-path: polygon(0 0, 34% 0, 58% 100%, 0 100%);
}

.chapter-set--memory .set-light-right {
  background: radial-gradient(ellipse at 78% 28%, rgba(157, 114, 71, .12), transparent 35%);
}

.chapter-set--memory .set-backdrop::before {
  position: absolute;
  top: 18%;
  left: 13%;
  width: 25%;
  height: 39%;
  content: "";
  border: 2px solid rgba(227, 186, 124, .2);
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(225, 184, 122, .18) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(180deg, transparent 49.5%, rgba(225, 184, 122, .18) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(135deg, rgba(221, 175, 108, .12), rgba(60, 39, 24, .06));
  box-shadow: 0 0 44px rgba(231, 171, 91, .07), inset 0 0 30px rgba(245, 208, 153, .05);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 850ms ease 220ms, transform 1050ms var(--ease) 220ms;
}

.chapter-set--memory .set-backdrop::after {
  position: absolute;
  inset: 12% 5% 18%;
  content: "";
  opacity: .18;
  background:
    repeating-linear-gradient(5deg, transparent 0 25px, rgba(232, 203, 159, .035) 26px 27px),
    repeating-linear-gradient(93deg, transparent 0 88px, rgba(226, 191, 137, .025) 89px 90px);
  mask-image: radial-gradient(ellipse at center, #000, transparent 75%);
}

.chapter-set--memory .set-midground::before {
  position: absolute;
  left: 10%;
  bottom: 17%;
  width: 31%;
  height: 11%;
  content: "";
  border: 1px solid rgba(219, 169, 102, .22);
  border-radius: 3px 3px 14px 14px;
  background:
    linear-gradient(90deg, rgba(230, 177, 105, .08), transparent 22% 78%, rgba(230, 177, 105, .08)),
    linear-gradient(180deg, rgba(65, 39, 23, .76), rgba(22, 15, 11, .9));
  box-shadow: 0 18px 20px rgba(0, 0, 0, .34), inset 0 1px rgba(241, 205, 149, .12);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 850ms ease 480ms, transform 1000ms var(--ease) 480ms;
}

.chapter-set--memory .set-midground::after {
  position: absolute;
  left: 12%;
  bottom: 11.5%;
  width: 27%;
  height: 7%;
  content: "";
  border-left: 5px solid rgba(39, 25, 16, .82);
  border-right: 5px solid rgba(39, 25, 16, .82);
}

.chapter-set--memory .set-foreground {
  opacity: 0;
  background:
    radial-gradient(circle at 17% 27%, rgba(255, 228, 173, .34) 0 1px, transparent 1.8px),
    radial-gradient(circle at 31% 54%, rgba(255, 220, 160, .25) 0 1px, transparent 1.8px),
    radial-gradient(circle at 68% 36%, rgba(255, 229, 179, .2) 0 1px, transparent 1.8px),
    radial-gradient(circle at 79% 61%, rgba(255, 222, 160, .24) 0 1px, transparent 1.8px),
    radial-gradient(circle at 54% 73%, rgba(255, 231, 186, .17) 0 1px, transparent 1.8px);
  animation: memoryDust 16s ease-in-out infinite alternate;
  transition: opacity 1200ms ease 720ms;
}

.stage-scene.is-set-revealed .chapter-set--memory .set-backdrop::before,
.stage-scene.is-set-revealed .chapter-set--memory .set-midground::before {
  opacity: 1;
  transform: translate(0);
}

.stage-scene.is-set-revealed .chapter-set--memory .set-foreground {
  opacity: .72;
}

@keyframes memoryDust {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(3px, -5px, 0); }
}

/* Present set: open champagne arch and warm shared pool of light. */
.chapter-set--present::before {
  background:
    linear-gradient(90deg, rgba(72, 20, 26, .52), transparent 20% 80%, rgba(72, 20, 26, .52)),
    linear-gradient(180deg, rgba(252, 224, 177, .2), rgba(91, 57, 35, .14) 64%, rgba(42, 25, 15, .28));
  backdrop-filter: saturate(.92) brightness(1.05);
}

.chapter-set--present::after {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 215, 147, .46), transparent 60%),
    linear-gradient(180deg, transparent, rgba(119, 76, 40, .12));
}

.chapter-set--present .set-light-left {
  background: radial-gradient(ellipse at 24% 24%, rgba(255, 226, 174, .38), transparent 40%);
}

.chapter-set--present .set-light-right {
  background: radial-gradient(ellipse at 76% 24%, rgba(255, 226, 174, .38), transparent 40%);
}

.chapter-set--present .set-backdrop::before {
  position: absolute;
  top: 13%;
  left: 50%;
  width: 54%;
  height: 58%;
  content: "";
  border: 2px solid rgba(255, 229, 183, .29);
  border-bottom-color: rgba(255, 229, 183, .08);
  border-radius: 50% 50% 4px 4px / 42% 42% 4px 4px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 239, 204, .26), rgba(235, 188, 119, .08) 54%, transparent 72%);
  box-shadow: 0 0 55px rgba(248, 205, 137, .13), inset 0 0 45px rgba(255, 232, 189, .08);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 850ms ease 260ms, transform 1050ms var(--ease) 260ms;
}

.chapter-set--present .set-midground::before,
.chapter-set--present .set-midground::after {
  position: absolute;
  bottom: 16%;
  width: 24%;
  height: 42%;
  content: "";
  opacity: 0;
  background:
    linear-gradient(65deg, transparent 0 45%, rgba(111, 105, 67, .24) 46% 48%, transparent 49%),
    linear-gradient(28deg, transparent 0 51%, rgba(72, 88, 59, .23) 52% 56%, transparent 57%),
    linear-gradient(112deg, transparent 0 59%, rgba(70, 84, 58, .18) 60% 64%, transparent 65%),
    linear-gradient(148deg, transparent 0 67%, rgba(81, 91, 62, .16) 68% 72%, transparent 73%);
  clip-path: polygon(0 100%, 13% 72%, 7% 58%, 27% 66%, 37% 40%, 31% 28%, 48% 35%, 62% 7%, 68% 35%, 91% 21%, 73% 54%, 100% 65%, 76% 74%, 84% 100%);
  transition: opacity 1000ms ease 620ms, transform 1100ms var(--ease) 620ms;
}

.chapter-set--present .set-midground::before {
  left: 3%;
  transform: translateX(-12px);
}

.chapter-set--present .set-midground::after {
  right: 3%;
  transform: scaleX(-1) translateX(-12px);
}

.chapter-set--present .set-foreground::before {
  position: absolute;
  left: 50%;
  bottom: 7%;
  width: 62%;
  height: 30%;
  content: "";
  background: radial-gradient(ellipse at center, rgba(255, 220, 159, .2), transparent 67%);
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 1100ms ease 760ms, transform 1200ms var(--ease) 760ms;
}

.stage-scene.is-set-revealed .chapter-set--present .set-backdrop::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.stage-scene.is-set-revealed .chapter-set--present .set-midground::before {
  opacity: 1;
  transform: translateX(0);
}

.stage-scene.is-set-revealed .chapter-set--present .set-midground::after {
  opacity: 1;
  transform: scaleX(-1) translateX(0);
}

.stage-scene.is-set-revealed .chapter-set--present .set-foreground::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Mahjong set: dark green felt, walnut rails and a restrained table lamp. */
.chapter-set--mahjong::before {
  background:
    linear-gradient(90deg, rgba(51, 10, 17, .58), transparent 19% 81%, rgba(51, 10, 17, .58)),
    linear-gradient(180deg, rgba(6, 25, 22, .7), rgba(12, 35, 30, .62) 61%, rgba(24, 18, 13, .52));
  backdrop-filter: saturate(.72) brightness(.68);
}

.chapter-set--mahjong::after {
  background:
    radial-gradient(ellipse at 50% 86%, rgba(193, 138, 72, .18), transparent 53%),
    linear-gradient(180deg, transparent, rgba(16, 8, 5, .55));
}

.chapter-set--mahjong .set-light-left {
  left: 50%;
  right: auto;
  width: 54%;
  background: linear-gradient(180deg, rgba(246, 203, 130, .2), rgba(227, 163, 76, .08) 58%, transparent);
  clip-path: polygon(43% 0, 57% 0, 100% 100%, 0 100%);
  transform: translateX(-50%) scaleX(.82);
}

.chapter-set--mahjong .set-light-right {
  display: none;
}

.stage-scene.is-set-revealed .chapter-set--mahjong .set-light-left {
  transform: translateX(-50%) scaleX(1);
}

.chapter-set--mahjong .set-backdrop::before {
  position: absolute;
  top: 3%;
  left: 50%;
  width: 16%;
  height: 4.8%;
  content: "";
  border: 1px solid rgba(246, 208, 142, .38);
  border-radius: 50%;
  background: linear-gradient(180deg, #8f6233, #332015 62%, #160e0a);
  box-shadow: 0 7px 24px rgba(242, 188, 104, .15), inset 0 1px rgba(255, 235, 193, .28);
  opacity: 0;
  transform: translate(-50%, -7px);
  transition: opacity 700ms ease 180ms, transform 900ms var(--ease) 180ms;
}

.chapter-set--mahjong .set-backdrop::after {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 4%;
  content: "";
  background: rgba(211, 172, 111, .38);
}

.chapter-set--mahjong .set-midground::before,
.chapter-set--mahjong .set-midground::after {
  position: absolute;
  top: 39%;
  width: 5.4%;
  aspect-ratio: 3 / 4;
  content: "";
  border: 1px solid rgba(229, 196, 139, .28);
  border-radius: 3px;
  background: linear-gradient(145deg, rgba(242, 228, 198, .17), rgba(191, 165, 116, .06));
  box-shadow:
    16px 9px 0 -1px rgba(226, 210, 178, .08),
    16px 9px 0 0 rgba(229, 196, 139, .2),
    32px 18px 0 -1px rgba(226, 210, 178, .05),
    32px 18px 0 0 rgba(229, 196, 139, .15);
  opacity: 0;
  transition: opacity 850ms ease 700ms, transform 900ms var(--ease) 700ms;
}

.chapter-set--mahjong .set-midground::before {
  left: 7%;
  transform: translateY(-4px);
}

.chapter-set--mahjong .set-midground::after {
  right: 9%;
  transform: scaleX(-1) translateY(-4px);
}

.chapter-set--mahjong .set-foreground::before {
  position: absolute;
  left: 50%;
  bottom: 5%;
  width: 58%;
  height: 28%;
  content: "";
  border: 6px solid rgba(92, 54, 29, .96);
  border-radius: 50% 50% 18% 18% / 40% 40% 18% 18%;
  background:
    radial-gradient(ellipse at 50% 32%, rgba(105, 145, 114, .22), transparent 55%),
    linear-gradient(180deg, #1b4c3c, #0d3028);
  box-shadow:
    0 14px 0 #29170f,
    0 26px 38px rgba(0, 0, 0, .5),
    inset 0 0 34px rgba(2, 15, 12, .62),
    inset 0 2px rgba(231, 183, 110, .28);
  opacity: 0;
  transform: translate(-50%, 14px) scale(.98);
  transition: opacity 900ms ease 460ms, transform 1100ms var(--ease) 460ms;
}

.chapter-set--mahjong .set-foreground::after {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 22%;
  height: 13%;
  content: "";
  clip-path: polygon(17% 0, 83% 0, 100% 100%, 0 100%);
  background: linear-gradient(90deg, #24130d, #624026 50%, #24130d);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 800ms ease 680ms, transform 1000ms var(--ease) 680ms;
}

.stage-scene.is-set-revealed .chapter-set--mahjong .set-backdrop::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.stage-scene.is-set-revealed .chapter-set--mahjong .set-midground::before {
  opacity: 1;
  transform: translateY(0);
}

.stage-scene.is-set-revealed .chapter-set--mahjong .set-midground::after {
  opacity: 1;
  transform: scaleX(-1) translateY(0);
}

.stage-scene.is-set-revealed .chapter-set--mahjong .set-foreground::before {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.stage-scene.is-set-revealed .chapter-set--mahjong .set-foreground::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Finale set: tighter curtains and one warm pool of light. */
.chapter-set--finale::before {
  background:
    linear-gradient(90deg, rgba(24, 2, 6, .88), transparent 29% 71%, rgba(24, 2, 6, .88)),
    rgba(5, 4, 4, .48);
  backdrop-filter: brightness(.48) saturate(.68);
}

.chapter-set--finale::after {
  background: radial-gradient(ellipse at 50% 100%, rgba(224, 158, 79, .22), transparent 50%);
}

.chapter-set--finale .set-light-left {
  left: 50%;
  right: auto;
  width: 52%;
  background: linear-gradient(180deg, rgba(255, 221, 163, .36), rgba(237, 174, 92, .08) 72%, transparent);
  clip-path: polygon(44% 0, 56% 0, 88% 100%, 12% 100%);
  transform: translateX(-50%) scaleX(.76);
}

.stage-scene.is-set-revealed .chapter-set--finale .set-light-left {
  transform: translateX(-50%) scaleX(1);
}

.chapter-set--finale .set-light-right {
  display: none;
}

.chapter-set--finale .set-backdrop::before {
  position: absolute;
  inset: 5% 8% auto;
  height: 8%;
  content: "";
  opacity: .42;
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 205, 127, .7) 0 2px, transparent 3px),
    radial-gradient(circle at 34% 50%, rgba(255, 205, 127, .62) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 50%, rgba(255, 205, 127, .7) 0 2px, transparent 3px),
    radial-gradient(circle at 66% 50%, rgba(255, 205, 127, .62) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 50%, rgba(255, 205, 127, .7) 0 2px, transparent 3px);
}

.chapter-set--finale .set-foreground::before,
.chapter-set--finale .set-foreground::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 17%;
  content: "";
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 7px, rgba(0,0,0,.07) 8px 19px),
    linear-gradient(90deg, #250307, #721019 58%, #2c0408);
  box-shadow: inset 0 0 42px rgba(0,0,0,.55);
  opacity: 0;
  transition: opacity 850ms ease 260ms, transform 1000ms var(--ease) 260ms;
}

.chapter-set--finale .set-foreground::before {
  left: 0;
  transform: translateX(-12%);
}

.chapter-set--finale .set-foreground::after {
  right: 0;
  transform: translateX(12%);
}

.stage-scene.is-set-revealed .chapter-set--finale .set-foreground::before,
.stage-scene.is-set-revealed .chapter-set--finale .set-foreground::after {
  opacity: .92;
  transform: translateX(0);
}

/* R6 chapter typography lives on the stage, never inside a card. */
.chapter-shell {
  inset: 0;
  width: 100%;
  max-height: none;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

.chapter-shell header {
  position: absolute;
  top: 12%;
  left: 12%;
  right: 12%;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .84);
}

body[data-set="mahjong"] .chapter-shell header {
  top: 13%;
}

.chapter-shell header::after {
  position: absolute;
  right: 14%;
  bottom: -14px;
  left: 14%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(241, 203, 141, .38), transparent);
}

.chapter-shell header > * {
  opacity: 0;
  transform: translateY(8px);
}

.chapter-shell header .eyebrow {
  margin: 0;
  font-size: 14px;
}

.chapter-shell h2 {
  margin: 7px 0 8px;
  font-size: 48px;
  line-height: 1.22;
}

#chapterSubtitle {
  margin: 0;
  color: rgba(255, 238, 212, .8);
  font-size: 17px;
}

.stage-scene.is-set-revealed .chapter-shell.is-active header .eyebrow {
  animation: setTitleIn 520ms var(--ease) 40ms forwards;
}

.stage-scene.is-set-revealed .chapter-shell.is-active header h2 {
  animation: setTitleIn 620ms var(--ease) 290ms forwards;
}

.stage-scene.is-set-revealed .chapter-shell.is-active header #chapterSubtitle {
  animation: setTitleIn 620ms var(--ease) 540ms forwards;
}

@keyframes setTitleIn {
  to { opacity: 1; transform: translateY(0); }
}

.chapter-story {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: min(740px, calc(100vw - 220px));
  margin: 0;
  padding: 13px 24px;
  color: rgba(255, 241, 220, .9);
  background: linear-gradient(90deg, transparent, rgba(14, 8, 6, .57) 14% 86%, transparent);
  line-height: 1.75;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .85);
  opacity: 0;
  transform: translate(-50%, 8px);
}

.chapter-shell.is-media-empty .chapter-story {
  max-width: none;
  margin: 0;
  padding: 13px 24px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(14, 8, 6, .57) 14% 86%, transparent);
}

.stage-scene.is-set-revealed .chapter-shell.is-active .chapter-story {
  animation: storyIn 720ms ease 820ms forwards;
}

@keyframes storyIn {
  to { opacity: 1; transform: translate(-50%, 0); }
}

.chapter-shell > button {
  position: absolute;
  right: 4%;
  bottom: 3.4%;
  min-height: 40px;
  padding: 8px 17px;
  border: 1px solid rgba(232, 190, 128, .58);
  background:
    linear-gradient(90deg, rgba(235, 200, 142, .05), rgba(93, 48, 27, .46), rgba(235, 200, 142, .05)),
    rgba(15, 9, 7, .66);
  box-shadow: inset 0 0 0 2px rgba(236, 194, 128, .08), 0 8px 22px rgba(0,0,0,.26);
  color: var(--cream);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: auto;
}

.stage-scene.is-set-revealed .chapter-shell.is-active > button {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms ease 980ms, transform 620ms var(--ease) 980ms, background 180ms ease;
}

.chapter-shell > button:hover,
.finale-panel button:hover {
  background-color: rgba(142, 87, 45, .42);
}

/* The existing cards become lighter, narrower theater placards. */
.chapter-menu {
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 30px;
  padding-right: max(6vw, calc((100vw - 1540px) / 2));
  padding-left: max(6vw, calc((100vw - 1540px) / 2));
}

.chapter-sign {
  min-height: 184px;
  padding: 23px 17px 21px;
  border: 1px solid rgba(213, 166, 95, .72);
  background:
    repeating-linear-gradient(4deg, rgba(255,255,255,.018) 0 2px, transparent 3px 10px),
    linear-gradient(180deg, rgba(82, 41, 25, .94), rgba(33, 16, 12, .98));
  box-shadow:
    inset 0 0 0 2px rgba(247, 214, 157, .07),
    inset 0 0 26px rgba(10, 3, 2, .44),
    0 18px 32px rgba(0,0,0,.34);
}

.stage-scene.is-set-revealed .chapter-menu.is-active .chapter-sign {
  animation: signDrop 1.85s cubic-bezier(.22, .95, .25, 1) forwards;
}

.chapter-menu.is-active .chapter-sign {
  animation: none;
}

.chapter-sign strong {
  margin: 13px 0 10px;
  font-size: 29px;
}

/* Finale copy is part of the set, not a panel. */
.finale-panel {
  top: 50%;
  left: 50%;
  width: min(820px, calc(100vw - 40px));
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  text-shadow: 0 3px 22px rgba(0,0,0,.92);
  transform: translate(-50%, calc(-50% + 14px));
}

.finale-panel.is-active {
  transform: translate(-50%, -50%);
}

.finale-panel p,
.finale-panel strong,
.finale-panel .finale-actions {
  opacity: 0;
  transform: translateY(9px);
}

.finale-panel p {
  margin: 6px 0;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: 38px;
  line-height: 1.48;
}

.finale-panel strong {
  margin: 21px 0 26px;
  color: #efc889;
  font-size: 18px;
  font-weight: 500;
}

.stage-scene.is-set-revealed .finale-panel.is-active p:first-child {
  animation: setTitleIn 650ms var(--ease) 120ms forwards;
}

.stage-scene.is-set-revealed .finale-panel.is-active p:nth-child(2) {
  animation: setTitleIn 650ms var(--ease) 360ms forwards;
}

.stage-scene.is-set-revealed .finale-panel.is-active strong {
  animation: setTitleIn 650ms var(--ease) 660ms forwards;
}

.stage-scene.is-set-revealed .finale-panel.is-active .finale-actions {
  animation: setTitleIn 650ms var(--ease) 900ms forwards;
}

.finale-actions {
  gap: 12px;
}

.finale-panel button {
  min-width: 136px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid rgba(227, 182, 112, .48);
  background:
    linear-gradient(180deg, rgba(111, 63, 36, .36), rgba(29, 16, 11, .62));
  box-shadow: inset 0 0 0 2px rgba(236, 194, 128, .06);
}

@media (max-width: 760px) {
  .letter-scene {
    min-height: 100svh;
    overflow-y: auto;
  }

  .letter-film {
    position: relative;
    width: 100vw;
    height: 100svh;
    aspect-ratio: auto;
  }

  .letter-video {
    height: 42svh;
    object-fit: cover;
    object-position: center center;
  }

  .letter-vignette {
    height: 42svh;
    bottom: auto;
  }

  .opening-panel {
    left: 16px;
    right: 16px;
    bottom: auto;
    top: 43svh;
    width: auto;
    background: transparent;
    border: 0;
    padding: 24px 4px;
    backdrop-filter: none;
  }

  .opening-panel h1 {
    font-size: clamp(25px, 7vw, 36px);
  }

  .desktop-letter-form {
    display: none;
  }

  .mobile-letter-form {
    display: block;
    position: absolute;
    z-index: 35;
    top: 39svh;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 0 14px max(14px, env(safe-area-inset-bottom));
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 0 6%, rgba(12,7,7,.72) 6% 100%);
  }

  .mobile-letter-form.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-paper {
    width: min(540px, 100%);
    margin: 0 auto;
    padding: 28px 22px 34px;
    background:
      linear-gradient(90deg, rgba(120,90,58,.035) 1px, transparent 1px) 0 0 / 32px 100%,
      var(--paper);
    box-shadow: 0 24px 50px rgba(0,0,0,.36);
    color: var(--paper-ink);
  }

  .mobile-paper .paper-field > span,
  .mobile-paper .visibility legend { font-size: 16px; }

  .mobile-paper .paper-field input,
  .mobile-paper .paper-field textarea { font-size: 16px; }

  .mobile-paper .visibility { font-size: 16px; }

  .mobile-paper .seal-button {
    margin-top: 10px;
    padding: 11px 18px;
    font-size: 16px;
  }

  .progress-label {
    top: 9px;
    left: 9px;
  }

  .stage-scene {
    align-items: stretch;
  }

  body[data-stage="A7_DIALOGUE"] .stage-scene::before,
  body[data-stage="A7_DIALOGUE"] .stage-scene::after {
    content: "";
    position: absolute;
    pointer-events: none;
  }

  body[data-stage="A7_DIALOGUE"] .stage-scene::before {
    z-index: 0;
    inset: -24px;
    background-image: url("./assets/image/stage/Hovic&Map_web_A7_END_stage_for_web.png");
    background-position: center;
    background-size: cover;
    filter: blur(18px) brightness(.42) saturate(.78);
    opacity: .88;
    transform: scale(1.08);
  }

  body[data-stage="A7_DIALOGUE"] .stage-scene::after {
    z-index: 0;
    inset: 0;
    background:
      linear-gradient(180deg, rgba(20,3,5,.12), rgba(11,3,4,.24) 44%, rgba(4,2,2,.56)),
      linear-gradient(90deg, rgba(32,4,8,.38), transparent 28%, transparent 72%, rgba(32,4,8,.38));
  }

  .stage-media {
    top: 0;
    margin-top: 0;
  }

  body[data-stage="A7_DIALOGUE"] .stage-still {
    top: clamp(40px, 6svh, 58px);
    bottom: auto;
    width: 100vw;
    height: auto;
    aspect-ratio: 16 / 9;
    background: transparent;
    object-fit: contain;
  }

  body[data-stage="A7_DIALOGUE"] .dialogue-panel {
    top: calc(clamp(40px, 6svh, 58px) + 56.25vw + clamp(18px, 3svh, 28px));
    bottom: auto;
    width: calc(100vw - 28px);
    max-height: calc(100svh - clamp(40px, 6svh, 58px) - 56.25vw - clamp(36px, 6svh, 58px));
    padding: 11px 14px 12px;
    overflow-y: auto;
    background: rgba(22, 10, 9, .72);
    backdrop-filter: blur(9px);
  }

  body[data-stage="A7_DIALOGUE"] .dialogue-line {
    min-height: 0;
    margin: 7px 0 9px;
    font-size: 16px;
    line-height: 1.6;
  }

  body[data-stage="A7_DIALOGUE"] .speaker-row {
    gap: 12px;
  }

  body[data-stage="A7_DIALOGUE"] .dialogue-panel button {
    min-height: 36px;
    padding: 6px 13px;
    font-size: 14px;
  }

  .chapter-menu {
    grid-template-columns: 1fr;
    align-content: start;
    overflow-y: auto;
    padding: 14svh 18px 9svh;
  }

  .sign-rail {
    display: none;
  }

  .chapter-sign {
    min-height: 150px;
  }

  .chapter-sign::before,
  .chapter-sign::after {
    height: 12svh;
    top: -12svh;
  }

  .chapter-shell {
    top: 50%;
    left: 50%;
    width: calc(100vw - 24px);
    max-height: calc(100svh - 24px);
    transform: translate(-50%, calc(-50% + 14px));
  }

  .chapter-shell.is-active {
    transform: translate(-50%, -50%);
  }

  .finale-actions {
    display: grid;
  }
}

/* R7M2R3: film-led theatre transitions. CSS only supports the physical plaque motion. */
.cinematic-film-transition {
  position: absolute;
  z-index: 91;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  background: #050203;
  opacity: 0;
  pointer-events: none;
  transition: opacity 520ms ease, visibility 0s linear 520ms;
}

.cinematic-film-transition.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 520ms ease;
}

.cinematic-film-transition.is-finishing {
  opacity: 0;
}

.cinematic-transition-film,
.cinematic-film-stack {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cinematic-transition-film {
  display: block;
  object-fit: cover;
  object-position: center;
  background: #050203;
  opacity: 0;
  transform: translateZ(0) scale(1.003);
  transition: opacity 460ms ease;
}

.cinematic-transition-film.is-playing {
  opacity: 1;
}

.cinematic-film-grade {
  position: absolute;
  z-index: 3;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 48%, transparent 48%, rgba(3, 1, 2, .2) 100%),
    linear-gradient(180deg, rgba(24, 8, 8, .08), transparent 24% 78%, rgba(3, 1, 2, .2));
  box-shadow: inset 0 0 90px rgba(0, 0, 0, .2);
  pointer-events: none;
}

.cinematic-curtain-reveal .cinematic-transition-film {
  z-index: 1;
}

.trilogy-answer-transition,
.trilogy-answer-transition.is-active {
  animation: none;
  background: transparent;
}

.trilogy-answer-transition .cinematic-film-stack {
  z-index: 2;
  background: #050203;
  opacity: 0;
  transition: opacity 560ms ease;
}

.trilogy-answer-transition.is-film-active .cinematic-film-stack {
  opacity: 1;
}

.stage-scene.is-plaques-retreating .chapter-set--main {
  --stage-art: url("./assets/image/stage/HovicMap_A7_empty_stage.png");
}

.trilogy-answer-transition .cinematic-envelope-film {
  z-index: 1;
}

.trilogy-answer-transition .cinematic-curtain-film {
  z-index: 2;
}

.trilogy-answer-transition .cinematic-film-grade {
  z-index: 3;
}

.trilogy-answer-transition.is-entering-answer {
  opacity: 0;
  transition: opacity 720ms ease;
}

.trilogy-answer-transition.is-active .answer-reveal-plaque,
.trilogy-answer-transition.is-active .answer-reveal-plaque::before,
.trilogy-answer-transition.is-active .answer-plaque-copy,
.trilogy-answer-transition.is-active .answer-plaque-chain {
  animation: none !important;
}

.answer-reveal-plaque {
  z-index: 8;
  top: 5%;
  width: clamp(430px, 48vw, 720px);
  aspect-ratio: 1125 / 735;
  border: 0;
  border-radius: 0;
  background: url("./assets/image/stage/舞台R6R2/吊牌.png") center / contain no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 24px 24px rgba(0, 0, 0, .56));
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -118vh) rotate(-.8deg);
}

.answer-reveal-plaque::before {
  display: none;
}

.answer-plaque-chain {
  display: none;
}

.answer-plaque-copy {
  inset: 49% 11% 7%;
  opacity: 1;
  transform: none;
}

.answer-plaque-copy small {
  color: #d8b77d;
  font-size: 12px;
}

.answer-plaque-copy strong {
  margin: 7px 0 6px;
  font-size: clamp(29px, 3vw, 44px);
}

.answer-plaque-copy em {
  max-width: 88%;
  color: rgba(255, 235, 203, .82);
  font-size: clamp(11px, .9vw, 14px);
}

.answer-plaque-copy b {
  margin-top: 8px;
  color: #f1d3a0;
  font-size: 12px;
}

.trilogy-answer-transition.is-active.is-answer-ready .answer-reveal-plaque {
  visibility: visible;
  animation: cinematic-answer-plaque-drop 1120ms cubic-bezier(.19, .74, .24, 1) forwards !important;
  cursor: pointer;
  pointer-events: auto;
}

@keyframes cinematic-answer-plaque-drop {
  0% {
    opacity: 0;
    transform: translate(-50%, -118vh) rotate(-.8deg);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, 1.2vh) rotate(.45deg);
  }
  86% {
    opacity: 1;
    transform: translate(-50%, -.45vh) rotate(-.18deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(0);
  }
}

@media (max-width: 760px) {
  .cinematic-transition-film {
    object-position: center;
  }

  .cinematic-film-grade {
    box-shadow: inset 0 0 42px rgba(0, 0, 0, .16);
  }

  .answer-reveal-plaque {
    top: 16%;
    width: min(96vw, 540px);
  }

  .answer-plaque-copy {
    inset: 48% 9% 6%;
  }

  .answer-plaque-copy small {
    font-size: 9px;
  }

  .answer-plaque-copy strong {
    margin: 3px 0;
    font-size: clamp(24px, 7.4vw, 31px);
  }

  .answer-plaque-copy em {
    max-width: 96%;
    font-size: 9px;
    line-height: 1.25;
  }

  .answer-plaque-copy b {
    margin-top: 3px;
    font-size: 9px;
  }
}

/* R7M1 - Encore: Answer Is Us */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.answer-encore {
  position: absolute;
  inset: 0;
  z-index: 36;
  display: grid;
  place-items: center;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  color: #fff8eb;
  background: #090505;
  transition: opacity 620ms ease, visibility 0s linear 620ms;
}

.answer-encore.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 620ms ease;
}

.answer-encore.is-closing {
  opacity: 0;
  pointer-events: none;
}

.answer-stage,
.answer-stage-bg,
.answer-stage-grade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.answer-stage {
  overflow: hidden;
  background: #100706;
}

.answer-stage-bg {
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.025);
  filter: brightness(.64) saturate(.86) contrast(1.06);
  transition: opacity 1100ms ease, filter 1100ms ease, transform 7s ease;
}

.answer-stage-grade {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(6, 2, 2, .28) 0%, transparent 27%, transparent 62%, rgba(7, 3, 3, .62) 100%),
    linear-gradient(90deg, rgba(10, 4, 4, .36), transparent 24%, transparent 76%, rgba(10, 4, 4, .36));
  pointer-events: none;
}

.answer-encore[data-answer-scene="answer-intro"] .answer-bg-finale,
.answer-encore[data-answer-scene="answer-ending"] .answer-bg-finale {
  opacity: 1;
}

.answer-encore[data-answer-scene="answer-dusk"] .answer-bg-memory,
.answer-encore[data-answer-scene="answer-letter"] .answer-bg-memory,
.answer-encore[data-answer-scene="answer-seat"] .answer-bg-memory,
.answer-encore[data-answer-scene="answer-bridge"] .answer-bg-memory {
  opacity: 1;
}

.answer-encore[data-answer-scene="answer-paths"] .answer-bg-memory {
  opacity: .72;
}

.answer-encore[data-answer-scene="answer-paths"] .answer-bg-present {
  opacity: .28;
}

.answer-encore[data-answer-scene="answer-chorus-1"] .answer-bg-present,
.answer-encore[data-answer-scene="answer-final-chorus"] .answer-bg-present {
  opacity: 1;
  filter: brightness(.78) saturate(.92) contrast(1.04);
  transform: scale(1);
}

.answer-light {
  position: absolute;
  z-index: 4;
  top: -11%;
  width: 32%;
  height: 88%;
  opacity: .28;
  background: linear-gradient(180deg, rgba(255, 224, 160, .54), rgba(255, 203, 112, .08) 68%, transparent);
  filter: blur(9px);
  clip-path: polygon(45% 0, 58% 0, 100% 100%, 0 100%);
  transform-origin: top center;
  transition: left 1100ms ease, right 1100ms ease, opacity 900ms ease, transform 1100ms ease;
}

.answer-light-left { left: 11%; transform: rotate(9deg); }
.answer-light-right { right: 11%; transform: rotate(-9deg); }

.answer-encore[data-answer-scene="answer-dusk"] .answer-light-left {
  left: 17%;
  opacity: .42;
}

.answer-encore[data-answer-scene="answer-dusk"] .answer-light-right {
  right: 17%;
  opacity: .2;
}

.answer-encore[data-answer-scene="answer-chorus-1"] .answer-light-left,
.answer-encore[data-answer-scene="answer-final-chorus"] .answer-light-left {
  left: 34%;
  opacity: .5;
  transform: rotate(4deg);
}

.answer-encore[data-answer-scene="answer-chorus-1"] .answer-light-right,
.answer-encore[data-answer-scene="answer-final-chorus"] .answer-light-right {
  right: 34%;
  opacity: .5;
  transform: rotate(-4deg);
}

.answer-paths {
  position: absolute;
  z-index: 5;
  inset: 0;
  opacity: 0;
  transition: opacity 800ms ease;
}

.answer-paths i {
  position: absolute;
  bottom: 10%;
  width: 39%;
  height: 38%;
  border-top: 2px solid rgba(246, 202, 119, .82);
  filter: drop-shadow(0 0 9px rgba(231, 162, 69, .55));
}

.answer-paths i:first-child {
  left: 10%;
  border-radius: 100% 0 0 0;
  transform: rotate(13deg);
}

.answer-paths i:last-child {
  right: 10%;
  border-radius: 0 100% 0 0;
  transform: rotate(-13deg);
}

.answer-encore[data-answer-scene="answer-paths"] .answer-paths,
.answer-encore[data-answer-scene="answer-final-chorus"] .answer-paths {
  opacity: .78;
}

.answer-letter-prop {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 38%;
  width: min(24vw, 350px);
  aspect-ratio: 1.55;
  opacity: 0;
  transform: translate(-50%, -34px) rotate(-2deg) scale(.9);
  transition: opacity 780ms ease, transform 1100ms cubic-bezier(.2, .75, .2, 1);
  filter: drop-shadow(0 24px 30px rgba(8, 2, 1, .46));
}

.answer-letter-paper {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(117, 78, 47, .62);
  background:
    linear-gradient(28deg, transparent 49.3%, rgba(132, 93, 57, .48) 50%, transparent 50.7%),
    linear-gradient(-28deg, transparent 49.3%, rgba(132, 93, 57, .48) 50%, transparent 50.7%),
    #e6cfaa;
  box-shadow: inset 0 0 28px rgba(103, 64, 30, .26), 0 1px 0 rgba(255, 248, 219, .7);
}

.answer-letter-paper::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  top: -28%;
  height: 67%;
  background: #ead6b3;
  border: 1px solid rgba(117, 78, 47, .5);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: bottom;
  transform: rotateX(16deg);
}

.answer-letter-thread {
  position: absolute;
  left: 11%;
  right: 11%;
  top: 50%;
  height: 3px;
  background: #a71924;
  box-shadow: 0 0 6px rgba(155, 20, 28, .4);
}

.answer-letter-thread::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 21px;
  height: 21px;
  border: 3px solid #a71924;
  border-radius: 50% 42% 50% 44%;
  transform: translate(-50%, -50%) rotate(18deg);
  background: rgba(125, 13, 23, .18);
}

.answer-encore[data-answer-scene="answer-letter"] .answer-letter-prop,
.answer-encore[data-answer-scene="answer-bridge"] .answer-letter-prop {
  opacity: 1;
  transform: translate(-50%, 0) rotate(-1deg) scale(1);
}

.answer-encore[data-answer-scene="answer-letter"] .answer-letter-prop,
.answer-encore[data-answer-scene="answer-bridge"] .answer-letter-prop {
  z-index: 6;
  left: 73.5%;
  top: 62%;
  width: min(8vw, 110px);
  opacity: .82;
  transform: translate(-50%, 0) rotate(-4deg) scale(1);
}

.answer-seat-prop {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 17%;
  width: min(31vw, 470px);
  height: 24%;
  opacity: 0;
  transform: translateX(-50%) translateY(28px);
  transition: opacity 700ms ease, transform 1000ms ease;
}

.answer-seat-prop i {
  position: absolute;
  bottom: 0;
  width: 42%;
  height: 70%;
  border: 7px solid #43271a;
  border-top-width: 12px;
  box-shadow: inset 0 0 0 2px rgba(191, 133, 67, .28), 0 15px 24px rgba(0, 0, 0, .32);
  background: repeating-linear-gradient(90deg, transparent 0 14%, rgba(69, 40, 26, .92) 15% 20%);
}

.answer-seat-prop i:first-child { left: 4%; transform: perspective(500px) rotateY(8deg); }
.answer-seat-prop i:last-child { right: 4%; transform: perspective(500px) rotateY(-8deg); }

.answer-encore[data-answer-scene="answer-seat"] .answer-seat-prop {
  opacity: .92;
  transform: translateX(-50%) translateY(0);
}

.answer-couple {
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
}

.answer-person {
  position: absolute;
  bottom: 17%;
  width: clamp(38px, 4.2vw, 72px);
  height: clamp(150px, 26vh, 275px);
  display: none;
  opacity: 0;
  background: none;
  clip-path: none;
  filter: drop-shadow(0 18px 15px rgba(0, 0, 0, .48));
  transition: left 1300ms ease, right 1300ms ease, opacity 850ms ease, transform 1300ms ease;
}

.answer-couple-art {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: min(31vw, 430px);
  max-height: 66vh;
  object-fit: contain;
  opacity: 0;
  transform: translateX(-50%) translateY(22px) scale(.94);
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, .46));
  transition: opacity 900ms ease, transform 1200ms cubic-bezier(.2, .76, .2, 1);
}

.answer-encore[data-answer-scene="answer-chorus-1"] .answer-couple-art,
.answer-encore[data-answer-scene="answer-final-chorus"] .answer-couple-art,
.answer-encore[data-answer-scene="answer-ending"] .answer-couple-art {
  opacity: .94;
  transform: translateX(-50%) translateY(0) scale(1);
}

.answer-encore[data-answer-scene="answer-seat"] .answer-couple-art,
.answer-encore[data-answer-scene="answer-bridge"] .answer-couple-art {
  opacity: .62;
  transform: translateX(-50%) translateY(8px) scale(.92);
}

.answer-person::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10%;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 48% 48% 45% 45%;
  background: linear-gradient(150deg, #30211d, #110c0c 75%);
  transform: translateX(-50%);
  box-shadow: 0 6px 8px rgba(0, 0, 0, .35);
}

.answer-person::after {
  content: "";
  position: absolute;
  inset: 7% 0 0;
  filter: drop-shadow(0 9px 10px rgba(0, 0, 0, .22));
}

.answer-person-groom { left: 22%; }

.answer-person-groom::after {
  background:
    linear-gradient(90deg, transparent 47%, rgba(237, 224, 209, .11) 48% 51%, transparent 52%),
    linear-gradient(100deg, #111010, #322a27 48%, #090909);
  clip-path: polygon(34% 0, 66% 0, 84% 8%, 100% 42%, 82% 49%, 73% 29%, 72% 100%, 54% 100%, 50% 54%, 46% 100%, 27% 100%, 28% 29%, 18% 50%, 0 43%, 16% 8%);
}

.answer-person-bride {
  right: 22%;
  width: clamp(48px, 5.5vw, 94px);
}

.answer-person-bride::before {
  background: linear-gradient(150deg, #5c473b, #1b1212 75%);
}

.answer-person-bride::after {
  background: linear-gradient(105deg, #9b8d7a, #eadfc7 50%, #756b61);
  clip-path: polygon(39% 0, 61% 0, 74% 11%, 71% 31%, 91% 100%, 9% 100%, 29% 31%, 26% 11%);
}

.answer-red-thread {
  position: absolute;
  left: 40%;
  right: 40%;
  bottom: 34%;
  height: 22px;
  opacity: 0;
  border-top: 2px solid #b01d28;
  border-radius: 50%;
  filter: drop-shadow(0 0 5px rgba(194, 33, 45, .54));
  transition: left 1200ms ease, right 1200ms ease, opacity 700ms ease;
}

.answer-encore[data-answer-scene="answer-dusk"] .answer-person {
  opacity: .64;
}

.answer-encore[data-answer-scene="answer-dusk"] .answer-person-groom { left: 25%; transform: scale(.86); }
.answer-encore[data-answer-scene="answer-dusk"] .answer-person-bride { right: 25%; transform: scale(.78); }

.answer-encore[data-answer-scene="answer-letter"] .answer-person,
.answer-encore[data-answer-scene="answer-paths"] .answer-person,
.answer-encore[data-answer-scene="answer-seat"] .answer-person,
.answer-encore[data-answer-scene="answer-bridge"] .answer-person {
  opacity: .48;
}

.answer-encore[data-answer-scene="answer-letter"] .answer-person-groom,
.answer-encore[data-answer-scene="answer-paths"] .answer-person-groom { left: 30%; transform: scale(.82); }
.answer-encore[data-answer-scene="answer-letter"] .answer-person-bride,
.answer-encore[data-answer-scene="answer-paths"] .answer-person-bride { right: 30%; transform: scale(.82); }

.answer-encore[data-answer-scene="answer-chorus-1"] .answer-person,
.answer-encore[data-answer-scene="answer-final-chorus"] .answer-person,
.answer-encore[data-answer-scene="answer-ending"] .answer-person {
  opacity: .9;
}

.answer-encore[data-answer-scene="answer-chorus-1"] .answer-person-groom,
.answer-encore[data-answer-scene="answer-final-chorus"] .answer-person-groom,
.answer-encore[data-answer-scene="answer-ending"] .answer-person-groom { left: 44%; transform: translateX(-100%); }

.answer-encore[data-answer-scene="answer-chorus-1"] .answer-person-bride,
.answer-encore[data-answer-scene="answer-final-chorus"] .answer-person-bride,
.answer-encore[data-answer-scene="answer-ending"] .answer-person-bride { right: 44%; transform: translateX(100%); }

.answer-encore[data-answer-scene="answer-chorus-1"] .answer-red-thread,
.answer-encore[data-answer-scene="answer-bridge"] .answer-red-thread,
.answer-encore[data-answer-scene="answer-final-chorus"] .answer-red-thread,
.answer-encore[data-answer-scene="answer-ending"] .answer-red-thread {
  opacity: .9;
  left: 44%;
  right: 44%;
}

.answer-dust {
  position: absolute;
  z-index: 9;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.answer-dust i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 226, 168, .75);
  box-shadow: 0 0 6px rgba(255, 215, 137, .5);
  animation: answerDust 8s linear infinite;
}

.answer-dust i:nth-child(1) { left: 12%; top: 30%; animation-delay: -1s; }
.answer-dust i:nth-child(2) { left: 21%; top: 46%; animation-delay: -6s; }
.answer-dust i:nth-child(3) { left: 31%; top: 26%; animation-delay: -3s; }
.answer-dust i:nth-child(4) { left: 39%; top: 55%; animation-delay: -7s; }
.answer-dust i:nth-child(5) { left: 48%; top: 37%; animation-delay: -2s; }
.answer-dust i:nth-child(6) { left: 57%; top: 24%; animation-delay: -5s; }
.answer-dust i:nth-child(7) { left: 66%; top: 48%; animation-delay: -4s; }
.answer-dust i:nth-child(8) { left: 75%; top: 31%; animation-delay: -8s; }
.answer-dust i:nth-child(9) { left: 84%; top: 52%; animation-delay: -2.5s; }
.answer-dust i:nth-child(10) { left: 91%; top: 35%; animation-delay: -5.5s; }

@keyframes answerDust {
  0% { transform: translate3d(0, 24px, 0); opacity: 0; }
  18% { opacity: .7; }
  80% { opacity: .35; }
  100% { transform: translate3d(18px, -42px, 0); opacity: 0; }
}

.answer-intro-panel {
  position: relative;
  z-index: 14;
  width: min(88vw, 900px);
  padding-bottom: 10vh;
  text-align: center;
  transition: opacity 520ms ease, transform 620ms ease;
}

.answer-question {
  margin: 0;
  font-family: "Noto Serif TC", "Microsoft JhengHei", serif;
  font-size: clamp(23px, 2.5vw, 42px);
  line-height: 1.55;
  text-shadow: 0 4px 18px rgba(0, 0, 0, .9);
  transition: opacity 600ms ease, transform 600ms ease;
}

.answer-title-lockup {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  opacity: 0;
  transform: translate(-50%, -35%);
  transition: opacity 650ms ease, transform 650ms ease;
}

.answer-title-lockup > span {
  display: block;
  margin-bottom: 8px;
  color: #e4be7c;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.answer-title-lockup h2 {
  margin: 0;
  font-family: "Noto Serif TC", "Microsoft JhengHei", serif;
  font-size: clamp(38px, 5vw, 78px);
  font-weight: 500;
  letter-spacing: 0;
  text-shadow: 0 7px 28px rgba(0, 0, 0, .86);
}

.answer-encore.is-intro-ready .answer-question {
  opacity: .42;
  transform: translateY(-72px) scale(.92);
}

.answer-encore.is-intro-ready .answer-title-lockup {
  opacity: 1;
  transform: translate(-50%, -20%);
}

.answer-encore.has-started .answer-intro-panel {
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
}

.answer-intro-actions,
.answer-ending-panel > div {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.answer-encore button {
  min-height: 44px;
  border: 1px solid rgba(225, 190, 126, .48);
  color: #fff7e8;
  background: rgba(28, 14, 12, .72);
  font: inherit;
  cursor: pointer;
}

.answer-primary {
  padding: 0 26px;
  background: #8e2930 !important;
  box-shadow: inset 0 1px 0 rgba(255, 241, 213, .25), 0 12px 30px rgba(0, 0, 0, .28);
}

.answer-secondary,
.answer-player-skip,
.answer-ending-panel button {
  padding: 0 20px;
}

.answer-skip-top {
  position: absolute;
  z-index: 18;
  top: max(22px, env(safe-area-inset-top));
  right: max(24px, env(safe-area-inset-right));
  padding: 0 18px;
  border-color: rgba(244, 218, 170, .25) !important;
  background: rgba(12, 7, 7, .42) !important;
}

.answer-lyrics {
  position: absolute;
  z-index: 16;
  left: 50%;
  bottom: calc(94px + env(safe-area-inset-bottom));
  width: min(86vw, 850px);
  min-height: 116px;
  padding: 12px 26px 18px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 500ms ease, transform 500ms ease;
  text-shadow: 0 3px 12px rgba(0, 0, 0, .96);
}

.answer-encore.has-started .answer-lyrics {
  opacity: 1;
  transform: translate(-50%, 0);
}

.answer-lyric-previous,
.answer-lyric-current,
.answer-lyric-next {
  margin: 0;
  letter-spacing: 0;
}

.answer-lyric-previous {
  min-height: 22px;
  color: rgba(255, 246, 228, .24);
  font-size: 14px;
}

.answer-lyric-current {
  min-height: 44px;
  padding: 5px 0 3px;
  color: #fff9ec;
  font-family: "Noto Serif TC", "Microsoft JhengHei", serif;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 600;
  line-height: 1.45;
}

.answer-lyric-current.is-changing {
  animation: answerLyricIn 300ms ease both;
}

.answer-lyric-next {
  min-height: 24px;
  color: rgba(255, 246, 228, .52);
  font-size: clamp(13px, 1.2vw, 17px);
  line-height: 1.5;
}

@keyframes answerLyricIn {
  from { opacity: .2; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.answer-hook {
  position: absolute;
  z-index: 17;
  left: 50%;
  top: 39%;
  width: min(90vw, 900px);
  color: #fff7e8;
  font-family: "Noto Serif TC", "Microsoft JhengHei", serif;
  font-size: clamp(42px, 7vw, 108px);
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -42%) scale(.94);
  text-shadow: 0 7px 35px rgba(91, 42, 19, .84);
  pointer-events: none;
}

.answer-encore.show-hook .answer-hook {
  animation: answerHookReveal 1500ms ease both;
}

@keyframes answerHookReveal {
  0% { opacity: 0; transform: translate(-50%, -34%) scale(.94); }
  25%, 70% { opacity: .96; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -58%) scale(1.015); }
}

.answer-player {
  position: absolute;
  z-index: 18;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 48px 46px minmax(180px, 1fr) 46px 48px 90px auto;
  align-items: center;
  gap: 10px;
  width: min(92vw, 980px);
  min-height: 66px;
  padding: 8px 12px;
  border: 1px solid rgba(213, 175, 111, .24);
  border-radius: 7px;
  background: rgba(15, 8, 8, .84);
  box-shadow: 0 16px 45px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 245, 225, .06);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 450ms ease, transform 450ms ease;
}

.answer-encore.has-started .answer-player {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.answer-icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px !important;
  padding: 0;
  border-radius: 50%;
  font-family: "Segoe UI Symbol", sans-serif !important;
  font-size: 18px !important;
}

.answer-time {
  color: rgba(255, 244, 224, .72);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  text-align: center;
}

.answer-seek-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
}

.answer-seek,
.answer-volume-wrap input {
  width: 100%;
  accent-color: #be8f4e;
  cursor: pointer;
}

.answer-seek {
  position: relative;
  z-index: 2;
  height: 24px;
  margin: 0;
  opacity: .01;
}

.answer-seek-fill {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, #c79551 0 var(--answer-progress, 0%), rgba(255, 240, 214, .18) var(--answer-progress, 0%) 100%);
  transform: translateY(-50%);
}

.answer-volume-wrap {
  display: flex;
  align-items: center;
}

.answer-player-skip {
  min-height: 44px !important;
  white-space: nowrap;
}

.answer-ending-panel {
  position: absolute;
  z-index: 19;
  left: 50%;
  top: 44%;
  width: min(88vw, 720px);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -42%);
  pointer-events: none;
  transition: opacity 650ms ease, transform 650ms ease;
}

.answer-ending-panel > p {
  margin: 0;
  color: #fff7e8;
  font-family: "Noto Serif TC", "Microsoft JhengHei", serif;
  font-size: clamp(40px, 5.6vw, 80px);
  text-shadow: 0 8px 34px rgba(0, 0, 0, .88);
}

.answer-encore.is-finished .answer-ending-panel {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.answer-encore.is-finished .answer-lyrics {
  opacity: 0;
}

@media (max-width: 760px) {
  .answer-stage-bg {
    object-position: center top;
    filter: brightness(.58) saturate(.84) contrast(1.06);
  }

  .answer-intro-panel {
    width: 88vw;
    padding-bottom: 22vh;
  }

  .answer-question {
    font-size: clamp(22px, 6vw, 29px);
  }

  .answer-title-lockup h2 {
    font-size: clamp(38px, 11vw, 54px);
  }

  .answer-encore.is-intro-ready .answer-question {
    transform: translateY(-82px) scale(.9);
  }

  .answer-skip-top {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
  }

  .answer-light {
    height: 62%;
  }

  .answer-person {
    bottom: 37%;
    height: clamp(128px, 22vh, 190px);
  }

  .answer-couple-art {
    bottom: 34%;
    width: min(55vw, 290px);
    max-height: 42vh;
  }

  .answer-letter-prop {
    top: 30%;
    width: min(52vw, 250px);
  }

  .answer-encore[data-answer-scene="answer-letter"] .answer-letter-prop,
  .answer-encore[data-answer-scene="answer-bridge"] .answer-letter-prop {
    left: 86%;
    top: 62%;
    width: min(18vw, 68px);
    opacity: .76;
    transform: translate(-50%, 0) rotate(-4deg) scale(1);
  }

  .answer-seat-prop {
    bottom: 40%;
    width: min(64vw, 330px);
    height: 16%;
  }

  .answer-paths i {
    bottom: 34%;
  }

  .answer-red-thread {
    bottom: 49%;
  }

  .answer-hook {
    top: 34%;
    font-size: clamp(38px, 12vw, 58px);
  }

  .answer-lyrics {
    bottom: calc(106px + env(safe-area-inset-bottom));
    width: 94vw;
    min-height: 142px;
    padding: 12px 10px;
  }

  .answer-lyric-previous {
    font-size: 12px;
  }

  .answer-lyric-current {
    min-height: 58px;
    font-size: clamp(21px, 6vw, 27px);
    line-height: 1.4;
  }

  .answer-lyric-next {
    font-size: 14px;
  }

  .answer-player {
    grid-template-columns: 46px 40px minmax(0, 1fr) 40px 46px auto;
    grid-template-areas:
      "play elapsed seek duration mute skip";
    gap: 5px;
    width: calc(100vw - 16px);
    min-height: 78px;
    padding: 10px 8px max(10px, env(safe-area-inset-bottom));
  }

  .answer-player #answerPlayButton { grid-area: play; }
  .answer-player #answerElapsed { grid-area: elapsed; }
  .answer-player .answer-seek-wrap { grid-area: seek; }
  .answer-player #answerDuration { grid-area: duration; }
  .answer-player #answerMuteButton { grid-area: mute; }
  .answer-player #answerSkipButton { grid-area: skip; }
  .answer-volume-wrap { display: none; }

  .answer-player-skip {
    width: 48px;
    padding: 0 4px;
  }

  .answer-ending-panel {
    top: 39%;
  }

  .answer-ending-panel > p {
    font-size: clamp(38px, 11vw, 56px);
  }

  .answer-ending-panel > div {
    flex-direction: column;
    align-items: center;
  }

  .answer-ending-panel button {
    width: min(76vw, 290px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .answer-dust,
  .answer-paths,
  .answer-light {
    animation: none !important;
  }

  .answer-stage-bg,
  .answer-person,
  .answer-letter-prop,
  .answer-seat-prop,
  .answer-lyric-current,
  .answer-hook {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .chapter-shell h2 { font-size: 40px; }
  .chapter-sign strong { font-size: 25px; }
  .chapter-story { width: min(700px, calc(100vw - 170px)); }
}

@media (max-width: 760px) {
  .stage-fallback {
    width: 100vw;
    height: 100svh;
    max-width: none;
    max-height: none;
    background-position: center;
    background-size: cover;
  }

  .chapter-set {
    width: 100vw;
    height: 100svh;
  }

  .set-media-frame {
    top: 29%;
    width: calc(100vw - 34px);
  }

  .chapter-set--memory .set-light-left {
    clip-path: polygon(0 0, 52% 0, 84% 72%, 0 100%);
  }

  .chapter-set--memory .set-backdrop::before {
    top: 23%;
    left: 7%;
    width: 44%;
    height: 27%;
  }

  .chapter-set--memory .set-backdrop::after {
    inset: 16% 4% 18%;
  }

  .chapter-set--memory .set-midground::before {
    left: 9%;
    bottom: 27%;
    width: 48%;
    height: 8%;
  }

  .chapter-set--memory .set-midground::after {
    left: 13%;
    bottom: 22%;
    width: 40%;
    height: 6%;
  }

  .chapter-set--memory .set-foreground {
    background:
      radial-gradient(circle at 16% 34%, rgba(255, 228, 173, .3) 0 1px, transparent 1.8px),
      radial-gradient(circle at 70% 41%, rgba(255, 229, 179, .2) 0 1px, transparent 1.8px),
      radial-gradient(circle at 54% 68%, rgba(255, 231, 186, .16) 0 1px, transparent 1.8px);
  }

  .chapter-set--present .set-backdrop::before {
    top: 20%;
    width: 84%;
    height: 45%;
    border-radius: 49% 49% 4px 4px / 34% 34% 4px 4px;
  }

  .chapter-set--present .set-midground::before {
    bottom: 25%;
    width: 42%;
    height: 34%;
  }

  .chapter-set--present .set-midground::after {
    display: none;
  }

  .chapter-set--present .set-foreground::before {
    bottom: 19%;
    width: 96%;
    height: 24%;
  }

  .chapter-set--mahjong .set-light-left {
    width: 100%;
  }

  .chapter-set--mahjong .set-backdrop::before {
    top: 3.5%;
    width: 30%;
    height: 3.8%;
  }

  .chapter-set--mahjong .set-backdrop::after {
    height: 4%;
  }

  .chapter-set--mahjong .set-midground::before {
    top: 42%;
    left: 4%;
    width: 10%;
  }

  .chapter-set--mahjong .set-midground::after {
    top: 42%;
    right: 8%;
    width: 10%;
  }

  .chapter-set--mahjong .set-foreground::before {
    bottom: 19%;
    width: 92%;
    height: 22%;
    border-width: 4px;
  }

  .chapter-set--mahjong .set-foreground::after {
    bottom: 13%;
    width: 38%;
    height: 10%;
  }

  .chapter-set--finale .set-light-left {
    width: 100%;
  }

  .chapter-set--finale .set-foreground::before,
  .chapter-set--finale .set-foreground::after {
    width: 13%;
  }

  .chapter-shell {
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    max-height: none;
    overflow: hidden;
    transform: translateY(14px);
  }

  .chapter-shell.is-active {
    transform: translateY(0);
  }

  .chapter-shell header {
    top: 8.5%;
    left: 18px;
    right: 18px;
  }

  .chapter-shell header::after {
    right: 10%;
    left: 10%;
  }

  .chapter-shell header .eyebrow {
    font-size: 12px;
  }

  .chapter-shell h2 {
    margin: 6px 0 7px;
    font-size: 30px;
    line-height: 1.3;
  }

  body[data-set="mahjong"] .chapter-shell header {
    top: 9.5%;
  }

  body[data-set="mahjong"] .chapter-shell h2 {
    font-size: 25px;
  }

  #chapterSubtitle {
    font-size: 14px;
  }

  .chapter-story,
  .chapter-shell.is-media-empty .chapter-story {
    bottom: 8.5%;
    width: calc(100vw - 30px);
    padding: 10px 15px;
    font-size: 14px;
    line-height: 1.7;
    background: linear-gradient(90deg, transparent, rgba(12, 7, 6, .64) 8% 92%, transparent);
  }

  .chapter-shell > button {
    right: 14px;
    bottom: 2%;
    min-height: 38px;
    padding: 7px 13px;
    font-size: 14px;
  }

  .chapter-menu {
    gap: 14px;
    padding: 12svh 18px 6svh;
  }

  .chapter-sign {
    min-height: 138px;
    padding: 18px 14px 16px;
  }

  .chapter-sign strong {
    margin: 8px 0 7px;
    font-size: 23px;
  }

  .chapter-sign span,
  .chapter-sign em {
    font-size: 13px;
  }

  .finale-panel {
    width: calc(100vw - 36px);
  }

  .finale-panel p {
    font-size: 27px;
    line-height: 1.5;
  }

  .finale-panel strong {
    margin: 18px 0 22px;
    font-size: 16px;
  }

  .finale-actions {
    width: min(250px, 100%);
    margin: 0 auto;
    gap: 8px;
  }

  .finale-panel button {
    width: 100%;
    min-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* R6R1: scene-first correction. Each chapter reads without its title copy. */
.scenic {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  overflow: hidden;
}

.chapter-set--memory .scenic-memory,
.chapter-set--present .scenic-present,
.chapter-set--mahjong .scenic-mahjong,
.chapter-set--finale .scenic-finale {
  display: block;
}

.chapter-set--memory > .set-backdrop,
.chapter-set--memory > .set-midground,
.chapter-set--memory > .set-foreground,
.chapter-set--present > .set-backdrop,
.chapter-set--present > .set-midground,
.chapter-set--present > .set-foreground,
.chapter-set--mahjong > .set-backdrop,
.chapter-set--mahjong > .set-midground,
.chapter-set--mahjong > .set-foreground,
.chapter-set--finale > .set-backdrop,
.chapter-set--finale > .set-midground {
  display: none;
}

/* Main stage: three compact, weighty theater placards. */
.chapter-menu {
  grid-template-columns: repeat(3, minmax(0, 300px));
  justify-content: center;
  align-items: center;
  gap: clamp(30px, 3.2vw, 58px);
  padding: 20svh 5vw 10svh;
}

.sign-rail {
  display: none;
}

.chapter-sign {
  width: 100%;
  min-height: 168px;
  padding: 28px 22px 23px;
  overflow: visible;
  border: 1px solid #b88745;
  border-radius: 42% 42% 7px 7px / 18px 18px 7px 7px;
  background:
    linear-gradient(112deg, transparent 0 24%, rgba(255, 230, 177, .09) 26%, transparent 31%),
    repeating-linear-gradient(2deg, rgba(255,255,255,.018) 0 2px, rgba(0,0,0,.035) 3px 9px),
    linear-gradient(145deg, #6f3026, #3b1715 54%, #1f0b0c);
  box-shadow:
    inset 0 0 0 4px #351513,
    inset 0 0 0 5px rgba(215, 170, 99, .86),
    inset 0 0 0 9px rgba(44, 17, 14, .92),
    inset 0 0 0 10px rgba(194, 143, 73, .58),
    inset 0 12px 24px rgba(255, 216, 151, .07),
    inset 0 -16px 26px rgba(0, 0, 0, .42),
    0 9px 0 #160808,
    0 22px 32px rgba(0, 0, 0, .48);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
}

.chapter-sign:nth-of-type(2) { top: 12px; }
.chapter-sign:nth-of-type(3) { top: -6px; }

.chapter-sign::before,
.chapter-sign::after {
  top: -23svh;
  width: 2px;
  height: 23svh;
  border-radius: 2px;
  background: linear-gradient(90deg, #3f2818, #e0b46f 48%, #3a2518);
  box-shadow: 0 0 5px rgba(230, 187, 119, .42);
}

.chapter-sign::before { left: 25%; }
.chapter-sign::after { right: 25%; }

.chapter-sign span {
  color: #d5b98d;
  font-size: 14px;
}

.chapter-sign strong {
  margin: 11px 0 9px;
  color: #fff4df;
  font-size: 26px;
  line-height: 1.3;
}

.chapter-sign em {
  color: #cdbb9e;
  font-size: 14px;
}

.chapter-sign:hover {
  filter: brightness(1.08);
  background-color: transparent;
}

/* Act one: old window, lettered scrim, light shafts and a complete bench. */
.chapter-set--memory::before {
  background:
    linear-gradient(90deg, rgba(36, 18, 10, .44), rgba(106, 70, 38, .14) 44%, rgba(29, 16, 11, .52)),
    linear-gradient(180deg, rgba(74, 43, 23, .18), rgba(33, 18, 12, .42));
  backdrop-filter: sepia(.28) saturate(.78) brightness(.88);
}

.chapter-set--memory::after {
  height: 39%;
  background:
    radial-gradient(ellipse at 51% 98%, rgba(216, 152, 76, .32), transparent 59%),
    linear-gradient(180deg, transparent, rgba(48, 25, 13, .5));
}

.chapter-set--memory .set-light-left {
  opacity: .9;
  background: linear-gradient(118deg, rgba(255, 204, 124, .45), rgba(227, 151, 67, .16) 34%, transparent 57%);
  clip-path: polygon(0 0, 28% 0, 61% 100%, 2% 100%);
}

.memory-scrim {
  position: absolute;
  z-index: 1;
  top: 16%;
  left: 28%;
  width: 49%;
  height: 58%;
  border: 1px solid rgba(225, 183, 116, .27);
  background:
    repeating-linear-gradient(7deg, transparent 0 25px, rgba(87, 55, 31, .07) 26px 27px),
    repeating-linear-gradient(96deg, transparent 0 77px, rgba(107, 69, 37, .045) 78px 79px),
    radial-gradient(ellipse at 42% 28%, rgba(255, 229, 183, .2), transparent 42%),
    linear-gradient(135deg, rgba(183, 133, 72, .34), rgba(86, 54, 31, .23));
  box-shadow: inset 0 0 75px rgba(39, 20, 11, .44), 0 18px 45px rgba(0, 0, 0, .18);
  opacity: .74;
}

.memory-scrim::before,
.memory-scrim::after {
  position: absolute;
  left: 18%;
  right: 13%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(68, 41, 24, .34), transparent);
  box-shadow: 0 24px rgba(68, 41, 24, .19), 0 48px rgba(68, 41, 24, .16), 0 72px rgba(68, 41, 24, .12);
  transform: rotate(-1deg);
}

.memory-scrim::before { top: 48%; }
.memory-scrim::after { top: 67%; left: 32%; }

.memory-window {
  position: absolute;
  z-index: 4;
  top: 18%;
  left: 8%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 9px;
  width: 25%;
  height: 47%;
  padding: 12px;
  border: 8px solid #3d2517;
  outline: 2px solid rgba(223, 171, 95, .75);
  outline-offset: -4px;
  background: #26150d;
  box-shadow: 0 0 0 8px rgba(31, 17, 10, .54), 22px 28px 46px rgba(0, 0, 0, .4);
}

.memory-window span {
  border: 1px solid rgba(255, 230, 178, .55);
  background:
    radial-gradient(circle at 65% 30%, rgba(255, 240, 194, .68), transparent 19%),
    linear-gradient(150deg, #e5a85a, #9b5b2d 58%, #51301c);
  box-shadow: inset 0 0 22px rgba(255, 217, 146, .22);
}

.memory-rays {
  position: absolute;
  z-index: 2;
  top: 19%;
  left: 29%;
  width: 47%;
  height: 66%;
  background: linear-gradient(108deg, rgba(255, 207, 125, .3), rgba(235, 166, 78, .09) 47%, transparent 72%);
  clip-path: polygon(0 0, 37% 0, 100% 100%, 12% 100%);
  filter: blur(2px);
}

.memory-bench {
  position: absolute;
  z-index: 5;
  right: 8%;
  bottom: 15%;
  width: 32%;
  height: 24%;
  filter: drop-shadow(0 18px 12px rgba(0, 0, 0, .42));
}

.memory-bench i { position: absolute; display: block; }

.bench-back {
  top: 2%;
  left: 5%;
  width: 90%;
  height: 48%;
  border: 5px solid #3b2114;
  border-radius: 8px 8px 3px 3px;
  background:
    repeating-linear-gradient(0deg, #704426 0 13%, #4b2a19 14% 18%, #8b5730 19% 31%);
  box-shadow: inset 0 2px rgba(238, 182, 103, .25);
}

.bench-seat {
  top: 49%;
  left: 0;
  width: 100%;
  height: 16%;
  border: 3px solid #321b11;
  border-radius: 5px;
  background: linear-gradient(180deg, #9a6235, #56301c);
  box-shadow: inset 0 2px rgba(255, 207, 133, .24), 0 8px 0 #24130d;
}

.bench-leg {
  top: 63%;
  width: 6%;
  height: 34%;
  background: linear-gradient(90deg, #2d180f, #704327, #24120c);
  clip-path: polygon(0 0, 100% 0, 74% 100%, 22% 100%);
}

.bench-leg-left { left: 10%; }
.bench-leg-right { right: 10%; }

.bench-letter {
  top: 38%;
  left: 55%;
  width: 25%;
  height: 14%;
  border: 1px solid rgba(91, 55, 30, .64);
  background: #e3c99d;
  box-shadow: 0 4px 7px rgba(0, 0, 0, .33);
  transform: rotate(-5deg);
}

.bench-letter::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(28deg, transparent 49%, rgba(115, 69, 38, .36) 50% 52%, transparent 53%);
}

.memory-dust { position: absolute; inset: 0; z-index: 7; }
.memory-dust i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f7dca8;
  box-shadow: 0 0 7px rgba(255, 215, 151, .65);
  animation: r6r1Dust 10s ease-in-out infinite alternate;
}
.memory-dust i:nth-child(1) { left: 17%; top: 29%; }
.memory-dust i:nth-child(2) { left: 25%; top: 53%; animation-delay: -2s; }
.memory-dust i:nth-child(3) { left: 37%; top: 41%; animation-delay: -5s; }
.memory-dust i:nth-child(4) { left: 46%; top: 63%; animation-delay: -3s; }
.memory-dust i:nth-child(5) { left: 59%; top: 33%; animation-delay: -7s; }
.memory-dust i:nth-child(6) { left: 68%; top: 57%; animation-delay: -4s; }
.memory-dust i:nth-child(7) { left: 79%; top: 42%; animation-delay: -1s; }
.memory-dust i:nth-child(8) { left: 86%; top: 68%; animation-delay: -6s; }

@keyframes r6r1Dust {
  from { transform: translate3d(0, 4px, 0); opacity: .35; }
  to { transform: translate3d(7px, -9px, 0); opacity: .85; }
}

/* Act two: a bright three-arch manor garden and a path into the present. */
.chapter-set--present::before {
  background:
    linear-gradient(90deg, rgba(89, 25, 29, .38), transparent 18% 82%, rgba(89, 25, 29, .38)),
    linear-gradient(180deg, rgba(255, 230, 190, .33), rgba(179, 119, 65, .17) 56%, rgba(70, 39, 22, .25));
  backdrop-filter: saturate(1.02) brightness(1.16);
}

.chapter-set--present::after {
  height: 43%;
  background:
    radial-gradient(ellipse at 50% 93%, rgba(255, 224, 165, .72), transparent 57%),
    repeating-linear-gradient(90deg, rgba(255, 224, 176, .06) 0 1px, transparent 1px 92px),
    linear-gradient(180deg, transparent, rgba(118, 73, 37, .14));
}

.chapter-set--present .set-light-left,
.chapter-set--present .set-light-right {
  opacity: 1;
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 239, 206, .5), transparent 43%);
}

.present-arcade {
  position: absolute;
  z-index: 3;
  inset: 0;
}

.present-arch {
  position: absolute;
  bottom: 18%;
  display: block;
  border: 3px solid rgba(241, 205, 145, .78);
  border-bottom: 0;
  border-radius: 48% 48% 0 0 / 30% 30% 0 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 242, 215, .19), transparent 54%),
    linear-gradient(180deg, rgba(134, 83, 48, .16), rgba(58, 34, 21, .06));
  box-shadow: 0 0 0 7px rgba(95, 53, 30, .28), 0 0 24px rgba(255, 219, 158, .22), inset 0 0 18px rgba(255, 233, 191, .12);
}

.present-arch::before,
.present-arch::after {
  position: absolute;
  bottom: 0;
  width: 8px;
  height: 74%;
  content: "";
  background: linear-gradient(90deg, #6b4128, #dbad69 48%, #633922);
  box-shadow: 0 0 8px rgba(255, 219, 157, .24);
}
.present-arch::before { left: -5px; }
.present-arch::after { right: -5px; }

.present-arch-left {
  left: 14%;
  width: 22%;
  height: 45%;
  opacity: .72;
}
.present-arch-center {
  left: 35%;
  width: 30%;
  height: 57%;
}
.present-arch-right {
  right: 14%;
  width: 22%;
  height: 45%;
  opacity: .72;
}

.present-path {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 50%;
  width: 48%;
  height: 53%;
  background:
    linear-gradient(90deg, rgba(255, 230, 187, .16), rgba(255, 239, 208, .5) 50%, rgba(255, 230, 187, .16)),
    repeating-linear-gradient(100deg, transparent 0 30px, rgba(122, 75, 40, .08) 31px 32px);
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
  filter: drop-shadow(0 0 22px rgba(255, 215, 150, .25));
}

.present-foliage {
  position: absolute;
  z-index: 5;
  bottom: 14%;
  width: 23%;
  height: 47%;
}

.present-foliage::before,
.present-foliage::after {
  position: absolute;
  bottom: 0;
  width: 5px;
  height: 88%;
  border-radius: 50%;
  content: "";
  background: linear-gradient(#85905d, #314126);
  transform: rotate(20deg);
  transform-origin: bottom;
}
.present-foliage::before { left: 45%; }
.present-foliage::after { left: 59%; height: 76%; transform: rotate(-17deg); }
.present-foliage-left { left: 3%; }
.present-foliage-right { right: 3%; transform: scaleX(-1); }

.present-foliage i {
  position: absolute;
  width: 23%;
  height: 10%;
  border: 1px solid rgba(188, 183, 116, .27);
  border-radius: 75% 8% 75% 8%;
  background: linear-gradient(135deg, #657047, #253923);
  box-shadow: inset 0 1px rgba(230, 218, 158, .13), 0 5px 10px rgba(0, 0, 0, .15);
  clip-path: polygon(0 50%, 24% 8%, 72% 0, 100% 50%, 72% 100%, 24% 92%);
  transform: rotate(24deg);
}
.present-foliage i:nth-child(1) { left: 22%; top: 8%; }
.present-foliage i:nth-child(2) { left: 49%; top: 18%; transform: scaleX(-1) rotate(12deg); }
.present-foliage i:nth-child(3) { left: 13%; top: 32%; transform: rotate(38deg); }
.present-foliage i:nth-child(4) { left: 54%; top: 42%; transform: scaleX(-1) rotate(18deg); }
.present-foliage i:nth-child(5) { left: 25%; top: 57%; transform: rotate(19deg); }
.present-foliage i:nth-child(6) { left: 61%; top: 67%; transform: scaleX(-1) rotate(32deg); }
.present-foliage i:nth-child(7) { left: 18%; top: 78%; transform: rotate(42deg); }

.present-lantern {
  position: absolute;
  z-index: 6;
  bottom: 17%;
  width: 18px;
  height: 25%;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(90deg, #4b2d1d, #b27c3e 48%, #3d2419);
  box-shadow: 0 -5px 22px rgba(255, 208, 125, .38);
}
.present-lantern::before {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 34px;
  height: 28px;
  content: "";
  border: 2px solid #9a6b3a;
  background: radial-gradient(circle, #ffe0a2 0 18%, #b56c2d 21%, #3d2317 63%);
  clip-path: polygon(25% 0, 75% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
}
.present-lantern-left { left: 28%; }
.present-lantern-right { right: 28%; }

/* Special act: a restrained four-seat mahjong salon with a real tabletop. */
.chapter-set--mahjong::before {
  background:
    linear-gradient(90deg, rgba(45, 7, 12, .7), transparent 18% 82%, rgba(45, 7, 12, .7)),
    linear-gradient(180deg, rgba(5, 29, 26, .76), rgba(8, 43, 36, .58) 60%, rgba(28, 18, 12, .62));
  backdrop-filter: saturate(.82) brightness(.76);
}

.chapter-set--mahjong::after {
  height: 42%;
  background:
    radial-gradient(ellipse at 50% 78%, rgba(202, 145, 72, .29), transparent 48%),
    linear-gradient(180deg, transparent, rgba(14, 7, 4, .63));
}

.chapter-set--mahjong .set-light-left {
  left: 50%;
  width: 48%;
  opacity: .7;
  background: linear-gradient(180deg, rgba(255, 217, 151, .3), rgba(231, 168, 84, .08) 66%, transparent);
  clip-path: polygon(45% 0, 55% 0, 86% 100%, 14% 100%);
}

.mahjong-pendant {
  position: absolute;
  z-index: 8;
  top: 0;
  left: 50%;
  width: 13%;
  height: 14%;
  transform: translateX(-50%);
}
.mahjong-pendant::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 48%;
  content: "";
  background: linear-gradient(90deg, #3b2b1e, #c18e4d, #2d2118);
  transform: translateX(-50%);
}
.mahjong-pendant::after {
  position: absolute;
  left: 50%;
  bottom: 5%;
  width: 76%;
  height: 45%;
  content: "";
  border: 2px solid #a8753d;
  border-radius: 48% 48% 20% 20% / 32% 32% 17% 17%;
  background: linear-gradient(180deg, #b47b3d, #50301d 64%, #20130d);
  box-shadow: inset 0 -7px 13px rgba(255, 208, 125, .16), 0 9px 16px rgba(0, 0, 0, .45);
  transform: translateX(-50%);
}
.mahjong-pendant i {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 3%;
  width: 19%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffe1a4;
  box-shadow: 0 0 16px #f2ad53, 0 0 42px rgba(255, 191, 94, .45);
  transform: translateX(-50%);
}

.mahjong-glow {
  position: absolute;
  z-index: 2;
  top: 8%;
  left: 50%;
  width: 54%;
  height: 74%;
  background: linear-gradient(180deg, rgba(255, 215, 142, .2), rgba(219, 154, 70, .06) 67%, transparent);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
}

.mahjong-chair {
  position: absolute;
  z-index: 3;
  width: 10%;
  height: 20%;
  border: 6px solid #29170f;
  border-bottom: 0;
  border-radius: 18px 18px 4px 4px;
  background:
    linear-gradient(90deg, transparent 0 16%, rgba(202, 142, 75, .13) 17% 20%, transparent 21% 79%, rgba(202, 142, 75, .13) 80% 83%, transparent 84%),
    linear-gradient(180deg, #70442a, #321d15 72%);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, .36), 0 15px 20px rgba(0, 0, 0, .35);
}
.chair-back-left { left: 25%; top: 49%; transform: scale(.82) rotate(-7deg); opacity: .74; }
.chair-back-right { right: 25%; top: 49%; transform: scale(.82) rotate(7deg); opacity: .74; }
.chair-front-left { left: 23%; bottom: -4%; transform: rotate(6deg); opacity: .56; }
.chair-front-right { right: 23%; bottom: -4%; transform: rotate(-6deg); opacity: .56; }

.mahjong-table {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 14%;
  width: min(52%, 820px);
  height: 28%;
  padding: 17px;
  background: linear-gradient(145deg, #9b6032, #3c2014 54%, #1f110c);
  box-shadow: 0 12px 0 #21110b, 0 28px 34px rgba(0, 0, 0, .52), inset 0 3px rgba(244, 195, 122, .25);
  clip-path: polygon(8% 0, 92% 0, 100% 18%, 96% 86%, 88% 100%, 12% 100%, 4% 86%, 0 18%);
  transform: translateX(-50%) perspective(800px) rotateX(6deg);
  transform-origin: 50% 100%;
}

.mahjong-felt {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(117, 174, 144, .18), transparent 52%),
    repeating-linear-gradient(25deg, rgba(255,255,255,.012) 0 1px, transparent 1px 4px),
    #16493c;
  box-shadow: inset 0 0 35px rgba(0, 12, 9, .72), inset 0 0 0 2px rgba(222, 175, 104, .22);
  clip-path: polygon(7% 0, 93% 0, 100% 17%, 96% 85%, 87% 100%, 13% 100%, 4% 85%, 0 17%);
}

.mahjong-tile {
  position: absolute;
  width: 7%;
  height: 22%;
  border: 1px solid #bfae89;
  border-radius: 3px;
  background: linear-gradient(145deg, #f1e9d4, #cfc3a8);
  box-shadow: 3px 5px 0 #80755f, 5px 8px 9px rgba(0, 0, 0, .4);
}
.mahjong-tile::after {
  position: absolute;
  inset: 24%;
  border: 2px solid #8b2e26;
  border-radius: 50%;
  content: "";
  opacity: .58;
}
.tile-one { top: 18%; left: 14%; transform: rotate(-7deg); }
.tile-two { top: 13%; right: 17%; transform: rotate(5deg); }
.tile-three { bottom: 14%; left: 28%; transform: rotate(4deg); }
.tile-four { right: 29%; bottom: 11%; transform: rotate(-5deg); }

body[data-set="mahjong"] .chapter-story {
  bottom: 3.5%;
  width: min(690px, calc(100vw - 330px));
}

/* Finale: closed-in velvet, valance, monogram, footlights and ticket controls. */
.chapter-set--finale::before {
  background:
    linear-gradient(90deg, rgba(20, 1, 5, .94), transparent 31% 69%, rgba(20, 1, 5, .94)),
    linear-gradient(180deg, rgba(5, 3, 3, .52), rgba(4, 3, 3, .7));
  backdrop-filter: brightness(.55) saturate(.76);
}

.chapter-set--finale::after {
  height: 40%;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(237, 173, 91, .34), transparent 52%),
    linear-gradient(180deg, transparent, rgba(19, 8, 5, .58));
}

.chapter-set--finale .set-light-left {
  width: 48%;
  opacity: .78;
  background: linear-gradient(180deg, rgba(255, 225, 172, .43), rgba(235, 169, 85, .1) 72%, transparent);
  clip-path: polygon(44% 0, 56% 0, 88% 100%, 12% 100%);
}

.chapter-set--finale > .set-foreground {
  display: block;
  z-index: 9;
}

.chapter-set--finale .set-foreground::before,
.chapter-set--finale .set-foreground::after {
  width: 23%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 8px, rgba(0,0,0,.1) 9px 23px),
    linear-gradient(90deg, #240207, #83141d 54%, #310308);
  box-shadow: inset 0 0 58px rgba(0,0,0,.64), 0 0 32px rgba(0,0,0,.35);
}

.finale-valance {
  position: absolute;
  z-index: 11;
  top: 0;
  left: 18%;
  width: 64%;
  height: 15%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 9px, rgba(0,0,0,.08) 10px 25px),
    linear-gradient(180deg, #85141c, #42060c);
  box-shadow: inset 0 -18px 24px rgba(0,0,0,.42), 0 11px 22px rgba(0,0,0,.38);
  clip-path: polygon(0 0, 100% 0, 100% 64%, 92% 94%, 80% 69%, 68% 96%, 55% 70%, 43% 97%, 30% 70%, 18% 95%, 8% 70%, 0 90%);
}

.finale-valance i {
  position: absolute;
  top: 8%;
  width: 1px;
  height: 58%;
  background: rgba(235, 190, 117, .18);
}
.finale-valance i:nth-child(1) { left: 15%; }
.finale-valance i:nth-child(2) { left: 32%; }
.finale-valance i:nth-child(3) { left: 50%; }
.finale-valance i:nth-child(4) { left: 68%; }
.finale-valance i:nth-child(5) { left: 85%; }

.finale-monogram {
  position: absolute;
  z-index: 3;
  top: 42%;
  left: 50%;
  color: #e4b86f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(82px, 11vw, 190px);
  letter-spacing: 0;
  opacity: .12;
  text-shadow: 0 0 40px rgba(239, 184, 95, .2);
  transform: translate(-50%, -50%);
  white-space: nowrap;
}
.finale-monogram span { font-size: .58em; font-style: italic; }

.finale-footlights {
  position: absolute;
  z-index: 12;
  right: 24%;
  bottom: 8%;
  left: 24%;
  display: flex;
  justify-content: space-between;
}
.finale-footlights i {
  width: 11px;
  height: 8px;
  border: 1px solid rgba(116, 70, 33, .85);
  border-radius: 50% 50% 30% 30%;
  background: #f5c474;
  box-shadow: 0 -4px 14px rgba(255, 196, 101, .38), 0 3px 0 #3a2013;
  opacity: .68;
}

.finale-panel button {
  min-width: 148px;
  min-height: 44px;
  padding: 9px 18px;
  border: 3px double #8c6035;
  border-radius: 2px;
  background:
    radial-gradient(circle at 8px 50%, #2a1510 0 3px, transparent 4px),
    radial-gradient(circle at calc(100% - 8px) 50%, #2a1510 0 3px, transparent 4px),
    linear-gradient(180deg, #f0dfbd, #d7bd90);
  box-shadow: 0 7px 18px rgba(0,0,0,.32), inset 0 0 0 2px rgba(255,255,255,.3);
  color: #351b14;
  font-weight: 700;
  text-shadow: none;
  clip-path: polygon(0 0, 100% 0, 100% 36%, 96% 50%, 100% 64%, 100% 100%, 0 100%, 0 64%, 4% 50%, 0 36%);
}

.finale-panel button:hover {
  background-color: #f3e5c9;
  filter: brightness(1.04);
}

@media (max-width: 1100px) {
  .chapter-menu {
    grid-template-columns: repeat(3, minmax(0, 270px));
    gap: 24px;
  }

  .chapter-sign {
    min-height: 158px;
    padding-inline: 16px;
  }

  .chapter-sign strong { font-size: 23px; }
}

@media (max-width: 760px) {
  .chapter-menu {
    grid-template-columns: minmax(0, 300px);
    align-content: start;
    justify-content: center;
    gap: 16px;
    padding: 10svh 18px 7svh;
  }

  .chapter-sign,
  .chapter-sign:nth-of-type(2),
  .chapter-sign:nth-of-type(3) {
    top: 0;
    min-height: 142px;
    padding: 21px 17px 18px;
  }

  .chapter-sign:nth-of-type(2) { left: 8px; }
  .chapter-sign:nth-of-type(3) { left: -6px; }

  .chapter-sign::before,
  .chapter-sign::after {
    top: -9svh;
    height: 9svh;
  }

  .chapter-sign strong { font-size: 22px; }

  .memory-scrim {
    top: 16%;
    left: 24%;
    width: 70%;
    height: 57%;
  }

  .memory-window {
    top: 23%;
    left: 4%;
    width: 46%;
    height: 31%;
    gap: 5px;
    padding: 7px;
    border-width: 5px;
  }

  .memory-rays {
    top: 24%;
    left: 41%;
    width: 58%;
    height: 50%;
  }

  .memory-bench {
    right: 3%;
    bottom: 23%;
    width: 54%;
    height: 18%;
  }

  .present-arch { bottom: 25%; border-width: 2px; }
  .present-arch-left { left: 3%; width: 31%; height: 34%; }
  .present-arch-center { left: 24%; width: 52%; height: 45%; }
  .present-arch-right { right: 3%; width: 31%; height: 34%; }
  .present-path { width: 94%; height: 55%; }
  .present-foliage { bottom: 21%; width: 34%; height: 38%; }
  .present-foliage-left { left: -6%; }
  .present-foliage-right { right: -6%; }
  .present-lantern { bottom: 23%; height: 18%; }
  .present-lantern-left { left: 18%; }
  .present-lantern-right { right: 18%; }

  .mahjong-pendant { width: 34%; height: 13%; }
  .mahjong-glow { width: 100%; height: 68%; }
  .mahjong-table {
    bottom: 21%;
    width: 92%;
    height: 23%;
    padding: 10px;
  }
  .mahjong-chair { width: 18%; height: 16%; border-width: 4px; }
  .chair-back-left { left: 8%; top: 54%; }
  .chair-back-right { right: 8%; top: 54%; }
  .chair-front-left { left: 8%; bottom: 1%; }
  .chair-front-right { right: 8%; bottom: 1%; }

  body[data-set="mahjong"] .chapter-story {
    bottom: 7.5%;
    width: calc(100vw - 30px);
  }

  .chapter-set--finale .set-foreground::before,
  .chapter-set--finale .set-foreground::after {
    width: 16%;
  }

  .finale-valance {
    left: 11%;
    width: 78%;
    height: 12%;
  }

  .finale-monogram {
    top: 37%;
    font-size: 84px;
  }

  .finale-footlights {
    right: 17%;
    bottom: 5%;
    left: 17%;
  }

  .finale-footlights i {
    width: 7px;
    height: 6px;
  }

  .finale-panel button {
    width: 100%;
  }
}

/* R6R2: photorealistic theater art. Runtime flow and interaction logic stay locked. */
.chapter-set {
  --stage-art: none;
  background-color: #110806;
  background-image: var(--stage-art);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.chapter-set--main {
  --stage-art: url("./assets/image/stage/舞台R6R2/主舞台.png");
  opacity: 0;
  visibility: hidden;
}

body[data-stage="CHAPTER_MENU"] .chapter-set--main {
  opacity: 1;
  visibility: visible;
}

.chapter-set--memory {
  --stage-art: url("./assets/image/stage/舞台R6R2/第一幕.png");
}

.chapter-set--present {
  --stage-art: url("./assets/image/stage/舞台R6R2/第二幕.png");
}

.chapter-set--mahjong {
  --stage-art: url("./assets/image/stage/舞台R6R2/麻將番外.png");
}

.chapter-set--finale {
  --stage-art: url("./assets/image/stage/舞台R6R2/謝幕.png");
}

.chapter-set::before,
.chapter-set::after {
  content: none !important;
}

.chapter-set > .set-light,
.chapter-set > .set-backdrop,
.chapter-set > .set-midground,
.chapter-set > .set-foreground,
.chapter-set > .scenic {
  display: none !important;
}

/* The chapter copy sits on the photographed plaques instead of drawing new cards. */
.chapter-menu {
  grid-template-columns: repeat(3, clamp(280px, 17.2vw, 330px));
  align-content: start;
  justify-content: center;
  gap: clamp(55px, 5.2vw, 100px);
  padding: 24svh 20px 7svh;
}

.chapter-menu .sign-rail {
  display: none;
}

.chapter-sign,
.chapter-sign:nth-of-type(2),
.chapter-sign:nth-of-type(3) {
  left: 0;
  min-height: clamp(178px, 19svh, 220px);
  padding: 30px 20px 24px;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 9px 11px rgba(0, 0, 0, .12));
}

.chapter-sign:nth-of-type(1),
.chapter-sign:nth-of-type(3) {
  top: 9px;
}

.chapter-sign:nth-of-type(2) {
  top: -44px;
}

.chapter-sign::before,
.chapter-sign::after {
  content: none;
}

body[data-stage="CHAPTER_MENU"] .stage-scene.is-set-revealed .chapter-menu.is-active .chapter-sign {
  animation: r6r2SignCopyIn 620ms ease forwards;
}

body[data-stage="CHAPTER_MENU"] .stage-scene.is-set-revealed .chapter-menu.is-active .chapter-sign:nth-of-type(2) {
  animation-delay: 110ms;
}

body[data-stage="CHAPTER_MENU"] .stage-scene.is-set-revealed .chapter-menu.is-active .chapter-sign:nth-of-type(3) {
  animation-delay: 220ms;
}

@keyframes r6r2SignCopyIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chapter-sign span,
.chapter-sign em {
  color: rgba(246, 218, 174, .78);
  font-size: 13px;
  text-shadow: 0 2px 7px rgba(0, 0, 0, .88);
}

.chapter-sign strong {
  margin: 11px 0 9px;
  color: #fff0d4;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: clamp(23px, 1.55vw, 29px);
  font-weight: 600;
  line-height: 1.32;
  text-shadow: 0 3px 11px rgba(0, 0, 0, .9);
}

.chapter-sign:hover,
.chapter-sign:focus-visible {
  background: transparent;
  filter: brightness(1.12) drop-shadow(0 9px 13px rgba(0, 0, 0, .22));
}

/* Cinematic titles remain legible without turning into overlay cards. */
.chapter-shell header {
  top: 8.5%;
  text-shadow:
    0 3px 8px rgba(0, 0, 0, .96),
    0 0 24px rgba(0, 0, 0, .82);
}

body[data-set="memory"] .chapter-shell header {
  top: 7.5%;
}

body[data-set="mahjong"] .chapter-shell header {
  top: 27%;
}

.chapter-shell h2 {
  color: #fff2dc;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-weight: 600;
  letter-spacing: 0;
}

.chapter-shell header::after {
  background: linear-gradient(90deg, transparent, rgba(244, 205, 140, .68), transparent);
}

.chapter-story,
.chapter-shell.is-media-empty .chapter-story {
  background: linear-gradient(90deg, transparent, rgba(11, 6, 5, .74) 12% 88%, transparent);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .98);
}

.finale-panel {
  text-shadow:
    0 3px 9px rgba(0, 0, 0, .98),
    0 0 28px rgba(0, 0, 0, .88);
}

@media (max-width: 1100px) and (min-width: 761px) {
  .chapter-menu {
    grid-template-columns: repeat(3, minmax(230px, 27vw));
    gap: 4vw;
    padding-top: 24svh;
  }

  .chapter-sign strong {
    font-size: 22px;
  }
}

@media (max-width: 760px) {
  .chapter-set {
    background-position: center;
  }

  .chapter-set--main {
    --stage-art: url("./assets/image/stage/HovicMap_A7_empty_stage.png");
    background-position: center;
  }

  .chapter-set--memory {
    --stage-art: url("./assets/image/stage/舞台R6R2/第一幕_手機.png");
    background-position: center;
  }

  .chapter-set--present,
  .chapter-set--mahjong,
  .chapter-set--finale {
    background-position: center;
  }

  .chapter-menu {
    grid-template-columns: minmax(0, 350px);
    align-content: start;
    gap: 0;
    padding: max(5px, .7svh) 12px 2svh;
  }

  .chapter-sign,
  .chapter-sign:nth-of-type(1),
  .chapter-sign:nth-of-type(2),
  .chapter-sign:nth-of-type(3) {
    top: 0;
    left: 0;
    width: 100%;
    min-height: 225px;
    padding: 91px 30px 24px;
    background-image: url("./assets/image/stage/舞台R6R2/吊牌.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: drop-shadow(0 13px 15px rgba(0, 0, 0, .42));
  }

  .chapter-sign strong {
    margin: 7px 0 5px;
    font-size: 20px;
  }

  .chapter-sign span,
  .chapter-sign em {
    font-size: 11px;
  }

  .chapter-shell header,
  body[data-set="memory"] .chapter-shell header {
    top: 6.5%;
  }

  body[data-set="mahjong"] .chapter-shell header {
    top: 30%;
  }

  .chapter-shell h2 {
    font-size: 28px;
  }

  body[data-set="mahjong"] .chapter-shell h2 {
    font-size: 25px;
  }

  .finale-panel {
    top: 55%;
  }
}

/* R6R3: plaque-bound copy and the single-line mahjong caption only. */
@media (min-width: 761px) {
  body[data-stage="CHAPTER_MENU"] .chapter-menu {
    inset: auto;
    top: 50%;
    left: 50%;
    display: block;
    width: max(100vw, 177.777778vh);
    height: max(100vh, 56.25vw);
    padding: 0;
    overflow: visible;
    transform: translate(-50%, calc(-50% + 14px));
  }

  body[data-stage="CHAPTER_MENU"] .chapter-menu.is-active {
    transform: translate(-50%, -50%);
  }

  body[data-stage="CHAPTER_MENU"] .chapter-sign,
  body[data-stage="CHAPTER_MENU"] .chapter-sign:nth-of-type(1),
  body[data-stage="CHAPTER_MENU"] .chapter-sign:nth-of-type(2),
  body[data-stage="CHAPTER_MENU"] .chapter-sign:nth-of-type(3) {
    position: absolute;
    top: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    margin: 0;
    padding: 2.5% 2% 1.8%;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
  }

  body[data-stage="CHAPTER_MENU"] .chapter-sign:nth-of-type(1) {
    top: 24.2%;
    left: 19.1%;
    width: 17.5%;
    height: 22.2%;
  }

  body[data-stage="CHAPTER_MENU"] .chapter-sign:nth-of-type(2) {
    top: 18.1%;
    left: 40.1%;
    width: 19.3%;
    height: 23.6%;
  }

  body[data-stage="CHAPTER_MENU"] .chapter-sign:nth-of-type(3) {
    top: 24.8%;
    left: 63.7%;
    width: 17.3%;
    height: 22.1%;
  }

  body[data-stage="CHAPTER_MENU"] .chapter-sign > span,
  body[data-stage="CHAPTER_MENU"] .chapter-sign > strong,
  body[data-stage="CHAPTER_MENU"] .chapter-sign > em {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  body[data-stage="CHAPTER_MENU"] .chapter-sign > span,
  body[data-stage="CHAPTER_MENU"] .chapter-sign > em {
    font-size: clamp(9px, .68vw, 13px);
    line-height: 1.35;
  }

  body[data-stage="CHAPTER_MENU"] .chapter-sign > strong {
    margin: clamp(5px, .55vh, 9px) 0;
    font-size: clamp(15px, 1.48vw, 28px);
    line-height: 1.24;
    text-wrap: balance;
  }
}

body[data-set="mahjong"] .chapter-story,
body[data-set="mahjong"] .chapter-shell.is-media-empty .chapter-story {
  bottom: 9.2%;
  width: min(1500px, calc(100vw - 160px));
  max-width: none;
  padding-right: 8px;
  padding-left: 8px;
  overflow: visible;
  font-size: clamp(10px, .82vw, 15px);
  letter-spacing: 0;
  white-space: nowrap;
  word-break: keep-all;
  text-overflow: clip;
}

@media (max-width: 760px) {
  body[data-stage="CHAPTER_MENU"] .chapter-menu,
  body[data-stage="CHAPTER_MENU"] .chapter-menu.is-active {
    inset: 0;
    top: 0;
    left: 0;
    display: grid;
    width: 100%;
    height: 100%;
    transform: translateY(0);
  }

  body[data-stage="CHAPTER_MENU"] .chapter-sign,
  body[data-stage="CHAPTER_MENU"] .chapter-sign:nth-of-type(1),
  body[data-stage="CHAPTER_MENU"] .chapter-sign:nth-of-type(2),
  body[data-stage="CHAPTER_MENU"] .chapter-sign:nth-of-type(3) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 91px 30px 24px;
    text-align: center;
  }

  body[data-set="mahjong"] .chapter-story,
  body[data-set="mahjong"] .chapter-shell.is-media-empty .chapter-story {
    bottom: 8.5%;
    width: calc(100vw - 16px);
    padding-right: 2px;
    padding-left: 2px;
    font-size: clamp(6px, 1.65vw, 8px);
  }
}


/* R7M1R2 — returning visitor shortcuts */
.return-visit-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 226, 174, .14);
}

.return-visit-actions[hidden] {
  display: none;
}

.return-visit-actions > p {
  margin: 0 0 10px;
  color: rgba(255, 245, 223, .72);
  font-size: 13px;
  line-height: 1.65;
}

.return-visit-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opening-panel .return-secondary,
.opening-panel .return-tertiary {
  padding: 9px 14px;
  font-size: 13px;
  background: rgba(0, 0, 0, .24);
}

.opening-panel .return-tertiary {
  border-color: rgba(233, 189, 122, .42);
  background: rgba(119, 36, 39, .28);
}

@media (max-width: 760px) {
  .return-visit-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .opening-panel .return-secondary,
  .opening-panel .return-tertiary {
    width: 100%;
    min-height: 44px;
  }
}

/* R7M2: the optional after-curtain song theater. */
.afterstory-invite {
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid rgba(229, 188, 123, .22);
  opacity: 0;
  transform: translateY(8px);
}

.finale-panel .afterstory-invite p {
  margin: 0 0 11px;
  color: rgba(255, 239, 211, .76);
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  opacity: 1;
  transform: none;
}

.finale-panel .afterstory-invite button {
  border-color: rgba(235, 194, 129, .68);
  color: #fff0d6;
  background: linear-gradient(180deg, rgba(122, 60, 38, .7), rgba(59, 23, 22, .84));
}

.stage-scene.is-set-revealed .finale-panel.is-active .afterstory-invite {
  animation: setTitleIn 650ms var(--ease) 1120ms forwards;
}

.afterstory-experience {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: block;
  overflow: hidden;
  background: #0a0505;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 520ms ease, visibility 0s linear 520ms;
}

.afterstory-experience.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 520ms ease;
}

.afterstory-hub,
.afterstory-track {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}

.afterstory-experience.is-hub .afterstory-hub,
.afterstory-experience.is-track .afterstory-track {
  display: block;
}

.afterstory-backstage,
.afterstory-backstage-wall,
.afterstory-backstage-floor {
  position: absolute;
  inset: 0;
}

.afterstory-backstage {
  overflow: hidden;
  background: #120909;
  perspective: 1100px;
}

.afterstory-backstage-wall {
  bottom: 22%;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(231, 184, 116, .12) 8.15% 8.28%, transparent 8.4% 91.6%, rgba(231, 184, 116, .12) 91.72% 91.85%, transparent 92%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.016) 0 1px, transparent 1px 110px),
    radial-gradient(ellipse at 50% 8%, rgba(219, 155, 85, .19), transparent 42%),
    linear-gradient(180deg, #321a1a 0%, #1b0d0d 78%, #100808 100%);
  box-shadow: inset 0 -46px 70px rgba(0,0,0,.54);
}

.afterstory-backstage-wall::before {
  content: "";
  position: absolute;
  inset: 8% 9% 6%;
  border: 1px solid rgba(216, 169, 99, .13);
  box-shadow: inset 0 0 0 7px rgba(37, 17, 16, .46), inset 0 0 100px rgba(0,0,0,.36);
}

.afterstory-backstage-floor {
  top: 76%;
  background:
    repeating-linear-gradient(92deg, rgba(255,255,255,.025) 0 2px, transparent 2px 76px),
    linear-gradient(166deg, #26140f, #0f0907 68%);
  transform-origin: 50% 0;
  transform: perspective(560px) rotateX(58deg) scale(1.55);
  box-shadow: inset 0 16px 32px rgba(0,0,0,.55);
}

.afterstory-backstage-curtain {
  position: absolute;
  z-index: 2;
  top: -5%;
  bottom: -8%;
  width: 17%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.1) 0 3%, transparent 7% 14%),
    linear-gradient(90deg, #2b0309, #741a2d 47%, #270307);
  box-shadow: 0 0 44px rgba(0,0,0,.72), inset 0 0 36px rgba(0,0,0,.66);
}

.afterstory-backstage-curtain.curtain-left {
  left: -6%;
  transform: skewX(-2deg);
}

.afterstory-backstage-curtain.curtain-right {
  right: -6%;
  transform: scaleX(-1) skewX(-2deg);
}

.afterstory-backstage-lamp {
  position: absolute;
  z-index: 3;
  top: 8%;
  width: 2px;
  height: 20%;
  background: #8f663b;
  box-shadow: 0 0 4px rgba(245, 195, 119, .42);
}

.afterstory-backstage-lamp::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 74px;
  height: 34px;
  border: 2px solid rgba(206, 151, 77, .54);
  border-bottom: 0;
  border-radius: 50% 50% 4px 4px;
  background: radial-gradient(ellipse at 50% 100%, #ffe0a2, rgba(218, 146, 63, .58) 45%, #5c351e 72%);
  box-shadow: 0 22px 54px rgba(239, 171, 84, .24);
  transform: translateX(-50%);
}

.afterstory-backstage-lamp.lamp-left { left: 22%; }
.afterstory-backstage-lamp.lamp-right { right: 22%; }

.afterstory-hub-heading {
  position: absolute;
  z-index: 5;
  top: 6.5%;
  left: 50%;
  width: min(720px, calc(100vw - 50px));
  text-align: center;
  text-shadow: 0 4px 24px rgba(0,0,0,.9);
  transform: translateX(-50%);
}

.afterstory-hub-heading p,
.afterstory-track-heading p {
  margin: 0 0 5px;
  color: #d9aa6b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.afterstory-hub-heading h2 {
  margin: 0;
  color: #fff1d9;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: clamp(36px, 4.2vw, 62px);
  font-weight: 500;
  letter-spacing: 0;
}

.afterstory-hub-heading strong,
.afterstory-hub-heading span {
  display: block;
}

.afterstory-hub-heading strong {
  margin-top: 7px;
  color: #e7c58f;
  font-size: 16px;
  font-weight: 500;
}

.afterstory-hub-heading span {
  margin-top: 3px;
  color: rgba(255, 242, 220, .72);
  font-size: 13px;
}

.afterstory-programs {
  position: absolute;
  z-index: 6;
  top: 31%;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 290px));
  gap: clamp(24px, 4vw, 70px);
  transform: translateX(-50%);
}

.afterstory-program {
  position: relative;
  width: 100%;
  height: min(43svh, 400px);
  min-height: 270px;
  padding: 62px 24px 30px;
  overflow: hidden;
  border: 1px solid rgba(222, 174, 105, .62);
  border-radius: 3px 3px 0 0;
  color: #fff2dc;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(255,255,255,.025), transparent 20% 80%, rgba(0,0,0,.22)),
    repeating-linear-gradient(87deg, transparent 0 26px, rgba(255,255,255,.018) 27px 28px),
    linear-gradient(155deg, #5b3025, #28130f 70%);
  box-shadow:
    inset 0 0 0 7px rgba(31, 14, 11, .58),
    inset 0 0 0 8px rgba(232, 181, 104, .2),
    inset 0 -60px 80px rgba(0,0,0,.32),
    0 30px 42px rgba(0,0,0,.55);
  transform: translateY(0);
  transition: transform 260ms var(--ease), box-shadow 260ms ease;
}

.afterstory-program::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 66%;
  height: 4px;
  border: 1px solid rgba(245, 211, 153, .45);
  background: linear-gradient(90deg, #53341d, #e0b16e 50%, #53341d);
  box-shadow: 0 13px 0 -1px rgba(229, 184, 114, .16);
  transform: translateX(-50%);
}

.afterstory-program::after {
  content: "";
  position: absolute;
  inset: 44px 24px 29px;
  border: 1px solid rgba(236, 194, 128, .27);
  box-shadow: inset 0 0 36px rgba(0,0,0,.36);
  pointer-events: none;
}

.afterstory-program:hover,
.afterstory-program:focus-visible {
  transform: translateY(-7px);
  box-shadow:
    inset 0 0 0 7px rgba(31, 14, 11, .58),
    inset 0 0 0 8px rgba(232, 181, 104, .28),
    0 38px 56px rgba(0,0,0,.62),
    0 0 30px rgba(218, 157, 82, .13);
}

.afterstory-program-number,
.afterstory-program strong,
.afterstory-program em,
.afterstory-program-status {
  position: relative;
  z-index: 1;
  display: block;
}

.afterstory-program-number {
  margin-top: 18px;
  color: #d3a76c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: .12em;
}

.afterstory-program strong {
  margin: 28px 0 18px;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: clamp(21px, 1.7vw, 29px);
  font-weight: 500;
  line-height: 1.45;
  text-shadow: 0 3px 12px rgba(0,0,0,.8);
}

.afterstory-program em {
  color: rgba(255, 236, 207, .65);
  font-size: 13px;
  font-style: normal;
}

.afterstory-program-status {
  position: absolute;
  right: 34px;
  bottom: 42px;
  color: rgba(235, 201, 151, .68);
  font-size: 11px;
}

.afterstory-program.program-princess {
  background-color: #4b2027;
  background-image:
    radial-gradient(circle at 50% 38%, rgba(191, 84, 102, .2), transparent 34%),
    linear-gradient(90deg, rgba(255,255,255,.025), transparent 20% 80%, rgba(0,0,0,.22)),
    repeating-linear-gradient(87deg, transparent 0 26px, rgba(255,255,255,.018) 27px 28px),
    linear-gradient(155deg, #66333e, #2a1118 70%);
}

.afterstory-program.program-dog {
  background-color: #4c2f20;
  background-image:
    radial-gradient(circle at 50% 38%, rgba(224, 170, 93, .18), transparent 35%),
    linear-gradient(90deg, rgba(255,255,255,.025), transparent 20% 80%, rgba(0,0,0,.22)),
    repeating-linear-gradient(87deg, transparent 0 26px, rgba(255,255,255,.018) 27px 28px),
    linear-gradient(155deg, #68432c, #28150f 70%);
}

.afterstory-program.program-mahjong {
  background-color: #15352d;
  background-image:
    radial-gradient(circle at 50% 38%, rgba(95, 157, 115, .16), transparent 36%),
    linear-gradient(90deg, rgba(255,255,255,.025), transparent 20% 80%, rgba(0,0,0,.22)),
    repeating-linear-gradient(87deg, transparent 0 26px, rgba(255,255,255,.018) 27px 28px),
    linear-gradient(155deg, #274f41, #0e211d 70%);
}

.afterstory-back-button,
.afterstory-track-toolbar button,
.afterstory-ending button,
.afterstory-track-intro button {
  border: 1px solid rgba(232, 190, 123, .54);
  border-radius: 3px;
  color: #ffefd5;
  background: linear-gradient(180deg, rgba(93, 47, 32, .72), rgba(35, 17, 15, .86));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.025), 0 8px 24px rgba(0,0,0,.28);
}

.afterstory-back-button {
  position: absolute;
  z-index: 8;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  min-width: 132px;
  transform: translateX(-50%);
}

.afterstory-song-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0b0606;
  isolation: isolate;
}

.afterstory-stage-shell,
.afterstory-set {
  position: absolute;
  inset: 0;
}

.afterstory-stage-shell {
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 26%, rgba(235, 174, 97, .22), transparent 42%),
    linear-gradient(180deg, #1d0d0d, #090505 76%);
}

.afterstory-stage-valance {
  position: absolute;
  z-index: 8;
  top: -7%;
  left: -3%;
  width: 106%;
  height: 19%;
  border-bottom: 3px solid rgba(208, 151, 86, .32);
  border-radius: 0 0 50% 50%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 2.5%, transparent 5% 10%),
    linear-gradient(#7d1e30, #31050c 78%);
  box-shadow: 0 17px 38px rgba(0,0,0,.66), inset 0 -18px 24px rgba(0,0,0,.44);
}

.afterstory-stage-wing {
  position: absolute;
  z-index: 7;
  top: 4%;
  bottom: -5%;
  width: 15%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 4%, transparent 8% 16%),
    linear-gradient(90deg, #210207, #72182b 55%, #260308);
  box-shadow: 0 0 42px rgba(0,0,0,.72), inset 0 0 30px rgba(0,0,0,.64);
}

.afterstory-stage-wing.wing-left { left: -4%; }
.afterstory-stage-wing.wing-right { right: -4%; transform: scaleX(-1); }

.afterstory-stage-floor {
  position: absolute;
  z-index: 3;
  top: 70%;
  left: 5%;
  width: 90%;
  height: 45%;
  background:
    repeating-linear-gradient(92deg, rgba(255,255,255,.035) 0 2px, transparent 2px 72px),
    linear-gradient(155deg, #4a281b, #120b08 72%);
  box-shadow: inset 0 16px 42px rgba(0,0,0,.56), 0 -1px rgba(230, 176, 104, .23);
  transform: perspective(520px) rotateX(56deg) scale(1.32);
  transform-origin: 50% 0;
}

.afterstory-stage-light {
  position: absolute;
  z-index: 2;
  top: -18%;
  width: 42%;
  height: 95%;
  opacity: .42;
  filter: blur(6px);
  background: linear-gradient(165deg, rgba(255, 221, 154, .6), transparent 65%);
  clip-path: polygon(47% 0, 66% 0, 100% 100%, 0 100%);
}

.afterstory-stage-light.light-left { left: -8%; transform: rotate(-4deg); }
.afterstory-stage-light.light-right { right: -8%; transform: scaleX(-1) rotate(-4deg); }

.afterstory-set {
  z-index: 4;
  display: none;
  transition: filter 700ms ease, opacity 700ms ease;
}

.afterstory-song-stage[data-track="princess"] .afterstory-set-princess,
.afterstory-song-stage[data-track="dog_princess"] .afterstory-set-dog,
.afterstory-song-stage[data-track="mahjong_magic"] .afterstory-set-mahjong {
  display: block;
}

.afterstory-set-princess {
  background:
    radial-gradient(ellipse at 50% 36%, rgba(235, 158, 121, .3), transparent 37%),
    linear-gradient(180deg, rgba(94, 31, 47, .72), rgba(30, 11, 17, .9));
}

.princess-wall-panel {
  position: absolute;
  inset: 12% 13% 27%;
  border: 1px solid rgba(231, 181, 122, .24);
  background:
    repeating-linear-gradient(90deg, transparent 0 16%, rgba(238,195,137,.1) 16.1% 16.3%),
    linear-gradient(180deg, rgba(113, 49, 65, .54), rgba(42, 17, 28, .68));
  box-shadow: inset 0 0 70px rgba(0,0,0,.43);
}

.princess-mirror {
  position: absolute;
  top: 19%;
  left: 50%;
  width: 22%;
  height: 40%;
  border: clamp(7px, .65vw, 12px) solid #a7743d;
  border-radius: 50% 50% 46% 46%;
  background: linear-gradient(140deg, rgba(242, 222, 198, .3), rgba(66, 43, 45, .48) 48%, rgba(233, 178, 120, .18));
  box-shadow: inset 0 0 34px rgba(255, 222, 175, .18), 0 14px 30px rgba(0,0,0,.45), 0 0 42px rgba(235, 166, 100, .13);
  transform: translateX(-50%);
}

.princess-mirror i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffd89a;
  box-shadow: 0 0 13px #f6ae63;
}

.princess-mirror i:nth-child(1) { top: 6%; left: 12%; }
.princess-mirror i:nth-child(2) { top: 6%; right: 12%; }
.princess-mirror i:nth-child(3) { top: 31%; left: -7px; }
.princess-mirror i:nth-child(4) { top: 31%; right: -7px; }
.princess-mirror i:nth-child(5) { top: 62%; left: -7px; }
.princess-mirror i:nth-child(6) { top: 62%; right: -7px; }
.princess-mirror i:nth-child(7) { bottom: 5%; left: 15%; }
.princess-mirror i:nth-child(8) { bottom: 5%; right: 15%; }

.princess-vanity {
  position: absolute;
  z-index: 3;
  top: 58%;
  left: 34%;
  width: 32%;
  height: 10%;
  border: 2px solid #714527;
  background: linear-gradient(180deg, #75452e, #28140e);
  box-shadow: 0 13px 0 #1f100b, 0 23px 28px rgba(0,0,0,.55), inset 0 2px rgba(255,255,255,.08);
}

.princess-crown {
  position: absolute;
  top: -38px;
  left: 13%;
  width: 54px;
  height: 34px;
  border: 3px solid #c99a52;
  border-top: 0;
  background: linear-gradient(145deg, rgba(255,224,146,.3), rgba(106,66,28,.16));
  clip-path: polygon(0 100%, 8% 25%, 31% 64%, 50% 0, 70% 63%, 93% 25%, 100% 100%);
  filter: drop-shadow(0 5px 5px rgba(0,0,0,.42));
}

.princess-ticket,
.princess-stamp {
  position: absolute;
  top: -17px;
  width: 42px;
  height: 22px;
  border: 1px solid rgba(120, 73, 45, .66);
  background: #c9aa7d;
  box-shadow: 0 4px 6px rgba(0,0,0,.35);
  transform: rotate(-6deg);
}

.princess-ticket { right: 22%; }
.princess-stamp { right: 8%; width: 20px; background: #733143; transform: rotate(9deg); }

.princess-rack {
  position: absolute;
  top: 25%;
  left: 17%;
  width: 15%;
  height: 42%;
  border-top: 5px solid #9e6c37;
  border-right: 4px solid #6b4225;
  border-left: 4px solid #6b4225;
}

.princess-rack i {
  position: absolute;
  top: 8%;
  width: 30%;
  height: 63%;
  border-radius: 48% 48% 8% 8%;
  background: linear-gradient(90deg, #381019, #a34a61 45%, #35101a);
  box-shadow: 0 6px 14px rgba(0,0,0,.4);
  transform-origin: 50% 0;
}

.princess-rack i:nth-child(1) { left: 9%; transform: rotate(4deg); }
.princess-rack i:nth-child(2) { left: 34%; background: linear-gradient(90deg, #302422, #b28d76 45%, #302422); }
.princess-rack i:nth-child(3) { right: 8%; transform: rotate(-4deg); }

.princess-cart {
  position: absolute;
  top: 46%;
  right: 17%;
  width: 14%;
  height: 19%;
  border: 3px solid #9b6a37;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(89, 52, 32, .86), rgba(29, 16, 12, .9));
  box-shadow: 0 18px 24px rgba(0,0,0,.42);
}

.princess-cart::before,
.princess-cart::after {
  content: "";
  position: absolute;
  bottom: -10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b2516;
  border: 2px solid #a77842;
}

.princess-cart::before { left: 12%; }
.princess-cart::after { right: 12%; }

.princess-cart i {
  position: absolute;
  top: -22px;
  width: 28%;
  height: 24px;
  border-radius: 4px 4px 9px 9px;
  background: #b58759;
}

.princess-cart i:first-child { left: 12%; }
.princess-cart i:last-child { right: 15%; background: #7c2637; }

.princess-tissue {
  position: absolute;
  right: 29%;
  bottom: 30%;
  width: 44px;
  height: 26px;
  background: #d7c9ae;
  box-shadow: 0 5px 10px rgba(0,0,0,.35);
}

.princess-tissue::before {
  content: "";
  position: absolute;
  left: 15px;
  bottom: 16px;
  width: 21px;
  height: 28px;
  border-radius: 50% 50% 0 0;
  background: rgba(244, 236, 219, .82);
  transform: rotate(13deg);
}

.princess-mahjong-shadow {
  position: absolute;
  right: 24%;
  bottom: 30%;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 500ms ease;
}

.princess-mahjong-shadow i {
  width: 16px;
  height: 21px;
  border-radius: 2px;
  background: #d2c8aa;
  box-shadow: inset 0 0 0 1px #70684e;
}

.afterstory-song-stage[data-cue="princess-mahjong"] .princess-mahjong-shadow { opacity: .78; }
.afterstory-song-stage[data-cue="princess-soft"] .afterstory-set-princess { filter: saturate(.76) brightness(.86); }

.afterstory-set-dog {
  background:
    radial-gradient(ellipse at 62% 38%, rgba(244, 190, 112, .28), transparent 38%),
    linear-gradient(180deg, #503323, #1b100d 76%);
}

.dog-room-window {
  position: absolute;
  top: 18%;
  left: 18%;
  width: 22%;
  height: 34%;
  border: 9px solid #4d2b1d;
  background:
    linear-gradient(90deg, transparent 48%, #573421 48% 52%, transparent 52%),
    linear-gradient(transparent 48%, #573421 48% 52%, transparent 52%),
    radial-gradient(circle at 63% 28%, rgba(255, 224, 159, .36), transparent 7%),
    linear-gradient(180deg, #151928, #463126);
  box-shadow: inset 0 0 32px rgba(0,0,0,.56), 0 9px 24px rgba(0,0,0,.38);
}

.dog-floor-lamp {
  position: absolute;
  top: 24%;
  right: 19%;
  width: 5px;
  height: 42%;
  background: #8c6438;
  box-shadow: 0 0 4px rgba(255, 210, 133, .35);
}

.dog-floor-lamp::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -23%;
  width: 100px;
  height: 75px;
  border-radius: 50% 50% 13% 13%;
  background: linear-gradient(180deg, #c99458, #81512c);
  box-shadow: 0 28px 70px rgba(255, 190, 93, .25), inset 0 -15px 25px rgba(0,0,0,.26);
  clip-path: polygon(23% 0, 77% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
}

.dog-sofa {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 25%;
  width: 40%;
  height: 25%;
  border: 3px solid #4f271e;
  border-radius: 34px 34px 10px 10px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255,255,255,.06) 49.5% 50.5%, transparent 51%),
    linear-gradient(180deg, #8d3a42, #451b23 82%);
  box-shadow: 0 20px 32px rgba(0,0,0,.5), inset 0 3px rgba(255,255,255,.07);
  transform: translateX(-50%);
}

.dog-sofa::before,
.dog-sofa::after {
  content: "";
  position: absolute;
  bottom: -9%;
  width: 7%;
  height: 14%;
  background: #392017;
}

.dog-sofa::before { left: 10%; }
.dog-sofa::after { right: 10%; }

.dog-blanket {
  position: absolute;
  right: 8%;
  top: 17%;
  width: 30%;
  height: 72%;
  border-radius: 18px 4px 13px 22px;
  background: repeating-linear-gradient(110deg, #c69d78 0 9px, #b28566 9px 13px);
  box-shadow: 0 5px 12px rgba(0,0,0,.25);
  transform: rotate(-5deg);
}

.dog-cushion {
  position: absolute;
  left: 12%;
  top: 18%;
  width: 23%;
  height: 48%;
  border-radius: 8px;
  background: #b27c51;
  box-shadow: inset 0 0 13px rgba(0,0,0,.24);
  transform: rotate(6deg);
}

.dog-side-table {
  position: absolute;
  right: 25%;
  bottom: 24%;
  width: 10%;
  height: 9%;
  border-radius: 50%;
  background: linear-gradient(180deg, #8d5c39, #452719);
  box-shadow: 0 12px 0 -4px #2b1710, 0 23px 22px rgba(0,0,0,.42);
}

.dog-cold-drink {
  position: absolute;
  left: 18%;
  bottom: 74%;
  width: 22px;
  height: 40px;
  border: 2px solid rgba(221, 233, 223, .48);
  border-radius: 3px 3px 8px 8px;
  background: linear-gradient(transparent 22%, rgba(115, 71, 45, .7) 23%);
}

.dog-tissue {
  position: absolute;
  right: 13%;
  bottom: 77%;
  width: 34px;
  height: 24px;
  background: #cfbfa3;
}

.dog-symbols {
  position: absolute;
  left: 28%;
  bottom: 26%;
  width: 95px;
  height: 78px;
}

.dog-tag {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 46px;
  border: 4px solid #ae8151;
  border-radius: 50% 50% 45% 45%;
  background: #40261d;
  box-shadow: 0 7px 12px rgba(0,0,0,.36);
}

.dog-tag::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 14px;
  height: 14px;
  border: 3px solid #ae8151;
  border-radius: 50%;
  transform: translateX(-50%);
}

.dog-crown {
  position: absolute;
  right: 0;
  bottom: 8px;
  width: 43px;
  height: 32px;
  border: 3px solid #cc9c52;
  background: rgba(210, 162, 78, .12);
  clip-path: polygon(0 100%, 8% 20%, 34% 64%, 50% 0, 70% 62%, 93% 18%, 100% 100%);
}

.afterstory-song-stage[data-cue="dog-soft"],
.afterstory-song-stage[data-cue="dog-bridge"] {
  filter: saturate(.84) brightness(.92);
}

.afterstory-set-mahjong {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(217, 169, 92, .29), transparent 34%),
    linear-gradient(180deg, #203128, #09130f 76%);
}

.magic-wall-panels {
  position: absolute;
  inset: 14% 13% 29%;
  border: 1px solid rgba(204, 155, 87, .23);
  background:
    repeating-linear-gradient(90deg, transparent 0 16%, rgba(215, 168, 97, .1) 16.1% 16.3%),
    linear-gradient(180deg, #203d32, #10241e);
  box-shadow: inset 0 0 90px rgba(0,0,0,.5);
}

.magic-pendant {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 50%;
  width: 5px;
  height: 30%;
  background: #85603b;
  transform: translateX(-50%);
}

.magic-pendant::after {
  content: "";
  position: absolute;
  bottom: -7%;
  left: 50%;
  width: 190px;
  height: 74px;
  border: 3px solid #a4773f;
  border-radius: 50% 50% 9px 9px;
  background: radial-gradient(ellipse at 50% 100%, #ffdda0, #b87d3d 52%, #3f2916 76%);
  box-shadow: 0 34px 75px rgba(237, 168, 77, .28), inset 0 -15px 25px rgba(0,0,0,.34);
  transform: translateX(-50%);
}

.magic-table {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 21%;
  width: 40%;
  height: 29%;
  border: clamp(11px, 1vw, 18px) solid #56301d;
  border-radius: 6px;
  background: #133c30;
  box-shadow: inset 0 0 0 4px #97613a, inset 0 0 45px rgba(0,0,0,.48), 0 25px 34px rgba(0,0,0,.6);
  transform: translateX(-50%) perspective(580px) rotateX(57deg);
}

.magic-felt {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(221, 187, 125, .22);
  background: radial-gradient(circle at 50% 45%, #245f4c, #123d31 74%);
}

.magic-felt i {
  position: absolute;
  width: 9%;
  height: 19%;
  border-radius: 3px;
  background: linear-gradient(145deg, #e7dec4, #a99f82);
  box-shadow: inset 0 0 0 2px #756d56, 0 5px 7px rgba(0,0,0,.36);
}

.magic-felt i:nth-child(1) { top: 12%; left: 29%; transform: rotate(-5deg); }
.magic-felt i:nth-child(2) { top: 12%; left: 40%; }
.magic-felt i:nth-child(3) { top: 12%; left: 51%; transform: rotate(3deg); }
.magic-felt i:nth-child(4) { top: 12%; left: 62%; transform: rotate(7deg); }

.magic-token {
  position: absolute;
  right: 14%;
  bottom: 14%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 3px solid #bc8244;
  border-radius: 50%;
  color: #e6bd79;
  font-family: Georgia, serif;
  font-size: 14px;
  background: #65222a;
  box-shadow: 0 5px 8px rgba(0,0,0,.45);
}

.magic-chair {
  position: absolute;
  z-index: 3;
  width: 13%;
  height: 23%;
  border: 6px solid #402419;
  border-radius: 44% 44% 8% 8%;
  background: linear-gradient(90deg, #4b171d, #7c2c34 52%, #43151b);
  box-shadow: 0 16px 24px rgba(0,0,0,.46);
}

.magic-chair.chair-one { left: 26%; bottom: 22%; transform: rotate(5deg); }
.magic-chair.chair-two { right: 26%; bottom: 22%; transform: rotate(-5deg); }
.magic-chair.chair-three { left: 36%; top: 38%; transform: scale(.78); opacity: .72; }
.magic-chair.chair-four { right: 36%; top: 38%; transform: scale(.78); opacity: .72; }

.afterstory-song-stage[data-cue="mahjong-bridge"] .afterstory-set-mahjong {
  filter: saturate(.72) sepia(.12) brightness(.92);
}

.afterstory-song-stage[data-cue="mahjong-chorus"] .magic-pendant::after,
.afterstory-song-stage[data-cue="mahjong-final"] .magic-pendant::after {
  box-shadow: 0 34px 95px rgba(244, 184, 93, .45), inset 0 -15px 25px rgba(0,0,0,.28);
}

.afterstory-track-toolbar {
  position: absolute;
  z-index: 18;
  top: max(18px, env(safe-area-inset-top));
  right: 22px;
  left: 22px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.afterstory-track-toolbar button {
  min-height: 42px;
  padding: 8px 15px;
  font-size: 13px;
  pointer-events: auto;
  background: rgba(27, 13, 12, .62);
}

.afterstory-track-heading {
  position: absolute;
  z-index: 12;
  top: 8.2%;
  left: 50%;
  width: min(670px, calc(100vw - 150px));
  text-align: center;
  text-shadow: 0 3px 24px rgba(0,0,0,.95);
  transform: translateX(-50%);
  transition: opacity 500ms ease, transform 500ms ease;
}

.afterstory-track-heading h2 {
  margin: 0;
  color: #fff1da;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: clamp(30px, 3.4vw, 52px);
  font-weight: 500;
  letter-spacing: 0;
}

.afterstory-track-heading span {
  display: block;
  margin-top: 7px;
  color: rgba(243, 213, 172, .72);
  font-size: 13px;
}

.afterstory-experience.has-started .afterstory-track-heading {
  opacity: .68;
  transform: translate(-50%, -6px) scale(.84);
  transform-origin: 50% 0;
}

.afterstory-track-intro {
  position: absolute;
  z-index: 15;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(520px, calc(100vw - 60px));
  place-items: center;
  transform: translate(-50%, -50%);
  transition: opacity 420ms ease, visibility 0s linear 420ms;
}

.afterstory-track-intro button {
  min-width: 170px;
  min-height: 50px;
  padding: 10px 24px;
  font-size: 15px;
  background: linear-gradient(180deg, rgba(130, 65, 43, .92), rgba(54, 22, 21, .94));
}

.afterstory-experience.has-started .afterstory-track-intro {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.afterstory-lyrics {
  position: absolute;
  z-index: 15;
  right: 13%;
  bottom: 16.5%;
  left: 13%;
  text-align: center;
  text-shadow: 0 3px 18px rgba(0,0,0,.98), 0 1px 3px rgba(0,0,0,.9);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.afterstory-experience.has-started .afterstory-lyrics {
  opacity: 1;
  transform: translateY(0);
}

.afterstory-lyric-section {
  display: block;
  min-height: 18px;
  color: rgba(227, 183, 119, .75);
  font-size: 11px;
}

.afterstory-lyrics p {
  margin: 2px 0;
}

.afterstory-lyric-previous,
.afterstory-lyric-next {
  min-height: 21px;
  color: rgba(255, 242, 220, .43);
  font-size: clamp(12px, 1vw, 15px);
}

.afterstory-lyric-current {
  min-height: 41px;
  color: #fff5e6;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: clamp(22px, 2.2vw, 36px);
  font-weight: 500;
  line-height: 1.4;
}

.afterstory-special-bubble {
  position: absolute;
  z-index: 16;
  right: 14%;
  bottom: 38%;
  max-width: 300px;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid rgba(174, 126, 76, .7);
  border-radius: 18px 18px 5px 18px;
  color: #3c2419;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: 15px;
  background: rgba(244, 225, 193, .93);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transition: opacity 180ms ease, transform 220ms var(--ease);
}

.afterstory-special-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.afterstory-ending {
  position: absolute;
  z-index: 22;
  top: 50%;
  left: 50%;
  width: min(720px, calc(100vw - 48px));
  padding: 30px 22px;
  text-align: center;
  text-shadow: 0 4px 22px rgba(0,0,0,.92);
  background: radial-gradient(ellipse at 50% 50%, rgba(20, 9, 8, .78), transparent 72%);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-50% + 10px));
  transition: opacity 420ms ease, transform 420ms var(--ease), visibility 0s linear 420ms;
}

.afterstory-ending > p {
  margin: 0 0 20px;
  color: #fff0d8;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: clamp(28px, 3.2vw, 48px);
}

.afterstory-ending > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.afterstory-ending button {
  min-width: 130px;
  padding: 9px 15px;
}

.afterstory-ending .afterstory-primary {
  border-color: rgba(239, 198, 132, .78);
  background: linear-gradient(180deg, rgba(130, 65, 43, .94), rgba(54, 22, 21, .96));
}

.afterstory-experience.has-ended .afterstory-ending {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
  transition: opacity 420ms ease, transform 420ms var(--ease);
}

.afterstory-experience.has-ended .afterstory-lyrics,
.afterstory-experience.has-ended .afterstory-special-bubble {
  opacity: 0;
}

.afterstory-player {
  position: absolute;
  z-index: 24;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 48px 46px minmax(180px, 1fr) 46px 48px 110px minmax(94px, auto);
  gap: 9px;
  align-items: center;
  min-height: 74px;
  padding: 10px max(20px, calc((100vw - 1180px) / 2)) max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(229, 185, 117, .28);
  background: linear-gradient(180deg, rgba(18, 8, 8, .82), rgba(7, 4, 4, .96));
  box-shadow: 0 -16px 44px rgba(0,0,0,.38);
  backdrop-filter: blur(10px);
}

.afterstory-icon-button {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(233, 190, 125, .45);
  border-radius: 50%;
  color: #ffedcf;
  background: rgba(92, 43, 32, .42);
}

.afterstory-time {
  color: rgba(255, 239, 215, .74);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  text-align: center;
}

.afterstory-seek-wrap,
.afterstory-volume-wrap {
  display: flex;
  align-items: center;
  min-height: 44px;
}

#afterstorySeek,
#afterstoryVolume {
  width: 100%;
  accent-color: #b87350;
}

#afterstorySeek {
  height: 44px;
  margin: 0;
  background: linear-gradient(90deg, #c58d58 0 var(--afterstory-progress, 0%), rgba(255,255,255,.18) var(--afterstory-progress, 0%) 100%);
}

.afterstory-player-status {
  color: rgba(255, 238, 213, .62);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.afterstory-film-layer[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .afterstory-programs {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 18px;
    width: calc(100vw - 90px);
  }

  .afterstory-program {
    padding-right: 16px;
    padding-left: 16px;
  }

  .afterstory-player {
    grid-template-columns: 46px 42px minmax(120px, 1fr) 42px 46px 84px;
  }

  .afterstory-player-status {
    display: none;
  }
}

@media (max-width: 760px) {
  .finale-panel .afterstory-invite {
    margin-top: 16px;
    padding-top: 12px;
  }

  .finale-panel .afterstory-invite p {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .afterstory-backstage-curtain { width: 24%; }
  .afterstory-backstage-lamp.lamp-left { left: 14%; }
  .afterstory-backstage-lamp.lamp-right { right: 14%; }

  .afterstory-hub-heading {
    top: max(4.5%, env(safe-area-inset-top));
    width: calc(100vw - 34px);
  }

  .afterstory-hub-heading p { font-size: 9px; }
  .afterstory-hub-heading h2 { font-size: 34px; }
  .afterstory-hub-heading strong { margin-top: 3px; font-size: 14px; }
  .afterstory-hub-heading span { font-size: 11px; }

  .afterstory-programs {
    top: 27%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: calc(100vw - 42px);
  }

  .afterstory-program {
    display: grid;
    grid-template-columns: 72px 1fr 58px;
    grid-template-rows: 1fr 1fr;
    width: 100%;
    height: 15svh;
    min-height: 104px;
    max-height: 126px;
    padding: 18px 22px;
    align-items: center;
    text-align: left;
  }

  .afterstory-program::before {
    top: 12px;
    left: 22px;
    width: 4px;
    height: calc(100% - 24px);
    transform: none;
  }

  .afterstory-program::after { inset: 8px; }

  .afterstory-program-number {
    grid-row: 1 / 3;
    margin: 0;
    font-size: 10px;
  }

  .afterstory-program strong {
    grid-column: 2;
    margin: 0;
    font-size: clamp(16px, 4.4vw, 20px);
    line-height: 1.25;
  }

  .afterstory-program em {
    grid-column: 2;
    font-size: 11px;
  }

  .afterstory-program-status {
    position: static;
    grid-column: 3;
    grid-row: 1 / 3;
    justify-self: end;
    font-size: 10px;
  }

  .afterstory-back-button {
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .afterstory-stage-valance { height: 16%; }
  .afterstory-stage-wing { width: 21%; }
  .afterstory-stage-floor { top: 65%; height: 39%; }

  .afterstory-track-toolbar {
    top: max(9px, env(safe-area-inset-top));
    right: 10px;
    left: 10px;
  }

  .afterstory-track-toolbar button {
    min-width: 92px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .afterstory-track-heading {
    top: 7.5%;
    width: calc(100vw - 70px);
  }

  .afterstory-track-heading p { font-size: 9px; }
  .afterstory-track-heading h2 { font-size: clamp(23px, 7vw, 31px); }
  .afterstory-track-heading span { margin-top: 3px; font-size: 11px; }

  .afterstory-experience.has-started .afterstory-track-heading {
    opacity: .54;
    transform: translate(-50%, -4px) scale(.78);
  }

  .afterstory-track-intro { top: 46%; }
  .afterstory-track-intro button { min-height: 48px; }

  .afterstory-lyrics {
    right: 18px;
    bottom: 18%;
    left: 18px;
  }

  .afterstory-lyric-current {
    min-height: 35px;
    font-size: clamp(18px, 5.2vw, 24px);
  }

  .afterstory-lyric-previous,
  .afterstory-lyric-next {
    min-height: 18px;
    font-size: 11px;
  }

  .afterstory-special-bubble {
    right: 18px;
    bottom: 37%;
    max-width: calc(100vw - 78px);
    font-size: 13px;
  }

  .afterstory-ending {
    top: 46%;
    width: calc(100vw - 28px);
    padding: 18px 12px;
  }

  .afterstory-ending > p { margin-bottom: 14px; font-size: 25px; }
  .afterstory-ending > div { display: grid; grid-template-columns: 1fr; width: min(240px, 100%); margin: auto; gap: 7px; }
  .afterstory-ending button { width: 100%; min-height: 44px; }

  .afterstory-player {
    grid-template-columns: 44px 38px minmax(104px, 1fr) 38px 44px;
    grid-template-rows: 44px 28px;
    gap: 2px 6px;
    min-height: 92px;
    padding: 5px 10px max(7px, env(safe-area-inset-bottom));
  }

  .afterstory-volume-wrap {
    grid-column: 3 / 6;
    grid-row: 2;
    min-height: 26px;
  }

  .afterstory-player-status {
    display: block;
    grid-column: 1 / 3;
    grid-row: 2;
    overflow: visible;
    font-size: 9px;
    line-height: 1.2;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
  }

  .princess-wall-panel { inset: 15% 11% 33%; }
  .princess-mirror { top: 22%; width: 43%; height: 31%; }
  .princess-vanity { top: 52%; left: 24%; width: 52%; }
  .princess-rack { top: 29%; left: 12%; width: 19%; height: 32%; opacity: .76; }
  .princess-cart { top: 49%; right: 11%; width: 22%; height: 13%; }
  .princess-tissue { right: 24%; bottom: 38%; }

  .dog-room-window { top: 21%; left: 13%; width: 32%; height: 26%; }
  .dog-floor-lamp { top: 29%; right: 15%; height: 32%; }
  .dog-floor-lamp::before { width: 74px; height: 56px; }
  .dog-sofa { bottom: 31%; width: 65%; height: 19%; }
  .dog-side-table { right: 14%; bottom: 30%; width: 17%; }
  .dog-symbols { left: 20%; bottom: 31%; transform: scale(.72); transform-origin: 0 100%; }

  .magic-wall-panels { inset: 16% 11% 34%; }
  .magic-pendant { height: 25%; }
  .magic-pendant::after { width: 132px; height: 54px; }
  .magic-table { bottom: 29%; width: 68%; height: 20%; }
  .magic-chair { width: 21%; height: 16%; }
  .magic-chair.chair-one { left: 10%; bottom: 30%; }
  .magic-chair.chair-two { right: 10%; bottom: 30%; }
  .magic-chair.chair-three { left: 27%; top: 39%; }
  .magic-chair.chair-four { right: 27%; top: 39%; }
}

@media (max-height: 700px) and (min-width: 761px) {
  .afterstory-hub-heading { top: 3%; }
  .afterstory-programs { top: 27%; }
  .afterstory-program { height: 42svh; min-height: 230px; }
  .afterstory-track-heading { top: 6%; }
  .afterstory-lyrics { bottom: 18%; }
}

@media (max-height: 480px) {
  .afterstory-lyrics {
    bottom: 100px;
  }
}

/* R7M2R1: formal theatre navigation and intermission transitions. */
.theatre-flow-nav[hidden],
.answer-resume-gate[hidden] {
  display: none !important;
}

.theatre-flow-nav {
  position: absolute;
  z-index: 76;
  right: max(20px, env(safe-area-inset-right));
  left: max(20px, env(safe-area-inset-left));
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.theatre-flow-nav button,
.afterstory-hub-navigation button {
  min-width: 116px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid rgba(221, 174, 103, .56);
  border-radius: 4px;
  color: #f8e6c8;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: 13px;
  letter-spacing: 0;
  background: linear-gradient(180deg, rgba(76, 31, 27, .84), rgba(28, 12, 12, .94));
  box-shadow: inset 0 0 0 1px rgba(255, 224, 171, .08), 0 8px 20px rgba(0, 0, 0, .32);
  pointer-events: auto;
}

.theatre-flow-nav button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.trilogy-flow-nav {
  bottom: max(22px, env(safe-area-inset-bottom));
}

.answer-flow-nav {
  bottom: max(86px, calc(env(safe-area-inset-bottom) + 82px));
}

.curtains.is-quick .curtain {
  transition-duration: 420ms !important;
}

.chapter-menu.is-active.is-transitioning-out .chapter-sign {
  animation: none !important;
  opacity: 0 !important;
  transition: transform 920ms cubic-bezier(.44, .02, .3, 1), opacity 520ms ease 320ms !important;
}

.chapter-menu.is-active.is-transitioning-out .chapter-sign:nth-of-type(1) {
  transform: translate(-4vw, -125vh) rotate(-2deg) !important;
  transition-delay: 0ms !important;
}

.chapter-menu.is-active.is-transitioning-out .chapter-sign:nth-of-type(3) {
  transform: translate(4vw, -125vh) rotate(2deg) !important;
  transition-delay: 220ms !important;
}

.chapter-menu.is-active.is-transitioning-out .chapter-sign:nth-of-type(2) {
  transform: translateY(-128vh) !important;
  transition-delay: 440ms !important;
}

.theatre-transition {
  position: absolute;
  z-index: 90;
  inset: 0;
  overflow: hidden;
  color: #fff0d5;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms ease, visibility 0s linear 420ms;
}

.theatre-transition.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 420ms ease;
}

.trilogy-answer-transition {
  background: radial-gradient(ellipse at 50% 58%, rgba(153, 86, 48, .24), rgba(8, 4, 5, .68) 60%, rgba(5, 2, 3, .88));
}

.transition-empty-stage {
  position: absolute;
  inset: 0;
  background: url("./assets/image/stage/HovicMap_A7_empty_stage.png") center / cover no-repeat;
  opacity: 1;
  transform: scale(1);
}

.theatre-transition.is-active .transition-empty-stage {
  animation: none;
}

.retreat-sign {
  position: absolute;
  z-index: 2;
  top: -4%;
  width: min(29vw, 520px);
  aspect-ratio: 1125 / 735;
  filter: drop-shadow(0 16px 17px rgba(0, 0, 0, .42));
}

.retreat-sign-left { left: 9%; transform: rotate(-2deg); }
.retreat-sign-center { top: -8%; left: 50%; width: min(32vw, 570px); transform: translateX(-50%); }
.retreat-sign-right { right: 9%; transform: rotate(2deg); }

.retreat-sign img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.retreat-sign > span {
  position: absolute;
  right: 10%;
  bottom: 11%;
  left: 10%;
  display: flex;
  min-height: 39%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff0d4;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  text-align: center;
  text-shadow: 0 3px 9px rgba(0, 0, 0, .9);
}

.retreat-sign small {
  color: rgba(239, 205, 153, .72);
  font-size: 11px;
}

.retreat-sign strong {
  margin-top: 6px;
  font-size: clamp(16px, 1.55vw, 28px);
  font-weight: 500;
  line-height: 1.25;
}

.theatre-transition.is-active .retreat-sign-left {
  animation: retreat-sign-left 1250ms cubic-bezier(.48, .03, .3, 1) .45s forwards;
}

.theatre-transition.is-active .retreat-sign-right {
  animation: retreat-sign-right 1250ms cubic-bezier(.48, .03, .3, 1) .68s forwards;
}

.theatre-transition.is-active .retreat-sign-center {
  animation: retreat-sign-center 1300ms cubic-bezier(.48, .03, .3, 1) .92s forwards;
}

.transition-warm-focus {
  position: absolute;
  top: 8%;
  left: 50%;
  width: min(52vw, 720px);
  height: 90%;
  background: radial-gradient(ellipse at 50% 65%, rgba(255, 204, 126, .31), rgba(205, 115, 59, .12) 32%, transparent 68%);
  filter: blur(2px);
  opacity: 0;
  transform: translateX(-50%) scale(.74);
}

.theatre-transition.is-active .transition-warm-focus {
  animation: transition-focus-in 2.2s ease .35s forwards;
}

.transition-red-thread {
  position: absolute;
  top: 63%;
  left: 50%;
  width: min(34vw, 430px);
  height: 2px;
  background: linear-gradient(90deg, transparent, #8d1f2d 14%, #d45459 50%, #8d1f2d 86%, transparent);
  box-shadow: 0 0 11px rgba(178, 46, 55, .36);
  opacity: 0;
  transform: translateX(-50%) scaleX(.2);
}

.theatre-transition.is-active .transition-red-thread {
  animation: transition-thread-in 1.4s ease 1.05s forwards;
}

.transition-copy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(680px, calc(100vw - 56px));
  text-align: center;
  text-shadow: 0 4px 28px rgba(0, 0, 0, .92);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 14px));
}

.theatre-transition.is-active .transition-copy {
  animation: transition-copy-in 760ms ease 1.95s forwards;
}

.transition-copy span {
  display: block;
  color: rgba(223, 178, 111, .84);
  font-size: 12px;
}

.transition-copy h2 {
  margin: 8px 0 5px;
  color: #fff0d4;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 500;
  letter-spacing: 0;
}

.transition-copy p {
  margin: 0;
  color: rgba(255, 232, 196, .72);
  font-size: 14px;
}

@keyframes transition-focus-in {
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes retreat-sign-left {
  to { opacity: 0; transform: translate(-3vw, -125vh) rotate(-4deg); }
}

@keyframes retreat-sign-right {
  to { opacity: 0; transform: translate(3vw, -125vh) rotate(4deg); }
}

@keyframes retreat-sign-center {
  to { opacity: 0; transform: translate(-50%, -130vh); }
}

@keyframes transition-thread-in {
  to { opacity: .86; transform: translateX(-50%) scaleX(1); }
}

@keyframes transition-copy-in {
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.answer-afterstory-transition {
  z-index: 94;
  background: radial-gradient(ellipse at 50% 58%, rgba(144, 82, 47, .18), rgba(6, 3, 4, .72));
}

.transition-answer-line,
.transition-afterstory-line {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: min(720px, calc(100vw - 48px));
  margin: 0;
  color: #fff0d8;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: clamp(28px, 4vw, 54px);
  text-align: center;
  text-shadow: 0 4px 28px rgba(0, 0, 0, .96);
  transform: translate(-50%, -50%);
  transition: opacity 480ms ease, transform 480ms ease;
}

.transition-afterstory-line {
  font-size: clamp(22px, 3vw, 40px);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 10px));
}

.answer-afterstory-transition.is-curtain-closed .transition-answer-line {
  opacity: 0;
  transform: translate(-50%, calc(-50% - 8px));
}

.answer-afterstory-transition.is-message-visible .transition-afterstory-line {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.transition-curtain {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 51%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 4%, rgba(0,0,0,.15) 5% 10%),
    linear-gradient(90deg, #2a080d, #721c28 66%, #330b12);
  box-shadow: inset -18px 0 32px rgba(0, 0, 0, .46);
  transition: transform 780ms cubic-bezier(.52, .02, .3, 1);
}

.transition-curtain-left {
  left: 0;
  transform: translateX(-100%);
}

.transition-curtain-right {
  right: 0;
  transform: translateX(100%) scaleX(-1);
}

.answer-afterstory-transition.is-curtain-closed .transition-curtain-left {
  transform: translateX(0);
}

.answer-afterstory-transition.is-curtain-closed .transition-curtain-right {
  transform: translateX(0) scaleX(-1);
}

.answer-resume-gate {
  position: absolute;
  z-index: 62;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100vw - 42px));
  padding: 24px 22px;
  border: 1px solid rgba(222, 177, 111, .5);
  border-radius: 6px;
  color: #fff0d8;
  text-align: center;
  background: rgba(23, 10, 10, .92);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .58), inset 0 0 0 1px rgba(255, 233, 196, .06);
  transform: translate(-50%, -50%);
}

.answer-resume-gate p {
  margin: 0 0 15px;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  font-size: 18px;
}

.answer-resume-gate > div {
  display: flex;
  gap: 9px;
  justify-content: center;
}

.answer-resume-gate button {
  min-height: 44px;
}

.afterstory-hub-navigation {
  position: absolute;
  z-index: 22;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  left: max(20px, env(safe-area-inset-left));
  display: flex;
  justify-content: space-between;
}

.afterstory-hub-navigation .afterstory-back-button {
  position: static;
  transform: none;
}

.afterstory-track-intro {
  gap: 9px;
}

.afterstory-track-intro .afterstory-restart-button {
  border-color: rgba(225, 187, 130, .42);
  background: rgba(30, 14, 13, .84);
}

.afterstory-track-intro .afterstory-restart-button[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .theatre-flow-nav {
    right: max(10px, env(safe-area-inset-right));
    left: max(10px, env(safe-area-inset-left));
  }

  .theatre-flow-nav button,
  .afterstory-hub-navigation button {
    min-width: 102px;
    min-height: 44px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .trilogy-flow-nav {
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .answer-flow-nav {
    bottom: max(102px, calc(env(safe-area-inset-bottom) + 98px));
  }

  .transition-red-thread {
    width: 64vw;
  }

  .retreat-sign {
    top: -3%;
    left: 50%;
    width: min(84vw, 390px);
    transform: translateX(-50%);
  }

  .retreat-sign-left { top: -1%; }
  .retreat-sign-center { top: 19%; }
  .retreat-sign-right { top: 39%; right: auto; }

  .retreat-sign > span {
    right: 13%;
    bottom: 10%;
    left: 13%;
  }

  .retreat-sign strong {
    font-size: 17px;
  }

  .theatre-transition.is-active .retreat-sign-left {
    animation-name: retreat-sign-mobile;
  }

  .theatre-transition.is-active .retreat-sign-right {
    animation-name: retreat-sign-mobile;
  }

  .theatre-transition.is-active .retreat-sign-center {
    animation-name: retreat-sign-mobile;
  }

  .answer-resume-gate > div {
    display: grid;
  }

  .afterstory-hub-navigation {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
  }
}

@keyframes retreat-sign-mobile {
  to { opacity: 0; transform: translate(-50%, -130vh); }
}

/* R7M2R2: three-story plaques converge into the standalone fourth answer. */
.theatre-entry-panel {
  position: absolute;
  z-index: 28;
  top: 52%;
  left: 50%;
  width: min(620px, calc(100vw - 44px));
  color: #f7e8ce;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  text-align: center;
  text-shadow: 0 4px 22px rgba(0, 0, 0, .92);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 12px));
  transition: opacity 420ms ease, transform 420ms ease;
}

.theatre-entry-panel.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.theatre-entry-panel p {
  margin: 0 0 8px;
  color: #d9ae70;
  font-size: 13px;
}

.theatre-entry-panel h2 {
  margin: 0 0 22px;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.3;
}

.theatre-entry-panel button {
  min-width: 150px;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid rgba(224, 180, 111, .64);
  border-radius: 4px;
  color: #f8e8ce;
  background: linear-gradient(180deg, rgba(90, 39, 31, .92), rgba(37, 15, 14, .96));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 231, 189, .08);
}

.trilogy-flow-nav {
  z-index: 82;
}

.trilogy-flow-nav button[hidden] {
  display: none !important;
}

.chapter-shell:not(.is-active) > button {
  pointer-events: none;
}

.trilogy-answer-transition {
  background: radial-gradient(ellipse at 50% 62%, rgba(158, 90, 48, .18), rgba(8, 4, 5, .72) 62%, rgba(4, 2, 3, .92));
}

.trilogy-answer-transition.is-active {
  animation: r7m2r2-stage-dim 900ms ease forwards;
}

.trilogy-answer-transition.is-entering-answer {
  opacity: 0;
  transition: opacity 720ms ease;
}

.trilogy-answer-transition .transition-empty-stage {
  filter: brightness(.9) saturate(.92);
}

.trilogy-answer-transition.is-active .transition-empty-stage {
  animation: r7m2r2-stage-settle 5.6s ease forwards;
}

.trilogy-answer-transition .retreat-sign {
  z-index: 4;
}

.trilogy-answer-transition.is-active .retreat-sign-left {
  animation: r7m2r2-retreat-left 1.4s cubic-bezier(.46, .03, .28, 1) .8s forwards;
}

.trilogy-answer-transition.is-active .retreat-sign-right {
  animation: r7m2r2-retreat-right 1.4s cubic-bezier(.46, .03, .28, 1) 1.02s forwards;
}

.trilogy-answer-transition.is-active .retreat-sign-center {
  animation: r7m2r2-retreat-center 1.45s cubic-bezier(.46, .03, .28, 1) 1.24s forwards;
}

.transition-warm-focus {
  z-index: 2;
}

.trilogy-answer-transition.is-active .transition-warm-focus {
  animation: r7m2r2-focus 3.3s ease 1.55s forwards;
}

.trilogy-answer-transition .transition-red-thread {
  z-index: 5;
  top: 65%;
  width: 50%;
  height: 3px;
  background: none;
  box-shadow: none;
  opacity: 0;
}

.transition-red-thread-left {
  left: 0;
  transform: translateX(-104%) rotate(.5deg);
  background: linear-gradient(90deg, transparent 0, #6f1721 18%, #a92b36 72%, #d05a60 100%) !important;
  box-shadow: 0 0 9px rgba(160, 35, 45, .35) !important;
}

.transition-red-thread-right {
  right: 0;
  left: auto !important;
  transform: translateX(104%) rotate(-.5deg);
  background: linear-gradient(90deg, #d05a60 0, #a92b36 28%, #6f1721 82%, transparent 100%) !important;
  box-shadow: 0 0 9px rgba(160, 35, 45, .35) !important;
}

.trilogy-answer-transition.is-active .transition-red-thread-left {
  animation:
    r7m2r2-thread-left 1.25s cubic-bezier(.25, .74, .28, 1) 1.72s forwards,
    r7m2r2-thread-away 440ms ease 3.62s forwards;
}

.trilogy-answer-transition.is-active .transition-red-thread-right {
  animation:
    r7m2r2-thread-right 1.25s cubic-bezier(.25, .74, .28, 1) 1.72s forwards,
    r7m2r2-thread-away 440ms ease 3.62s forwards;
}

.transition-thread-knot {
  position: absolute;
  z-index: 6;
  top: calc(65% - 6px);
  left: 50%;
  width: 15px;
  height: 15px;
  border: 3px solid #a42c36;
  border-right-color: #d15a60;
  border-radius: 50%;
  box-shadow: 0 0 11px rgba(174, 46, 54, .38);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.45) rotate(-32deg);
}

.trilogy-answer-transition.is-active .transition-thread-knot {
  animation: r7m2r2-knot-in 520ms ease 2.7s forwards, r7m2r2-knot-away 420ms ease 3.55s forwards;
}

.answer-reveal-plaque {
  position: absolute;
  z-index: 8;
  top: 53%;
  left: 50%;
  display: block;
  width: clamp(320px, 24vw, 480px);
  aspect-ratio: 1.55 / 1;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(132, 100, 66, .56);
  border-radius: 2px;
  color: #3d241c;
  font-family: Georgia, "Times New Roman", "Microsoft JhengHei", serif;
  background:
    repeating-linear-gradient(6deg, rgba(102, 75, 48, .025) 0 2px, transparent 3px 9px),
    linear-gradient(150deg, #f4ead5, #d9c7a6 70%, #cdb894);
  box-shadow: 0 20px 42px rgba(0, 0, 0, .48), inset 0 0 26px rgba(116, 82, 49, .12);
  opacity: 0;
  visibility: hidden;
  cursor: default;
  pointer-events: none;
  transform: translate(-50%, -44%) perspective(900px) rotateX(15deg) scale(.48);
  transform-origin: 50% 50%;
}

.answer-reveal-plaque::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -28%;
  left: -5%;
  width: 110%;
  aspect-ratio: 1125 / 735;
  background: url("./assets/image/stage/舞台R6R2/吊牌.png") center / contain no-repeat;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, .48));
  opacity: 0;
  pointer-events: none;
}

.trilogy-answer-transition.is-active .answer-reveal-plaque {
  animation:
    r7m2r2-letter-arrive 760ms cubic-bezier(.22, .78, .28, 1) 2.72s forwards,
    r7m2r2-plaque-grow 1.02s cubic-bezier(.2, .72, .23, 1) 4.46s forwards,
    r7m2r2-plaque-settle 620ms ease-in-out 5.3s forwards,
    r7m2r2-paper-away 1ms linear 5.0s forwards;
}

.trilogy-answer-transition.is-active .answer-reveal-plaque::before {
  animation: r7m2r2-paper-to-wood 820ms ease 4.42s forwards;
}

.trilogy-answer-transition.is-answer-ready .answer-reveal-plaque {
  cursor: pointer;
  pointer-events: auto;
}

.answer-letter-flap {
  position: absolute;
  z-index: 3;
  top: -1px;
  right: -1px;
  left: -1px;
  height: 53%;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(170deg, #efe1c7, #cbb58e);
  filter: drop-shadow(0 5px 5px rgba(72, 43, 28, .2));
  transform-origin: 50% 0;
}

.trilogy-answer-transition.is-active .answer-letter-flap {
  animation: r7m2r2-letter-open 720ms cubic-bezier(.25, .7, .25, 1) 3.24s forwards;
}

.answer-card-question,
.answer-plaque-copy {
  position: absolute;
  z-index: 4;
  inset: 12% 9%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.answer-card-question {
  color: #5b392c;
  font-size: clamp(17px, 1.45vw, 25px);
  line-height: 1.5;
  opacity: 0;
}

.trilogy-answer-transition.is-active .answer-card-question {
  animation: r7m2r2-question-in 420ms ease 3.5s forwards, r7m2r2-question-out 320ms ease 4.48s forwards;
}

.answer-plaque-copy {
  top: 23%;
  bottom: 26%;
  flex-direction: column;
  color: #fff0d8;
  text-shadow: 0 3px 10px rgba(0, 0, 0, .88);
  opacity: 0;
  transform: translateY(-8px);
}

.trilogy-answer-transition.is-active .answer-plaque-copy {
  animation: r7m2r2-plaque-copy-in 560ms ease 5.02s forwards;
}

.answer-plaque-copy small {
  color: #d6aa69;
  font-size: 11px;
}

.answer-plaque-copy strong {
  margin: 5px 0 4px;
  font-size: clamp(25px, 2.2vw, 38px);
  font-weight: 500;
  line-height: 1.12;
}

.answer-plaque-copy em {
  max-width: 92%;
  color: rgba(255, 231, 195, .78);
  font-size: clamp(11px, .78vw, 13px);
  font-style: normal;
  line-height: 1.4;
}

.answer-plaque-copy b {
  margin-top: 6px;
  color: #efd09b;
  font-size: 11px;
  font-weight: 400;
}

.answer-plaque-chain {
  position: absolute;
  z-index: -2;
  bottom: calc(100% - 3px);
  width: 4px;
  height: 53vh;
  background: repeating-linear-gradient(180deg, #bb8140 0 5px, #543018 6px 10px);
  box-shadow: 0 0 5px rgba(0, 0, 0, .7);
  opacity: 0;
  transform: translateY(-100%);
}

.answer-plaque-chain-left { left: 14.8%; }
.answer-plaque-chain-right { right: 13.5%; }

.trilogy-answer-transition.is-active .answer-plaque-chain {
  animation: r7m2r2-chain-drop 680ms ease 4.46s forwards;
}

@keyframes r7m2r2-stage-dim {
  from { background-color: rgba(0, 0, 0, 0); }
  to { background-color: rgba(0, 0, 0, .12); }
}

@keyframes r7m2r2-stage-settle {
  0%, 12% { filter: brightness(1) saturate(.96); }
  32%, 100% { filter: brightness(.82) saturate(.88); }
}

@keyframes r7m2r2-retreat-left {
  0% { opacity: 1; transform: rotate(-2deg); }
  18% { transform: translateY(-1.5vh) rotate(1.4deg); }
  100% { opacity: 0; transform: translate(-2vw, -128vh) rotate(-3deg); }
}

@keyframes r7m2r2-retreat-right {
  0% { opacity: 1; transform: rotate(2deg); }
  18% { transform: translateY(-1.5vh) rotate(-1.4deg); }
  100% { opacity: 0; transform: translate(2vw, -128vh) rotate(3deg); }
}

@keyframes r7m2r2-retreat-center {
  0% { opacity: 1; transform: translateX(-50%); }
  18% { transform: translate(-50%, -1.5vh) rotate(.8deg); }
  100% { opacity: 0; transform: translate(-50%, -132vh) rotate(-1deg); }
}

@keyframes r7m2r2-focus {
  0% { opacity: 0; transform: translateX(-50%) scale(.72); }
  38%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes r7m2r2-thread-left {
  from { opacity: 0; transform: translateX(-104%) rotate(.5deg); }
  to { opacity: .9; transform: translateX(0) rotate(.5deg); }
}

@keyframes r7m2r2-thread-right {
  from { opacity: 0; transform: translateX(104%) rotate(-.5deg); }
  to { opacity: .9; transform: translateX(0) rotate(-.5deg); }
}

@keyframes r7m2r2-thread-away {
  to { opacity: 0; }
}

@keyframes r7m2r2-knot-in {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(18deg); }
}

@keyframes r7m2r2-knot-away {
  to { opacity: 0; transform: translate(-50%, -50%) scale(.64) rotate(54deg); }
}

@keyframes r7m2r2-letter-arrive {
  from { visibility: visible; opacity: 0; transform: translate(-50%, -44%) perspective(900px) rotateX(15deg) scale(.48); }
  to { visibility: visible; opacity: 1; transform: translate(-50%, -50%) perspective(900px) rotateX(0) scale(.78); }
}

@keyframes r7m2r2-letter-open {
  0% { opacity: 1; transform: perspective(600px) rotateX(0); }
  72% { opacity: 1; transform: perspective(600px) rotateX(-172deg); }
  100% { opacity: 0; transform: perspective(600px) rotateX(-180deg); }
}

@keyframes r7m2r2-question-in { to { opacity: 1; } }
@keyframes r7m2r2-question-out { to { opacity: 0; } }
@keyframes r7m2r2-paper-to-wood { to { opacity: 1; } }

@keyframes r7m2r2-plaque-grow {
  from { transform: translate(-50%, -50%) scale(.78); }
  to { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes r7m2r2-paper-away {
  to {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }
}

@keyframes r7m2r2-plaque-settle {
  0% { transform: translate(-50%, -50%) rotate(0) scale(1.1); }
  42% { transform: translate(-50%, -50%) rotate(-.7deg) scale(1.1); }
  100% { transform: translate(-50%, -50%) rotate(0) scale(1.1); }
}

@keyframes r7m2r2-plaque-copy-in { to { opacity: 1; } }

@keyframes r7m2r2-chain-drop {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: .88; transform: translateY(0); }
}

@media (max-width: 760px) {
  .trilogy-flow-nav button:last-child {
    max-width: 190px;
  }

  .trilogy-answer-transition .transition-red-thread {
    top: 67%;
    width: 50%;
  }

  .transition-thread-knot {
    top: calc(67% - 6px);
  }

  .answer-reveal-plaque {
    top: 51%;
    width: min(86vw, 390px);
  }

  .answer-reveal-plaque::before {
    top: -20%;
    left: 0;
    width: 100%;
  }

  .answer-plaque-chain-left { left: 18%; }
  .answer-plaque-chain-right { right: 18%; }

  .answer-plaque-copy {
    inset: 21% 9% 27%;
  }

  .answer-plaque-copy small {
    font-size: 10px;
  }

  .answer-plaque-copy strong {
    margin: 4px 0 3px;
    font-size: clamp(25px, 7.5vw, 30px);
    line-height: 1.05;
  }

  .answer-plaque-copy em {
    max-width: 96%;
    font-size: 10px;
    line-height: 1.35;
  }

  .answer-plaque-copy b {
    margin-top: 3px;
    font-size: 10px;
  }

  .theatre-entry-panel {
    top: 50%;
  }
}

/* R7M2R3 final cascade: supersede the retired card-morph transition. */
.trilogy-answer-transition,
.trilogy-answer-transition.is-active {
  animation: none;
  background: transparent;
}

.trilogy-answer-transition.is-entering-answer {
  opacity: 0;
  transition: opacity 720ms ease;
}

.trilogy-answer-transition.is-active .answer-reveal-plaque,
.trilogy-answer-transition.is-active .answer-reveal-plaque::before,
.trilogy-answer-transition.is-active .answer-plaque-copy,
.trilogy-answer-transition.is-active .answer-plaque-chain {
  animation: none !important;
}

.answer-reveal-plaque {
  z-index: 8;
  top: 5%;
  width: clamp(430px, 48vw, 720px);
  aspect-ratio: 1125 / 735;
  border: 0;
  border-radius: 0;
  background: url("./assets/image/stage/舞台R6R2/吊牌.png") center / contain no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 24px 24px rgba(0, 0, 0, .56));
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -118vh) rotate(-.8deg);
}

.answer-reveal-plaque::before,
.answer-plaque-chain,
.answer-letter-flap,
.answer-card-question {
  display: none;
}

.answer-plaque-copy,
.trilogy-answer-transition.is-active .answer-plaque-copy {
  inset: 49% 11% 7%;
  opacity: 1;
  transform: none;
}

.answer-plaque-copy small { color: #d8b77d; font-size: 12px; }
.answer-plaque-copy strong { margin: 7px 0 6px; font-size: clamp(29px, 3vw, 44px); }
.answer-plaque-copy em { max-width: 88%; color: rgba(255, 235, 203, .82); font-size: clamp(11px, .9vw, 14px); }
.answer-plaque-copy b { margin-top: 8px; color: #f1d3a0; font-size: 12px; }

.trilogy-answer-transition.is-active.is-answer-ready .answer-reveal-plaque {
  visibility: visible;
  animation: cinematic-answer-plaque-drop 1120ms cubic-bezier(.19, .74, .24, 1) forwards !important;
  cursor: pointer;
  pointer-events: auto;
}

@media (max-width: 760px) {
  .answer-reveal-plaque {
    top: 16%;
    width: min(96vw, 540px);
  }

  .answer-plaque-copy,
  .trilogy-answer-transition.is-active .answer-plaque-copy {
    inset: 48% 9% 6%;
  }

  .answer-plaque-copy small { font-size: 9px; }
  .answer-plaque-copy strong { margin: 3px 0; font-size: clamp(24px, 7.4vw, 31px); }
  .answer-plaque-copy em { max-width: 96%; font-size: 9px; line-height: 1.25; }
  .answer-plaque-copy b { margin-top: 3px; font-size: 9px; }
}
