/* Central contract for every full-page Playground animation. Not index previews. */
html[data-playground="true"] { --playground-header-height: 80px; }
@media (max-width: 1199px) {
 html[data-playground="true"] { --playground-header-height: 64px; }
}
body[data-playground-demo] .playground-stage {
 position: fixed; inset: var(--playground-header-height) 0 0;
 width: 100%; height: calc(100dvh - var(--playground-header-height));
 margin: 0; padding: 0; z-index: 4; overflow: hidden;
}
/* Murmuration, DNA and Sparkler fill the viewport from its top, behind the transparent menu. */
body[data-playground-demo] .playground-stage.murmuration,
body[data-playground-demo] .playground-stage.dna,
body[data-playground-demo] .playground-stage.sparkler {
 top: 0; height: 100dvh;
}
body[data-playground-demo] .playground-stage.murmuration > canvas {
 top: 0; transform: translateX(-50%);
}
/* Keep the drawing area at the top on tall screens, rather than centring it
   in the full viewport. The artwork never adds document space. */
body[data-playground-demo] .playground-stage:not(.murmuration):not(.dna):not(.sparkler) > canvas,
body[data-playground-demo] .playground-stage > .xray-stage {
 position: absolute; top: 0; height: min(100vw, 100%);
}
body[data-playground-demo] .playground-stage > .xray-stage { background: transparent; }
body[data-playground-demo] .content-006 { isolation: auto; }
body[data-playground-demo] .demos-index,
body[data-playground-demo] .demos-index * { pointer-events: none; }
body[data-playground-demo] .demos-index a { pointer-events: auto; }
body[data-playground-demo] .demos-list { position: relative; z-index: 5; }
body[data-playground-demo] .demos-list a { width: fit-content; max-width: 100%; }

@media (max-width: 1199px) {
 /* Retain the Globe's requested mobile enlargement, anchored to the same top. */
 body[data-playground-demo] .playground-stage.globe > canvas { height: min(125vw, 125%); }
}

@media (max-width: 809px) {
 /* Phone only: 90% of the former 125% drawing surface, centred below header. */
 body[data-playground-demo] .playground-stage.globe > canvas {
  width: 112.5%; left: -6.25%; height: min(112.5vw, 112.5%);
 }
}

body[data-playground-demo] .playground-stage.dna > canvas,
body[data-playground-demo] .playground-stage.sparkler > canvas { position: absolute; top: 0; width: 100%; height: 100%; }

/* Keep demo attribution quieter than the navigation. */
[data-playground-demo] .demos-intro p[class$="-credit"] { opacity: 0.5; }
