:root {
  --bg: #000;
  --text: #8a8a8a;
  --warn: #d0a040;
  --error: #e06060;
  --ok: #6a9a6a;
}
* { box-sizing: border-box; }
/* Author `display` rules must never resurrect hidden overlays above the test pattern. */
[hidden] { display: none !important; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overscroll-behavior: none;
  touch-action: none;
}
body.no-cursor, body.no-cursor * { cursor: none !important; }

#view {
  position: absolute;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
}
#view.pannable { cursor: grab; }

#message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  white-space: pre-wrap;
  font-size: 14px;
}
#message.error { color: var(--error); }

#hud {
  position: fixed;
  top: 8px;
  left: 8px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.75);
  pointer-events: none;
  max-width: calc(100vw - 16px);
}
#hud-title { color: #b0b0b0; }
#hud-warn { color: var(--warn); }
#hud-warn .error { color: var(--error); }
.ok { color: var(--ok); }
.bad { color: var(--error); }

#help {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(560px, calc(100vw - 32px));
  height: fit-content;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 16px 20px;
  background: #111;
  border: 1px solid #333;
  color: #aaa;
}
#help h1 { font-size: 13px; margin: 0 0 8px; color: #ccc; }
#help h1:not(:first-child) { margin-top: 16px; }
#help td { padding: 2px 16px 2px 0; vertical-align: top; }
#help td:first-child { color: #ccc; white-space: nowrap; }
#help p { margin: 0 0 8px; }
#help code { color: #ccc; }
