/* JUGGLE's page: the shared skin and stage are ../module.css (site/public/module.css); this is only what's its own.
   The page is gold like every module's; only the panel's own lights keep their colour (the rungs' white and ONE's and TWO's caps),
   and the TV shows the module's picture as it is. */

/* 20 HP at the line's scale */
.stage { --panel-ratio: 101.3 / 128.5; --panel-max: 560px; --panel-max-narrow: 520px; overflow-x: clip; }
.stage:focus { outline: none; }

/* the rungs: each one's sprite (assets/win-<shape>.png, light as alpha) masks the colour the engine gives it, over the
   face's bare FR4, at the engine's level by opacity */
.panel2d { isolation: isolate; }
.p2-win { position: absolute; pointer-events: none; opacity: 0; z-index: 1; }
.p2-win { -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.p2 { z-index: 2; }

/* the TV the RCA feeds: a plain dark set round the picture. The picture is the framebuffer's 320 x 240 pixels at a
   whole number of screen pixels each (js/stage.js sets its size), never smoothed, nothing drawn over it */
.tv { background: #0a0a09; border: 1px solid var(--s-line); border-radius: 14px; padding: 14px 14px 10px;
  width: fit-content; max-width: 100%; margin: 0 auto; }
.tv-screen { background: #000; border-radius: 4px; overflow: hidden; }
#screen { display: block; width: 320px; height: 240px; image-rendering: pixelated; }
.tv .tv-label { margin-top: 8px; text-align: center; }

/* beside the panel: the last eight seconds */
#scope { display: block; width: 100%; height: 132px; }
.status { min-height: 2.8em; }
.readout { min-height: 2.8em; font: 400 0.74rem/1.4 "Space Mono", ui-monospace, monospace; color: var(--ink); }
#patch-note { min-height: 8.4em; }

/* your own cast: a card to pick (the file input, inside its label), the way back, and the line under them. The TV
   takes a drop; while something's dragged over it, its edge goes gold */
.tv.over { border-color: var(--gold); }
.tv-cast { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.cast-pick, .cast-back {
  position: relative; font: 600 0.74rem/1 "Poppins", system-ui, sans-serif; color: var(--ink);
  background: rgba(12, 11, 9, 0.82); border: 1px solid var(--s-line); border-radius: 0; padding: 0.45rem 0.7rem; cursor: pointer;
}
.cast-pick:hover, .cast-back:hover:not(:disabled) { border-color: var(--gold); color: var(--gold-hi); }
.cast-pick:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.cast-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cast-back:disabled { opacity: 0.45; cursor: default; }
.tv .cast-line { margin-top: 6px; max-width: 320px; margin-left: auto; margin-right: auto; }
