/* JUNK DRAWER'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, and the drawers and what's in them are what they are. */

/* 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; }

/* a pulled drawer comes out over the panel; nothing hangs past its foot */
.panel2d { overflow: visible; isolation: isolate; }
.stage-panel { position: relative; z-index: 2; }

/* the shelf: twelve things to hand, above the panel */
.shelf { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; margin: 0 auto 0.7rem; padding: 4px; background: #12110e; border: 1px solid var(--s-line);
  width: min(100%, calc(80vh * var(--panel-ratio, 101.3 / 128.5)), var(--panel-max, 560px), calc(100cqw * 128.5 / 101.3 * var(--panel-ratio, 101.3 / 128.5))); box-sizing: border-box; }
.shelf button { appearance: none; background: none; border: 0; padding: 3px; margin: 0; min-width: 0; aspect-ratio: 1; overflow: hidden; position: relative; display: grid; place-items: center; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
.shelf button:hover, .shelf button:focus-visible { background: rgba(212, 175, 55, 0.14); outline: none; }
.shelf img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; pointer-events: none; }
.shelf-held { position: fixed; z-index: 50; pointer-events: none; transform: translate(-50%, -50%); filter: drop-shadow(0.3em 0.5em 0.3em rgba(0, 0, 0, 0.6)); }
@media (max-width: 620px) { .shelf { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* the cracks: the light's picture, warm, and a soft glow on the panel round them */
.p2-cell { position: absolute; pointer-events: none; opacity: 0; z-index: 1; background: #ffdba0; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.p2-halo { position: absolute; pointer-events: none; opacity: 0; z-index: 1; background: radial-gradient(closest-side, rgba(255, 204, 140, 0.5), rgba(255, 204, 140, 0)); }
.p2 { z-index: 2; }

/* a drawer: the tray tilted back from its top edge, the front coming down the panel */
.dw { position: absolute; inset: 0; pointer-events: none; }
.dw-tray { position: absolute; overflow: hidden; visibility: hidden; transform-origin: 50% 0; background: #120b07; box-shadow: inset 2px 0 0 #6e4c34, inset -2px 0 0 #5a3c28; pointer-events: auto; will-change: transform; }
.dw-floor { position: absolute; background-size: 100% 100%; box-shadow: inset 0 0.4em 0.9em rgba(0, 0, 0, 0.55); will-change: transform; }
.dw-mark { position: absolute; width: 20%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(60, 42, 30, 0.8); background: radial-gradient(closest-side, rgba(70, 50, 36, 0.8) 30%, rgba(70, 50, 36, 0) 70%); pointer-events: none; }
.dw-glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(to bottom, rgba(255, 196, 120, 0.42), rgba(255, 196, 120, 0.08) 70%); }
.dw-front { position: absolute; transform-origin: 50% 0; cursor: grab; touch-action: none; pointer-events: auto; will-change: transform; box-shadow: 0.35em 0.5em 0.5em rgba(0, 0, 0, 0.62); -webkit-tap-highlight-color: transparent; }
.dw-front.held { cursor: grabbing; }
.dw-front:focus-visible { outline: 2px solid rgba(212, 175, 55, 0.8); outline-offset: 1px; }
.dw-wood { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.dw-paper { position: absolute; background-size: 100% 100%; pointer-events: none; }
.dw-word { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; padding: 0 2%; border: 0; background: none; outline: none; pointer-events: none; text-align: center;
  font: 700 clamp(9px, 2.6cqw, 15px)/1 "Bradley Hand", "Segoe Print", "Bradley Hand ITC", cursive; color: #1a1c2c; }
.dw-word:focus { background: rgba(255, 244, 214, 0.5); }

/* things */
.th { position: absolute; appearance: none; background: none; border: 0; padding: 0; margin: 0; cursor: grab; touch-action: none; pointer-events: auto; -webkit-tap-highlight-color: transparent; filter: drop-shadow(0.1em 0.16em 0.1em rgba(0, 0, 0, 0.55)); }
.th img { display: block; width: 100%; height: 100%; pointer-events: none; }
.th:focus-visible { outline: 2px solid rgba(212, 175, 55, 0.8); outline-offset: 1px; }

/* beside the panel: the hits and the reservoir */
#scope { display: block; width: 100%; height: 190px; }
.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: 7.2em; }
