/* Option 13, the stage: the costume hangs in front of the words, two fans open onto the film,
   and the film block holds a button, one line of consent and one line of credit.
   Loaded after the other sheets of this option: it finishes what they started.

   Layers. .performer-world is one stacking context:
     0  the back of the stage: its depth, the mask procession, the cloth while the portrait wears it
     1  the opening scene, and after it the chapter text
     2  the cloth in front of the words (wardrobe.js makes this copy and shows it below the story's top edge)
     3  the film block and the finale (finale.css): nothing of ours stands in front of the player
     4  the two fans (fan.js); the film is open to use only once they are clear of it */
.wardrobe-content{z-index:auto}
.wardrobe-copy{z-index:1}
/* the dark plate behind the column was there to keep cloth off the words; the cloth is in front now */
.wardrobe-copy::before{content:none}
.wardrobe-front,.fan-stage{position:sticky;top:0;width:100%;height:100svh;margin-bottom:-100svh;overflow:hidden;pointer-events:none;visibility:hidden}
.wardrobe-front{z-index:2}
.fan-stage{z-index:4}
.fan-stage canvas{position:absolute;inset:0;display:block;width:100%;height:100%}
.cloth-set{position:absolute;inset:0;pointer-events:none}
.wardrobe-stage>.cloth-set{z-index:3}
.wardrobe-front .wardrobe-panel{object-fit:fill;transform-origin:50% 45%;transition:none;max-width:none}

/* The performance: one pinned stage for the fans and the film. The block holds the film behind its
   button, the consent beside the button, and the credit. */
/* 245svh (215 until 4 October 2026): the film now goes in smoke 0.3 of a window before its stage lets it go
   (finale.js FILM.ahead), so the stage is that much longer and the film stands as long as before. */
.reveal-window{height:245svh;min-height:0;margin-top:20px}
.reveal-window>.performance-film{position:sticky;top:0;z-index:3;height:100svh;min-height:0;box-sizing:border-box;padding:16px 0 40px;display:flex;flex-direction:column;justify-content:center;align-items:center;opacity:var(--film-reveal,0);will-change:opacity}
/* The film is the picture here: as large as the window allows (it may be wider than the 1180 px of the
   reading stage), with room above it for the page's header and below it for the credit. */
