html, body {
  margin: 0;
  height: 100%;
  /* Obsidian night around the canvas: neutral enough for all three lands */
  background: radial-gradient(ellipse at center, #1a1424 0%, #07060b 75%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", monospace;
  overflow: hidden;
}
#wrap { text-align: center; }
canvas {
  display: block;
  margin: 0 auto;
  max-width: 100vw;
  max-height: 100vh;
  image-rendering: pixelated;
  /* menus are tappable (INPUT_SPEC §2): no scroll, zoom or text pick on the canvas */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: #07060b;
  border-radius: 4px;
  box-shadow: 0 0 0 2px #2a1f14, 0 10px 40px rgba(0, 0, 0, 0.6);
}
/* TOUCH-3 (touch_buttons.js): a D-pad and Q W E R as round pixel buttons in the
   bottom corners on a touch device, fixed to the viewport (safe areas kept) */
#tbtns { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#tbtns .tbtns-safe {
  position: absolute; visibility: hidden; pointer-events: none;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}
#tbtns .tbtn {
  position: absolute; display: none; margin: 0; max-width: none; max-height: none;
  background: transparent; border-radius: 0; box-shadow: none;
  image-rendering: pixelated;
  touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
  opacity: 0.75;
}
#tbtns .tbtn.on { display: block; pointer-events: auto; }
#tbtns .tbtn.held { opacity: 0.95; }
