/*
 * VESPID — css/style.css
 * Page shell + letterbox.
 *
 * The canvas element IS the playfield (224x288 playfield units at the scale
 * computed by js/main.js). Everything around it is letterbox: solid black,
 * no decoration. #stage (fixed, full viewport, flex-centred) both provides
 * the black letterbox and centres the playfield at any window size.
 */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000; /* letterbox: solid black */
}

#game {
  display: block;  /* no inline baseline gap */
  background: #000;
}

/*
 * Diagnostic overlay, shown only with ?debug in the URL. js/main.js
 * repositions it to the playfield's top-left on every resize so it never
 * sits over the letterbox.
 */
#debug {
  position: fixed;
  display: none;
  margin: 0;
  padding: 3px 5px;
  font: 11px/1.4 ui-monospace, Consolas, "Courier New", monospace;
  color: #7dd77d;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
  white-space: pre;
  z-index: 10;
}

/*
 * DEV MODE console overlay (js/dev.js). A real DOM element OUTSIDE the
 * canvas: real pixels, readable font. Created only under ?dev=1 and only
 * on first toggle; hidden otherwise (zero per-frame cost). Never touches
 * the letterbox, hud.js or the render path.
 */
#vp-dev-console {
  position: fixed;
  left: 10px;
  bottom: 10px;
  width: 440px;
  max-width: calc(100vw - 20px);
  background: rgba(0, 0, 0, 0.88);
  border: 1px solid #2a4a2a;
  color: #9fe89f;
  font: 12px/1.45 ui-monospace, Consolas, "Courier New", monospace;
  z-index: 30;
}
#vp-dev-console .vp-dev-out {
  margin: 0;
  padding: 6px 8px 0;
  max-height: 34vh;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
#vp-dev-console .vp-dev-input {
  display: block;
  width: calc(100% - 16px);
  margin: 0;
  padding: 5px 8px 7px;
  border: 0;
  border-top: 1px solid #2a4a2a;
  background: transparent;
  color: #c8f5c8;
  font: inherit;
  outline: none;
}
