:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: #f1f0f4;
  background: #0b0a0f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { background: #080101; }
.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% -15%, #343442, #1c1b22 42%, #0b0a0f 87%);
}
.stage[data-state="finished"] { background: #080101; }
.stage[data-state="finished"] .scene { visibility: hidden; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene { display: block; pointer-events: none; }
.caption {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: max(4.7%, env(safe-area-inset-bottom, 0px));
  width: max-content;
  max-width: 94%;
  max-height: 28%;
  margin: 0;
  overflow: auto;
  overflow-wrap: anywhere;
  transform: translateX(-50%);
  text-align: center;
  font-size: clamp(16px, min(3dvh, 6vw), 48px);
  font-weight: 800;
  line-height: 1.24;
  color: #fff;
  -webkit-text-stroke: 1.7px #030204;
  paint-order: stroke fill;
  text-shadow: 0 1px 2px #000;
}
.complete, .fallback, .notice {
  position: absolute;
  inset-inline: 0;
  margin: 0;
  text-align: center;
}
.fallback, .complete { top: 50%; transform: translateY(-50%); }
.fallback { font: 700 clamp(25px, 4vw, 75px)/1 monospace; }
.complete {
  font-size: clamp(20px, 3dvh, 34px);
  font-weight: 650;
  letter-spacing: .16em;
  padding-inline-start: .16em;
  text-shadow: 0 0 19px #f8b6b648;
  animation: reveal 390ms 160ms both;
}
.notice { top: 62%; padding-inline: 1rem; font-size: .875rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .complete { animation: none; }
}
