/* Option 14, the loading screen and the order in which the page loads (loading.js says why).
   The PNG artwork is replaced by WebP renditions at the size it is shown (tools/build-renditions.mjs);
   the PNGs stay in assets/ for earlier options and the provenance records. */
.mask-frame{background-image:url('assets/masks-2172-cut.webp')}
.face-surface{background-image:url('assets/specimens-1448.webp')}
.video-art{background-image:linear-gradient(#0002,#0008),url('assets/embroidery-macro-1536.webp')}
/* The dim robe behind the panels is gone (4 October 2026, his note: once the scroll begins, the background
   must stay black, without the light costume shapes in it). It was the costume picture at brightness 0.3
   over the whole window, also the dearest layer of the hand-over in WebKit. */
.robe-depth{display:none}

/* Further down: nothing is shown before loading.js has every picture in and decoded (data-near, set for
   all of them as the page opens). */
html.js:not([data-faces-near]) .face-surface{background-image:none}
.js .video-shell:not([data-near]) .video-art{background-image:none}
.js .finale:not([data-near]) #end .name .mark{-webkit-mask:none;mask:none;background:transparent}
.js .finale:not([data-near]) #end .before,.js .finale:not([data-near]) #end .after{font-family:Georgia,serif}

/* The loading screen. The red and its letters are the page's own drawing and stand from the first paint;
   the letters wait for their face (3 s at most; the inline script after the SVG). Until everything is in,
   the letters rise out of the red in black from the bottom up (loading.js), with one word under them, in
   black, a little larger than a line of the chapters (his note on the first version); the window does not
   scroll. */
html.letters-wait #cutout-letters{opacity:0}
html.bl-loading.loading-js,html.bl-loading.loading-js body{overflow:hidden}
.bl-loading-word{position:fixed;left:0;right:0;top:calc(40dvh + .5 * min(46vw, 62dvh) + clamp(22px, 4.5dvh, 48px));z-index:45;margin:0;padding-left:.2em;
  color:#030303;font:500 clamp(19px,1.7vw,28px)/1.3 var(--font-body);letter-spacing:.2em;text-align:center;pointer-events:none;
  transition:opacity .35s ease,visibility 0s linear .35s}
html:not(.bl-loading) .bl-loading-word,html.letters-wait .bl-loading-word{opacity:0;visibility:hidden}
html:not(.js) .bl-loading-word{display:none}
/* Reduced motion keeps the red and its letters (continuity.css), so the word keeps its place. */

/* Then the portrait and the costume at its shoulders come in together, whole, behind the full letters. */
html.awaiting .portrait,html.awaiting .wardrobe-backdrop,html.awaiting .wardrobe-front{opacity:0}
html.arriving .portrait,html.arriving .wardrobe-backdrop,html.arriving .wardrobe-front{transition:opacity .6s ease-out}
/* The story's words wait with them (round 2): nobody scrolls meanwhile, but a page whose loader never ran
   must not show the chapters over the still red. .wardrobe-copy is a stacking context of its own already,
   so its opacity changes no layering. */
html.awaiting .wardrobe-copy,html.awaiting .fan-stage{opacity:0}
html.awaiting .performance-film,html.awaiting .static-fans{visibility:hidden}
html.arriving .wardrobe-copy,html.arriving .fan-stage{transition:opacity .6s ease-out}
/* The closing credit stands only once its lettering (the mask SVG) and its italic are in: loading.js marks
   the finale data-credit-ready. #end is sticky, a stacking context already, so its opacity changes no
   layering. */
html.awaiting #end,html.loading-js .finale:not([data-credit-ready]) #end{opacity:0}
.finale[data-credit-ready] #end{transition:opacity .6s ease-out}
/* Should loading.js never run (html.loading-js missing), the pictures show after 12 s as they are. */
html.awaiting:not(.loading-js) .portrait,html.awaiting:not(.loading-js) .wardrobe-backdrop,html.awaiting:not(.loading-js) .wardrobe-front,html.awaiting:not(.loading-js) .wardrobe-copy,html.awaiting:not(.loading-js) .fan-stage,html.awaiting:not(.loading-js) #end{animation:bl-unblock 0s 12s forwards}
html.awaiting:not(.loading-js) .performance-film{animation:bl-unhide 0s 12s forwards}
@keyframes bl-unblock{to{opacity:1}}
@keyframes bl-unhide{to{visibility:visible}}
@media (prefers-reduced-motion:reduce){
  html.arriving .portrait,html.arriving .wardrobe-backdrop,html.arriving .wardrobe-front,html.arriving .wardrobe-copy,html.arriving .fan-stage,.finale[data-credit-ready] #end{transition:none}
}
/* Reduced motion and no JavaScript show the lining as a still band (wardrobe.css). */
@media (prefers-reduced-motion:reduce),(scripting:none){.lining-window{background-image:url('assets/lining-inner-1024.webp')}}
/* Option 14, 5 October 2026 (his note, in Safari: "when we scroll to the top, we can overscroll such that then we
   see the black background. But the red should always stick"). The window does not bounce at the page's ends
   (overscroll-behavior), and where a browser bounces anyway, the ground it shows beyond the page is the red for as
   long as the red stands (intro.js sets data-curtain="off" on the root once it has faded). */
html,body{overscroll-behavior-y:none}
html.js:not([data-curtain="off"]){background:#b61922}
@media(prefers-reduced-motion:reduce){html.js:not([data-curtain="off"]){background:var(--black)}}
/* The red on the GPU (curtain-gl.js, intro.js), over the SVG it takes the place of once the page has opened. */
.curtain-gl{position:absolute;inset:0;width:100%;height:100%;display:block;visibility:hidden;pointer-events:none}
