/* ============================================================================
   FILM OVERLAY (v50): Enzo's IMAX reel as the gate's moving film.
   film-loop.* is his V2 overlay with a taller frame (1290x758) over black. It fills the gate at
   full width with its own green edge-code strip on top; the picture fills
   its 1.87:1 window, trimmed about 2.5% top and bottom. The site's old green strip,
   slivers and frame lines are gone; the overlay has its own.
   ========================================================================= */
#stage{top:37px;height:560px}                    /* 953 x 758/1290, bottom at the recess edge (597) */
#stage .edge,#stage .ecBacking,#stage .fline{display:none!important}
#winL,#winR{opacity:1}                            /* v55: neighbouring frames shown again */
#stage .borderv{object-fit:fill}
/* v56: the film rides above the picture (film-top.js), cut by its own alpha; the video below
   shows the colour half of film-loop (the alpha matte is stacked under it) as the fallback */
#stage .borderv{object-fit:cover;object-position:50% 0}
.filmtop{position:absolute;inset:0;width:100%;height:100%;z-index:7;pointer-events:none;display:block}
.filmtop:not(.on){visibility:hidden}
/* v57: Enzo's taller gate panel. Its opening is real transparency (stepped top and bottom, deck
   y 21-619 at the centre, 51-589 at the sides, x 56-1025), so the panel now sits ABOVE the film and
   its rim cuts it. The film is scaled to fill the opening from its top step to its bottom step:
   601 px tall (1290x758 at 0.7929 deck px per film px, up from 0.7388), centred on the opening.
   Its sides run under the panel; the neighbouring-frame slivers show about 30 px each. */
#gateBay{background-image:none!important}
#gateBay::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:20;
  background:url('assets/gate-panel-v64-v74.webp') center/contain no-repeat}
#stage{left:29.1px;top:20px;width:1022.8px;height:601px}
/* v58: the side frames sit on top of the main picture, which runs under the frame lines */
.fswrap{z-index:5}
.winL,.winR{z-index:6}
/* v63: the panel is rebuilt entirely from the original (assets/gate-panel-v64.webp, 2162x1306, see
   tools/build_gate_panel_v63.py). Its opening (deck y 21-620.5, x 56-1024) is sized to the film, so the
   film keeps its v57 fit and the neighbouring-frame slivers stay visible. */
/* v64: the inner lip on both sides is thin and even top to bottom (the original drew it wider between the pins) */

/* v71: the gate blade, thin and lit like real steel. blade-steel.png and blade-tab.png are rendered from a
   height map by tools/make_blade.py (key light upper left, studio reflections, brushed sheen). The visible strip
   is 2.5 px; an invisible 16 px band around it is what you grab. */
.wipebar.blade{top:calc(84/758*100%); height:calc((716 - 84)/758*100%); width:2.5px; transform:translateX(-1.25px);
  background:none; box-shadow:none; cursor:ew-resize; pointer-events:auto}
.wipebar.blade::before{content:""; position:absolute; top:0; bottom:0; left:-7px; right:-7px}
.wipebar.blade .steel{position:absolute; inset:0; overflow:hidden;
  background:url('assets/blade-steel.png') 0 0/100% 100% no-repeat;
  box-shadow:0 0 .6px rgba(0,0,0,.9), 1.5px 1px 2.5px rgba(0,0,0,.5), -1px 0 1.5px rgba(0,0,0,.28)}
.wipebar.blade .tab{position:absolute; left:50%; top:100%; width:64px; height:20px; margin-left:-32px; margin-top:-2px;
  background:url('assets/blade-tab.png') 0 0/100% 100% no-repeat; cursor:ew-resize;
  filter:drop-shadow(0 1.5px 1.2px rgba(0,0,0,.75)) drop-shadow(1px 3px 4px rgba(0,0,0,.4))}
