/* 仅影响序章弹层。舞台保持 16:9，字幕高度随画幅缩放。 */
dialog.xmp-root {
  position: fixed; inset: 0; z-index: 2147483600;
  box-sizing: border-box; width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none; margin: 0; border: 0; padding: 0;
  overflow: hidden; overscroll-behavior: contain; background: #0b0912; color: #fff7e9;
  font: 16px/1.45 "Microsoft YaHei","PingFang SC",system-ui,sans-serif;
}
dialog.xmp-root[open] { display: grid; place-items: center; }
dialog.xmp-root::backdrop { background: #0b0912; }
.xmp-root [hidden] { display: none !important; }
.xmp-root .xmp-stage {
  width: min(100vw, 177.777778vh); width: min(100vw, 177.777778dvh);
  position: relative; aspect-ratio: 16/9; overflow: hidden; container-type: inline-size;
}
.xmp-root .xmp-canvas { width: 100%; height: 100%; display: block; position: static; pointer-events: none; }
.xmp-root .xmp-caption, .xmp-root .xmp-credit {
  position: absolute; padding: 0; margin: 0; pointer-events: none;
  color: #fff8eb; font-weight: 600; font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;
  text-shadow: 0 2px 5px #10091d, 0 0 3px #171021; paint-order: stroke fill;
  -webkit-text-stroke: .095em #271b2d;
}
.xmp-root .xmp-caption {
  left: 4%; right: 4%; bottom: 6.1%; text-align: center;
  line-height: 1.38; font-size: clamp(14px,2.65vw,52px); font-size: clamp(14px,2.65cqw,52px);
}
.xmp-root .xmp-caption.xmp-caption-top { top: 6.5%; bottom: auto; text-align: left; }
.xmp-root .xmp-credit {
  right: 4.5%; bottom: 5.8%; font-size: clamp(12px,1.55vw,30px); font-size: clamp(12px,1.55cqw,30px);
}
.xmp-root .xmp-controls {
  position: absolute; top: max(12px,env(safe-area-inset-top)); right: max(14px,env(safe-area-inset-right));
  display: flex; align-items: center; gap: 8px;
}
.xmp-root .xmp-button {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 6px 13px; border-radius: 7px;
  background: rgba(23,16,37,.79); color: #fff6e5; border: 1px solid rgba(255,239,209,.45);
  font: 600 14px/1.25 "Microsoft YaHei","PingFang SC",system-ui,sans-serif;
}
.xmp-root .xmp-button:hover { background: #46334f; }
.xmp-root .xmp-button:focus-visible { outline: 2px solid #ffdb9b; outline-offset: 2px; }
.xmp-root .xmp-button:disabled { color:#ccc1d5; cursor:default; }
.xmp-root .xmp-loading {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  padding: .6em 1.1em; border-radius: 8px; background:#20182be6; color:#fff3d8;
}
.xmp-root .xmp-sr { position: absolute; width: 1px; height: 1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.xmp-root .xmp-score { display:none; }

.xmp-root .xmp-canvas { image-rendering:auto; }
.xmp-root .xmp-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,244,221,.14); pointer-events: none;
}
.xmp-root .xmp-progress-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, #ff9ed2, #ffe4ad);
  transition: width .12s linear;
}
@media (pointer:coarse) {
  .xmp-root .xmp-button { min-height:44px; min-width:49px; }
}
