
/* ============================================================================
   TELECINE BENCH — v12
   Authored on a fixed master canvas of 1720 x 1088 and scaled to fit, so every
   coordinate in here is a master pixel. That is the same discipline the painted
   skin will need: one master size, parts placed against it, one scale factor at
   the end. When the PSD art lands, each block below swaps its gradients for a
   background-image and nothing else moves.
   ========================================================================= */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
[hidden]{display:none!important}            /* the artifact host supplies this; standalone needs it too */

:root{
  --steel-0:#2a3236; --steel-1:#3c474b; --steel-2:#515f64; --steel-3:#6b7b80;
  --steel-4:#8b9aa0; --well:#14191b; --ink:#0a0d0e;
  --cream:#e9e4d6; --dim:#93a0a4; --amber:#f0a832; --amber-d:#8a5d12;
  --led:#46e05a; --line:rgba(0,0,0,.55); --hi:rgba(255,255,255,.14);
  --mono:'Azeret Mono',ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}

html,body{height:100%}
body{
  background:#07090a; color:var(--cream); font-family:var(--mono);
  overflow:hidden; -webkit-font-smoothing:antialiased;
}
.room{
  position:fixed; inset:0; overflow:hidden;
  background:
    radial-gradient(130% 90% at 50% 108%, #1b2124 0%, #0d1012 46%, #07090a 100%);
}
.deck{
  position:absolute; left:50%; margin-left:-860px; bottom:0;
  width:1720px; height:948px;
  transform:scale(var(--k,1)); transform-origin:bottom center;
}

/* ------------------------------------------------------------------- panel */
.panel{
  position:relative; height:948px; margin:0 20px; padding:16px 18px;
  display:flex; flex-direction:column; gap:12px;
  background:
    linear-gradient(177deg, rgba(255,255,255,.07), rgba(0,0,0,.26) 62%),
    linear-gradient(92deg, var(--steel-1), var(--steel-2) 34%, var(--steel-2) 66%, var(--steel-1));
  border:1px solid #1d2427; border-radius:4px;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.17), inset 0 -2px 10px rgba(0,0,0,.5),
             0 -4px 22px rgba(0,0,0,.55);
}
.panel::before{              /* rolled-steel grain, cheap and it kills the flatness */
  content:""; position:absolute; inset:0; pointer-events:none; border-radius:inherit;
  opacity:.5; mix-blend-mode:overlay;
  background:repeating-linear-gradient(94deg,
    rgba(255,255,255,.055) 0 1px, transparent 1px 3px, rgba(0,0,0,.05) 3px 4px, transparent 4px 7px);
}
/* corner bolts */
.bolt{
  position:absolute; width:17px; height:17px; border-radius:50%;
  background:radial-gradient(circle at 36% 30%, #b9c4c8, #6e7d82 46%, #2f3a3e);
  box-shadow:0 1px 2px rgba(0,0,0,.7), inset 0 -1px 2px rgba(0,0,0,.5);
}
.bolt::after{
  content:""; position:absolute; inset:5px 3px; border-radius:1px;
  background:linear-gradient(#20282b,#46525700);
}
.bolt.bl{left:11px;bottom:11px}.bolt.br{right:11px;bottom:11px}

/* ------------------------------------------------------------------ toprow */
.toprow{height:76px; display:flex; align-items:stretch; padding:0; flex:none}
.plate{
  position:relative; display:flex; padding:8px 34px;
  background:linear-gradient(#7a878b,#4d5a5f 55%,#3b474b);
  border:1px solid #232d31; border-radius:3px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.4), 0 3px 8px rgba(0,0,0,.55);
}
.plate .inner{
  flex:1; min-width:0; display:flex; align-items:center;
  background:linear-gradient(#1b2224,#0b0f11);
  border:1px solid #05080a; border-radius:2px;
  box-shadow:inset 0 2px 7px rgba(0,0,0,.9);
}
.pscrew{
  position:absolute; width:17px; height:17px; top:50%; margin-top:-8.5px;
  border-radius:50%;
  background:radial-gradient(circle at 36% 30%,#c0cacd,#78858a 52%,#364145);
  box-shadow:0 1px 2px rgba(0,0,0,.65);
}
.pscrew.l{left:8px} .pscrew.r{right:8px}
.pscrew::before{
  content:""; position:absolute; left:50%; top:50%; width:12px; height:2.4px;
  margin:-1.2px 0 0 -6px; background:#2b3437; transform:rotate(40deg);
}
.nameplate{width:486px; flex:0 0 486px}
.nameplate .inner{flex-direction:column; align-items:flex-start;
                  justify-content:center; gap:4px; padding:0 26px}
.np-title{font-size:21px; letter-spacing:.17em; font-weight:700; color:var(--cream);
          text-transform:uppercase; text-shadow:0 1px 0 rgba(0,0,0,.9)}
.np-sub{font-size:11px; letter-spacing:.13em; color:var(--dim)}
.toprow .spacer{flex:1}
.statusplate{width:532px; flex:0 0 532px}
.statusplate .inner{justify-content:space-between; padding:0 24px}
.lamps{display:flex; align-items:center; gap:9px}
.lampLabel{font-size:11.5px; letter-spacing:.17em; color:var(--dim); margin-right:16px}
.lamp{
  width:14px; height:14px; border-radius:50%; flex:none;
  background:radial-gradient(circle at 36% 30%, #2c3639, #10171a);
  box-shadow:inset 0 0 4px rgba(0,0,0,.9), 0 0 0 1px #000;
  transition:background .12s linear, box-shadow .12s linear;
}
.lamp.green.on{background:radial-gradient(circle at 36% 30%,#d8ffd4,var(--led) 42%,#128a22);
  box-shadow:0 0 10px rgba(70,224,90,.75), 0 0 22px rgba(70,224,90,.35), 0 0 0 1px #000}
.lamp.amber.on{background:radial-gradient(circle at 36% 30%,#ffe7bb,var(--amber) 42%,#8a5d12);
  box-shadow:0 0 10px rgba(240,168,50,.7), 0 0 20px rgba(240,168,50,.3), 0 0 0 1px #000}
.brand{font-size:11.5px; letter-spacing:.15em; color:var(--dim); text-align:right; line-height:1.55}
.brand b{color:#c3ccce; font-weight:600}

/* -------------------------------------------------------------------- bays */
.midrow{flex:1; display:grid; grid-template-columns:210px 1fr 300px; gap:14px; min-height:0}
.bay{
  position:relative; padding:7px 9px 9px; min-width:0; min-height:0;
  display:flex; flex-direction:column;
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.14));
  border:1px solid rgba(0,0,0,.5); border-radius:3px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16), 0 1px 3px rgba(0,0,0,.4);
}
.bayhead{
  font-size:10.5px; font-weight:600; letter-spacing:.24em; text-transform:uppercase;
  color:#a9b6ba; height:22px; line-height:22px; padding:0 4px; margin-bottom:6px;
  text-shadow:0 1px 0 rgba(0,0,0,.75); flex:none;
  border-bottom:1px solid rgba(0,0,0,.3);
  display:flex; justify-content:space-between; align-items:center;
}
.bayhead i{font-style:normal; color:#7f8d92; letter-spacing:.14em; font-size:10px}

/* ------------------------------------------------------------- shot index */
.filmstrip{
  flex:1; min-height:0; position:relative; padding:12px 15px;
  display:flex; flex-direction:column; justify-content:space-between;
  background:linear-gradient(#0e1213,#070a0b);
  border:1px solid #000; border-radius:2px;
  box-shadow:inset 0 3px 8px rgba(0,0,0,.85);
}
/* perforation columns, drawn rather than imaged so they stay crisp at any scale */
.filmstrip::before,.filmstrip::after{
  content:""; position:absolute; top:0; bottom:0; width:11px;
  background-image:repeating-linear-gradient(180deg,
    transparent 0 9px, #cfd6d2 9px 22px, transparent 22px 31px);
  opacity:.82;
}
.filmstrip::before{left:2px} .filmstrip::after{right:2px}
.shot{
  position:relative; display:block; width:100%; padding:0; cursor:pointer;
  background:none; border:2px solid transparent; border-radius:2px;
  font:inherit; color:inherit; text-align:left;
}
.shot img{display:block; width:100%; aspect-ratio:320/233; object-fit:cover;
          filter:brightness(.52) saturate(.75); transition:filter .14s}
.shot .code{display:block; font-size:10px; letter-spacing:.17em; color:#7c8a8e;
            padding:3px 0 1px}
.shot:hover img{filter:brightness(.78) saturate(.9)}
.shot[aria-current="true"]{border-color:var(--amber);
  box-shadow:0 0 0 1px rgba(0,0,0,.8), 0 0 12px rgba(240,168,50,.35)}
.shot[aria-current="true"] img{filter:none}
.shot[aria-current="true"] .code{color:var(--amber)}
.shot:focus-visible{outline:2px solid #7fd4ff; outline-offset:2px}

/* -------------------------------------------------------------------- gate */
#gateBay{padding:7px 9px 9px}
.well{
  flex:1; min-height:0; position:relative; display:grid; place-items:center;
  background:#050708; border:1px solid #000; border-radius:2px;
  box-shadow:inset 0 4px 14px rgba(0,0,0,.9);
}
.roller{      /* the two guide rollers the film runs between */
  position:absolute; top:12px; bottom:12px; width:22px; z-index:7; border-radius:4px;
  background:linear-gradient(90deg,#161c1e,#8e9ca1 34%,#58666b 58%,#141a1c);
  box-shadow:0 0 8px rgba(0,0,0,.8);
}
.roller::before,.roller::after{
  content:""; position:absolute; left:-4px; right:-4px; height:16px; border-radius:3px;
  background:linear-gradient(90deg,#20282b,#aab7bb 40%,#5d6b70 64%,#1b2224);
}
.roller::before{top:-6px} .roller::after{bottom:-6px}
.roller.l{left:6px} .roller.r{right:6px}

.stage{
  position:relative; width:calc(100% - 54px); aspect-ratio:1290/796;
  background:#000; outline:none; cursor:pointer;
  box-shadow:0 0 0 1px #000, 0 6px 20px rgba(0,0,0,.7);
}
.stage.comparing{cursor:ew-resize}
.borderv{position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:top center; z-index:1}
.ecBacking{position:absolute; left:0; right:0; top:0; background:#0c1a06; z-index:2}
.edge{
  position:absolute; left:0; right:0; top:0; z-index:3;
  display:flex; align-items:center; gap:10px; padding:0 10px;
  background:linear-gradient(#2f6a12,#1d4a09);
  font-size:10px; letter-spacing:.1em; color:#d9ff9a; overflow:hidden;
}
.edge #bars{flex:0 0 200px; height:68%; min-width:0; opacity:.95}
.edge .gap{flex:1; min-width:0}
.edge .kcr{color:#bdf07e; letter-spacing:.14em}
.win{position:absolute; overflow:hidden; background:#000}
.win video,.win img,.win canvas{position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; display:block}
.winL,.winR{z-index:4; opacity:.9}
.fswrap{position:absolute; z-index:6; background:#000}
.winMain{position:absolute; inset:0; z-index:1}
.fline{position:absolute; z-index:5; background:#000}
.proxytag{
  position:absolute; z-index:8; left:50%; top:50%; transform:translate(-50%,-50%);
  font-size:13px; letter-spacing:.3em; color:#8d9a9e; border:1px solid #333c3f;
  padding:9px 18px; background:rgba(0,0,0,.6);
}
/* wipe */
.wipebar{position:absolute; top:var(--gt); height:var(--gh); width:2px; z-index:9;
  background:#fff; box-shadow:0 0 10px rgba(0,0,0,.9); transform:translateX(-1px)}
.wipebar .grip{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:30px; height:30px; border-radius:50%; background:#f2f4f2; color:#1b2124;
  display:grid; place-items:center; box-shadow:0 2px 8px rgba(0,0,0,.8)}
.wipebar .grip svg{width:19px; height:19px; fill:currentColor}
.wipetag{position:absolute; z-index:9; top:calc(var(--gt) + 10px);
  font-size:10px; letter-spacing:.18em; color:#eef1ec; background:rgba(0,0,0,.66);
  padding:3px 7px; border:1px solid rgba(255,255,255,.2)}
.zoomnote{position:absolute; z-index:9; right:10px; bottom:calc(100% - var(--gt) - var(--gh) + 10px);
  font-size:10px; letter-spacing:.14em; color:#cfd6d2; background:rgba(0,0,0,.6); padding:3px 7px}

/* -------------------------------------------------------------- comp stack */
/* Fixed row height, NOT stretched to fill: the empty panel below the stack
   is deliberate headroom for a shot that carries more layers than this one. */
.bank{display:flex; flex-direction:column; gap:7px; flex:none}
.lrow{
  display:flex; align-items:center; gap:9px; width:100%; height:50px; flex:none;
  padding:5px 9px;
  font:inherit; color:inherit; cursor:pointer; text-align:left;
  background:linear-gradient(#2d3639,#1c2325);
  border:1px solid #0d1113; border-radius:2px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.1);
}
.lrow:disabled{cursor:default; opacity:.5}
.lrow[data-cur="1"]{border-color:transparent;box-shadow:none}
.lrow[data-solo="1"]{border-color:transparent;box-shadow:none}
.sw{
  width:25px; height:100%; flex:none; border-radius:2px;
  background:linear-gradient(#2a2318,#171310);
  border:1px solid #0c0a08; box-shadow:inset 0 1px 0 rgba(255,255,255,.07);
  transition:background .1s linear, box-shadow .1s linear;
}
.lrow[data-on="1"] .sw{
  background:linear-gradient(#ffd98f,var(--amber) 48%,#b0741a);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5), 0 0 9px rgba(240,168,50,.5);
}
.th{height:100%; width:auto; aspect-ratio:320/233; flex:none;
    object-fit:cover; background:#000; border:1px solid #0a0d0e; filter:brightness(.55)}
.lrow[data-on="1"] .th{filter:none}
.lmeta{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px}
.lname{font-size:12px; letter-spacing:.14em; color:#c9d2d4; text-transform:uppercase;
       white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lrow[data-on="1"] .lname{color:var(--cream)}
.lcode{font-size:9.5px; letter-spacing:.14em; color:#7c8a8e}
.pilot{
  width:9px; height:9px; flex:none; border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#1f2a24,#0b100d);
  box-shadow:inset 0 0 3px rgba(0,0,0,.9);
}
.lrow[data-selected='1'] .pilot{background:radial-gradient(circle at 35% 30%,#ccffc8,var(--led) 45%,#0f7a1c);
  box-shadow:0 0 8px rgba(70,224,90,.8)}

.bigbtns{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:13px; flex:none}
.big{
  height:56px; font:inherit; font-size:13px; letter-spacing:.2em; cursor:pointer;
  color:#20282b; text-transform:uppercase;
  background:linear-gradient(#e9ecea,#aab4b6 52%,#8c9799);
  border:1px solid #121719; border-radius:3px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), 0 3px 0 #2b3337, 0 5px 9px rgba(0,0,0,.55);
  transition:transform .06s linear, box-shadow .06s linear, background .1s linear;
}
.big:active:not(:disabled){transform:translateY(2px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5), 0 1px 0 #2b3337, 0 2px 4px rgba(0,0,0,.5)}
.big[aria-pressed="true"]{background:linear-gradient(#ffd98f,var(--amber) 52%,#c08322); color:#2a1c05}
.big:disabled{opacity:.42; cursor:default}


/* ------------------------------------------------------------------ botrow */
.botrow{height:100px; display:grid; grid-template-columns:270px 1fr 390px 190px; gap:12px; flex:none}
.mod{padding:6px 10px 8px}
.tbtns{flex:1; display:grid; grid-template-columns:repeat(3,1fr); gap:9px; align-items:stretch}
.tb{
  font:inherit; cursor:pointer; color:#1d2427; display:grid; place-items:center;
  background:linear-gradient(#e9ecea,#aab4b6 52%,#8c9799);
  border:1px solid #121719; border-radius:3px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), 0 3px 0 #2b3337, 0 5px 9px rgba(0,0,0,.55);
  transition:transform .06s linear, box-shadow .06s linear;
}
.tb:active:not(:disabled){transform:translateY(2px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5), 0 1px 0 #2b3337, 0 2px 4px rgba(0,0,0,.5)}
.tb:disabled{opacity:.42; cursor:default}
.tb svg{width:24px; height:24px; fill:currentColor}

/* frame scrub */
.scrubwrap{flex:1; display:flex; align-items:center; padding:0 6px}
.scrub{position:relative; width:100%; height:26px; cursor:pointer; touch-action:none}
.chan{
  position:absolute; left:0; right:0; top:50%; transform:translateY(-50%); height:13px;
  background:linear-gradient(#0a0e0f,#1a2225); border:1px solid #000; border-radius:7px;
  box-shadow:inset 0 2px 5px rgba(0,0,0,.9);
}
.chanfill{
  position:absolute; left:2px; top:50%; transform:translateY(-50%); height:9px; border-radius:5px;
  background:linear-gradient(#ffd98f,var(--amber) 55%,#b8791a);
  box-shadow:0 0 10px rgba(240,168,50,.45);
}
.tick{position:absolute; top:1px; width:2px; height:5px; background:#9aa7ab; opacity:.85}
.scrubcap{
  position:absolute; top:50%; width:22px; height:30px; margin-left:-11px;
  transform:translateY(-50%); border-radius:3px; pointer-events:none;
  background:linear-gradient(90deg,#8c9799,#eef1ec 42%,#c3cccd 58%,#7d8a8c);
  border:1px solid #131a1c;
  box-shadow:0 2px 6px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.9);
}
.scrubcap::after{content:""; position:absolute; left:50%; top:5px; bottom:5px; width:1px;
  margin-left:-.5px; background:rgba(0,0,0,.4)}

/* counter */
.ctr{
  flex:1; display:flex; align-items:center; gap:14px; padding:0 14px;
  background:linear-gradient(#0b0f10,#05080a); border:1px solid #000; border-radius:2px;
  box-shadow:inset 0 3px 9px rgba(0,0,0,.9);
}
.digits{font-size:34px; font-weight:700; letter-spacing:.07em; color:var(--amber);
        text-shadow:0 0 13px rgba(240,168,50,.6); font-variant-numeric:tabular-nums}
.of{font-size:13px; letter-spacing:.14em; color:#6f7d81}
.tc{margin-left:auto; font-size:13px; letter-spacing:.11em; color:#a98236;
    font-variant-numeric:tabular-nums}

/* screen */
.fswrapbox{flex:1; min-height:0; display:grid; place-items:center}
.fsb{
  height:100%; aspect-ratio:1; font:inherit; cursor:pointer; color:#1d2427;
  display:grid; place-items:center;
  background:linear-gradient(#e9ecea,#aab4b6 52%,#8c9799);
  border:1px solid #121719; border-radius:3px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), 0 3px 0 #2b3337, 0 5px 9px rgba(0,0,0,.55);
}
.fsb:active:not(:disabled){transform:translateY(2px)}
.fsb:disabled{opacity:.42; cursor:default}
.fsb svg{width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:2.1;
         stroke-linecap:round}

button:focus-visible{outline:2px solid #7fd4ff; outline-offset:2px}

/* fullscreen: the video and nothing else */
.fswrap:fullscreen{background:#000; display:grid; place-items:center; inset:0;
  width:100vw; height:100vh; left:0; top:0}
.fswrap:fullscreen .winMain{position:relative; inset:auto;
  width:min(100vw, 177.78vh); height:min(56.25vw, 100vh)}
.fswrap:-webkit-full-screen{background:#000; display:grid; place-items:center}
.fswrap:-webkit-full-screen .winMain{position:relative; inset:auto;
  width:min(100vw, 177.78vh); height:min(56.25vw, 100vh)}

@media (prefers-reduced-motion:reduce){ .spin{display:initial} }