.wardrobe-content .video-shell{flex:none;width:min(88vw,1700px,calc((100svh - clamp(150px,31svh,280px)) * 16 / 9));max-width:none;min-height:0;margin:0}
.film-start{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:16px;text-align:center}
.film-start .load-film{position:static;width:auto;flex:none;gap:14px;padding:4px 22px;color:#f1eadc;font:500 17px/1.3 var(--font-body);letter-spacing:.01em}
.film-start .load-film .play-symbol{background:#0b0908a6}
.film-start .load-film:hover .play-symbol,.film-link:hover .play-symbol{background:#b61922}
.film-consent{margin:0;max-width:34em;color:#ddd4c4;font:400 14px/1.5 var(--font-body);text-shadow:0 1px 10px #000,0 0 2px #000;text-wrap:balance}
.film-consent a{color:#f4eee2;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;white-space:nowrap}
#video-shell[data-player-ready="true"] .film-start{display:none}
/* the player itself is never shown under a fan: it appears when both are clear of it */
#video-shell iframe{opacity:1;transition:opacity .35s ease}
/* Covered, it is transparent and takes no pointer, but stays in the keyboard's order (pass 2 review, C8: with
   visibility:hidden Tab went past the film): a Tab into it brings the page to the parted fans (fan.js bringFilm). */
#video-shell[data-covered="true"] iframe{opacity:0;pointer-events:none;transition:none}
.film-credit{flex:none;width:fit-content;max-width:min(88vw,1100px);margin:18px 0 0;color:#b9ae9b;font:400 14px/1.5 var(--font-body);text-align:center;text-wrap:balance}
/* the film's credit comes with the film, not before it: hidden while a fan still covers the player
   (phase B, M4) */
.film-credit{transition:opacity .3s ease}
#video-shell[data-covered="true"]~.film-credit{opacity:0;transition:none}
/* Under the fans the film block cannot be used by pointer. It is not inert (phase B, C6): a keyboard
   focus in it takes the page to where the fans have parted (fan.js bringFilm). */
#performance[data-stage-ready="false"] .film-start{pointer-events:none}
.film-link{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:#f1eadc;font:500 17px/1.3 var(--font-body)}
html:not(.js) .film-start{display:none}

/* Without motion or without JavaScript the story is a still one: the pair of fans as a picture,
   then the film in the ordinary flow of the page. */
.static-fans{display:none;position:relative;width:min(1100px,94%);height:auto;margin:0 auto}
@media(prefers-reduced-motion:reduce){
 .fan-stage{display:none}
 .static-fans{display:block}
 .reveal-window{height:auto;padding-top:10px}
 .reveal-window>.performance-film{position:relative;height:auto;opacity:1;will-change:auto;padding:34px 0 64px}
}
html:not(.js) .static-fans{display:block}
html:not(.js) .reveal-window{height:auto;padding-top:10px}
html:not(.js) .reveal-window>.performance-film{position:relative;height:auto;opacity:1;will-change:auto;padding:34px 0 64px}
/* Without JavaScript the panels keep their place in the stylesheet: moved apart far enough that
   no cloth lies on the reading column at any width (the inner edge reaches 36.52 % of a panel). */
html:not(.js) .wardrobe-stage{--copy-w:min(480px,44vw);--cloth-edge:13.48vw;--cloth-gap:28px}
@media(min-width:761px) and (max-width:980px) and (orientation:portrait){html:not(.js) .wardrobe-stage{--copy-w:min(480px,100vw - 180px)}}
@media(max-width:760px){html:not(.js) .wardrobe-stage{--copy-w:min(440px,100vw - 74px);--cloth-edge:83.6px;--cloth-gap:8px}}
html:not(.js) .wardrobe-stage .outer-left,html:not(.js) .wardrobe-stage .lining-left{transform:translate(calc(-50% - max(0px,var(--copy-w) / 2 + var(--cloth-gap) - var(--cloth-edge))),-46%)}
html:not(.js) .wardrobe-stage .outer-right,html:not(.js) .wardrobe-stage .lining-right{transform:translate(calc(-50% + max(0px,var(--copy-w) / 2 + var(--cloth-gap) - var(--cloth-edge))),-46%)}

/* The page ends on the studio's credit after the film: finale.css. */

@media(max-width:760px){
 .wardrobe-content .video-shell{width:92%}
 .film-start{gap:10px;padding:10px}
 .film-start .load-film{font-size:15px;gap:10px;padding:2px 18px}
 .film-consent{font-size:13px;line-height:1.45}
 .film-credit{max-width:92%;margin-top:14px;font-size:13px}
 .credit-sep{display:none}
 .credit-rest{display:block}
}
@media(max-height:560px){
 .film-start{gap:8px}
 .film-start .load-film{gap:8px}
 .film-start .load-film .play-symbol{width:44px;height:44px;font-size:14px}
 .film-credit{margin-top:10px}
}

/* The film block is sticky: the browser moves it, on its own scrolling thread, exactly with the page. Option 14
   had fixed it to the window and placed it from script, so that a fast scroll down could not carry it off before
   its smoke; but in Safari YouTube's player runs on the page's own thread, and once it was loaded the block was
   placed late: scrolled up quickly, the film stood over the words coming in (his note of 5 October 2026: "the
   youtube player is still there, while the text behind it is already scrolling"). Its bottom margin of minus
   twice its height keeps it pinned (sticky keeps the margin box inside the stage) until a window after its stage
   has left: it goes in smoke, with the costume, as its stage ends (finale.js), and a loaded player's fade onto its
   cover first must not carry it off. Reduced
   motion keeps the plain sticky block, which simply scrolls away. */
@media (prefers-reduced-motion:no-preference){
  html.js .reveal-window>.performance-film{margin-bottom:-200svh}
  html.js .reveal-window>.performance-film[data-film]{pointer-events:none}
}
/* The costume's sides fading into the black (wardrobe.js, round 3 of option 14): the black laid over the cloth
   beyond its edges, moved by transform, in place of a mask redrawn every frame. */
.cloth-edge{position:absolute;top:0;left:0;height:100%;z-index:6;pointer-events:none;visibility:hidden;transform-origin:0 0;will-change:transform}
.cloth-edge.solid{width:100%;background:#030303}
.cloth-edge.ramp{width:100px}
.cloth-edge.ramp.left{background:linear-gradient(90deg,#030303,rgba(3,3,3,0))}
.cloth-edge.ramp.right{background:linear-gradient(90deg,rgba(3,3,3,0),#030303)}
