/* The view and the HUD are small canvases blown up in sharp square blocks (main.js and hud.js
   size them). The console (console.js) slides up from under the screen's bottom edge when the
   controls are hacked: the repair game's screen with a gauge either side, sitting on the bottom
   edge, no panel behind; pixel canvases too, all at one scale, --s, set from the window's size. */
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; }
body { touch-action: none; user-select: none; -webkit-user-select: none; font-family: ui-monospace, Menlo, monospace; }
canvas { display: block; image-rendering: pixelated; }
#view { position: fixed; left: 0; top: 0; }
#hud { position: fixed; left: 0; top: 0; pointer-events: none; }
.fail { position: fixed; inset: 0; margin: auto; height: 1em; color: #ccc; text-align: center; }

.console {
  --s: 2;
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, calc(100% + 30px));
  transition: transform 0.38s cubic-bezier(0.6, 0, 0.8, 0.4);
  pointer-events: none;
}
.console.open { transform: translate(-50%, 0); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.05); }
.console.open .screen { pointer-events: auto; }   /* only the screen takes clicks: the gaps show the view */
.console .bay {
  display: flex; align-items: flex-end; gap: calc(8px * var(--s));
  padding-bottom: calc(6px * var(--s));
}
.console .gauge-wrap {
  padding: calc(4px * var(--s)); background: #15181d;
  box-shadow: inset 0 0 0 calc(1px * var(--s)) #4a505c;
  clip-path: polygon(calc(4px * var(--s)) 0, calc(100% - 4px * var(--s)) 0, 100% calc(4px * var(--s)), 100% calc(100% - 4px * var(--s)), calc(100% - 4px * var(--s)) 100%, calc(4px * var(--s)) 100%, 0 calc(100% - 4px * var(--s)), 0 calc(4px * var(--s)));
}
.console .gauge { width: calc(96px * var(--s)); height: calc(96px * var(--s)); }
/* The screen's bezel: a dark recess with a faint green glow from the screen. */
.console .bezel {
  padding: calc(6px * var(--s)); background: #0b0c0f;
  box-shadow: inset 0 0 0 calc(2px * var(--s)) #1d2027, 0 0 calc(12px * var(--s)) rgba(80, 230, 120, 0.12);
}
.console .screen { display: block; width: calc(320px * var(--s)); height: calc(240px * var(--s)); cursor: pointer; }