.wipebar.blade .tab > *{display:none}                 /* the stamping is in the picture now */
.wipebar.blade:hover .steel,.wipebar.blade:hover .tab{filter:brightness(1.1)}
.wipebar.blade:hover .tab{filter:brightness(1.1) drop-shadow(0 1.5px 1.2px rgba(0,0,0,.75)) drop-shadow(1px 3px 4px rgba(0,0,0,.4))}
/* the sheen: a glint runs down the blade and across the tab for the first few seconds it's on screen */
.wipebar.blade .steel::after,.wipebar.blade .tab::after{content:""; position:absolute; inset:0; opacity:0; pointer-events:none;
  mix-blend-mode:screen}
.wipebar.blade .steel::after{background:linear-gradient(180deg,transparent 0 44%,rgba(255,255,255,.95) 50%,transparent 56% 100%) 0 0/100% 300% no-repeat}
.wipebar.blade .tab::after{background:linear-gradient(105deg,transparent 0 40%,rgba(255,255,255,.85) 50%,transparent 60% 100%) 0 0/300% 100% no-repeat;
  -webkit-mask:url('assets/blade-tab.png') 0 0/100% 100%; mask:url('assets/blade-tab.png') 0 0/100% 100%}
.wipebar.blade.sheen .steel::after{animation:bladeGlint 1.6s cubic-bezier(.45,0,.25,1) 3 both}
.wipebar.blade.sheen .tab::after{animation:tabSheen 1.6s cubic-bezier(.45,0,.25,1) 3 both}
@keyframes bladeGlint{0%{opacity:1;background-position:0 100%} 55%{opacity:1;background-position:0 0} 56%,100%{opacity:0;background-position:0 0}}
@keyframes tabSheen{0%,50%{opacity:0;background-position:100% 0} 51%{opacity:1;background-position:100% 0} 92%{opacity:1;background-position:0 0} 100%{opacity:0;background-position:0 0}}
@media (prefers-reduced-motion:reduce){ .wipebar.blade.sheen .steel::after,.wipebar.blade.sheen .tab::after{animation:none} }
/* the layer names on screwed-on steel plaques at the bottom of each side */
.wipetag.plaque{top:auto; bottom:calc(100% - var(--gt) - var(--gh) + 12px); padding:5px 15px;
  font:700 9.5px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:#1d2427;
  background:linear-gradient(#e7ebea,#aeb7b9); border:1px solid #11181a; border-radius:2px;
  box-shadow:0 2px 4px rgba(0,0,0,.6),inset 0 1px 0 #fff}
.wipetag.plaque::before,.wipetag.plaque::after{content:""; position:absolute; top:50%; width:5px; height:5px; margin-top:-2.5px;
  border-radius:50%; background:radial-gradient(circle at 35% 30%,#fff,#6f7b7f)}
.wipetag.plaque::before{left:4px} .wipetag.plaque::after{right:4px}
.wipetag.plaque i{font-style:normal}
.wipetag.plaque i.la{color:#9a5a00} .wipetag.plaque i.lb{color:#1f5f8f}   /* the A and B lamp colours, stamped */

/* v74: the new apron sits BEHIND the chassis. Its front lip is hidden behind the chassis top, the title and
   status plates sit in the apron's two recesses, and the bays start right under the title plate.
   base-panel-v74.webp is the base panel with 78 px of plain brushed metal taken out under its top rim, so
   everything from the bays down moves up 60 px (app.js: DECK_H, VIEW_BOTTOM, MACHINE_BOTTOM, TOP). */
.deck{height:1226px}
.headstage{top:122px;height:250px;z-index:1}
.headstage .top-apron{height:250px;object-fit:fill}
.apron-monogram{left:774px;top:50px}
.panel{top:302px;height:872px;background-image:url('assets/base-panel-v74.webp')}
.midrow{top:14px}
.botrow{top:677px}
.toprow{top:224px}
.nameplate{left:20px;top:0;width:488px;height:92px}
.statusplate{left:1113px;top:3.15px;transform:scale(.9207547)}
.cast-shadow-layer{height:1226px}

/* v76: the product badge on the front face of the apron's centre block (tools/make_badge.py):
   chrome bezel, black field, "Enzo" in raised chrome blackletter, a chrome rule, TB-1570 */
.headstage .prodbadge{position:absolute;left:725.1px;top:151.5px;width:161.8px;height:34px;z-index:2;pointer-events:none;
  filter:drop-shadow(0 1.2px .8px rgba(0,0,0,.7)) drop-shadow(0 3px 5px rgba(0,0,0,.3))}
html.is-pocket .prodbadge{display:none}
/* v77: badge reads E-VFX (Killigrew, Paul Lloyd, free) | TB-1570 */
.headstage .prodbadge{left:726.4px;width:159.2px}
/* v78: E-VFX moves up onto the block's top face as a round plate screwed on (tools/make_medallion.py);
   the front-face plate keeps TB-1570 on its own */
.headstage .prodbadge{left:749.25px;top:154.5px;width:113.5px;height:28px}
.headstage .medallion{position:absolute;left:756px;top:24px;width:100px;height:100px;z-index:2;pointer-events:none;
  filter:drop-shadow(0 1.5px 1px rgba(0,0,0,.65)) drop-shadow(1px 4px 6px rgba(0,0,0,.35))}
html.is-pocket .medallion{display:none}

/* v79: the scrub fill lit like the counter digits (display.js: core rgb(255,247,224), glow rgb(255,115,14)):
   a hot near-white core fading to amber, with a layered orange bloom spilling onto the track */
.chanfill{opacity:1;
  background:linear-gradient(rgba(255,186,96,.95),rgb(255,247,224) 45%,rgb(255,224,170) 55%,rgba(255,150,40,.95));
  box-shadow:0 0 1.5px rgba(255,214,150,.95),0 0 4px rgba(255,140,40,.85),0 0 9px rgba(255,115,14,.6),0 0 18px rgba(255,115,14,.32),0 0 34px rgba(255,115,14,.16)}
/* v80: E-VFX is Enzo's oval plate (tools/e-vfx-plate-src.png), centred on the block's top face; TB-1570 stays as in v78 */
.headstage .medallion{left:726.75px;top:28px;width:158.5px;height:92px;
  filter:drop-shadow(0 1.5px 1px rgba(0,0,0,.6)) drop-shadow(1px 4px 6px rgba(0,0,0,.35))}
/* v82: fit-up where the apron meets the chassis (tools/fit_v82.py)
   - the status plate is now 530x100 (488x92 on the bench, like the title plate) and fills its recess
   - the chassis' top corners are square, so it meets the apron's square bottom in one line; the apron's lip,
     which is a hair wider than the chassis, is trimmed below the chassis line so no sliver shows at the ends */
.statusplate{top:0;height:100px}
#runLamp,#markLamp{top:38px}
.headstage{clip-path:polygon(0 0,100% 0,100% 190px,calc(100% - 2px) 190px,calc(100% - 2px) 100%,2px 100%,2px 190px,0 190px)}
/* v83: back to the chassis' own rounded top corners (the squared v82 corners showed a mitre seam). The apron's
   side now carries on down behind them (top-apron-v83.webp, tools/fit_v83.py), so the notches show its side,
   not its lip caps; below the corners its 1-2 px overhang past the chassis sides is trimmed */
.panel{background-image:url('assets/base-panel-v74.webp')}
.headstage{clip-path:polygon(0 0,100% 0,100% 212px,calc(100% - 2px) 212px,calc(100% - 2px) 100%,2px 100%,2px 212px,0 212px)}
/* v84: the apron's sides trimmed to the chassis' exact side lines (2 px left, 3.3 px right) all the way down, so the
   outline runs straight from apron to chassis with no 1-2 px step where the apron used to stick out */
.headstage{clip-path:inset(0 3.3px 0 2px)}
