* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: #fff;
  font-family: ui-monospace, Menlo, Consolas, monospace; }
canvas { display: block; width: 100vw; height: 100vh; }
.hidden { display: none !important; }

.overlay { position: fixed; inset: 0; overflow-y: auto; padding: 24px 16px;
  background: rgba(0,0,0,.72); display: flex; flex-direction: column; align-items: center; gap: 10px; }
h1 { letter-spacing: .15em; margin: 12px 0; }
h3 { margin: 10px 0 4px; }
button { font: inherit; min-width: 240px; padding: 10px 16px; color: #fff; background: #222;
  border: 2px solid #555; border-radius: 6px; cursor: pointer; }
button:hover, button:focus { border-color: #4cf; outline: none; background: #133; }
button.small { min-width: 0; padding: 4px 10px; }
.help { color: #bbb; text-align: center; line-height: 1.6; max-width: 640px; }

/* text with dark outline, like goggle OSD */
#hud, #msg, #padStatus { position: fixed; pointer-events: none; text-shadow: 0 0 3px #000, 0 0 2px #000; }
#hud { left: 16px; bottom: 16px; font-size: 18px; white-space: pre; }
#msg { top: 40%; width: 100%; text-align: center; font-size: 28px; }
#padStatus { top: 10px; right: 16px; font-size: 13px; z-index: 5; }

.sticks { display: flex; gap: 40px; text-align: center; font-size: 13px; }
.stick { width: 120px; height: 120px; border: 2px solid #888; border-radius: 8px; position: relative; margin: 0 auto 6px; }
.stick i { position: absolute; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: #4cf; left: 50%; top: 50%; }
#channels td { padding: 2px 8px; }
.bar { width: 200px; height: 12px; background: #333; position: relative; }
.bar i { position: absolute; top: 0; bottom: 0; left: 50%; background: #4cf; }
#rawAxes, #rawBtns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 700px; font-size: 12px; }
#rawBtns span { width: 34px; padding: 4px 0; text-align: center; border: 1px solid #555; border-radius: 4px; }
#rawBtns span.on { background: #4cf; color: #000; }
