/* V64.20: approved background study revision 4, after owner-requested rollback.
   Decorative layers only; character/control geometry and game rules unchanged. */
.reference-screen { isolation: isolate; }
.reference-screen .reference-scene {
  --backdrop-rise: 145px;
  overflow: visible;
  background: none;
  box-shadow: none;
}
.reference-screen .reference-scene-game { --backdrop-rise: 92px; }
.reference-screen .reference-scene::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--backdrop-rise)) 0 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, #020813 0%, #020813d9 13%, #02081399 32%, #0208131a 52%, transparent 66%, transparent 84%, #020813 100%),
    linear-gradient(90deg, #02081366, transparent 15%, transparent 85%, #02081366),
    var(--reference-scene);
  background-position: center;
  background-size: cover;
}
.reference-screen .reference-scene::after {
  /* Premium sprites extend 5% below their scene. Fade over that overflow too;
     otherwise the unshaded feet reappear as a bright strip above the XP card. */
  inset: 0 0 -8%;
  z-index: 6;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 70%, #020813 92%, #020813 100%);
}
/* The old depth vignette starts at the original scene top, producing a hard
   horizontal edge across the extended artwork. The full-height ::before
   already owns both the top fade and side vignette, so don't stack it twice. */
.reference-screen .reference-scene .reference-scene-depth { background: none; }
.reference-game::before { content: none; }
.reference-game .reference-chain-head { z-index: 8; }
.reference-result-main .reference-brush-title { z-index: 8; }
/* Keep the approved revision 4 rim. The later alpha study is not enabled. */
.reference-result-main .reference-result-callout {
  border-top-color: #0b2230;
  box-shadow: 0 8px 22px #00000038;
}
@media (max-height: 740px) {
  .reference-screen .reference-scene { --backdrop-rise: 113px; }
  .reference-screen .reference-scene-game { --backdrop-rise: 58px; }
}
