/* The simulator's place on a page (js/sim-box.js; Nicholas, 2026-11-24: "we want the fake and the real to
   match up always"). The box has the device's shape from the first paint, with the still of the device and
   <plisp-loading> in it, so nothing on the page moves when the simulator comes in.

     <div class="sim-box" id="…"><plisp-loading></plisp-loading></div>
     <script src="/js/loading-screen.js"></script> in the head: the first paint needs it.

   A page sets the box's width only (max-width, its column); never its height or shape.
   The frame is see-through, not hidden: Chrome gives a hidden frame no animation frames, and one at
   opacity 0 one a second. */
.sim-box { position: relative; width: 100%; max-width: 430px; aspect-ratio: 672 / 722.31; background: center / 100% 100% no-repeat var(--sim-still); }
.sim-box[data-view="screen"] { max-width: none; aspect-ratio: 480 / 248; background: none; }
.sim-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; opacity: .01; pointer-events: none; transition: opacity 300ms ease; }
.sim-box.is-live iframe { opacity: 1; pointer-events: auto; }
.sim-box.is-settled { background-image: none; } /* after the fade, so a still never shows beside the live device */
/* The speaker of a simulator with sound (js/hero-sound.js; CADR-0154): always at its bottom right, in the wheel's margin,
   over no key. The same on every page. */
:is(.sim-box, .wb-stage) > .sound-btn { position: absolute; z-index: 2; right: 0; bottom: 5%; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-soft); cursor: pointer; }
:is(.sim-box, .wb-stage) > .sound-btn[hidden] { display: none; }
:is(.sim-box, .wb-stage) > .sound-btn:hover { background: var(--surface-2); color: var(--text); }
/* Something else on the still's screen when the simulator did not come: the glass's place on the face. */
.sim-box-glass { position: absolute; left: 20%; top: 2.9%; width: 60%; height: 29.4%; box-sizing: border-box; overflow: hidden; }
.sim-box:not(.is-failed) .sim-box-glass { display: none; }
@media (prefers-reduced-motion: reduce) { .sim-box iframe { transition: none; } }
:root { --sim-still: url("/embed-stills/vapor-arcade.webp"); }
.theme-midnight { --sim-still: url("/embed-stills/midnight.webp"); }
.theme-vapor-sunset { --sim-still: url("/embed-stills/vapor-sunset.webp"); }
.theme-vapor-arcade { --sim-still: url("/embed-stills/vapor-arcade.webp"); }
.theme-ocean { --sim-still: url("/embed-stills/ocean.webp"); }
.theme-forest { --sim-still: url("/embed-stills/forest.webp"); }
.theme-coal { --sim-still: url("/embed-stills/coal.webp"); }
/* A workbench.js from before sim-box.js, still in a browser's cache (10 minutes): it says ready its own way. */
html[data-embed="ready"] .sim-box iframe { opacity: 1; pointer-events: auto; }
